{
  "openapi": "3.1.0",
  "info": {
    "title": "API pública da Excursso",
    "version": "v1 (beta)",
    "description": "Dados da agência por HTTP. Autentique com uma chave de API da agência no cabeçalho Authorization."
  },
  "servers": [
    {
      "url": "https://excursso.com/api"
    }
  ],
  "security": [
    {
      "apiKey": []
    }
  ],
  "paths": {
    "/organizations/{organizationId}/context": {
      "get": {
        "operationId": "getContext",
        "tags": [
          "context"
        ],
        "x-access": "members",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "userId": {
                      "type": "string"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "permissions": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "excursion:read",
                          "excursion:create",
                          "excursion:update",
                          "excursion:publish",
                          "departure:read",
                          "departure:create",
                          "departure:publish",
                          "booking:read",
                          "booking:create",
                          "booking:update",
                          "passenger:read",
                          "passenger:update",
                          "payment:read",
                          "payment:create",
                          "payment:refund",
                          "finance:read",
                          "finance:manage",
                          "fleet:read",
                          "fleet:manage",
                          "checkin:read",
                          "checkin:manage",
                          "team:manage",
                          "organization:manage"
                        ]
                      }
                    },
                    "plan": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "enum": [
                            "free",
                            "essential",
                            "professional"
                          ]
                        },
                        "subscribed": {
                          "type": "string",
                          "enum": [
                            "free",
                            "essential",
                            "professional"
                          ]
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "trialing",
                            "active",
                            "past_due",
                            "canceled",
                            "free"
                          ]
                        },
                        "reason": {
                          "type": "string",
                          "enum": [
                            "free",
                            "trial",
                            "trial-expired",
                            "active",
                            "grace",
                            "grace-expired",
                            "canceled-until-period-end",
                            "canceled"
                          ]
                        },
                        "endsAt": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "billingInterval": {
                          "anyOf": [
                            {
                              "type": "string",
                              "enum": [
                                "monthly",
                                "yearly"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "paidThrough": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "subscribed",
                        "status",
                        "reason",
                        "endsAt",
                        "billingInterval",
                        "paidThrough"
                      ],
                      "additionalProperties": false
                    },
                    "capabilities": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string",
                        "enum": [
                          "agency-page",
                          "excursions",
                          "online-bookings",
                          "panel-bookings",
                          "boarding",
                          "fleet",
                          "sales-tools",
                          "assistant",
                          "guide-users",
                          "team-roles",
                          "contract-signature",
                          "cancellation-rules",
                          "sales-agents",
                          "agency-analytics",
                          "minor-travel",
                          "public-api",
                          "webhooks",
                          "billing",
                          "pendencies"
                        ]
                      },
                      "additionalProperties": {
                        "type": "boolean"
                      },
                      "required": [
                        "agency-page",
                        "excursions",
                        "online-bookings",
                        "panel-bookings",
                        "boarding",
                        "fleet",
                        "sales-tools",
                        "assistant",
                        "guide-users",
                        "team-roles",
                        "contract-signature",
                        "cancellation-rules",
                        "sales-agents",
                        "agency-analytics",
                        "minor-travel",
                        "public-api",
                        "webhooks",
                        "billing",
                        "pendencies"
                      ]
                    },
                    "features": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string",
                        "enum": [
                          "catalog",
                          "bookings",
                          "passengers",
                          "payments",
                          "finance",
                          "fleet",
                          "checkin",
                          "team",
                          "website",
                          "organization",
                          "contract-signature",
                          "cancellation-rules",
                          "sales-agents",
                          "agency-analytics",
                          "minor-travel",
                          "public-api",
                          "webhooks",
                          "billing",
                          "pendencies"
                        ]
                      },
                      "additionalProperties": {
                        "type": "boolean"
                      },
                      "required": [
                        "catalog",
                        "bookings",
                        "passengers",
                        "payments",
                        "finance",
                        "fleet",
                        "checkin",
                        "team",
                        "website",
                        "organization",
                        "contract-signature",
                        "cancellation-rules",
                        "sales-agents",
                        "agency-analytics",
                        "minor-travel",
                        "public-api",
                        "webhooks",
                        "billing",
                        "pendencies"
                      ]
                    }
                  },
                  "required": [
                    "userId",
                    "organizationId",
                    "permissions",
                    "plan",
                    "capabilities",
                    "features"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/profile": {
      "get": {
        "operationId": "getProfile",
        "tags": [
          "profile"
        ],
        "x-permission": [
          "organization:manage"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "slug": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "active",
                        "suspended",
                        "prospect"
                      ]
                    },
                    "contactEmail": {
                      "type": "string"
                    },
                    "contactPhone": {
                      "type": "string"
                    },
                    "cadasturNumber": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "about": {
                      "type": "string"
                    },
                    "location": {
                      "type": "string"
                    },
                    "socialLinks": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "label": {
                            "type": "string"
                          },
                          "url": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "label",
                          "url"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "id",
                    "slug",
                    "name",
                    "status",
                    "contactEmail",
                    "contactPhone",
                    "cadasturNumber",
                    "description",
                    "about",
                    "location",
                    "socialLinks"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "patchProfile",
        "tags": [
          "profile"
        ],
        "x-permission": [
          "organization:manage"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 150
                  },
                  "contactEmail": {
                    "anyOf": [
                      {
                        "type": "string",
                        "const": ""
                      },
                      {
                        "type": "string",
                        "format": "email",
                        "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                      }
                    ]
                  },
                  "contactPhone": {
                    "type": "string"
                  },
                  "cadasturNumber": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 2000
                  },
                  "about": {
                    "type": "string",
                    "maxLength": 6000
                  },
                  "location": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "socialLinks": {
                    "maxItems": 8,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "label": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 60
                        },
                        "url": {
                          "type": "string",
                          "format": "uri"
                        }
                      },
                      "required": [
                        "label",
                        "url"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "slug": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "active",
                        "suspended",
                        "prospect"
                      ]
                    },
                    "contactEmail": {
                      "type": "string"
                    },
                    "contactPhone": {
                      "type": "string"
                    },
                    "cadasturNumber": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "about": {
                      "type": "string"
                    },
                    "location": {
                      "type": "string"
                    },
                    "socialLinks": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "label": {
                            "type": "string"
                          },
                          "url": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "label",
                          "url"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "id",
                    "slug",
                    "name",
                    "status",
                    "contactEmail",
                    "contactPhone",
                    "cadasturNumber",
                    "description",
                    "about",
                    "location",
                    "socialLinks"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/dashboard": {
      "get": {
        "operationId": "getDashboard",
        "tags": [
          "dashboard"
        ],
        "x-access": "members",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "trips": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "reservations": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "upcomingDepartures": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "finance": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "receivedCents": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "outstandingCents": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "overdueCents": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            }
                          },
                          "required": [
                            "receivedCents",
                            "outstandingCents",
                            "overdueCents"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "onlineSales": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "publishedDepartures": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "paymentConnected": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "publishedDepartures",
                            "paymentConnected"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "trips",
                    "reservations",
                    "upcomingDepartures",
                    "finance",
                    "onlineSales"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/dashboard/departures": {
      "get": {
        "operationId": "getDashboardDepartures",
        "tags": [
          "dashboard"
        ],
        "x-permission": [
          "excursion:read"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "default": 1,
              "type": "integer",
              "minimum": 1,
              "maximum": 100000
            }
          },
          {
            "name": "size",
            "in": "query",
            "required": false,
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "default": "",
              "type": "string",
              "maxLength": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          },
                          "startsAt": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "draft",
                              "published",
                              "closed",
                              "cancelled"
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "title",
                          "startsAt",
                          "status"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "size": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "pages": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "page",
                        "size",
                        "total",
                        "pages"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "items",
                    "pagination"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/public-profile": {
      "get": {
        "operationId": "getPublicProfile",
        "tags": [
          "public-profile"
        ],
        "x-permission": [
          "organization:manage"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "logoId": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "heroId": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "galleryIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "featuredExcursionIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "logoId",
                    "heroId",
                    "galleryIds",
                    "featuredExcursionIds"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "putPublicProfile",
        "tags": [
          "public-profile"
        ],
        "x-permission": [
          "organization:manage"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "logoId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 100
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "heroId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 100
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "galleryIds": {
                    "maxItems": 24,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 100
                    }
                  },
                  "featuredExcursionIds": {
                    "maxItems": 12,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 100
                    }
                  }
                },
                "required": [
                  "logoId",
                  "heroId",
                  "galleryIds",
                  "featuredExcursionIds"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "logoId": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "heroId": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "galleryIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "featuredExcursionIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "logoId",
                    "heroId",
                    "galleryIds",
                    "featuredExcursionIds"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/public-profile/reviews": {
      "get": {
        "operationId": "getPublicProfileReviews",
        "tags": [
          "public-profile"
        ],
        "x-permission": [
          "organization:manage"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "default": 1,
              "type": "integer",
              "minimum": 1,
              "maximum": 100000
            }
          },
          {
            "name": "size",
            "in": "query",
            "required": false,
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "default": "",
              "type": "string",
              "maxLength": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "organizationId": {
                            "type": "string"
                          },
                          "excursionId": {
                            "type": "string"
                          },
                          "bookingId": {
                            "type": "string"
                          },
                          "passengerId": {
                            "type": "string"
                          },
                          "authorName": {
                            "type": "string"
                          },
                          "rating": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "comment": {
                            "type": "string"
                          },
                          "dimensions": {
                            "type": "object",
                            "propertyNames": {
                              "type": "string",
                              "enum": [
                                "organization",
                                "transport",
                                "lodging",
                                "value",
                                "itinerary"
                              ]
                            },
                            "additionalProperties": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 5
                            }
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "published",
                              "hidden"
                            ]
                          },
                          "moderationReason": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "moderatedBy": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "moderatedAt": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "updatedAt": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "media": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "variant": {
                                  "type": "string",
                                  "enum": [
                                    "original",
                                    "thumb",
                                    "medium",
                                    "share",
                                    "square"
                                  ]
                                },
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "uploading",
                                    "processing",
                                    "ready",
                                    "rejected",
                                    "deleted"
                                  ]
                                },
                                "contentType": {
                                  "type": "string"
                                },
                                "filename": {
                                  "type": "string"
                                },
                                "alt": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "sortOrder": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                "size": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                "width": {
                                  "anyOf": [
                                    {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "height": {
                                  "anyOf": [
                                    {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "duration": {
                                  "type": [
                                    "number",
                                    "null"
                                  ]
                                },
                                "createdAt": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                "updatedAt": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                "previewUrl": {
                                  "type": "string"
                                },
                                "context": {
                                  "type": "string",
                                  "enum": [
                                    "branding",
                                    "agency-gallery",
                                    "excursion-gallery",
                                    "destination-gallery",
                                    "review"
                                  ]
                                },
                                "role": {
                                  "type": "string",
                                  "enum": [
                                    "logo",
                                    "hero",
                                    "gallery",
                                    "poster"
                                  ]
                                }
                              },
                              "required": [
                                "id",
                                "variant",
                                "status",
                                "contentType",
                                "filename",
                                "alt",
                                "sortOrder",
                                "size",
                                "width",
                                "height",
                                "duration",
                                "createdAt",
                                "updatedAt",
                                "context",
                                "role"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "required": [
                          "id",
                          "organizationId",
                          "excursionId",
                          "bookingId",
                          "passengerId",
                          "authorName",
                          "rating",
                          "comment",
                          "dimensions",
                          "status",
                          "moderationReason",
                          "moderatedBy",
                          "moderatedAt",
                          "createdAt",
                          "updatedAt",
                          "media"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "size": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "pages": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "page",
                        "size",
                        "total",
                        "pages"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "items",
                    "pagination"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/public-profile/reviews/{id}": {
      "patch": {
        "operationId": "patchPublicProfileReviewsId",
        "tags": [
          "public-profile"
        ],
        "x-permission": [
          "organization:manage"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "published",
                      "hidden"
                    ]
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 1000
                  }
                },
                "required": [
                  "status",
                  "reason"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "excursionId": {
                      "type": "string"
                    },
                    "bookingId": {
                      "type": "string"
                    },
                    "passengerId": {
                      "type": "string"
                    },
                    "authorName": {
                      "type": "string"
                    },
                    "rating": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "comment": {
                      "type": "string"
                    },
                    "dimensions": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string",
                        "enum": [
                          "organization",
                          "transport",
                          "lodging",
                          "value",
                          "itinerary"
                        ]
                      },
                      "additionalProperties": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 5
                      }
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "published",
                        "hidden"
                      ]
                    },
                    "moderationReason": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "moderatedBy": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "moderatedAt": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "updatedAt": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "organizationId",
                    "excursionId",
                    "bookingId",
                    "passengerId",
                    "authorName",
                    "rating",
                    "comment",
                    "dimensions",
                    "status",
                    "moderationReason",
                    "moderatedBy",
                    "moderatedAt",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/media": {
      "get": {
        "operationId": "getMedia",
        "tags": [
          "media"
        ],
        "x-permission": [
          "excursion:read",
          "organization:manage"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "default": 1,
              "type": "integer",
              "minimum": 1,
              "maximum": 100000
            }
          },
          {
            "name": "size",
            "in": "query",
            "required": false,
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "default": "",
              "type": "string",
              "maxLength": 100
            }
          },
          {
            "name": "context",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "branding",
                "agency-gallery",
                "excursion-gallery",
                "destination-gallery",
                "review"
              ]
            }
          },
          {
            "name": "parentId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "variant": {
                            "type": "string",
                            "enum": [
                              "original",
                              "thumb",
                              "medium",
                              "share",
                              "square"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "uploading",
                              "processing",
                              "ready",
                              "rejected",
                              "deleted"
                            ]
                          },
                          "contentType": {
                            "type": "string"
                          },
                          "filename": {
                            "type": "string"
                          },
                          "alt": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "sortOrder": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "size": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "width": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "height": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "duration": {
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "updatedAt": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "previewUrl": {
                            "type": "string"
                          },
                          "context": {
                            "type": "string",
                            "enum": [
                              "branding",
                              "agency-gallery",
                              "excursion-gallery",
                              "destination-gallery",
                              "review"
                            ]
                          },
                          "role": {
                            "type": "string",
                            "enum": [
                              "logo",
                              "hero",
                              "gallery",
                              "poster"
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "variant",
                          "status",
                          "contentType",
                          "filename",
                          "alt",
                          "sortOrder",
                          "size",
                          "width",
                          "height",
                          "duration",
                          "createdAt",
                          "updatedAt",
                          "context",
                          "role"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "size": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "pages": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "page",
                        "size",
                        "total",
                        "pages"
                      ],
                      "additionalProperties": false
                    },
                    "readyCounts": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string",
                        "enum": [
                          "branding",
                          "agency-gallery",
                          "excursion-gallery",
                          "destination-gallery",
                          "review"
                        ]
                      },
                      "additionalProperties": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      }
                    }
                  },
                  "required": [
                    "items",
                    "pagination",
                    "readyCounts"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/media/uploads": {
      "post": {
        "operationId": "postMediaUploads",
        "tags": [
          "media"
        ],
        "x-permission": [
          "excursion:update",
          "organization:manage"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "context": {
                    "type": "string",
                    "enum": [
                      "branding",
                      "agency-gallery",
                      "excursion-gallery",
                      "destination-gallery",
                      "review"
                    ]
                  },
                  "role": {
                    "type": "string",
                    "enum": [
                      "logo",
                      "hero",
                      "gallery",
                      "poster"
                    ]
                  },
                  "parentId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "filename": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 180
                  },
                  "contentType": {
                    "type": "string",
                    "enum": [
                      "image/jpeg",
                      "image/png",
                      "image/webp",
                      "image/avif",
                      "video/mp4",
                      "video/webm"
                    ]
                  },
                  "size": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 104857600
                  },
                  "alt": {
                    "type": "string",
                    "maxLength": 300
                  },
                  "width": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 20000
                  },
                  "height": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 20000
                  },
                  "duration": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 3600
                  },
                  "variant": {
                    "default": "original",
                    "type": "string",
                    "enum": [
                      "original",
                      "thumb",
                      "medium",
                      "share",
                      "square"
                    ]
                  },
                  "originalId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  }
                },
                "required": [
                  "context",
                  "role",
                  "parentId",
                  "filename",
                  "contentType",
                  "size",
                  "alt"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Criado",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "asset": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "variant": {
                          "type": "string",
                          "enum": [
                            "original",
                            "thumb",
                            "medium",
                            "share",
                            "square"
                          ]
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "uploading",
                            "processing",
                            "ready",
                            "rejected",
                            "deleted"
                          ]
                        },
                        "contentType": {
                          "type": "string"
                        },
                        "filename": {
                          "type": "string"
                        },
                        "alt": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "sortOrder": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "size": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "width": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "height": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "duration": {
                          "type": [
                            "number",
                            "null"
                          ]
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "previewUrl": {
                          "type": "string"
                        },
                        "context": {
                          "type": "string",
                          "enum": [
                            "branding",
                            "agency-gallery",
                            "excursion-gallery",
                            "destination-gallery",
                            "review"
                          ]
                        },
                        "role": {
                          "type": "string",
                          "enum": [
                            "logo",
                            "hero",
                            "gallery",
                            "poster"
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "variant",
                        "status",
                        "contentType",
                        "filename",
                        "alt",
                        "sortOrder",
                        "size",
                        "width",
                        "height",
                        "duration",
                        "createdAt",
                        "updatedAt",
                        "context",
                        "role"
                      ],
                      "additionalProperties": false
                    },
                    "url": {
                      "type": "string"
                    },
                    "headers": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {
                        "type": "string"
                      }
                    },
                    "expiresAt": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "asset",
                    "url",
                    "headers",
                    "expiresAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/media/{id}/complete": {
      "post": {
        "operationId": "postMediaIdComplete",
        "tags": [
          "media"
        ],
        "x-permission": [
          "excursion:update",
          "organization:manage"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "variant": {
                      "type": "string",
                      "enum": [
                        "original",
                        "thumb",
                        "medium",
                        "share",
                        "square"
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "uploading",
                        "processing",
                        "ready",
                        "rejected",
                        "deleted"
                      ]
                    },
                    "contentType": {
                      "type": "string"
                    },
                    "filename": {
                      "type": "string"
                    },
                    "alt": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "sortOrder": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "size": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "width": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "height": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "duration": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "createdAt": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "updatedAt": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "previewUrl": {
                      "type": "string"
                    },
                    "context": {
                      "type": "string",
                      "enum": [
                        "branding",
                        "agency-gallery",
                        "excursion-gallery",
                        "destination-gallery",
                        "review"
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "logo",
                        "hero",
                        "gallery",
                        "poster"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "variant",
                    "status",
                    "contentType",
                    "filename",
                    "alt",
                    "sortOrder",
                    "size",
                    "width",
                    "height",
                    "duration",
                    "createdAt",
                    "updatedAt",
                    "context",
                    "role"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/media/{id}": {
      "patch": {
        "operationId": "patchMediaId",
        "tags": [
          "media"
        ],
        "x-permission": [
          "excursion:update",
          "organization:manage"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "alt": {
                    "type": "string",
                    "maxLength": 300
                  },
                  "sortOrder": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 1000
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "variant": {
                      "type": "string",
                      "enum": [
                        "original",
                        "thumb",
                        "medium",
                        "share",
                        "square"
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "uploading",
                        "processing",
                        "ready",
                        "rejected",
                        "deleted"
                      ]
                    },
                    "contentType": {
                      "type": "string"
                    },
                    "filename": {
                      "type": "string"
                    },
                    "alt": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "sortOrder": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "size": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "width": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "height": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "duration": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "createdAt": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "updatedAt": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "previewUrl": {
                      "type": "string"
                    },
                    "context": {
                      "type": "string",
                      "enum": [
                        "branding",
                        "agency-gallery",
                        "excursion-gallery",
                        "destination-gallery",
                        "review"
                      ]
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "logo",
                        "hero",
                        "gallery",
                        "poster"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "variant",
                    "status",
                    "contentType",
                    "filename",
                    "alt",
                    "sortOrder",
                    "size",
                    "width",
                    "height",
                    "duration",
                    "createdAt",
                    "updatedAt",
                    "context",
                    "role"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteMediaId",
        "tags": [
          "media"
        ],
        "x-permission": [
          "excursion:update",
          "organization:manage"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Sem conteúdo"
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/fleet": {
      "get": {
        "operationId": "getFleet",
        "tags": [
          "fleet"
        ],
        "x-permission": [
          "fleet:read"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "default": 1,
              "type": "integer",
              "minimum": 1,
              "maximum": 100000
            }
          },
          {
            "name": "size",
            "in": "query",
            "required": false,
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "default": "",
              "type": "string",
              "maxLength": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "organizationId": {
                            "type": "string"
                          },
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "seatLayout": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "seats": {
                                    "minItems": 1,
                                    "maxItems": 100,
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "label": {
                                          "type": "string",
                                          "minLength": 1,
                                          "maxLength": 20
                                        },
                                        "row": {
                                          "type": "integer",
                                          "minimum": 1,
                                          "maximum": 100
                                        },
                                        "column": {
                                          "type": "integer",
                                          "minimum": 1,
                                          "maximum": 10
                                        },
                                        "blocked": {
                                          "type": "boolean"
                                        }
                                      },
                                      "required": [
                                        "label",
                                        "row",
                                        "column",
                                        "blocked"
                                      ],
                                      "additionalProperties": false
                                    }
                                  }
                                },
                                "required": [
                                  "seats"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "plate": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "amenities": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "air-conditioning",
                                "restroom",
                                "wifi",
                                "power-outlets",
                                "reclining-seats"
                              ]
                            }
                          }
                        },
                        "required": [
                          "organizationId",
                          "id",
                          "name",
                          "seatLayout",
                          "plate",
                          "amenities"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "size": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "pages": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "page",
                        "size",
                        "total",
                        "pages"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "items",
                    "pagination"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "postFleet",
        "tags": [
          "fleet"
        ],
        "x-permission": [
          "fleet:manage"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 120
                  },
                  "seatLayout": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "seats": {
                            "minItems": 1,
                            "maxItems": 100,
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "label": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 20
                                },
                                "row": {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 100
                                },
                                "column": {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 10
                                },
                                "blocked": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "label",
                                "row",
                                "column",
                                "blocked"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "required": [
                          "seats"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "plate": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "amenities": {
                    "default": [],
                    "maxItems": 5,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "air-conditioning",
                        "restroom",
                        "wifi",
                        "power-outlets",
                        "reclining-seats"
                      ]
                    }
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Criado",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "organizationId": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "seatLayout": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "seats": {
                              "minItems": 1,
                              "maxItems": 100,
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "label": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 20
                                  },
                                  "row": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 100
                                  },
                                  "column": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 10
                                  },
                                  "blocked": {
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "label",
                                  "row",
                                  "column",
                                  "blocked"
                                ],
                                "additionalProperties": false
                              }
                            }
                          },
                          "required": [
                            "seats"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "plate": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "amenities": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "air-conditioning",
                          "restroom",
                          "wifi",
                          "power-outlets",
                          "reclining-seats"
                        ]
                      }
                    }
                  },
                  "required": [
                    "organizationId",
                    "id",
                    "name",
                    "seatLayout",
                    "plate",
                    "amenities"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/fleet/{id}": {
      "patch": {
        "operationId": "patchFleetId",
        "tags": [
          "fleet"
        ],
        "x-permission": [
          "fleet:manage"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 120
                  },
                  "seatLayout": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "seats": {
                            "minItems": 1,
                            "maxItems": 100,
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "label": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 20
                                },
                                "row": {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 100
                                },
                                "column": {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 10
                                },
                                "blocked": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "label",
                                "row",
                                "column",
                                "blocked"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "required": [
                          "seats"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "plate": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "amenities": {
                    "maxItems": 5,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "air-conditioning",
                        "restroom",
                        "wifi",
                        "power-outlets",
                        "reclining-seats"
                      ]
                    }
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "organizationId": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "seatLayout": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "seats": {
                              "minItems": 1,
                              "maxItems": 100,
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "label": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 20
                                  },
                                  "row": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 100
                                  },
                                  "column": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 10
                                  },
                                  "blocked": {
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "label",
                                  "row",
                                  "column",
                                  "blocked"
                                ],
                                "additionalProperties": false
                              }
                            }
                          },
                          "required": [
                            "seats"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "plate": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "amenities": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "air-conditioning",
                          "restroom",
                          "wifi",
                          "power-outlets",
                          "reclining-seats"
                        ]
                      }
                    }
                  },
                  "required": [
                    "organizationId",
                    "id",
                    "name",
                    "seatLayout",
                    "plate",
                    "amenities"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/travelers": {
      "get": {
        "operationId": "getTravelers",
        "tags": [
          "travelers"
        ],
        "x-permission": [
          "passenger:read"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "default": 1,
              "type": "integer",
              "minimum": 1,
              "maximum": 100000
            }
          },
          {
            "name": "size",
            "in": "query",
            "required": false,
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "default": "",
              "type": "string",
              "maxLength": 100
            }
          },
          {
            "name": "externalRef",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 120
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "email": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "phone": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "birthDate": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "documentType": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "cpf",
                                  "rg",
                                  "passport",
                                  "birth-certificate"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "documentHint": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "externalRef": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "emergencyContact": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string"
                                  },
                                  "phone": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "name",
                                  "phone"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "bookings": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "lastTripAt": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "email",
                          "phone",
                          "birthDate",
                          "documentType",
                          "documentHint",
                          "externalRef",
                          "emergencyContact",
                          "bookings",
                          "lastTripAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "size": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "pages": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "page",
                        "size",
                        "total",
                        "pages"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "items",
                    "pagination"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "postTravelers",
        "tags": [
          "travelers"
        ],
        "x-permission": [
          "passenger:update"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 150
                  },
                  "email": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "phone": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "birthDate": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "document": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "cpf",
                              "rg",
                              "passport",
                              "birth-certificate"
                            ]
                          },
                          "number": {
                            "type": "string",
                            "minLength": 5,
                            "maxLength": 40
                          },
                          "issuer": {
                            "type": "string",
                            "maxLength": 20
                          },
                          "issuerState": {
                            "type": "string",
                            "enum": [
                              "AC",
                              "AL",
                              "AM",
                              "AP",
                              "BA",
                              "CE",
                              "DF",
                              "ES",
                              "GO",
                              "MA",
                              "MG",
                              "MS",
                              "MT",
                              "PA",
                              "PB",
                              "PE",
                              "PI",
                              "PR",
                              "RJ",
                              "RN",
                              "RO",
                              "RR",
                              "RS",
                              "SC",
                              "SE",
                              "SP",
                              "TO"
                            ]
                          }
                        },
                        "required": [
                          "type",
                          "number"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "externalRef": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "emergencyContact": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "minLength": 2,
                            "maxLength": 150
                          },
                          "phone": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "required": [
                          "name",
                          "phone"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Criado",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "email": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "phone": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "birthDate": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "documentType": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "cpf",
                            "rg",
                            "passport",
                            "birth-certificate"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "documentHint": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "externalRef": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "emergencyContact": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string"
                            },
                            "phone": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "name",
                            "phone"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "bookings": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "lastTripAt": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "email",
                    "phone",
                    "birthDate",
                    "documentType",
                    "documentHint",
                    "externalRef",
                    "emergencyContact",
                    "bookings",
                    "lastTripAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/travelers/{id}": {
      "get": {
        "operationId": "getTravelersId",
        "tags": [
          "travelers"
        ],
        "x-permission": [
          "passenger:read"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "email": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "phone": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "birthDate": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "documentType": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "cpf",
                            "rg",
                            "passport",
                            "birth-certificate"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "documentHint": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "externalRef": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "emergencyContact": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string"
                            },
                            "phone": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "name",
                            "phone"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "bookings": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "lastTripAt": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "trips": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "bookingId": {
                            "type": "string"
                          },
                          "role": {
                            "type": "string",
                            "enum": [
                              "buyer",
                              "passenger"
                            ]
                          },
                          "title": {
                            "type": "string"
                          },
                          "startsAt": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "confirmed",
                              "cancelled",
                              "expired"
                            ]
                          },
                          "totalCents": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          }
                        },
                        "required": [
                          "bookingId",
                          "role",
                          "title",
                          "startsAt",
                          "status",
                          "totalCents"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "email",
                    "phone",
                    "birthDate",
                    "documentType",
                    "documentHint",
                    "externalRef",
                    "emergencyContact",
                    "bookings",
                    "lastTripAt",
                    "trips"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "patchTravelersId",
        "tags": [
          "travelers"
        ],
        "x-permission": [
          "passenger:update"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 150
                  },
                  "email": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "phone": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "birthDate": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "document": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "cpf",
                              "rg",
                              "passport",
                              "birth-certificate"
                            ]
                          },
                          "number": {
                            "type": "string",
                            "minLength": 5,
                            "maxLength": 40
                          },
                          "issuer": {
                            "type": "string",
                            "maxLength": 20
                          },
                          "issuerState": {
                            "type": "string",
                            "enum": [
                              "AC",
                              "AL",
                              "AM",
                              "AP",
                              "BA",
                              "CE",
                              "DF",
                              "ES",
                              "GO",
                              "MA",
                              "MG",
                              "MS",
                              "MT",
                              "PA",
                              "PB",
                              "PE",
                              "PI",
                              "PR",
                              "RJ",
                              "RN",
                              "RO",
                              "RR",
                              "RS",
                              "SC",
                              "SE",
                              "SP",
                              "TO"
                            ]
                          }
                        },
                        "required": [
                          "type",
                          "number"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "externalRef": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "emergencyContact": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "minLength": 2,
                            "maxLength": 150
                          },
                          "phone": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "required": [
                          "name",
                          "phone"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "email": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "phone": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "birthDate": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "documentType": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "cpf",
                            "rg",
                            "passport",
                            "birth-certificate"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "documentHint": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "externalRef": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "emergencyContact": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string"
                            },
                            "phone": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "name",
                            "phone"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "bookings": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "lastTripAt": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "email",
                    "phone",
                    "birthDate",
                    "documentType",
                    "documentHint",
                    "externalRef",
                    "emergencyContact",
                    "bookings",
                    "lastTripAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/travelers/{id}/document": {
      "get": {
        "operationId": "getTravelersIdDocument",
        "tags": [
          "travelers"
        ],
        "x-permission": [
          "passenger:read"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "document": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "cpf",
                                "rg",
                                "passport",
                                "birth-certificate"
                              ]
                            },
                            "number": {
                              "type": "string",
                              "minLength": 5,
                              "maxLength": 40
                            },
                            "issuer": {
                              "type": "string",
                              "minLength": 2,
                              "maxLength": 20
                            },
                            "issuerState": {
                              "type": "string",
                              "enum": [
                                "AC",
                                "AL",
                                "AM",
                                "AP",
                                "BA",
                                "CE",
                                "DF",
                                "ES",
                                "GO",
                                "MA",
                                "MG",
                                "MS",
                                "MT",
                                "PA",
                                "PB",
                                "PE",
                                "PI",
                                "PR",
                                "RJ",
                                "RN",
                                "RO",
                                "RR",
                                "RS",
                                "SC",
                                "SE",
                                "SP",
                                "TO"
                              ]
                            }
                          },
                          "required": [
                            "type",
                            "number"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "document"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/search": {
      "get": {
        "operationId": "getSearch",
        "tags": [
          "search"
        ],
        "x-permission": [
          "departure:read"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "default": 1,
              "type": "integer",
              "minimum": 1,
              "maximum": 100000
            }
          },
          {
            "name": "size",
            "in": "query",
            "required": false,
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 2,
              "maxLength": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "excursion",
                              "destination",
                              "booking",
                              "traveler",
                              "vehicle"
                            ]
                          },
                          "id": {
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          },
                          "subtitle": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "kind",
                          "id",
                          "title",
                          "subtitle"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "size": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "pages": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "page",
                        "size",
                        "total",
                        "pages"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "items",
                    "pagination"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/operations/departures": {
      "get": {
        "operationId": "getOperationsDepartures",
        "tags": [
          "operations"
        ],
        "x-permission": [
          "departure:read"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "default": 1,
              "type": "integer",
              "minimum": 1,
              "maximum": 100000
            }
          },
          {
            "name": "size",
            "in": "query",
            "required": false,
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "default": "",
              "type": "string",
              "maxLength": 100
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "draft",
                "published",
                "closed",
                "cancelled"
              ]
            }
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "schema": {
              "default": "upcoming",
              "type": "string",
              "enum": [
                "today",
                "upcoming",
                "past",
                "all"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "excursionId": {
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          },
                          "destination": {
                            "type": "string"
                          },
                          "startsAt": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "draft",
                              "published",
                              "closed",
                              "cancelled"
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "excursionId",
                          "title",
                          "destination",
                          "startsAt",
                          "status"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "size": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "pages": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "page",
                        "size",
                        "total",
                        "pages"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "items",
                    "pagination"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/operations/departures/{id}/manifest": {
      "get": {
        "operationId": "getOperationsDeparturesIdManifest",
        "tags": [
          "operations"
        ],
        "x-permission": [
          "checkin:read"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "default": 1,
              "type": "integer",
              "minimum": 1,
              "maximum": 100000
            }
          },
          {
            "name": "size",
            "in": "query",
            "required": false,
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "default": "",
              "type": "string",
              "maxLength": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "bookingId": {
                            "type": "string"
                          },
                          "buyerName": {
                            "type": "string"
                          },
                          "buyerPhone": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "bookingStatus": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "confirmed",
                              "cancelled",
                              "expired"
                            ]
                          },
                          "boardingPointName": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "seatLabel": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "checkedInAt": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "documentType": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "cpf",
                                  "rg",
                                  "passport",
                                  "birth-certificate"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "documentHint": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "lapInfant": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "bookingId",
                          "buyerName",
                          "buyerPhone",
                          "bookingStatus",
                          "boardingPointName",
                          "seatLabel",
                          "checkedInAt",
                          "documentType",
                          "documentHint",
                          "lapInfant"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "size": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "pages": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "page",
                        "size",
                        "total",
                        "pages"
                      ],
                      "additionalProperties": false
                    },
                    "departure": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "title": {
                          "type": "string"
                        },
                        "startsAt": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "title",
                        "startsAt"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "items",
                    "pagination",
                    "departure"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/operations/departures/{id}/passenger-documents": {
      "get": {
        "operationId": "getOperationsDeparturesIdPassengerDocuments",
        "tags": [
          "operations"
        ],
        "x-permission": [
          "passenger:read"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "default": 1,
              "type": "integer",
              "minimum": 1,
              "maximum": 100000
            }
          },
          {
            "name": "size",
            "in": "query",
            "required": false,
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "default": "",
              "type": "string",
              "maxLength": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "passengerId": {
                            "type": "string"
                          },
                          "document": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "passengerId",
                          "document"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "size": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "pages": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "page",
                        "size",
                        "total",
                        "pages"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "items",
                    "pagination"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/operations/departures/{id}/passenger-list": {
      "get": {
        "operationId": "getOperationsDeparturesIdPassengerList",
        "tags": [
          "operations"
        ],
        "x-permission": [
          "passenger:read"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "departure": {
                      "type": "object",
                      "properties": {
                        "title": {
                          "type": "string"
                        },
                        "startsAt": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "title",
                        "startsAt"
                      ],
                      "additionalProperties": false
                    },
                    "entries": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "passengerId": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "document": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "cpf",
                                      "rg",
                                      "passport",
                                      "birth-certificate"
                                    ]
                                  },
                                  "number": {
                                    "type": "string",
                                    "minLength": 5,
                                    "maxLength": 40
                                  },
                                  "issuer": {
                                    "type": "string",
                                    "minLength": 2,
                                    "maxLength": 20
                                  },
                                  "issuerState": {
                                    "type": "string",
                                    "enum": [
                                      "AC",
                                      "AL",
                                      "AM",
                                      "AP",
                                      "BA",
                                      "CE",
                                      "DF",
                                      "ES",
                                      "GO",
                                      "MA",
                                      "MG",
                                      "MS",
                                      "MT",
                                      "PA",
                                      "PB",
                                      "PE",
                                      "PI",
                                      "PR",
                                      "RJ",
                                      "RN",
                                      "RO",
                                      "RR",
                                      "RS",
                                      "SC",
                                      "SE",
                                      "SP",
                                      "TO"
                                    ]
                                  }
                                },
                                "required": [
                                  "type",
                                  "number"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "birthDate": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "lapInfant": {
                            "type": "boolean"
                          },
                          "seatLabel": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "boardingPoint": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "passengerId",
                          "name",
                          "document",
                          "birthDate",
                          "lapInfant",
                          "seatLabel",
                          "boardingPoint"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "frozen": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "version": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 9007199254740991
                            },
                            "frozenAt": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "passengerCount": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "token": {
                              "type": "string",
                              "pattern": "^[0-9a-f-]{36}\\.[0-9a-f]{64}$"
                            },
                            "changes": {
                              "type": "object",
                              "properties": {
                                "added": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "removed": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "substituted": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "corrected": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "counted": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "limit": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "exceeded": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "added",
                                "removed",
                                "substituted",
                                "corrected",
                                "counted",
                                "limit",
                                "exceeded"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "id",
                            "version",
                            "frozenAt",
                            "passengerCount",
                            "token",
                            "changes"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "departure",
                    "entries",
                    "frozen"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "postOperationsDeparturesIdPassengerList",
        "tags": [
          "operations"
        ],
        "x-permission": [
          "passenger:update"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Criado",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "departure": {
                      "type": "object",
                      "properties": {
                        "title": {
                          "type": "string"
                        },
                        "startsAt": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "title",
                        "startsAt"
                      ],
                      "additionalProperties": false
                    },
                    "entries": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "passengerId": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "document": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "cpf",
                                      "rg",
                                      "passport",
                                      "birth-certificate"
                                    ]
                                  },
                                  "number": {
                                    "type": "string",
                                    "minLength": 5,
                                    "maxLength": 40
                                  },
                                  "issuer": {
                                    "type": "string",
                                    "minLength": 2,
                                    "maxLength": 20
                                  },
                                  "issuerState": {
                                    "type": "string",
                                    "enum": [
                                      "AC",
                                      "AL",
                                      "AM",
                                      "AP",
                                      "BA",
                                      "CE",
                                      "DF",
                                      "ES",
                                      "GO",
                                      "MA",
                                      "MG",
                                      "MS",
                                      "MT",
                                      "PA",
                                      "PB",
                                      "PE",
                                      "PI",
                                      "PR",
                                      "RJ",
                                      "RN",
                                      "RO",
                                      "RR",
                                      "RS",
                                      "SC",
                                      "SE",
                                      "SP",
                                      "TO"
                                    ]
                                  }
                                },
                                "required": [
                                  "type",
                                  "number"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "birthDate": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "lapInfant": {
                            "type": "boolean"
                          },
                          "seatLabel": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "boardingPoint": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "passengerId",
                          "name",
                          "document",
                          "birthDate",
                          "lapInfant",
                          "seatLabel",
                          "boardingPoint"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "frozen": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "version": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 9007199254740991
                            },
                            "frozenAt": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "passengerCount": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "token": {
                              "type": "string",
                              "pattern": "^[0-9a-f-]{36}\\.[0-9a-f]{64}$"
                            },
                            "changes": {
                              "type": "object",
                              "properties": {
                                "added": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "removed": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "substituted": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "corrected": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "counted": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "limit": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "exceeded": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "added",
                                "removed",
                                "substituted",
                                "corrected",
                                "counted",
                                "limit",
                                "exceeded"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "id",
                            "version",
                            "frozenAt",
                            "passengerCount",
                            "token",
                            "changes"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "departure",
                    "entries",
                    "frozen"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/operations/departures/{id}/check-ins/{passengerId}": {
      "post": {
        "operationId": "postOperationsDeparturesIdCheckInsPassengerId",
        "tags": [
          "operations"
        ],
        "x-permission": [
          "checkin:manage"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "passengerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "checkedIn": {
                      "type": "boolean",
                      "const": true
                    },
                    "checkedInAt": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "checkedIn",
                    "checkedInAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/finance/departures/{id}/expenses": {
      "get": {
        "operationId": "getFinanceDeparturesIdExpenses",
        "tags": [
          "finance"
        ],
        "x-permission": [
          "finance:read"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "default": 1,
              "type": "integer",
              "minimum": 1,
              "maximum": 100000
            }
          },
          {
            "name": "size",
            "in": "query",
            "required": false,
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "default": "",
              "type": "string",
              "maxLength": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "departureId": {
                            "type": "string"
                          },
                          "category": {
                            "type": "string",
                            "enum": [
                              "transport",
                              "guide",
                              "lodging",
                              "tickets",
                              "food",
                              "other"
                            ]
                          },
                          "description": {
                            "type": "string"
                          },
                          "supplierName": {
                            "type": "string"
                          },
                          "estimatedCents": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "actualCents": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "dueDate": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "paidAt": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "departureId",
                          "category",
                          "description",
                          "supplierName",
                          "estimatedCents",
                          "actualCents",
                          "dueDate",
                          "paidAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "size": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "pages": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "page",
                        "size",
                        "total",
                        "pages"
                      ],
                      "additionalProperties": false
                    },
                    "summary": {
                      "type": "object",
                      "properties": {
                        "estimatedCents": {
                          "type": "number"
                        },
                        "actualCents": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "estimatedCents",
                        "actualCents"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "items",
                    "pagination",
                    "summary"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "postFinanceDeparturesIdExpenses",
        "tags": [
          "finance"
        ],
        "x-permission": [
          "finance:manage"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "category": {
                    "type": "string",
                    "enum": [
                      "transport",
                      "guide",
                      "lodging",
                      "tickets",
                      "food",
                      "other"
                    ]
                  },
                  "description": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 250
                  },
                  "supplierName": {
                    "default": "",
                    "type": "string",
                    "maxLength": 150
                  },
                  "estimatedCents": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100000000
                  },
                  "actualCents": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 100000000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "dueDate": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "paidAt": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "category",
                  "description",
                  "estimatedCents"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Criado",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "departureId": {
                      "type": "string"
                    },
                    "category": {
                      "type": "string",
                      "enum": [
                        "transport",
                        "guide",
                        "lodging",
                        "tickets",
                        "food",
                        "other"
                      ]
                    },
                    "description": {
                      "type": "string"
                    },
                    "supplierName": {
                      "type": "string"
                    },
                    "estimatedCents": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "actualCents": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "dueDate": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "paidAt": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "departureId",
                    "category",
                    "description",
                    "supplierName",
                    "estimatedCents",
                    "actualCents",
                    "dueDate",
                    "paidAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/finance/departures/{id}/expenses/{expenseId}": {
      "patch": {
        "operationId": "patchFinanceDeparturesIdExpensesExpenseId",
        "tags": [
          "finance"
        ],
        "x-permission": [
          "finance:manage"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "expenseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "category": {
                    "type": "string",
                    "enum": [
                      "transport",
                      "guide",
                      "lodging",
                      "tickets",
                      "food",
                      "other"
                    ]
                  },
                  "description": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 250
                  },
                  "supplierName": {
                    "type": "string",
                    "maxLength": 150
                  },
                  "estimatedCents": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100000000
                  },
                  "actualCents": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 100000000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "dueDate": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "paidAt": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "departureId": {
                      "type": "string"
                    },
                    "category": {
                      "type": "string",
                      "enum": [
                        "transport",
                        "guide",
                        "lodging",
                        "tickets",
                        "food",
                        "other"
                      ]
                    },
                    "description": {
                      "type": "string"
                    },
                    "supplierName": {
                      "type": "string"
                    },
                    "estimatedCents": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "actualCents": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "dueDate": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "paidAt": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "departureId",
                    "category",
                    "description",
                    "supplierName",
                    "estimatedCents",
                    "actualCents",
                    "dueDate",
                    "paidAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteFinanceDeparturesIdExpensesExpenseId",
        "tags": [
          "finance"
        ],
        "x-permission": [
          "finance:manage"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "expenseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Sem conteúdo"
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/finance/receivables": {
      "get": {
        "operationId": "getFinanceReceivables",
        "tags": [
          "finance"
        ],
        "x-permission": [
          "finance:read"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "default": 1,
              "type": "integer",
              "minimum": 1,
              "maximum": 100000
            }
          },
          {
            "name": "size",
            "in": "query",
            "required": false,
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "default": "",
              "type": "string",
              "maxLength": 100
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "open",
                "paid",
                "overdue"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "bookingId": {
                            "type": "string"
                          },
                          "buyerName": {
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          },
                          "dueDate": {
                            "type": "string"
                          },
                          "amountCents": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "paidCents": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          }
                        },
                        "required": [
                          "id",
                          "bookingId",
                          "buyerName",
                          "title",
                          "dueDate",
                          "amountCents",
                          "paidCents"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "size": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "pages": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "page",
                        "size",
                        "total",
                        "pages"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "items",
                    "pagination"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/finance/departures/{id}": {
      "get": {
        "operationId": "getFinanceDeparturesId",
        "tags": [
          "finance"
        ],
        "x-permission": [
          "finance:read"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "default": 1,
              "type": "integer",
              "minimum": 1,
              "maximum": 100000
            }
          },
          {
            "name": "size",
            "in": "query",
            "required": false,
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "default": "",
              "type": "string",
              "maxLength": 100
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "open",
                "partial",
                "paid",
                "overdue"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "buyerName": {
                            "type": "string"
                          },
                          "buyerPhone": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "bookingStatus": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "confirmed",
                              "cancelled",
                              "expired"
                            ]
                          },
                          "totalCents": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "paidCents": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "balanceCents": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "overdueCents": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "nextDueDate": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "financialStatus": {
                            "type": "string",
                            "enum": [
                              "open",
                              "partial",
                              "paid",
                              "overdue"
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "buyerName",
                          "buyerPhone",
                          "bookingStatus",
                          "totalCents",
                          "paidCents",
                          "balanceCents",
                          "overdueCents",
                          "nextDueDate",
                          "financialStatus"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "size": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "pages": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "page",
                        "size",
                        "total",
                        "pages"
                      ],
                      "additionalProperties": false
                    },
                    "summary": {
                      "type": "object",
                      "properties": {
                        "bookings": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "totalCents": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "paidCents": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "balanceCents": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "overdueCents": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "bookings",
                        "totalCents",
                        "paidCents",
                        "balanceCents",
                        "overdueCents"
                      ],
                      "additionalProperties": false
                    },
                    "breakEven": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "passengers": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "state": {
                              "type": "string",
                              "const": "no-costs"
                            }
                          },
                          "required": [
                            "passengers",
                            "state"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "passengers": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "state": {
                              "type": "string",
                              "const": "even"
                            },
                            "costCents": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "revenueCents": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "profitCents": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            }
                          },
                          "required": [
                            "passengers",
                            "state",
                            "costCents",
                            "revenueCents",
                            "profitCents"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "passengers": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "state": {
                              "type": "string",
                              "const": "short"
                            },
                            "costCents": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "revenueCents": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "shortfallCents": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "passengersNeeded": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "exclusiveMinimum": 0,
                                  "maximum": 9007199254740991
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "seatsLeft": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "reachable": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "passengers",
                            "state",
                            "costCents",
                            "revenueCents",
                            "shortfallCents",
                            "passengersNeeded",
                            "seatsLeft",
                            "reachable"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    }
                  },
                  "required": [
                    "items",
                    "pagination",
                    "summary",
                    "breakEven"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/bookings/{id}/access": {
      "post": {
        "operationId": "postBookingsIdAccess",
        "tags": [
          "bookings"
        ],
        "x-permission": [
          "booking:read"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "token": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "token"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/bookings/{id}/revoke-access": {
      "post": {
        "operationId": "postBookingsIdRevokeAccess",
        "tags": [
          "bookings"
        ],
        "x-permission": [
          "booking:update"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Sem conteúdo"
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/bookings/{id}/voucher": {
      "post": {
        "operationId": "postBookingsIdVoucher",
        "tags": [
          "bookings"
        ],
        "x-permission": [
          "booking:read"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "token": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "token"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/bookings": {
      "get": {
        "operationId": "getBookings",
        "tags": [
          "bookings"
        ],
        "x-permission": [
          "booking:read"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "default": 1,
              "type": "integer",
              "minimum": 1,
              "maximum": 100000
            }
          },
          {
            "name": "size",
            "in": "query",
            "required": false,
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "default": "",
              "type": "string",
              "maxLength": 100
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "pending",
                "confirmed",
                "cancelled",
                "expired"
              ]
            }
          },
          {
            "name": "externalRef",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 120
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "confirmed",
                              "cancelled",
                              "expired"
                            ]
                          },
                          "externalRef": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "buyerName": {
                            "type": "string"
                          },
                          "departureId": {
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          },
                          "startsAt": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "status",
                          "externalRef",
                          "buyerName",
                          "departureId",
                          "title",
                          "startsAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "size": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "pages": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "page",
                        "size",
                        "total",
                        "pages"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "items",
                    "pagination"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "postBookings",
        "tags": [
          "bookings"
        ],
        "x-permission": [
          "booking:create"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "idempotencyKey": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "departureId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "inventoryPoolId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "fareOptionId": {
                    "type": "string"
                  },
                  "extraChargeIds": {
                    "default": [],
                    "maxItems": 30,
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "buyer": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "minLength": 2,
                        "maxLength": 150
                      },
                      "email": {
                        "type": "string",
                        "format": "email",
                        "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                      },
                      "phone": {
                        "type": "string"
                      },
                      "cpf": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "name",
                      "cpf"
                    ],
                    "additionalProperties": false
                  },
                  "passengers": {
                    "minItems": 1,
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "minLength": 2,
                          "maxLength": 150
                        },
                        "boardingPointId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        "seatLabel": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 20
                        },
                        "lapInfant": {
                          "type": "boolean"
                        },
                        "document": {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "cpf",
                                "rg",
                                "passport",
                                "birth-certificate"
                              ]
                            },
                            "number": {
                              "type": "string",
                              "minLength": 5,
                              "maxLength": 40
                            },
                            "issuer": {
                              "type": "string",
                              "maxLength": 20
                            },
                            "issuerState": {
                              "type": "string",
                              "enum": [
                                "AC",
                                "AL",
                                "AM",
                                "AP",
                                "BA",
                                "CE",
                                "DF",
                                "ES",
                                "GO",
                                "MA",
                                "MG",
                                "MS",
                                "MT",
                                "PA",
                                "PB",
                                "PE",
                                "PI",
                                "PR",
                                "RJ",
                                "RN",
                                "RO",
                                "RR",
                                "RS",
                                "SC",
                                "SE",
                                "SP",
                                "TO"
                              ]
                            }
                          },
                          "required": [
                            "type",
                            "number"
                          ],
                          "additionalProperties": false
                        },
                        "birthDate": {
                          "type": "string",
                          "format": "date",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                        },
                        "travelerId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 100
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "installments": {
                    "minItems": 1,
                    "maxItems": 36,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "dueDate": {
                          "type": "string",
                          "format": "date",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                        },
                        "amountCents": {
                          "type": "integer",
                          "exclusiveMinimum": 0,
                          "maximum": 100000000
                        }
                      },
                      "required": [
                        "dueDate",
                        "amountCents"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "couponCode": {
                    "type": "string",
                    "pattern": "^[A-Z0-9][A-Z0-9_-]{2,29}$"
                  },
                  "externalRef": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  }
                },
                "required": [
                  "idempotencyKey",
                  "departureId",
                  "inventoryPoolId",
                  "buyer",
                  "passengers",
                  "installments"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Criado",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "confirmed",
                        "cancelled",
                        "expired"
                      ]
                    },
                    "externalRef": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "buyerName": {
                      "type": "string"
                    },
                    "departureId": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "startsAt": {
                      "type": "string"
                    },
                    "buyerEmail": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "buyerPhone": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "buyerDocumentHint": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "destination": {
                      "type": "string"
                    },
                    "offerSnapshot": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "title": {
                              "type": "string"
                            },
                            "destination": {
                              "type": "string"
                            },
                            "description": {
                              "type": "string"
                            },
                            "itinerary": {
                              "type": "string"
                            },
                            "durationLabel": {
                              "type": "string"
                            },
                            "includedSuppliers": {
                              "type": "string"
                            },
                            "included": {
                              "type": "string"
                            },
                            "excluded": {
                              "type": "string"
                            },
                            "restrictions": {
                              "type": "string"
                            },
                            "cancellationPolicy": {
                              "type": "string"
                            },
                            "meetingInstructions": {
                              "type": "string"
                            },
                            "startsAt": {
                              "type": "string"
                            },
                            "fare": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": "string"
                                    },
                                    "partySize": {
                                      "type": "number"
                                    },
                                    "priceCents": {
                                      "type": "number"
                                    }
                                  },
                                  "required": [
                                    "name",
                                    "partySize",
                                    "priceCents"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "charges": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string"
                                  },
                                  "basis": {
                                    "type": "string",
                                    "enum": [
                                      "booking",
                                      "passenger"
                                    ]
                                  },
                                  "priceCents": {
                                    "type": "number"
                                  }
                                },
                                "required": [
                                  "name",
                                  "basis",
                                  "priceCents"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "lapInfants": {
                              "type": "object",
                              "properties": {
                                "count": {
                                  "type": "number"
                                },
                                "priceCents": {
                                  "type": "number"
                                }
                              },
                              "required": [
                                "count",
                                "priceCents"
                              ],
                              "additionalProperties": false
                            },
                            "coupon": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string"
                                },
                                "discountCents": {
                                  "type": "number"
                                }
                              },
                              "required": [
                                "code",
                                "discountCents"
                              ],
                              "additionalProperties": false
                            },
                            "contract": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "title",
                            "destination",
                            "startsAt",
                            "fare",
                            "charges",
                            "lapInfants"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "status",
                    "externalRef",
                    "buyerName",
                    "departureId",
                    "title",
                    "startsAt",
                    "buyerEmail",
                    "buyerPhone",
                    "buyerDocumentHint",
                    "destination",
                    "offerSnapshot"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/bookings/{id}": {
      "get": {
        "operationId": "getBookingsId",
        "tags": [
          "bookings"
        ],
        "x-permission": [
          "booking:read"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "confirmed",
                        "cancelled",
                        "expired"
                      ]
                    },
                    "externalRef": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "buyerName": {
                      "type": "string"
                    },
                    "departureId": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "startsAt": {
                      "type": "string"
                    },
                    "buyerEmail": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "buyerPhone": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "buyerDocumentHint": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "destination": {
                      "type": "string"
                    },
                    "offerSnapshot": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "title": {
                              "type": "string"
                            },
                            "destination": {
                              "type": "string"
                            },
                            "description": {
                              "type": "string"
                            },
                            "itinerary": {
                              "type": "string"
                            },
                            "durationLabel": {
                              "type": "string"
                            },
                            "includedSuppliers": {
                              "type": "string"
                            },
                            "included": {
                              "type": "string"
                            },
                            "excluded": {
                              "type": "string"
                            },
                            "restrictions": {
                              "type": "string"
                            },
                            "cancellationPolicy": {
                              "type": "string"
                            },
                            "meetingInstructions": {
                              "type": "string"
                            },
                            "startsAt": {
                              "type": "string"
                            },
                            "fare": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": "string"
                                    },
                                    "partySize": {
                                      "type": "number"
                                    },
                                    "priceCents": {
                                      "type": "number"
                                    }
                                  },
                                  "required": [
                                    "name",
                                    "partySize",
                                    "priceCents"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "charges": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string"
                                  },
                                  "basis": {
                                    "type": "string",
                                    "enum": [
                                      "booking",
                                      "passenger"
                                    ]
                                  },
                                  "priceCents": {
                                    "type": "number"
                                  }
                                },
                                "required": [
                                  "name",
                                  "basis",
                                  "priceCents"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "lapInfants": {
                              "type": "object",
                              "properties": {
                                "count": {
                                  "type": "number"
                                },
                                "priceCents": {
                                  "type": "number"
                                }
                              },
                              "required": [
                                "count",
                                "priceCents"
                              ],
                              "additionalProperties": false
                            },
                            "coupon": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string"
                                },
                                "discountCents": {
                                  "type": "number"
                                }
                              },
                              "required": [
                                "code",
                                "discountCents"
                              ],
                              "additionalProperties": false
                            },
                            "contract": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "title",
                            "destination",
                            "startsAt",
                            "fare",
                            "charges",
                            "lapInfants"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "status",
                    "externalRef",
                    "buyerName",
                    "departureId",
                    "title",
                    "startsAt",
                    "buyerEmail",
                    "buyerPhone",
                    "buyerDocumentHint",
                    "destination",
                    "offerSnapshot"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "patchBookingsId",
        "tags": [
          "bookings"
        ],
        "x-permission": [
          "booking:update"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "externalRef": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "confirmed",
                        "cancelled",
                        "expired"
                      ]
                    },
                    "externalRef": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "buyerName": {
                      "type": "string"
                    },
                    "departureId": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "startsAt": {
                      "type": "string"
                    },
                    "buyerEmail": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "buyerPhone": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "buyerDocumentHint": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "destination": {
                      "type": "string"
                    },
                    "offerSnapshot": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "title": {
                              "type": "string"
                            },
                            "destination": {
                              "type": "string"
                            },
                            "description": {
                              "type": "string"
                            },
                            "itinerary": {
                              "type": "string"
                            },
                            "durationLabel": {
                              "type": "string"
                            },
                            "includedSuppliers": {
                              "type": "string"
                            },
                            "included": {
                              "type": "string"
                            },
                            "excluded": {
                              "type": "string"
                            },
                            "restrictions": {
                              "type": "string"
                            },
                            "cancellationPolicy": {
                              "type": "string"
                            },
                            "meetingInstructions": {
                              "type": "string"
                            },
                            "startsAt": {
                              "type": "string"
                            },
                            "fare": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": "string"
                                    },
                                    "partySize": {
                                      "type": "number"
                                    },
                                    "priceCents": {
                                      "type": "number"
                                    }
                                  },
                                  "required": [
                                    "name",
                                    "partySize",
                                    "priceCents"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "charges": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string"
                                  },
                                  "basis": {
                                    "type": "string",
                                    "enum": [
                                      "booking",
                                      "passenger"
                                    ]
                                  },
                                  "priceCents": {
                                    "type": "number"
                                  }
                                },
                                "required": [
                                  "name",
                                  "basis",
                                  "priceCents"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "lapInfants": {
                              "type": "object",
                              "properties": {
                                "count": {
                                  "type": "number"
                                },
                                "priceCents": {
                                  "type": "number"
                                }
                              },
                              "required": [
                                "count",
                                "priceCents"
                              ],
                              "additionalProperties": false
                            },
                            "coupon": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string"
                                },
                                "discountCents": {
                                  "type": "number"
                                }
                              },
                              "required": [
                                "code",
                                "discountCents"
                              ],
                              "additionalProperties": false
                            },
                            "contract": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "title",
                            "destination",
                            "startsAt",
                            "fare",
                            "charges",
                            "lapInfants"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "status",
                    "externalRef",
                    "buyerName",
                    "departureId",
                    "title",
                    "startsAt",
                    "buyerEmail",
                    "buyerPhone",
                    "buyerDocumentHint",
                    "destination",
                    "offerSnapshot"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/bookings/{id}/passengers": {
      "get": {
        "operationId": "getBookingsIdPassengers",
        "tags": [
          "bookings"
        ],
        "x-permission": [
          "passenger:read"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "default": 1,
              "type": "integer",
              "minimum": 1,
              "maximum": 100000
            }
          },
          {
            "name": "size",
            "in": "query",
            "required": false,
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "default": "",
              "type": "string",
              "maxLength": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "boardingPointId": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "boardingPointName": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "seatLabel": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "documentType": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "cpf",
                                  "rg",
                                  "passport",
                                  "birth-certificate"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "documentHint": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "birthDate": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "lapInfant": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "boardingPointId",
                          "boardingPointName",
                          "seatLabel",
                          "documentType",
                          "documentHint",
                          "birthDate",
                          "lapInfant"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "size": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "pages": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "page",
                        "size",
                        "total",
                        "pages"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "items",
                    "pagination"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/bookings/{id}/passenger-options": {
      "get": {
        "operationId": "getBookingsIdPassengerOptions",
        "tags": [
          "bookings"
        ],
        "x-permission": [
          "passenger:read"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "seatSelectionEnabled": {
                      "type": "boolean"
                    },
                    "seatLayout": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "seats": {
                              "minItems": 1,
                              "maxItems": 100,
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "label": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 20
                                  },
                                  "row": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 100
                                  },
                                  "column": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 10
                                  },
                                  "blocked": {
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "label",
                                  "row",
                                  "column",
                                  "blocked"
                                ],
                                "additionalProperties": false
                              }
                            }
                          },
                          "required": [
                            "seats"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "boardingPoints": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "departureId": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "address": {
                            "type": "string"
                          },
                          "boardingAt": {
                            "type": "string"
                          },
                          "returnAt": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "reference": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "departureId",
                          "name",
                          "address",
                          "boardingAt",
                          "returnAt",
                          "reference"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "occupied": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "label": {
                            "type": "string"
                          },
                          "passengerId": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "label",
                          "passengerId"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "id",
                    "seatSelectionEnabled",
                    "seatLayout",
                    "boardingPoints",
                    "occupied"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/bookings/{id}/passengers/{passengerId}": {
      "patch": {
        "operationId": "patchBookingsIdPassengersPassengerId",
        "tags": [
          "bookings"
        ],
        "x-permission": [
          "passenger:update"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "passengerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 150
                  },
                  "boardingPointId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 200
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "seatLabel": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 20
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "document": {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "enum": [
                          "cpf",
                          "rg",
                          "passport",
                          "birth-certificate"
                        ]
                      },
                      "number": {
                        "type": "string",
                        "minLength": 5,
                        "maxLength": 40
                      },
                      "issuer": {
                        "type": "string",
                        "maxLength": 20
                      },
                      "issuerState": {
                        "type": "string",
                        "enum": [
                          "AC",
                          "AL",
                          "AM",
                          "AP",
                          "BA",
                          "CE",
                          "DF",
                          "ES",
                          "GO",
                          "MA",
                          "MG",
                          "MS",
                          "MT",
                          "PA",
                          "PB",
                          "PE",
                          "PI",
                          "PR",
                          "RJ",
                          "RN",
                          "RO",
                          "RR",
                          "RS",
                          "SC",
                          "SE",
                          "SP",
                          "TO"
                        ]
                      }
                    },
                    "required": [
                      "type",
                      "number"
                    ],
                    "additionalProperties": false
                  },
                  "birthDate": {
                    "type": "string",
                    "format": "date",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "boardingPointId": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "boardingPointName": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "seatLabel": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "documentType": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "cpf",
                            "rg",
                            "passport",
                            "birth-certificate"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "documentHint": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "birthDate": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "lapInfant": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "boardingPointId",
                    "boardingPointName",
                    "seatLabel",
                    "documentType",
                    "documentHint",
                    "birthDate",
                    "lapInfant"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/bookings/{id}/cancel": {
      "post": {
        "operationId": "postBookingsIdCancel",
        "tags": [
          "bookings"
        ],
        "x-permission": [
          "booking:update"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "confirmed",
                        "cancelled",
                        "expired"
                      ]
                    },
                    "externalRef": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "buyerName": {
                      "type": "string"
                    },
                    "departureId": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "startsAt": {
                      "type": "string"
                    },
                    "buyerEmail": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "buyerPhone": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "buyerDocumentHint": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "destination": {
                      "type": "string"
                    },
                    "offerSnapshot": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "title": {
                              "type": "string"
                            },
                            "destination": {
                              "type": "string"
                            },
                            "description": {
                              "type": "string"
                            },
                            "itinerary": {
                              "type": "string"
                            },
                            "durationLabel": {
                              "type": "string"
                            },
                            "includedSuppliers": {
                              "type": "string"
                            },
                            "included": {
                              "type": "string"
                            },
                            "excluded": {
                              "type": "string"
                            },
                            "restrictions": {
                              "type": "string"
                            },
                            "cancellationPolicy": {
                              "type": "string"
                            },
                            "meetingInstructions": {
                              "type": "string"
                            },
                            "startsAt": {
                              "type": "string"
                            },
                            "fare": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": "string"
                                    },
                                    "partySize": {
                                      "type": "number"
                                    },
                                    "priceCents": {
                                      "type": "number"
                                    }
                                  },
                                  "required": [
                                    "name",
                                    "partySize",
                                    "priceCents"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "charges": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string"
                                  },
                                  "basis": {
                                    "type": "string",
                                    "enum": [
                                      "booking",
                                      "passenger"
                                    ]
                                  },
                                  "priceCents": {
                                    "type": "number"
                                  }
                                },
                                "required": [
                                  "name",
                                  "basis",
                                  "priceCents"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "lapInfants": {
                              "type": "object",
                              "properties": {
                                "count": {
                                  "type": "number"
                                },
                                "priceCents": {
                                  "type": "number"
                                }
                              },
                              "required": [
                                "count",
                                "priceCents"
                              ],
                              "additionalProperties": false
                            },
                            "coupon": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string"
                                },
                                "discountCents": {
                                  "type": "number"
                                }
                              },
                              "required": [
                                "code",
                                "discountCents"
                              ],
                              "additionalProperties": false
                            },
                            "contract": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "title",
                            "destination",
                            "startsAt",
                            "fare",
                            "charges",
                            "lapInfants"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "status",
                    "externalRef",
                    "buyerName",
                    "departureId",
                    "title",
                    "startsAt",
                    "buyerEmail",
                    "buyerPhone",
                    "buyerDocumentHint",
                    "destination",
                    "offerSnapshot"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/bookings/{id}/cancel-paid": {
      "post": {
        "operationId": "postBookingsIdCancelPaid",
        "tags": [
          "bookings"
        ],
        "x-permission": [
          "booking:update"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string",
                    "minLength": 5,
                    "maxLength": 1000
                  },
                  "refundDueCents": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100000000
                  }
                },
                "required": [
                  "reason",
                  "refundDueCents"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "confirmed",
                        "cancelled",
                        "expired"
                      ]
                    },
                    "externalRef": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "buyerName": {
                      "type": "string"
                    },
                    "departureId": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "startsAt": {
                      "type": "string"
                    },
                    "buyerEmail": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "buyerPhone": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "buyerDocumentHint": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "destination": {
                      "type": "string"
                    },
                    "offerSnapshot": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "title": {
                              "type": "string"
                            },
                            "destination": {
                              "type": "string"
                            },
                            "description": {
                              "type": "string"
                            },
                            "itinerary": {
                              "type": "string"
                            },
                            "durationLabel": {
                              "type": "string"
                            },
                            "includedSuppliers": {
                              "type": "string"
                            },
                            "included": {
                              "type": "string"
                            },
                            "excluded": {
                              "type": "string"
                            },
                            "restrictions": {
                              "type": "string"
                            },
                            "cancellationPolicy": {
                              "type": "string"
                            },
                            "meetingInstructions": {
                              "type": "string"
                            },
                            "startsAt": {
                              "type": "string"
                            },
                            "fare": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": "string"
                                    },
                                    "partySize": {
                                      "type": "number"
                                    },
                                    "priceCents": {
                                      "type": "number"
                                    }
                                  },
                                  "required": [
                                    "name",
                                    "partySize",
                                    "priceCents"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "charges": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string"
                                  },
                                  "basis": {
                                    "type": "string",
                                    "enum": [
                                      "booking",
                                      "passenger"
                                    ]
                                  },
                                  "priceCents": {
                                    "type": "number"
                                  }
                                },
                                "required": [
                                  "name",
                                  "basis",
                                  "priceCents"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "lapInfants": {
                              "type": "object",
                              "properties": {
                                "count": {
                                  "type": "number"
                                },
                                "priceCents": {
                                  "type": "number"
                                }
                              },
                              "required": [
                                "count",
                                "priceCents"
                              ],
                              "additionalProperties": false
                            },
                            "coupon": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string"
                                },
                                "discountCents": {
                                  "type": "number"
                                }
                              },
                              "required": [
                                "code",
                                "discountCents"
                              ],
                              "additionalProperties": false
                            },
                            "contract": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "title",
                            "destination",
                            "startsAt",
                            "fare",
                            "charges",
                            "lapInfants"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "status",
                    "externalRef",
                    "buyerName",
                    "departureId",
                    "title",
                    "startsAt",
                    "buyerEmail",
                    "buyerPhone",
                    "buyerDocumentHint",
                    "destination",
                    "offerSnapshot"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/bookings/{id}/refunds": {
      "post": {
        "operationId": "postBookingsIdRefunds",
        "tags": [
          "bookings"
        ],
        "x-permission": [
          "payment:refund"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "amountCents": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 100000000
                  },
                  "method": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 80
                  },
                  "reference": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 120
                  }
                },
                "required": [
                  "amountCents",
                  "method",
                  "reference"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Criado",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "amountCents": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "method": {
                      "type": "string"
                    },
                    "reference": {
                      "type": "string"
                    },
                    "refundedAt": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "amountCents",
                    "method",
                    "reference",
                    "refundedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/bookings/{id}/finance": {
      "get": {
        "operationId": "getBookingsIdFinance",
        "tags": [
          "bookings"
        ],
        "x-permission": [
          "payment:read"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "confirmed",
                        "cancelled",
                        "expired"
                      ]
                    },
                    "holdExpiresAt": {
                      "type": "number"
                    },
                    "checkoutStarted": {
                      "type": "boolean"
                    },
                    "checkoutUrl": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "totalCents": {
                      "type": "number"
                    },
                    "discountCents": {
                      "type": "number"
                    },
                    "offerSnapshot": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "title": {
                              "type": "string"
                            },
                            "destination": {
                              "type": "string"
                            },
                            "description": {
                              "type": "string"
                            },
                            "itinerary": {
                              "type": "string"
                            },
                            "durationLabel": {
                              "type": "string"
                            },
                            "includedSuppliers": {
                              "type": "string"
                            },
                            "included": {
                              "type": "string"
                            },
                            "excluded": {
                              "type": "string"
                            },
                            "restrictions": {
                              "type": "string"
                            },
                            "cancellationPolicy": {
                              "type": "string"
                            },
                            "meetingInstructions": {
                              "type": "string"
                            },
                            "startsAt": {
                              "type": "string"
                            },
                            "fare": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": "string"
                                    },
                                    "partySize": {
                                      "type": "number"
                                    },
                                    "priceCents": {
                                      "type": "number"
                                    }
                                  },
                                  "required": [
                                    "name",
                                    "partySize",
                                    "priceCents"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "charges": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string"
                                  },
                                  "basis": {
                                    "type": "string",
                                    "enum": [
                                      "booking",
                                      "passenger"
                                    ]
                                  },
                                  "priceCents": {
                                    "type": "number"
                                  }
                                },
                                "required": [
                                  "name",
                                  "basis",
                                  "priceCents"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "lapInfants": {
                              "type": "object",
                              "properties": {
                                "count": {
                                  "type": "number"
                                },
                                "priceCents": {
                                  "type": "number"
                                }
                              },
                              "required": [
                                "count",
                                "priceCents"
                              ],
                              "additionalProperties": false
                            },
                            "coupon": {
                              "type": "object",
                              "properties": {
                                "code": {
                                  "type": "string"
                                },
                                "discountCents": {
                                  "type": "number"
                                }
                              },
                              "required": [
                                "code",
                                "discountCents"
                              ],
                              "additionalProperties": false
                            },
                            "contract": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "title",
                            "destination",
                            "startsAt",
                            "fare",
                            "charges",
                            "lapInfants"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "contractAcceptance": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "acceptedName": {
                              "type": "string"
                            },
                            "channel": {
                              "type": "string",
                              "enum": [
                                "checkout",
                                "booking_link"
                              ]
                            },
                            "acceptedAt": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "acceptedName",
                            "channel",
                            "acceptedAt"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "paidCents": {
                      "type": "number"
                    },
                    "refundedCents": {
                      "type": "number"
                    },
                    "refundDueCents": {
                      "type": "number"
                    },
                    "cancellationReason": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "balanceCents": {
                      "type": "number"
                    },
                    "creditCents": {
                      "type": "number"
                    },
                    "installments": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "dueDate": {
                            "type": "string"
                          },
                          "amountCents": {
                            "type": "number"
                          },
                          "allocatedCents": {
                            "type": "number"
                          },
                          "checkoutUrl": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "dueDate",
                          "amountCents",
                          "allocatedCents",
                          "checkoutUrl"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "payments": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "source": {
                            "type": "string",
                            "enum": [
                              "provider",
                              "manual"
                            ]
                          },
                          "method": {
                            "type": "string"
                          },
                          "amountCents": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "receivedAt": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          }
                        },
                        "required": [
                          "id",
                          "source",
                          "method",
                          "amountCents",
                          "receivedAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "refunds": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "amountCents": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "method": {
                            "type": "string"
                          },
                          "reference": {
                            "type": "string"
                          },
                          "refundedAt": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          }
                        },
                        "required": [
                          "id",
                          "amountCents",
                          "method",
                          "reference",
                          "refundedAt"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "status",
                    "holdExpiresAt",
                    "checkoutStarted",
                    "checkoutUrl",
                    "totalCents",
                    "discountCents",
                    "offerSnapshot",
                    "contractAcceptance",
                    "paidCents",
                    "refundedCents",
                    "refundDueCents",
                    "cancellationReason",
                    "balanceCents",
                    "creditCents",
                    "installments",
                    "payments",
                    "refunds"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/bookings/{id}/payments": {
      "post": {
        "operationId": "postBookingsIdPayments",
        "tags": [
          "bookings"
        ],
        "x-permission": [
          "payment:create"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "amountCents": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 100000000
                  },
                  "manualReference": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "method": {
                    "type": "string"
                  }
                },
                "required": [
                  "amountCents",
                  "manualReference",
                  "method"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Criado",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "source": {
                      "type": "string",
                      "enum": [
                        "provider",
                        "manual"
                      ]
                    },
                    "method": {
                      "type": "string"
                    },
                    "amountCents": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "receivedAt": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "source",
                    "method",
                    "amountCents",
                    "receivedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/bookings/{id}/checkout": {
      "post": {
        "operationId": "postBookingsIdCheckout",
        "tags": [
          "bookings"
        ],
        "x-permission": [
          "payment:create"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "amountCents": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 100000000
                  },
                  "idempotencyKey": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "installmentId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  }
                },
                "required": [
                  "amountCents",
                  "idempotencyKey"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string"
                    },
                    "attemptId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "url",
                    "attemptId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/sales/coupons": {
      "get": {
        "operationId": "getSalesCoupons",
        "tags": [
          "sales"
        ],
        "x-permission": [
          "booking:read"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "default": 1,
              "type": "integer",
              "minimum": 1,
              "maximum": 100000
            }
          },
          {
            "name": "size",
            "in": "query",
            "required": false,
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "default": "",
              "type": "string",
              "maxLength": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "organizationId": {
                            "type": "string"
                          },
                          "code": {
                            "type": "string"
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "percent",
                              "fixed"
                            ]
                          },
                          "value": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "maxUses": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "usedCount": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "validUntil": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "excursionId": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "active": {
                            "type": "boolean"
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          }
                        },
                        "required": [
                          "id",
                          "organizationId",
                          "code",
                          "kind",
                          "value",
                          "maxUses",
                          "usedCount",
                          "validUntil",
                          "excursionId",
                          "active",
                          "createdAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "size": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "pages": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "page",
                        "size",
                        "total",
                        "pages"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "items",
                    "pagination"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "postSalesCoupons",
        "tags": [
          "sales"
        ],
        "x-permission": [
          "excursion:update"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "pattern": "^[A-Z0-9][A-Z0-9_-]{2,29}$"
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "percent",
                      "fixed"
                    ]
                  },
                  "value": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 100000000
                  },
                  "maxUses": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 100000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "validUntil": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "excursionId": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 200
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "active": {
                    "default": true,
                    "type": "boolean"
                  }
                },
                "required": [
                  "code",
                  "kind",
                  "value"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Criado",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string"
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "percent",
                        "fixed"
                      ]
                    },
                    "value": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "maxUses": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "usedCount": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "validUntil": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "excursionId": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "active": {
                      "type": "boolean"
                    },
                    "createdAt": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "organizationId",
                    "code",
                    "kind",
                    "value",
                    "maxUses",
                    "usedCount",
                    "validUntil",
                    "excursionId",
                    "active",
                    "createdAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/sales/coupons/{id}": {
      "put": {
        "operationId": "putSalesCouponsId",
        "tags": [
          "sales"
        ],
        "x-permission": [
          "excursion:update"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "pattern": "^[A-Z0-9][A-Z0-9_-]{2,29}$"
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "percent",
                      "fixed"
                    ]
                  },
                  "value": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 100000000
                  },
                  "maxUses": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 100000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "validUntil": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "excursionId": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 200
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "active": {
                    "default": true,
                    "type": "boolean"
                  }
                },
                "required": [
                  "code",
                  "kind",
                  "value"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string"
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "percent",
                        "fixed"
                      ]
                    },
                    "value": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "maxUses": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "usedCount": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "validUntil": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "excursionId": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "active": {
                      "type": "boolean"
                    },
                    "createdAt": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "organizationId",
                    "code",
                    "kind",
                    "value",
                    "maxUses",
                    "usedCount",
                    "validUntil",
                    "excursionId",
                    "active",
                    "createdAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/sales/contract": {
      "get": {
        "operationId": "getSalesContract",
        "tags": [
          "sales"
        ],
        "x-permission": [
          "organization:manage"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "body": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": [
                        "number",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "body",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "putSalesContract",
        "tags": [
          "sales"
        ],
        "x-permission": [
          "organization:manage"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "body": {
                    "type": "string",
                    "maxLength": 50000
                  }
                },
                "required": [
                  "body"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "body": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": [
                        "number",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "body",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/sales/departures/{id}/waitlist": {
      "get": {
        "operationId": "getSalesDeparturesIdWaitlist",
        "tags": [
          "sales"
        ],
        "x-permission": [
          "booking:read"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "default": 1,
              "type": "integer",
              "minimum": 1,
              "maximum": 100000
            }
          },
          {
            "name": "size",
            "in": "query",
            "required": false,
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "default": "",
              "type": "string",
              "maxLength": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "email": {
                            "type": "string"
                          },
                          "phone": {
                            "type": "string"
                          },
                          "partySize": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "notifiedAt": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "position": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 9007199254740991
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "email",
                          "phone",
                          "partySize",
                          "createdAt",
                          "notifiedAt",
                          "position"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "size": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "pages": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "page",
                        "size",
                        "total",
                        "pages"
                      ],
                      "additionalProperties": false
                    },
                    "people": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "items",
                    "pagination",
                    "people"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/sales/departures/{id}/waitlist/{entryId}": {
      "delete": {
        "operationId": "deleteSalesDeparturesIdWaitlistEntryId",
        "tags": [
          "sales"
        ],
        "x-permission": [
          "booking:update"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "entryId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Sem conteúdo"
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/sales/departures/{id}/rooming": {
      "get": {
        "operationId": "getSalesDeparturesIdRooming",
        "tags": [
          "sales"
        ],
        "x-permission": [
          "passenger:read"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "departure": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "title": {
                          "type": "string"
                        },
                        "startsAt": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "title",
                        "startsAt"
                      ],
                      "additionalProperties": false
                    },
                    "passengers": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "bookingId": {
                            "type": "string"
                          },
                          "buyerName": {
                            "type": "string"
                          },
                          "fareName": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "roomId": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "bookingId",
                          "buyerName",
                          "fareName",
                          "roomId"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "rooms": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "label": {
                            "type": "string"
                          },
                          "notes": {
                            "type": "string"
                          },
                          "passengerIds": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        },
                        "required": [
                          "id",
                          "label",
                          "notes",
                          "passengerIds"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "departure",
                    "passengers",
                    "rooms"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "putSalesDeparturesIdRooming",
        "tags": [
          "sales"
        ],
        "x-permission": [
          "passenger:update"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "rooms": {
                    "maxItems": 300,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "label": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 60
                        },
                        "notes": {
                          "default": "",
                          "type": "string",
                          "maxLength": 300
                        },
                        "passengerIds": {
                          "maxItems": 20,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          }
                        }
                      },
                      "required": [
                        "label",
                        "passengerIds"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "rooms"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "departure": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "title": {
                          "type": "string"
                        },
                        "startsAt": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "title",
                        "startsAt"
                      ],
                      "additionalProperties": false
                    },
                    "passengers": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "bookingId": {
                            "type": "string"
                          },
                          "buyerName": {
                            "type": "string"
                          },
                          "fareName": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "roomId": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "bookingId",
                          "buyerName",
                          "fareName",
                          "roomId"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "rooms": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "label": {
                            "type": "string"
                          },
                          "notes": {
                            "type": "string"
                          },
                          "passengerIds": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        },
                        "required": [
                          "id",
                          "label",
                          "notes",
                          "passengerIds"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "departure",
                    "passengers",
                    "rooms"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/excursions": {
      "get": {
        "operationId": "getExcursions",
        "tags": [
          "excursions"
        ],
        "x-permission": [
          "excursion:read"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "default": 1,
              "type": "integer",
              "minimum": 1,
              "maximum": 100000
            }
          },
          {
            "name": "size",
            "in": "query",
            "required": false,
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "default": "",
              "type": "string",
              "maxLength": 100
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "draft",
                "published",
                "archived"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "organizationId": {
                            "type": "string"
                          },
                          "id": {
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          },
                          "itinerary": {
                            "type": "string"
                          },
                          "durationLabel": {
                            "type": "string"
                          },
                          "includedSuppliers": {
                            "type": "string"
                          },
                          "included": {
                            "type": "string"
                          },
                          "excluded": {
                            "type": "string"
                          },
                          "restrictions": {
                            "type": "string"
                          },
                          "cancellationPolicy": {
                            "type": "string"
                          },
                          "destinationId": {
                            "type": "string"
                          },
                          "coverImageUrl": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "draft",
                              "published",
                              "archived"
                            ]
                          },
                          "destination": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "organizationId",
                          "id",
                          "title",
                          "description",
                          "itinerary",
                          "durationLabel",
                          "includedSuppliers",
                          "included",
                          "excluded",
                          "restrictions",
                          "cancellationPolicy",
                          "destinationId",
                          "coverImageUrl",
                          "status",
                          "destination"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "size": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "pages": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "page",
                        "size",
                        "total",
                        "pages"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "items",
                    "pagination"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "postExcursions",
        "tags": [
          "excursions"
        ],
        "x-permission": [
          "excursion:create"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 180
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 20000
                  },
                  "coverImageUrl": {
                    "default": "",
                    "anyOf": [
                      {
                        "type": "string",
                        "const": ""
                      },
                      {
                        "type": "string",
                        "format": "uri"
                      }
                    ]
                  },
                  "itinerary": {
                    "default": "",
                    "type": "string",
                    "maxLength": 20000
                  },
                  "durationLabel": {
                    "default": "",
                    "type": "string",
                    "maxLength": 100
                  },
                  "includedSuppliers": {
                    "default": "",
                    "type": "string",
                    "maxLength": 5000
                  },
                  "included": {
                    "default": "",
                    "type": "string",
                    "maxLength": 10000
                  },
                  "excluded": {
                    "default": "",
                    "type": "string",
                    "maxLength": 10000
                  },
                  "restrictions": {
                    "default": "",
                    "type": "string",
                    "maxLength": 10000
                  },
                  "cancellationPolicy": {
                    "default": "",
                    "type": "string",
                    "maxLength": 10000
                  },
                  "destinationId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  }
                },
                "required": [
                  "title",
                  "description",
                  "destinationId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Criado",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "organizationId": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "itinerary": {
                      "type": "string"
                    },
                    "durationLabel": {
                      "type": "string"
                    },
                    "includedSuppliers": {
                      "type": "string"
                    },
                    "included": {
                      "type": "string"
                    },
                    "excluded": {
                      "type": "string"
                    },
                    "restrictions": {
                      "type": "string"
                    },
                    "cancellationPolicy": {
                      "type": "string"
                    },
                    "destinationId": {
                      "type": "string"
                    },
                    "coverImageUrl": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "draft",
                        "published",
                        "archived"
                      ]
                    },
                    "destination": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "organizationId",
                    "id",
                    "title",
                    "description",
                    "itinerary",
                    "durationLabel",
                    "includedSuppliers",
                    "included",
                    "excluded",
                    "restrictions",
                    "cancellationPolicy",
                    "destinationId",
                    "coverImageUrl",
                    "status",
                    "destination"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/excursions/{id}": {
      "patch": {
        "operationId": "patchExcursionsId",
        "tags": [
          "excursions"
        ],
        "x-permission": [
          "excursion:update"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 180
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 20000
                  },
                  "coverImageUrl": {
                    "anyOf": [
                      {
                        "type": "string",
                        "const": ""
                      },
                      {
                        "type": "string",
                        "format": "uri"
                      }
                    ]
                  },
                  "itinerary": {
                    "type": "string",
                    "maxLength": 20000
                  },
                  "durationLabel": {
                    "type": "string",
                    "maxLength": 100
                  },
                  "includedSuppliers": {
                    "type": "string",
                    "maxLength": 5000
                  },
                  "included": {
                    "type": "string",
                    "maxLength": 10000
                  },
                  "excluded": {
                    "type": "string",
                    "maxLength": 10000
                  },
                  "restrictions": {
                    "type": "string",
                    "maxLength": 10000
                  },
                  "cancellationPolicy": {
                    "type": "string",
                    "maxLength": 10000
                  },
                  "destinationId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "organizationId": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "itinerary": {
                      "type": "string"
                    },
                    "durationLabel": {
                      "type": "string"
                    },
                    "includedSuppliers": {
                      "type": "string"
                    },
                    "included": {
                      "type": "string"
                    },
                    "excluded": {
                      "type": "string"
                    },
                    "restrictions": {
                      "type": "string"
                    },
                    "cancellationPolicy": {
                      "type": "string"
                    },
                    "destinationId": {
                      "type": "string"
                    },
                    "coverImageUrl": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "draft",
                        "published",
                        "archived"
                      ]
                    },
                    "destination": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "organizationId",
                    "id",
                    "title",
                    "description",
                    "itinerary",
                    "durationLabel",
                    "includedSuppliers",
                    "included",
                    "excluded",
                    "restrictions",
                    "cancellationPolicy",
                    "destinationId",
                    "coverImageUrl",
                    "status",
                    "destination"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/excursions/{id}/publish": {
      "post": {
        "operationId": "postExcursionsIdPublish",
        "tags": [
          "excursions"
        ],
        "x-permission": [
          "excursion:publish"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "organizationId": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "itinerary": {
                      "type": "string"
                    },
                    "durationLabel": {
                      "type": "string"
                    },
                    "includedSuppliers": {
                      "type": "string"
                    },
                    "included": {
                      "type": "string"
                    },
                    "excluded": {
                      "type": "string"
                    },
                    "restrictions": {
                      "type": "string"
                    },
                    "cancellationPolicy": {
                      "type": "string"
                    },
                    "destinationId": {
                      "type": "string"
                    },
                    "coverImageUrl": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "draft",
                        "published",
                        "archived"
                      ]
                    },
                    "destination": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "organizationId",
                    "id",
                    "title",
                    "description",
                    "itinerary",
                    "durationLabel",
                    "includedSuppliers",
                    "included",
                    "excluded",
                    "restrictions",
                    "cancellationPolicy",
                    "destinationId",
                    "coverImageUrl",
                    "status",
                    "destination"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/excursions/{id}/archive": {
      "post": {
        "operationId": "postExcursionsIdArchive",
        "tags": [
          "excursions"
        ],
        "x-permission": [
          "excursion:update"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "organizationId": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "itinerary": {
                      "type": "string"
                    },
                    "durationLabel": {
                      "type": "string"
                    },
                    "includedSuppliers": {
                      "type": "string"
                    },
                    "included": {
                      "type": "string"
                    },
                    "excluded": {
                      "type": "string"
                    },
                    "restrictions": {
                      "type": "string"
                    },
                    "cancellationPolicy": {
                      "type": "string"
                    },
                    "destinationId": {
                      "type": "string"
                    },
                    "coverImageUrl": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "draft",
                        "published",
                        "archived"
                      ]
                    },
                    "destination": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "organizationId",
                    "id",
                    "title",
                    "description",
                    "itinerary",
                    "durationLabel",
                    "includedSuppliers",
                    "included",
                    "excluded",
                    "restrictions",
                    "cancellationPolicy",
                    "destinationId",
                    "coverImageUrl",
                    "status",
                    "destination"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/excursions/{id}/departures": {
      "get": {
        "operationId": "getExcursionsIdDepartures",
        "tags": [
          "excursions"
        ],
        "x-permission": [
          "departure:read"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "default": 1,
              "type": "integer",
              "minimum": 1,
              "maximum": 100000
            }
          },
          {
            "name": "size",
            "in": "query",
            "required": false,
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "default": "",
              "type": "string",
              "maxLength": 100
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "draft",
                "published",
                "closed",
                "cancelled"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "inventory": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "departureId": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "unit": {
                                "type": "string",
                                "enum": [
                                  "person",
                                  "room",
                                  "package"
                                ]
                              },
                              "capacity": {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              "reserved": {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              "priceCents": {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              "lapInfantPriceCents": {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              }
                            },
                            "required": [
                              "id",
                              "departureId",
                              "name",
                              "unit",
                              "capacity",
                              "reserved",
                              "priceCents",
                              "lapInfantPriceCents"
                            ],
                            "additionalProperties": false
                          },
                          "fareOptions": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "departureId": {
                                  "type": "string"
                                },
                                "name": {
                                  "type": "string"
                                },
                                "partySize": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                "priceCents": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                "active": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "id",
                                "departureId",
                                "name",
                                "partySize",
                                "priceCents",
                                "active"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "extraCharges": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "departureId": {
                                  "type": "string"
                                },
                                "name": {
                                  "type": "string"
                                },
                                "priceCents": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                "basis": {
                                  "type": "string",
                                  "enum": [
                                    "booking",
                                    "passenger"
                                  ]
                                },
                                "required": {
                                  "type": "boolean"
                                },
                                "active": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "id",
                                "departureId",
                                "name",
                                "priceCents",
                                "basis",
                                "required",
                                "active"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "departure": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "excursionId": {
                                "type": "string"
                              },
                              "startsAt": {
                                "type": "string"
                              },
                              "meetingInstructions": {
                                "type": "string"
                              },
                              "vehicleId": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "seatLayoutSnapshot": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "seats": {
                                        "minItems": 1,
                                        "maxItems": 100,
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "label": {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 20
                                            },
                                            "row": {
                                              "type": "integer",
                                              "minimum": 1,
                                              "maximum": 100
                                            },
                                            "column": {
                                              "type": "integer",
                                              "minimum": 1,
                                              "maximum": 10
                                            },
                                            "blocked": {
                                              "type": "boolean"
                                            }
                                          },
                                          "required": [
                                            "label",
                                            "row",
                                            "column",
                                            "blocked"
                                          ],
                                          "additionalProperties": false
                                        }
                                      }
                                    },
                                    "required": [
                                      "seats"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "seatSelectionEnabled": {
                                "type": "boolean"
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "draft",
                                  "published",
                                  "closed",
                                  "cancelled"
                                ]
                              }
                            },
                            "required": [
                              "id",
                              "excursionId",
                              "startsAt",
                              "meetingInstructions",
                              "vehicleId",
                              "seatLayoutSnapshot",
                              "seatSelectionEnabled",
                              "status"
                            ],
                            "additionalProperties": false
                          },
                          "breakEven": {
                            "anyOf": [
                              {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "state": {
                                        "type": "string",
                                        "const": "no-costs"
                                      }
                                    },
                                    "required": [
                                      "state"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "state": {
                                        "type": "string",
                                        "const": "even"
                                      },
                                      "costCents": {
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 9007199254740991
                                      },
                                      "revenueCents": {
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 9007199254740991
                                      },
                                      "profitCents": {
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 9007199254740991
                                      }
                                    },
                                    "required": [
                                      "state",
                                      "costCents",
                                      "revenueCents",
                                      "profitCents"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "state": {
                                        "type": "string",
                                        "const": "short"
                                      },
                                      "costCents": {
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 9007199254740991
                                      },
                                      "revenueCents": {
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 9007199254740991
                                      },
                                      "shortfallCents": {
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 9007199254740991
                                      },
                                      "passengersNeeded": {
                                        "anyOf": [
                                          {
                                            "type": "integer",
                                            "exclusiveMinimum": 0,
                                            "maximum": 9007199254740991
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "seatsLeft": {
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 9007199254740991
                                      },
                                      "reachable": {
                                        "type": "boolean"
                                      }
                                    },
                                    "required": [
                                      "state",
                                      "costCents",
                                      "revenueCents",
                                      "shortfallCents",
                                      "passengersNeeded",
                                      "seatsLeft",
                                      "reachable"
                                    ],
                                    "additionalProperties": false
                                  }
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "inventory",
                          "fareOptions",
                          "extraCharges",
                          "departure",
                          "breakEven"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "size": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "pages": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "page",
                        "size",
                        "total",
                        "pages"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "items",
                    "pagination"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "postExcursionsIdDepartures",
        "tags": [
          "excursions"
        ],
        "x-permission": [
          "departure:create"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "startsAt": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  "vehicleId": {
                    "type": "string"
                  },
                  "seatSelectionEnabled": {
                    "default": false,
                    "type": "boolean"
                  },
                  "meetingInstructions": {
                    "default": "",
                    "type": "string",
                    "maxLength": 2000
                  },
                  "capacity": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10000
                  },
                  "priceCents": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 100000000
                  },
                  "lapInfantPriceCents": {
                    "default": 0,
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100000000
                  },
                  "unit": {
                    "default": "person",
                    "type": "string",
                    "const": "person"
                  },
                  "boardingPoints": {
                    "maxItems": 30,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "minLength": 2,
                          "maxLength": 150
                        },
                        "address": {
                          "type": "string",
                          "minLength": 3,
                          "maxLength": 500
                        },
                        "boardingAt": {
                          "type": "string",
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                        },
                        "returnAt": {
                          "anyOf": [
                            {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "format": "date-time",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                                },
                                {
                                  "type": "string",
                                  "const": ""
                                }
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "reference": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 160
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "name",
                        "address",
                        "boardingAt"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "fareOptions": {
                    "default": [],
                    "maxItems": 30,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "minLength": 2,
                          "maxLength": 100
                        },
                        "partySize": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 100
                        },
                        "priceCents": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 100000000
                        }
                      },
                      "required": [
                        "name",
                        "partySize",
                        "priceCents"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "extraCharges": {
                    "default": [],
                    "maxItems": 30,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "minLength": 2,
                          "maxLength": 100
                        },
                        "priceCents": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 100000000
                        },
                        "basis": {
                          "type": "string",
                          "enum": [
                            "booking",
                            "passenger"
                          ]
                        },
                        "required": {
                          "default": false,
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "name",
                        "priceCents",
                        "basis"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "startsAt",
                  "capacity",
                  "priceCents"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Criado",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "excursionId": {
                      "type": "string"
                    },
                    "startsAt": {
                      "type": "string"
                    },
                    "meetingInstructions": {
                      "type": "string"
                    },
                    "vehicleId": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "seatLayoutSnapshot": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "seats": {
                              "minItems": 1,
                              "maxItems": 100,
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "label": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 20
                                  },
                                  "row": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 100
                                  },
                                  "column": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 10
                                  },
                                  "blocked": {
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "label",
                                  "row",
                                  "column",
                                  "blocked"
                                ],
                                "additionalProperties": false
                              }
                            }
                          },
                          "required": [
                            "seats"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "seatSelectionEnabled": {
                      "type": "boolean"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "draft",
                        "published",
                        "closed",
                        "cancelled"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "excursionId",
                    "startsAt",
                    "meetingInstructions",
                    "vehicleId",
                    "seatLayoutSnapshot",
                    "seatSelectionEnabled",
                    "status"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/excursions/{id}/departures/{departureId}/publish": {
      "post": {
        "operationId": "postExcursionsIdDeparturesDepartureIdPublish",
        "tags": [
          "excursions"
        ],
        "x-permission": [
          "departure:publish"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "departureId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "excursionId": {
                      "type": "string"
                    },
                    "startsAt": {
                      "type": "string"
                    },
                    "meetingInstructions": {
                      "type": "string"
                    },
                    "vehicleId": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "seatLayoutSnapshot": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "seats": {
                              "minItems": 1,
                              "maxItems": 100,
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "label": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 20
                                  },
                                  "row": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 100
                                  },
                                  "column": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 10
                                  },
                                  "blocked": {
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "label",
                                  "row",
                                  "column",
                                  "blocked"
                                ],
                                "additionalProperties": false
                              }
                            }
                          },
                          "required": [
                            "seats"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "seatSelectionEnabled": {
                      "type": "boolean"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "draft",
                        "published",
                        "closed",
                        "cancelled"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "excursionId",
                    "startsAt",
                    "meetingInstructions",
                    "vehicleId",
                    "seatLayoutSnapshot",
                    "seatSelectionEnabled",
                    "status"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/excursions/{id}/departures/{departureId}/pricing": {
      "put": {
        "operationId": "putExcursionsIdDeparturesDepartureIdPricing",
        "tags": [
          "excursions"
        ],
        "x-permission": [
          "excursion:update"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "departureId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "priceCents": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 100000000
                  },
                  "lapInfantPriceCents": {
                    "default": 0,
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100000000
                  },
                  "fareOptions": {
                    "maxItems": 30,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "minLength": 2,
                          "maxLength": 100
                        },
                        "partySize": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 100
                        },
                        "priceCents": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 100000000
                        }
                      },
                      "required": [
                        "name",
                        "partySize",
                        "priceCents"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "extraCharges": {
                    "maxItems": 30,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "minLength": 2,
                          "maxLength": 100
                        },
                        "priceCents": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 100000000
                        },
                        "basis": {
                          "type": "string",
                          "enum": [
                            "booking",
                            "passenger"
                          ]
                        },
                        "required": {
                          "default": false,
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "name",
                        "priceCents",
                        "basis"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "priceCents",
                  "fareOptions",
                  "extraCharges"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "inventory": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "departureId": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "unit": {
                          "type": "string",
                          "enum": [
                            "person",
                            "room",
                            "package"
                          ]
                        },
                        "capacity": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "reserved": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "priceCents": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "lapInfantPriceCents": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "id",
                        "departureId",
                        "name",
                        "unit",
                        "capacity",
                        "reserved",
                        "priceCents",
                        "lapInfantPriceCents"
                      ],
                      "additionalProperties": false
                    },
                    "fareOptions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "departureId": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "partySize": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "priceCents": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "active": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "id",
                          "departureId",
                          "name",
                          "partySize",
                          "priceCents",
                          "active"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "extraCharges": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "departureId": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "priceCents": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "basis": {
                            "type": "string",
                            "enum": [
                              "booking",
                              "passenger"
                            ]
                          },
                          "required": {
                            "type": "boolean"
                          },
                          "active": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "id",
                          "departureId",
                          "name",
                          "priceCents",
                          "basis",
                          "required",
                          "active"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "inventory",
                    "fareOptions",
                    "extraCharges"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/excursions/{id}/departures/{departureId}/history": {
      "get": {
        "operationId": "getExcursionsIdDeparturesDepartureIdHistory",
        "tags": [
          "excursions"
        ],
        "x-permission": [
          "departure:read"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "departureId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "default": 1,
              "type": "integer",
              "minimum": 1,
              "maximum": 100000
            }
          },
          {
            "name": "size",
            "in": "query",
            "required": false,
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "default": "",
              "type": "string",
              "maxLength": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "departureId": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "rescheduled",
                              "cancelled"
                            ]
                          },
                          "reason": {
                            "type": "string"
                          },
                          "previousStartsAt": {
                            "type": "string"
                          },
                          "startsAt": {
                            "type": "string"
                          },
                          "actorId": {
                            "type": "string"
                          },
                          "occurredAt": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          }
                        },
                        "required": [
                          "id",
                          "departureId",
                          "type",
                          "reason",
                          "previousStartsAt",
                          "startsAt",
                          "actorId",
                          "occurredAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "size": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "pages": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "page",
                        "size",
                        "total",
                        "pages"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "items",
                    "pagination"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/excursions/{id}/departures/{departureId}/reschedule": {
      "post": {
        "operationId": "postExcursionsIdDeparturesDepartureIdReschedule",
        "tags": [
          "excursions"
        ],
        "x-permission": [
          "departure:publish"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "departureId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "startsAt": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 2000
                  }
                },
                "required": [
                  "startsAt",
                  "reason"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "departure": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "excursionId": {
                          "type": "string"
                        },
                        "startsAt": {
                          "type": "string"
                        },
                        "meetingInstructions": {
                          "type": "string"
                        },
                        "vehicleId": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "seatLayoutSnapshot": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "seats": {
                                  "minItems": 1,
                                  "maxItems": 100,
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "label": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 20
                                      },
                                      "row": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 100
                                      },
                                      "column": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 10
                                      },
                                      "blocked": {
                                        "type": "boolean"
                                      }
                                    },
                                    "required": [
                                      "label",
                                      "row",
                                      "column",
                                      "blocked"
                                    ],
                                    "additionalProperties": false
                                  }
                                }
                              },
                              "required": [
                                "seats"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "seatSelectionEnabled": {
                          "type": "boolean"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "draft",
                            "published",
                            "closed",
                            "cancelled"
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "excursionId",
                        "startsAt",
                        "meetingInstructions",
                        "vehicleId",
                        "seatLayoutSnapshot",
                        "seatSelectionEnabled",
                        "status"
                      ],
                      "additionalProperties": false
                    },
                    "affectedBookings": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "departure",
                    "affectedBookings"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/excursions/{id}/departures/{departureId}/cancel": {
      "post": {
        "operationId": "postExcursionsIdDeparturesDepartureIdCancel",
        "tags": [
          "excursions"
        ],
        "x-permission": [
          "departure:publish"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "departureId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 2000
                  }
                },
                "required": [
                  "reason"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "departure": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "excursionId": {
                          "type": "string"
                        },
                        "startsAt": {
                          "type": "string"
                        },
                        "meetingInstructions": {
                          "type": "string"
                        },
                        "vehicleId": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "seatLayoutSnapshot": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "seats": {
                                  "minItems": 1,
                                  "maxItems": 100,
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "label": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 20
                                      },
                                      "row": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 100
                                      },
                                      "column": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 10
                                      },
                                      "blocked": {
                                        "type": "boolean"
                                      }
                                    },
                                    "required": [
                                      "label",
                                      "row",
                                      "column",
                                      "blocked"
                                    ],
                                    "additionalProperties": false
                                  }
                                }
                              },
                              "required": [
                                "seats"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "seatSelectionEnabled": {
                          "type": "boolean"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "draft",
                            "published",
                            "closed",
                            "cancelled"
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "excursionId",
                        "startsAt",
                        "meetingInstructions",
                        "vehicleId",
                        "seatLayoutSnapshot",
                        "seatSelectionEnabled",
                        "status"
                      ],
                      "additionalProperties": false
                    },
                    "affectedBookings": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "departure",
                    "affectedBookings"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/excursions/{id}/departures/{departureId}/close": {
      "post": {
        "operationId": "postExcursionsIdDeparturesDepartureIdClose",
        "tags": [
          "excursions"
        ],
        "x-permission": [
          "departure:publish"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "departureId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "excursionId": {
                      "type": "string"
                    },
                    "startsAt": {
                      "type": "string"
                    },
                    "meetingInstructions": {
                      "type": "string"
                    },
                    "vehicleId": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "seatLayoutSnapshot": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "seats": {
                              "minItems": 1,
                              "maxItems": 100,
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "label": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 20
                                  },
                                  "row": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 100
                                  },
                                  "column": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 10
                                  },
                                  "blocked": {
                                    "type": "boolean"
                                  }
                                },
                                "required": [
                                  "label",
                                  "row",
                                  "column",
                                  "blocked"
                                ],
                                "additionalProperties": false
                              }
                            }
                          },
                          "required": [
                            "seats"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "seatSelectionEnabled": {
                      "type": "boolean"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "draft",
                        "published",
                        "closed",
                        "cancelled"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "excursionId",
                    "startsAt",
                    "meetingInstructions",
                    "vehicleId",
                    "seatLayoutSnapshot",
                    "seatSelectionEnabled",
                    "status"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/destinations": {
      "get": {
        "operationId": "getDestinations",
        "tags": [
          "destinations"
        ],
        "x-permission": [
          "excursion:read"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "default": 1,
              "type": "integer",
              "minimum": 1,
              "maximum": 100000
            }
          },
          {
            "name": "size",
            "in": "query",
            "required": false,
            "schema": {
              "default": 200,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "default": "",
              "type": "string",
              "maxLength": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          },
                          "city": {
                            "type": "string"
                          },
                          "region": {
                            "type": "string"
                          },
                          "country": {
                            "type": "string"
                          },
                          "address": {
                            "type": "string"
                          },
                          "latitude": {
                            "anyOf": [
                              {
                                "type": "number",
                                "minimum": -140737488355328,
                                "maximum": 140737488355327
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "longitude": {
                            "anyOf": [
                              {
                                "type": "number",
                                "minimum": -140737488355328,
                                "maximum": 140737488355327
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "highlights": {
                            "type": "string"
                          },
                          "visitorInformation": {
                            "type": "string"
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "updatedAt": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "slug": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "draft",
                              "published",
                              "archived"
                            ]
                          },
                          "revision": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "source": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "externalId": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "description",
                          "city",
                          "region",
                          "country",
                          "address",
                          "latitude",
                          "longitude",
                          "highlights",
                          "visitorInformation",
                          "createdAt",
                          "updatedAt",
                          "slug",
                          "status",
                          "revision",
                          "source",
                          "externalId"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "size": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "pages": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "page",
                        "size",
                        "total",
                        "pages"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "items",
                    "pagination"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/contract-signature/bookings/{id}": {
      "get": {
        "operationId": "getContractSignatureBookingsId",
        "tags": [
          "contract-signature"
        ],
        "x-permission": [
          "booking:read"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "signature": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "code": {
                              "type": "string"
                            },
                            "signerName": {
                              "type": "string"
                            },
                            "signedAt": {
                              "type": "string"
                            },
                            "documentHash": {
                              "type": "string"
                            },
                            "signatureHash": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "code",
                            "signerName",
                            "signedAt",
                            "documentHash",
                            "signatureHash"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "signer": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "email": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "name",
                        "email"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "signature",
                    "signer"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/cancellation-rules/policy": {
      "get": {
        "operationId": "getCancellationRulesPolicy",
        "tags": [
          "cancellation-rules"
        ],
        "x-permission": [
          "excursion:read"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "policy": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "bands": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "minDays": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 365
                                  },
                                  "refundPercent": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 100
                                  }
                                },
                                "required": [
                                  "minDays",
                                  "refundPercent"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "updatedAt": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            }
                          },
                          "required": [
                            "bands",
                            "updatedAt"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "policy"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "putCancellationRulesPolicy",
        "tags": [
          "cancellation-rules"
        ],
        "x-permission": [
          "organization:manage"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "bands": {
                    "minItems": 1,
                    "maxItems": 8,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "minDays": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 365
                        },
                        "refundPercent": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 100
                        }
                      },
                      "required": [
                        "minDays",
                        "refundPercent"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "bands"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "policy": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "bands": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "minDays": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 365
                                  },
                                  "refundPercent": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 100
                                  }
                                },
                                "required": [
                                  "minDays",
                                  "refundPercent"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "updatedAt": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            }
                          },
                          "required": [
                            "bands",
                            "updatedAt"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "policy"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteCancellationRulesPolicy",
        "tags": [
          "cancellation-rules"
        ],
        "x-permission": [
          "organization:manage"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Sem conteúdo"
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/cancellation-rules/bookings/{id}": {
      "get": {
        "operationId": "getCancellationRulesBookingsId",
        "tags": [
          "cancellation-rules"
        ],
        "x-permission": [
          "payment:read"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "terms": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "bands": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "minDays": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 365
                                  },
                                  "refundPercent": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 100
                                  }
                                },
                                "required": [
                                  "minDays",
                                  "refundPercent"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "channel": {
                              "type": "string",
                              "enum": [
                                "site",
                                "panel"
                              ]
                            },
                            "capturedAt": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            }
                          },
                          "required": [
                            "bands",
                            "channel",
                            "capturedAt"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "confirmed",
                        "cancelled",
                        "expired"
                      ]
                    },
                    "totalCents": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "paidCents": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "purchasedAt": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "startsAt": {
                      "type": "string"
                    },
                    "suggestion": {
                      "type": "object",
                      "properties": {
                        "basis": {
                          "type": "string",
                          "enum": [
                            "withdrawal",
                            "band",
                            "none"
                          ]
                        },
                        "daysBeforeDeparture": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "band": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "minDays": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 365
                                },
                                "refundPercent": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 100
                                }
                              },
                              "required": [
                                "minDays",
                                "refundPercent"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "refundCents": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "retainedCents": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "aboveSafeLimit": {
                          "type": "boolean"
                        },
                        "reasons": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "required": [
                        "basis",
                        "daysBeforeDeparture",
                        "band",
                        "refundCents",
                        "retainedCents",
                        "aboveSafeLimit",
                        "reasons"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "terms",
                    "status",
                    "totalCents",
                    "paidCents",
                    "purchasedAt",
                    "startsAt",
                    "suggestion"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/cancellation-rules/departures/{id}/minimum": {
      "get": {
        "operationId": "getCancellationRulesDeparturesIdMinimum",
        "tags": [
          "cancellation-rules"
        ],
        "x-permission": [
          "departure:read"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "minimum": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "departureId": {
                              "type": "string"
                            },
                            "minimumPassengers": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "confirmBy": {
                              "type": "string"
                            },
                            "reserved": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            }
                          },
                          "required": [
                            "departureId",
                            "minimumPassengers",
                            "confirmBy",
                            "reserved"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "status": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "missing": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "reached": {
                              "type": "boolean"
                            },
                            "deadlinePassed": {
                              "type": "boolean"
                            },
                            "canCancel": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "missing",
                            "reached",
                            "deadlinePassed",
                            "canCancel"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "startsAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "minimum",
                    "status",
                    "startsAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "putCancellationRulesDeparturesIdMinimum",
        "tags": [
          "cancellation-rules"
        ],
        "x-permission": [
          "departure:publish"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "minimumPassengers": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 500
                  },
                  "confirmBy": {
                    "type": "string",
                    "format": "date",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                  }
                },
                "required": [
                  "minimumPassengers",
                  "confirmBy"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "minimum": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "departureId": {
                              "type": "string"
                            },
                            "minimumPassengers": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "confirmBy": {
                              "type": "string"
                            },
                            "reserved": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            }
                          },
                          "required": [
                            "departureId",
                            "minimumPassengers",
                            "confirmBy",
                            "reserved"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "status": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "missing": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            "reached": {
                              "type": "boolean"
                            },
                            "deadlinePassed": {
                              "type": "boolean"
                            },
                            "canCancel": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "missing",
                            "reached",
                            "deadlinePassed",
                            "canCancel"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "startsAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "minimum",
                    "status",
                    "startsAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteCancellationRulesDeparturesIdMinimum",
        "tags": [
          "cancellation-rules"
        ],
        "x-permission": [
          "departure:publish"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Sem conteúdo"
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/cancellation-rules/departures/{id}/cancel-below-minimum": {
      "post": {
        "operationId": "postCancellationRulesDeparturesIdCancelBelowMinimum",
        "tags": [
          "cancellation-rules"
        ],
        "x-permission": [
          "departure:publish"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "departure": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "excursionId": {
                          "type": "string"
                        },
                        "startsAt": {
                          "type": "string"
                        },
                        "meetingInstructions": {
                          "type": "string"
                        },
                        "vehicleId": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "seatLayoutSnapshot": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "seats": {
                                  "minItems": 1,
                                  "maxItems": 100,
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "label": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 20
                                      },
                                      "row": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 100
                                      },
                                      "column": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 10
                                      },
                                      "blocked": {
                                        "type": "boolean"
                                      }
                                    },
                                    "required": [
                                      "label",
                                      "row",
                                      "column",
                                      "blocked"
                                    ],
                                    "additionalProperties": false
                                  }
                                }
                              },
                              "required": [
                                "seats"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "seatSelectionEnabled": {
                          "type": "boolean"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "draft",
                            "published",
                            "closed",
                            "cancelled"
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "excursionId",
                        "startsAt",
                        "meetingInstructions",
                        "vehicleId",
                        "seatLayoutSnapshot",
                        "seatSelectionEnabled",
                        "status"
                      ],
                      "additionalProperties": false
                    },
                    "affectedBookings": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "departure",
                    "affectedBookings"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/sales-agents": {
      "get": {
        "operationId": "getSalesAgents",
        "tags": [
          "sales-agents"
        ],
        "x-permission": [
          "finance:read"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "default": 1,
              "type": "integer",
              "minimum": 1,
              "maximum": 100000
            }
          },
          {
            "name": "size",
            "in": "query",
            "required": false,
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "default": "",
              "type": "string",
              "maxLength": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "code": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "pixKey": {
                            "type": "string"
                          },
                          "email": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "phone": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "active": {
                            "type": "boolean"
                          },
                          "commission": {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "percent",
                                  "per_passenger"
                                ]
                              },
                              "value": {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              }
                            },
                            "required": [
                              "kind",
                              "value"
                            ],
                            "additionalProperties": false
                          },
                          "rates": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "excursionId": {
                                  "type": "string"
                                },
                                "title": {
                                  "type": "string"
                                },
                                "commission": {
                                  "type": "object",
                                  "properties": {
                                    "kind": {
                                      "type": "string",
                                      "enum": [
                                        "percent",
                                        "per_passenger"
                                      ]
                                    },
                                    "value": {
                                      "type": "integer",
                                      "minimum": -9007199254740991,
                                      "maximum": 9007199254740991
                                    }
                                  },
                                  "required": [
                                    "kind",
                                    "value"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "required": [
                                "excursionId",
                                "title",
                                "commission"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "sales": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "accruedCents": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "paidCents": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "balanceCents": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          }
                        },
                        "required": [
                          "id",
                          "code",
                          "name",
                          "pixKey",
                          "email",
                          "phone",
                          "active",
                          "commission",
                          "rates",
                          "createdAt",
                          "sales",
                          "accruedCents",
                          "paidCents",
                          "balanceCents"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "size": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "pages": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "page",
                        "size",
                        "total",
                        "pages"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "items",
                    "pagination"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "postSalesAgents",
        "tags": [
          "sales-agents"
        ],
        "x-permission": [
          "finance:manage"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 120
                  },
                  "pixKey": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 140
                  },
                  "email": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 254
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "phone": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "code": {
                    "type": "string",
                    "pattern": "^[A-Z0-9]{3,12}$"
                  },
                  "active": {
                    "default": true,
                    "type": "boolean"
                  },
                  "commission": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "percent",
                          "per_passenger"
                        ]
                      },
                      "value": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 10000000
                      }
                    },
                    "required": [
                      "kind",
                      "value"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "name",
                  "pixKey",
                  "commission"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Criado",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "pixKey": {
                      "type": "string"
                    },
                    "email": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "phone": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "active": {
                      "type": "boolean"
                    },
                    "commission": {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "enum": [
                            "percent",
                            "per_passenger"
                          ]
                        },
                        "value": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "kind",
                        "value"
                      ],
                      "additionalProperties": false
                    },
                    "rates": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "excursionId": {
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          },
                          "commission": {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "percent",
                                  "per_passenger"
                                ]
                              },
                              "value": {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              }
                            },
                            "required": [
                              "kind",
                              "value"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "excursionId",
                          "title",
                          "commission"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "createdAt": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "code",
                    "name",
                    "pixKey",
                    "email",
                    "phone",
                    "active",
                    "commission",
                    "rates",
                    "createdAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/sales-agents/options": {
      "get": {
        "operationId": "getSalesAgentsOptions",
        "tags": [
          "sales-agents"
        ],
        "x-permission": [
          "booking:create"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "default": 1,
              "type": "integer",
              "minimum": 1,
              "maximum": 100000
            }
          },
          {
            "name": "size",
            "in": "query",
            "required": false,
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "default": "",
              "type": "string",
              "maxLength": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "code": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "code",
                          "name"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "size": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "pages": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "page",
                        "size",
                        "total",
                        "pages"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "items",
                    "pagination"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/sales-agents/bookings/{id}": {
      "get": {
        "operationId": "getSalesAgentsBookingsId",
        "tags": [
          "sales-agents"
        ],
        "x-permission": [
          "booking:read"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "agent": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "code": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "id",
                            "code",
                            "name"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "channel": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "site",
                            "panel"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "locked": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "agent",
                    "channel",
                    "locked"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "putSalesAgentsBookingsId",
        "tags": [
          "sales-agents"
        ],
        "x-permission": [
          "booking:update"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "agentId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  }
                },
                "required": [
                  "agentId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "agent": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "code": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "id",
                            "code",
                            "name"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "channel": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "site",
                            "panel"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "locked": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "agent",
                    "channel",
                    "locked"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/sales-agents/{id}": {
      "get": {
        "operationId": "getSalesAgentsId",
        "tags": [
          "sales-agents"
        ],
        "x-permission": [
          "finance:read"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "agent": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "code": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "pixKey": {
                          "type": "string"
                        },
                        "email": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "phone": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "active": {
                          "type": "boolean"
                        },
                        "commission": {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "percent",
                                "per_passenger"
                              ]
                            },
                            "value": {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            }
                          },
                          "required": [
                            "kind",
                            "value"
                          ],
                          "additionalProperties": false
                        },
                        "rates": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "excursionId": {
                                "type": "string"
                              },
                              "title": {
                                "type": "string"
                              },
                              "commission": {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "percent",
                                      "per_passenger"
                                    ]
                                  },
                                  "value": {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991
                                  }
                                },
                                "required": [
                                  "kind",
                                  "value"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "excursionId",
                              "title",
                              "commission"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "sales": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "accruedCents": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "paidCents": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "balanceCents": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "id",
                        "code",
                        "name",
                        "pixKey",
                        "email",
                        "phone",
                        "active",
                        "commission",
                        "rates",
                        "createdAt",
                        "sales",
                        "accruedCents",
                        "paidCents",
                        "balanceCents"
                      ],
                      "additionalProperties": false
                    },
                    "open": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "accrual",
                              "reversal",
                              "settlement"
                            ]
                          },
                          "balanceEffectCents": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "amountCents": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "baseCents": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "bookingId": {
                            "type": "string"
                          },
                          "buyerName": {
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          },
                          "rule": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "settledBy": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "payoutId": {
                                    "type": "string"
                                  },
                                  "method": {
                                    "type": "string",
                                    "enum": [
                                      "manual_pix",
                                      "provider_split"
                                    ]
                                  }
                                },
                                "required": [
                                  "payoutId",
                                  "method"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "kind",
                          "balanceEffectCents",
                          "amountCents",
                          "baseCents",
                          "bookingId",
                          "buyerName",
                          "title",
                          "rule",
                          "createdAt",
                          "settledBy"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "payouts": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "agentId": {
                            "type": "string"
                          },
                          "method": {
                            "type": "string",
                            "enum": [
                              "manual_pix",
                              "provider_split"
                            ]
                          },
                          "amountCents": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "reference": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "providerId": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "providerReference": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "paidAt": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "entries": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          }
                        },
                        "required": [
                          "id",
                          "agentId",
                          "method",
                          "amountCents",
                          "reference",
                          "providerId",
                          "providerReference",
                          "paidAt",
                          "entries"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "agent",
                    "open",
                    "payouts"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "patchSalesAgentsId",
        "tags": [
          "sales-agents"
        ],
        "x-permission": [
          "finance:manage"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 120
                  },
                  "pixKey": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 140
                  },
                  "email": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 254
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "phone": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "code": {
                    "type": "string",
                    "pattern": "^[A-Z0-9]{3,12}$"
                  },
                  "active": {
                    "type": "boolean"
                  },
                  "commission": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "percent",
                          "per_passenger"
                        ]
                      },
                      "value": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 10000000
                      }
                    },
                    "required": [
                      "kind",
                      "value"
                    ],
                    "additionalProperties": false
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "pixKey": {
                      "type": "string"
                    },
                    "email": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "phone": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "active": {
                      "type": "boolean"
                    },
                    "commission": {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "enum": [
                            "percent",
                            "per_passenger"
                          ]
                        },
                        "value": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "kind",
                        "value"
                      ],
                      "additionalProperties": false
                    },
                    "rates": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "excursionId": {
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          },
                          "commission": {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "percent",
                                  "per_passenger"
                                ]
                              },
                              "value": {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              }
                            },
                            "required": [
                              "kind",
                              "value"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "excursionId",
                          "title",
                          "commission"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "createdAt": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "code",
                    "name",
                    "pixKey",
                    "email",
                    "phone",
                    "active",
                    "commission",
                    "rates",
                    "createdAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/sales-agents/{id}/ledger": {
      "get": {
        "operationId": "getSalesAgentsIdLedger",
        "tags": [
          "sales-agents"
        ],
        "x-permission": [
          "finance:read"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "default": 1,
              "type": "integer",
              "minimum": 1,
              "maximum": 100000
            }
          },
          {
            "name": "size",
            "in": "query",
            "required": false,
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "default": "",
              "type": "string",
              "maxLength": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "accrual",
                              "reversal",
                              "settlement"
                            ]
                          },
                          "balanceEffectCents": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "amountCents": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "baseCents": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "bookingId": {
                            "type": "string"
                          },
                          "buyerName": {
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          },
                          "rule": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "settledBy": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "payoutId": {
                                    "type": "string"
                                  },
                                  "method": {
                                    "type": "string",
                                    "enum": [
                                      "manual_pix",
                                      "provider_split"
                                    ]
                                  }
                                },
                                "required": [
                                  "payoutId",
                                  "method"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "kind",
                          "balanceEffectCents",
                          "amountCents",
                          "baseCents",
                          "bookingId",
                          "buyerName",
                          "title",
                          "rule",
                          "createdAt",
                          "settledBy"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "size": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "pages": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "page",
                        "size",
                        "total",
                        "pages"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "items",
                    "pagination"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/sales-agents/{id}/rates": {
      "put": {
        "operationId": "putSalesAgentsIdRates",
        "tags": [
          "sales-agents"
        ],
        "x-permission": [
          "finance:manage"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "excursionId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "commission": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "percent",
                              "per_passenger"
                            ]
                          },
                          "value": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 10000000
                          }
                        },
                        "required": [
                          "kind",
                          "value"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "excursionId",
                  "commission"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "pixKey": {
                      "type": "string"
                    },
                    "email": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "phone": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "active": {
                      "type": "boolean"
                    },
                    "commission": {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "enum": [
                            "percent",
                            "per_passenger"
                          ]
                        },
                        "value": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "kind",
                        "value"
                      ],
                      "additionalProperties": false
                    },
                    "rates": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "excursionId": {
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          },
                          "commission": {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "percent",
                                  "per_passenger"
                                ]
                              },
                              "value": {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              }
                            },
                            "required": [
                              "kind",
                              "value"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "excursionId",
                          "title",
                          "commission"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "createdAt": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "code",
                    "name",
                    "pixKey",
                    "email",
                    "phone",
                    "active",
                    "commission",
                    "rates",
                    "createdAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/sales-agents/{id}/payouts": {
      "post": {
        "operationId": "postSalesAgentsIdPayouts",
        "tags": [
          "sales-agents"
        ],
        "x-permission": [
          "finance:manage"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "entryIds": {
                    "minItems": 1,
                    "maxItems": 500,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 100
                    }
                  },
                  "reference": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 200
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "idempotencyKey": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  }
                },
                "required": [
                  "entryIds",
                  "idempotencyKey"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Criado",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "agentId": {
                      "type": "string"
                    },
                    "method": {
                      "type": "string",
                      "enum": [
                        "manual_pix",
                        "provider_split"
                      ]
                    },
                    "amountCents": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "reference": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "providerId": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "providerReference": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "paidAt": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "entries": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "agentId",
                    "method",
                    "amountCents",
                    "reference",
                    "providerId",
                    "providerReference",
                    "paidAt",
                    "entries"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/agency-analytics": {
      "get": {
        "operationId": "getAgencyAnalytics",
        "tags": [
          "agency-analytics"
        ],
        "x-permission": [
          "organization:manage"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "metaPixelId": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "ga4MeasurementId": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "metaTestEventCode": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "metaConversionsApi": {
                      "type": "boolean"
                    },
                    "ga4MeasurementProtocol": {
                      "type": "boolean"
                    },
                    "deliveries": {
                      "type": "object",
                      "properties": {
                        "pending": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "sent": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "failed": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "lastError": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "pending",
                        "sent",
                        "failed",
                        "lastError"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "metaPixelId",
                    "ga4MeasurementId",
                    "metaTestEventCode",
                    "metaConversionsApi",
                    "ga4MeasurementProtocol",
                    "deliveries"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "putAgencyAnalytics",
        "tags": [
          "agency-analytics"
        ],
        "x-permission": [
          "organization:manage"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "metaPixelId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^\\d{15,16}$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "ga4MeasurementId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^G-[A-Z0-9]{6,12}$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "metaAccessToken": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9_-]{30,1024}$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "ga4ApiSecret": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9_-]{10,100}$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "metaTestEventCode": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^TEST[A-Z0-9]{2,20}$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "metaPixelId",
                  "ga4MeasurementId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "metaPixelId": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "ga4MeasurementId": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "metaTestEventCode": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "metaConversionsApi": {
                      "type": "boolean"
                    },
                    "ga4MeasurementProtocol": {
                      "type": "boolean"
                    },
                    "deliveries": {
                      "type": "object",
                      "properties": {
                        "pending": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "sent": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "failed": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "lastError": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "pending",
                        "sent",
                        "failed",
                        "lastError"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "metaPixelId",
                    "ga4MeasurementId",
                    "metaTestEventCode",
                    "metaConversionsApi",
                    "ga4MeasurementProtocol",
                    "deliveries"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/minor-travel/bookings/{id}": {
      "get": {
        "operationId": "getMinorTravelBookingsId",
        "tags": [
          "minor-travel"
        ],
        "x-permission": [
          "booking:read"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "default": 1,
              "type": "integer",
              "minimum": 1,
              "maximum": 100000
            }
          },
          {
            "name": "size",
            "in": "query",
            "required": false,
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "default": "",
              "type": "string",
              "maxLength": 100
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "not-required",
                "pending",
                "provided"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "passengerId": {
                            "type": "string"
                          },
                          "bookingId": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "age": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "companion": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "parents",
                                  "relative",
                                  "authorized-adult",
                                  "unaccompanied"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "responsiblePassengerId": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "responsibleName": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "proof": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "aev",
                                  "notarized",
                                  "judicial",
                                  "kinship"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "aevCode": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "rule": {
                            "type": "string",
                            "enum": [
                              "none",
                              "unknown",
                              "kinship",
                              "authorization"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "not-required",
                              "pending",
                              "provided"
                            ]
                          }
                        },
                        "required": [
                          "passengerId",
                          "bookingId",
                          "name",
                          "age",
                          "companion",
                          "responsiblePassengerId",
                          "responsibleName",
                          "proof",
                          "aevCode",
                          "rule",
                          "status"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "size": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "pages": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "page",
                        "size",
                        "total",
                        "pages"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "items",
                    "pagination"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/minor-travel/departures/{id}": {
      "get": {
        "operationId": "getMinorTravelDeparturesId",
        "tags": [
          "minor-travel"
        ],
        "x-permission": [
          "checkin:read"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "default": 1,
              "type": "integer",
              "minimum": 1,
              "maximum": 100000
            }
          },
          {
            "name": "size",
            "in": "query",
            "required": false,
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "default": "",
              "type": "string",
              "maxLength": 100
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "not-required",
                "pending",
                "provided"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "passengerId": {
                            "type": "string"
                          },
                          "bookingId": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "age": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "companion": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "parents",
                                  "relative",
                                  "authorized-adult",
                                  "unaccompanied"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "responsiblePassengerId": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "responsibleName": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "proof": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "aev",
                                  "notarized",
                                  "judicial",
                                  "kinship"
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "aevCode": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "rule": {
                            "type": "string",
                            "enum": [
                              "none",
                              "unknown",
                              "kinship",
                              "authorization"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "not-required",
                              "pending",
                              "provided"
                            ]
                          }
                        },
                        "required": [
                          "passengerId",
                          "bookingId",
                          "name",
                          "age",
                          "companion",
                          "responsiblePassengerId",
                          "responsibleName",
                          "proof",
                          "aevCode",
                          "rule",
                          "status"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "size": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "pages": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "page",
                        "size",
                        "total",
                        "pages"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "items",
                    "pagination"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/minor-travel/passengers/{id}": {
      "put": {
        "operationId": "putMinorTravelPassengersId",
        "tags": [
          "minor-travel"
        ],
        "x-permission": [
          "passenger:update"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "companion": {
                    "type": "string",
                    "enum": [
                      "parents",
                      "relative",
                      "authorized-adult",
                      "unaccompanied"
                    ]
                  },
                  "responsiblePassengerId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 100
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "proof": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "aev",
                          "notarized",
                          "judicial",
                          "kinship"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "aevCode": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 60
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "companion",
                  "responsiblePassengerId",
                  "proof",
                  "aevCode"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "passengerId": {
                      "type": "string"
                    },
                    "bookingId": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "age": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "companion": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "parents",
                            "relative",
                            "authorized-adult",
                            "unaccompanied"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "responsiblePassengerId": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "responsibleName": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "proof": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "aev",
                            "notarized",
                            "judicial",
                            "kinship"
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "aevCode": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "rule": {
                      "type": "string",
                      "enum": [
                        "none",
                        "unknown",
                        "kinship",
                        "authorization"
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "not-required",
                        "pending",
                        "provided"
                      ]
                    }
                  },
                  "required": [
                    "passengerId",
                    "bookingId",
                    "name",
                    "age",
                    "companion",
                    "responsiblePassengerId",
                    "responsibleName",
                    "proof",
                    "aevCode",
                    "rule",
                    "status"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/webhooks/endpoints": {
      "get": {
        "operationId": "getWebhooksEndpoints",
        "tags": [
          "webhooks"
        ],
        "x-permission": [
          "organization:manage"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "default": 1,
              "type": "integer",
              "minimum": 1,
              "maximum": 100000
            }
          },
          {
            "name": "size",
            "in": "query",
            "required": false,
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "default": "",
              "type": "string",
              "maxLength": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "url": {
                            "type": "string"
                          },
                          "events": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "booking.created",
                                "booking.confirmed",
                                "booking.cancelled",
                                "booking.expired",
                                "payment.received",
                                "payment.refunded",
                                "contract.signed"
                              ]
                            }
                          },
                          "active": {
                            "type": "boolean"
                          },
                          "consecutiveFailures": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "failingSince": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "updatedAt": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          }
                        },
                        "required": [
                          "id",
                          "url",
                          "events",
                          "active",
                          "consecutiveFailures",
                          "failingSince",
                          "createdAt",
                          "updatedAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "size": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "pages": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "page",
                        "size",
                        "total",
                        "pages"
                      ],
                      "additionalProperties": false
                    },
                    "events": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "booking.created",
                          "booking.confirmed",
                          "booking.cancelled",
                          "booking.expired",
                          "payment.received",
                          "payment.refunded",
                          "contract.signed"
                        ]
                      }
                    }
                  },
                  "required": [
                    "items",
                    "pagination",
                    "events"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "postWebhooksEndpoints",
        "tags": [
          "webhooks"
        ],
        "x-permission": [
          "organization:manage"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "maxLength": 500,
                    "format": "uri"
                  },
                  "events": {
                    "minItems": 1,
                    "maxItems": 7,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "booking.created",
                        "booking.confirmed",
                        "booking.cancelled",
                        "booking.expired",
                        "payment.received",
                        "payment.refunded",
                        "contract.signed"
                      ]
                    }
                  },
                  "active": {
                    "default": true,
                    "type": "boolean"
                  }
                },
                "required": [
                  "url",
                  "events"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Criado",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "endpoint": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "url": {
                          "type": "string"
                        },
                        "events": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "booking.created",
                              "booking.confirmed",
                              "booking.cancelled",
                              "booking.expired",
                              "payment.received",
                              "payment.refunded",
                              "contract.signed"
                            ]
                          }
                        },
                        "active": {
                          "type": "boolean"
                        },
                        "consecutiveFailures": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "failingSince": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "id",
                        "url",
                        "events",
                        "active",
                        "consecutiveFailures",
                        "failingSince",
                        "createdAt",
                        "updatedAt"
                      ],
                      "additionalProperties": false
                    },
                    "secret": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "endpoint",
                    "secret"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/webhooks/endpoints/{id}": {
      "patch": {
        "operationId": "patchWebhooksEndpointsId",
        "tags": [
          "webhooks"
        ],
        "x-permission": [
          "organization:manage"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "maxLength": 500,
                    "format": "uri"
                  },
                  "events": {
                    "minItems": 1,
                    "maxItems": 7,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "booking.created",
                        "booking.confirmed",
                        "booking.cancelled",
                        "booking.expired",
                        "payment.received",
                        "payment.refunded",
                        "contract.signed"
                      ]
                    }
                  },
                  "active": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "url": {
                      "type": "string"
                    },
                    "events": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "booking.created",
                          "booking.confirmed",
                          "booking.cancelled",
                          "booking.expired",
                          "payment.received",
                          "payment.refunded",
                          "contract.signed"
                        ]
                      }
                    },
                    "active": {
                      "type": "boolean"
                    },
                    "consecutiveFailures": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "failingSince": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "updatedAt": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "id",
                    "url",
                    "events",
                    "active",
                    "consecutiveFailures",
                    "failingSince",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteWebhooksEndpointsId",
        "tags": [
          "webhooks"
        ],
        "x-permission": [
          "organization:manage"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Sem conteúdo"
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/webhooks/endpoints/{id}/secret": {
      "post": {
        "operationId": "postWebhooksEndpointsIdSecret",
        "tags": [
          "webhooks"
        ],
        "x-permission": [
          "organization:manage"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "endpoint": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "url": {
                          "type": "string"
                        },
                        "events": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "booking.created",
                              "booking.confirmed",
                              "booking.cancelled",
                              "booking.expired",
                              "payment.received",
                              "payment.refunded",
                              "contract.signed"
                            ]
                          }
                        },
                        "active": {
                          "type": "boolean"
                        },
                        "consecutiveFailures": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "failingSince": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "createdAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "updatedAt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "id",
                        "url",
                        "events",
                        "active",
                        "consecutiveFailures",
                        "failingSince",
                        "createdAt",
                        "updatedAt"
                      ],
                      "additionalProperties": false
                    },
                    "secret": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "endpoint",
                    "secret"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/webhooks/endpoints/{id}/test": {
      "post": {
        "operationId": "postWebhooksEndpointsIdTest",
        "tags": [
          "webhooks"
        ],
        "x-permission": [
          "organization:manage"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "eventId": {
                      "type": "string"
                    },
                    "eventType": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "sent",
                        "failed"
                      ]
                    },
                    "attempts": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "responseStatus": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "lastError": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "createdAt": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "sentAt": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "eventId",
                    "eventType",
                    "status",
                    "attempts",
                    "responseStatus",
                    "lastError",
                    "createdAt",
                    "sentAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/webhooks/endpoints/{id}/deliveries": {
      "get": {
        "operationId": "getWebhooksEndpointsIdDeliveries",
        "tags": [
          "webhooks"
        ],
        "x-permission": [
          "organization:manage"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "default": 1,
              "type": "integer",
              "minimum": 1,
              "maximum": 100000
            }
          },
          {
            "name": "size",
            "in": "query",
            "required": false,
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "default": "",
              "type": "string",
              "maxLength": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "eventId": {
                            "type": "string"
                          },
                          "eventType": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "sent",
                              "failed"
                            ]
                          },
                          "attempts": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "responseStatus": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "lastError": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "createdAt": {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          "sentAt": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "eventId",
                          "eventType",
                          "status",
                          "attempts",
                          "responseStatus",
                          "lastError",
                          "createdAt",
                          "sentAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "size": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "pages": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "page",
                        "size",
                        "total",
                        "pages"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "items",
                    "pagination"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/pendencies": {
      "get": {
        "operationId": "getPendencies",
        "tags": [
          "pendencies"
        ],
        "x-access": "members",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "default": 1,
              "type": "integer",
              "minimum": 1,
              "maximum": 100000
            }
          },
          {
            "name": "size",
            "in": "query",
            "required": false,
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "default": "",
              "type": "string",
              "maxLength": 100
            }
          },
          {
            "name": "kind",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "payment-review",
                "overdue-installment",
                "refund-owed",
                "below-minimum",
                "minor-authorization",
                "contract-unsigned",
                "waitlist-seats",
                "agent-payouts"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "const": "departure"
                              },
                              "departure": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "excursionId": {
                                    "type": "string"
                                  },
                                  "title": {
                                    "type": "string"
                                  },
                                  "startsAt": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "id",
                                  "excursionId",
                                  "title",
                                  "startsAt"
                                ],
                                "additionalProperties": false
                              },
                              "summary": {
                                "type": "string"
                              },
                              "deadline": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "items": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "key": {
                                      "type": "string"
                                    },
                                    "kind": {
                                      "type": "string",
                                      "enum": [
                                        "payment-review",
                                        "overdue-installment",
                                        "refund-owed",
                                        "below-minimum",
                                        "minor-authorization",
                                        "contract-unsigned",
                                        "waitlist-seats",
                                        "agent-payouts"
                                      ]
                                    },
                                    "title": {
                                      "type": "string"
                                    },
                                    "detail": {
                                      "type": "string"
                                    },
                                    "deadline": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "bookingId": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "departure": {
                                      "anyOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "id": {
                                              "type": "string"
                                            },
                                            "excursionId": {
                                              "type": "string"
                                            },
                                            "title": {
                                              "type": "string"
                                            },
                                            "startsAt": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "id",
                                            "excursionId",
                                            "title",
                                            "startsAt"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "action": {
                                      "oneOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "type": "string",
                                              "const": "installment-link"
                                            },
                                            "bookingId": {
                                              "type": "string"
                                            },
                                            "installmentId": {
                                              "type": "string"
                                            },
                                            "amountCents": {
                                              "type": "integer",
                                              "minimum": -9007199254740991,
                                              "maximum": 9007199254740991
                                            },
                                            "checkoutUrl": {
                                              "type": [
                                                "string",
                                                "null"
                                              ]
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "bookingId",
                                            "installmentId",
                                            "amountCents",
                                            "checkoutUrl"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "type": "string",
                                              "const": "booking-link"
                                            },
                                            "bookingId": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "bookingId"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "type": "string",
                                              "const": "refund"
                                            },
                                            "bookingId": {
                                              "type": "string"
                                            },
                                            "amountCents": {
                                              "type": "integer",
                                              "minimum": -9007199254740991,
                                              "maximum": 9007199254740991
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "bookingId",
                                            "amountCents"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "type": "string",
                                              "const": "open-booking"
                                            },
                                            "bookingId": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "bookingId"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "type": "string",
                                              "const": "open-departure"
                                            },
                                            "departureId": {
                                              "type": "string"
                                            },
                                            "excursionId": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "departureId",
                                            "excursionId"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "type": "string",
                                              "const": "open-waitlist"
                                            },
                                            "departureId": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "departureId"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "type": {
                                              "type": "string",
                                              "const": "open-sales-agents"
                                            }
                                          },
                                          "required": [
                                            "type"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "key",
                                    "kind",
                                    "title",
                                    "detail",
                                    "deadline",
                                    "bookingId",
                                    "departure",
                                    "action"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "required": [
                              "type",
                              "departure",
                              "summary",
                              "deadline",
                              "items"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "const": "item"
                              },
                              "item": {
                                "type": "object",
                                "properties": {
                                  "key": {
                                    "type": "string"
                                  },
                                  "kind": {
                                    "type": "string",
                                    "enum": [
                                      "payment-review",
                                      "overdue-installment",
                                      "refund-owed",
                                      "below-minimum",
                                      "minor-authorization",
                                      "contract-unsigned",
                                      "waitlist-seats",
                                      "agent-payouts"
                                    ]
                                  },
                                  "title": {
                                    "type": "string"
                                  },
                                  "detail": {
                                    "type": "string"
                                  },
                                  "deadline": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "bookingId": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "departure": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "id": {
                                            "type": "string"
                                          },
                                          "excursionId": {
                                            "type": "string"
                                          },
                                          "title": {
                                            "type": "string"
                                          },
                                          "startsAt": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "id",
                                          "excursionId",
                                          "title",
                                          "startsAt"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "action": {
                                    "oneOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "const": "installment-link"
                                          },
                                          "bookingId": {
                                            "type": "string"
                                          },
                                          "installmentId": {
                                            "type": "string"
                                          },
                                          "amountCents": {
                                            "type": "integer",
                                            "minimum": -9007199254740991,
                                            "maximum": 9007199254740991
                                          },
                                          "checkoutUrl": {
                                            "type": [
                                              "string",
                                              "null"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "bookingId",
                                          "installmentId",
                                          "amountCents",
                                          "checkoutUrl"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "const": "booking-link"
                                          },
                                          "bookingId": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "bookingId"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "const": "refund"
                                          },
                                          "bookingId": {
                                            "type": "string"
                                          },
                                          "amountCents": {
                                            "type": "integer",
                                            "minimum": -9007199254740991,
                                            "maximum": 9007199254740991
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "bookingId",
                                          "amountCents"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "const": "open-booking"
                                          },
                                          "bookingId": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "bookingId"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "const": "open-departure"
                                          },
                                          "departureId": {
                                            "type": "string"
                                          },
                                          "excursionId": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "departureId",
                                          "excursionId"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "const": "open-waitlist"
                                          },
                                          "departureId": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "departureId"
                                        ],
                                        "additionalProperties": false
                                      },
                                      {
                                        "type": "object",
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "const": "open-sales-agents"
                                          }
                                        },
                                        "required": [
                                          "type"
                                        ],
                                        "additionalProperties": false
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "key",
                                  "kind",
                                  "title",
                                  "detail",
                                  "deadline",
                                  "bookingId",
                                  "departure",
                                  "action"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "type",
                              "item"
                            ],
                            "additionalProperties": false
                          }
                        ]
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "size": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 9007199254740991
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "pages": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "page",
                        "size",
                        "total",
                        "pages"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "items",
                    "pagination"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{organizationId}/pendencies/summary": {
      "get": {
        "operationId": "getPendenciesSummary",
        "tags": [
          "pendencies"
        ],
        "x-access": "members",
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "kinds": {
                      "type": "object",
                      "properties": {
                        "payment-review": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "overdue-installment": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "refund-owed": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "below-minimum": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "minor-authorization": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "contract-unsigned": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "waitlist-seats": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "agent-payouts": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "payment-review",
                        "overdue-installment",
                        "refund-owed",
                        "below-minimum",
                        "minor-authorization",
                        "contract-unsigned",
                        "waitlist-seats",
                        "agent-payouts"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "total",
                    "kinds"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Erro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "apiKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "Chave criada no painel, em Configurações › API e MCP (exc_live_...)."
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "required": [
          "error",
          "code",
          "requestId"
        ],
        "properties": {
          "error": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "requestId": {
            "type": "string"
          },
          "issues": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "path": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    }
  }
}
