{
  "openapi": "3.1.0",
  "info": {
    "title": "ELIORIA SST-X API",
    "version": "1.0.0",
    "description": "Contrato HTTP gerado diretamente das rotas Hono do SST-X."
  },
  "servers": [
    {
      "url": "https://api.elioria.com.br",
      "description": "Production"
    }
  ],
  "paths": {
    "/api/admin/environments/tenants": {
      "get": {
        "operationId": "get-api-admin-environments-tenants",
        "summary": "GET /tenants",
        "description": "GET /tenants",
        "tags": [
          "admin"
        ],
        "responses": {
          "200": {
            "description": "HTTP 200 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/environment-admin.ts:31"
        ],
        "x-middlewares": []
      }
    },
    "/api/admin/environments/tenants/{id}": {
      "put": {
        "operationId": "put-api-admin-environments-tenants-id",
        "summary": "PUT /tenants/{id}",
        "description": "PUT /tenants/{id}",
        "tags": [
          "admin"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "404": {
            "description": "HTTP 404 response"
          },
          "409": {
            "description": "HTTP 409 response"
          },
          "422": {
            "description": "HTTP 422 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/environment-admin.ts:40"
        ],
        "x-middlewares": []
      }
    },
    "/api/admin/environments/tenants/{id}/purge": {
      "post": {
        "operationId": "post-api-admin-environments-tenants-id-purge",
        "summary": "POST /tenants/{id}/purge",
        "description": "POST /tenants/{id}/purge",
        "tags": [
          "admin"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "404": {
            "description": "HTTP 404 response"
          },
          "409": {
            "description": "HTTP 409 response"
          },
          "422": {
            "description": "HTTP 422 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/environment-admin.ts:68"
        ],
        "x-middlewares": []
      }
    },
    "/api/admin/environments/tenants/{id}/purge-preview": {
      "get": {
        "operationId": "get-api-admin-environments-tenants-id-purge-preview",
        "summary": "GET /tenants/{id}/purge-preview",
        "description": "GET /tenants/{id}/purge-preview",
        "tags": [
          "admin"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "404": {
            "description": "HTTP 404 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/environment-admin.ts:59"
        ],
        "x-middlewares": []
      }
    },
    "/api/auth/{wildcard}": {
      "get": {
        "operationId": "get-api-auth-wildcard",
        "summary": "GET /api/auth/{wildcard}",
        "description": "GET /api/auth/{wildcard}",
        "tags": [
          "auth"
        ],
        "parameters": [
          {
            "name": "wildcard",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "HTTP 200 response"
          }
        },
        "x-source-locations": [
          "apps/api/src/index.ts:187"
        ],
        "x-middlewares": []
      },
      "post": {
        "operationId": "post-api-auth-wildcard",
        "summary": "POST /api/auth/{wildcard}",
        "description": "POST /api/auth/{wildcard}",
        "tags": [
          "auth"
        ],
        "parameters": [
          {
            "name": "wildcard",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "HTTP 200 response"
          }
        },
        "x-source-locations": [
          "apps/api/src/index.ts:187"
        ],
        "x-middlewares": []
      }
    },
    "/api/cipa/votar/{token}": {
      "post": {
        "operationId": "post-api-cipa-votar-token",
        "summary": "POST /api/cipa/votar/{token}",
        "description": "POST /api/cipa/votar/{token}",
        "tags": [
          "cipa"
        ],
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "410": {
            "description": "HTTP 410 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/index.ts:199"
        ],
        "x-middlewares": []
      }
    },
    "/api/ia/admin/audit": {
      "get": {
        "operationId": "get-api-ia-admin-audit",
        "summary": "GET /audit",
        "description": "GET /audit",
        "tags": [
          "ia"
        ],
        "responses": {
          "200": {
            "description": "HTTP 200 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/ia-admin.ts:969"
        ],
        "x-middlewares": []
      }
    },
    "/api/ia/admin/audit/export": {
      "get": {
        "operationId": "get-api-ia-admin-audit-export",
        "summary": "GET /audit/export",
        "description": "GET /audit/export",
        "tags": [
          "ia"
        ],
        "responses": {
          "200": {
            "description": "HTTP 200 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/ia-admin.ts:1071"
        ],
        "x-middlewares": []
      }
    },
    "/api/ia/admin/block-user/{userId}": {
      "post": {
        "operationId": "post-api-ia-admin-block-user-user-id",
        "summary": "POST /block-user/{userId}",
        "description": "POST /block-user/{userId}",
        "tags": [
          "ia"
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "404": {
            "description": "HTTP 404 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/ia-admin.ts:892"
        ],
        "x-middlewares": []
      }
    },
    "/api/ia/admin/bootstrap": {
      "post": {
        "operationId": "post-api-ia-admin-bootstrap",
        "summary": "POST /bootstrap",
        "description": "POST /bootstrap",
        "tags": [
          "ia"
        ],
        "responses": {
          "200": {
            "description": "HTTP 200 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/ia-admin.ts:1201"
        ],
        "x-middlewares": []
      }
    },
    "/api/ia/admin/entitlements/{tenantId}": {
      "post": {
        "operationId": "post-api-ia-admin-entitlements-tenant-id",
        "summary": "POST /entitlements/{tenantId}",
        "description": "POST /entitlements/{tenantId}",
        "tags": [
          "ia"
        ],
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "HTTP 200 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/ia-admin.ts:905"
        ],
        "x-middlewares": []
      }
    },
    "/api/ia/admin/feedback": {
      "get": {
        "operationId": "get-api-ia-admin-feedback",
        "summary": "GET /feedback",
        "description": "GET /feedback",
        "tags": [
          "ia"
        ],
        "responses": {
          "200": {
            "description": "HTTP 200 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/ia-admin.ts:934"
        ],
        "x-middlewares": []
      }
    },
    "/api/ia/admin/health": {
      "get": {
        "operationId": "get-api-ia-admin-health",
        "summary": "GET /health",
        "description": "GET /health",
        "tags": [
          "ia"
        ],
        "responses": {
          "200": {
            "description": "HTTP 200 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/ia-admin.ts:1107"
        ],
        "x-middlewares": []
      }
    },
    "/api/ia/admin/kb-versions": {
      "get": {
        "operationId": "get-api-ia-admin-kb-versions",
        "summary": "GET /kb-versions",
        "description": "GET /kb-versions",
        "tags": [
          "ia"
        ],
        "responses": {
          "200": {
            "description": "HTTP 200 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/ia-admin.ts:484"
        ],
        "x-middlewares": []
      },
      "post": {
        "operationId": "post-api-ia-admin-kb-versions",
        "summary": "POST /kb-versions",
        "description": "POST /kb-versions",
        "tags": [
          "ia"
        ],
        "responses": {
          "201": {
            "description": "HTTP 201 response"
          },
          "255": {
            "description": "HTTP 255 response"
          },
          "400": {
            "description": "HTTP 400 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/ia-admin.ts:518"
        ],
        "x-middlewares": []
      }
    },
    "/api/ia/admin/kb-versions/{id}/compare/{otherId}": {
      "get": {
        "operationId": "get-api-ia-admin-kb-versions-id-compare-other-id",
        "summary": "GET /kb-versions/{id}/compare/{otherId}",
        "description": "GET /kb-versions/{id}/compare/{otherId}",
        "tags": [
          "ia"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "otherId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "404": {
            "description": "HTTP 404 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/ia-admin.ts:1016"
        ],
        "x-middlewares": []
      }
    },
    "/api/ia/admin/kb-versions/{id}/publish": {
      "post": {
        "operationId": "post-api-ia-admin-kb-versions-id-publish",
        "summary": "POST /kb-versions/{id}/publish",
        "description": "POST /kb-versions/{id}/publish",
        "tags": [
          "ia"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "404": {
            "description": "HTTP 404 response"
          },
          "409": {
            "description": "HTTP 409 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/ia-admin.ts:557"
        ],
        "x-middlewares": []
      }
    },
    "/api/ia/admin/kb-versions/{id}/rollback": {
      "post": {
        "operationId": "post-api-ia-admin-kb-versions-id-rollback",
        "summary": "POST /kb-versions/{id}/rollback",
        "description": "POST /kb-versions/{id}/rollback",
        "tags": [
          "ia"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "HTTP 400 response"
          },
          "404": {
            "description": "HTTP 404 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/ia-admin.ts:649"
        ],
        "x-middlewares": []
      }
    },
    "/api/ia/admin/knowledge-files": {
      "get": {
        "operationId": "get-api-ia-admin-knowledge-files",
        "summary": "GET /knowledge-files",
        "description": "GET /knowledge-files",
        "tags": [
          "ia"
        ],
        "responses": {
          "200": {
            "description": "HTTP 200 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/ia-admin.ts:288"
        ],
        "x-middlewares": []
      },
      "post": {
        "operationId": "post-api-ia-admin-knowledge-files",
        "summary": "POST /knowledge-files",
        "description": "POST /knowledge-files",
        "tags": [
          "ia"
        ],
        "responses": {
          "201": {
            "description": "HTTP 201 response"
          },
          "255": {
            "description": "HTTP 255 response"
          },
          "400": {
            "description": "HTTP 400 response"
          },
          "413": {
            "description": "HTTP 413 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/ia-admin.ts:348"
        ],
        "x-middlewares": []
      }
    },
    "/api/ia/admin/knowledge-files/{id}": {
      "get": {
        "operationId": "get-api-ia-admin-knowledge-files-id",
        "summary": "GET /knowledge-files/{id}",
        "description": "GET /knowledge-files/{id}",
        "tags": [
          "ia"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "404": {
            "description": "HTTP 404 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/ia-admin.ts:324"
        ],
        "x-middlewares": []
      },
      "patch": {
        "operationId": "patch-api-ia-admin-knowledge-files-id",
        "summary": "PATCH /knowledge-files/{id}",
        "description": "PATCH /knowledge-files/{id}",
        "tags": [
          "ia"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "404": {
            "description": "HTTP 404 response"
          },
          "413": {
            "description": "HTTP 413 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/ia-admin.ts:386"
        ],
        "x-middlewares": []
      }
    },
    "/api/ia/admin/knowledge-files/{id}/status": {
      "post": {
        "operationId": "post-api-ia-admin-knowledge-files-id-status",
        "summary": "POST /knowledge-files/{id}/status",
        "description": "POST /knowledge-files/{id}/status",
        "tags": [
          "ia"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "HTTP 400 response"
          },
          "404": {
            "description": "HTTP 404 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/ia-admin.ts:435"
        ],
        "x-middlewares": []
      }
    },
    "/api/ia/admin/knowledge-files/{id}/toggle-ai": {
      "post": {
        "operationId": "post-api-ia-admin-knowledge-files-id-toggle-ai",
        "summary": "POST /knowledge-files/{id}/toggle-ai",
        "description": "POST /knowledge-files/{id}/toggle-ai",
        "tags": [
          "ia"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "404": {
            "description": "HTTP 404 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/ia-admin.ts:469"
        ],
        "x-middlewares": []
      }
    },
    "/api/ia/admin/limits/{tenantId}": {
      "put": {
        "operationId": "put-api-ia-admin-limits-tenant-id",
        "summary": "PUT /limits/{tenantId}",
        "description": "PUT /limits/{tenantId}",
        "tags": [
          "ia"
        ],
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "HTTP 200 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/ia-admin.ts:855"
        ],
        "x-middlewares": []
      }
    },
    "/api/ia/admin/messages/{id}/flag": {
      "post": {
        "operationId": "post-api-ia-admin-messages-id-flag",
        "summary": "POST /messages/{id}/flag",
        "description": "POST /messages/{id}/flag",
        "tags": [
          "ia"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "404": {
            "description": "HTTP 404 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/ia-admin.ts:956"
        ],
        "x-middlewares": []
      }
    },
    "/api/ia/admin/notifications": {
      "get": {
        "operationId": "get-api-ia-admin-notifications",
        "summary": "GET /notifications",
        "description": "GET /notifications",
        "tags": [
          "ia"
        ],
        "responses": {
          "200": {
            "description": "HTTP 200 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/ia-admin.ts:1262"
        ],
        "x-middlewares": []
      }
    },
    "/api/ia/admin/notifications/{id}/retry": {
      "post": {
        "operationId": "post-api-ia-admin-notifications-id-retry",
        "summary": "POST /notifications/{id}/retry",
        "description": "POST /notifications/{id}/retry",
        "tags": [
          "ia"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "404": {
            "description": "HTTP 404 response"
          },
          "409": {
            "description": "HTTP 409 response"
          },
          "503": {
            "description": "HTTP 503 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/ia-admin.ts:1272"
        ],
        "x-middlewares": []
      }
    },
    "/api/ia/admin/prompt-configs": {
      "get": {
        "operationId": "get-api-ia-admin-prompt-configs",
        "summary": "GET /prompt-configs",
        "description": "GET /prompt-configs",
        "tags": [
          "ia"
        ],
        "responses": {
          "200": {
            "description": "HTTP 200 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/ia-admin.ts:92"
        ],
        "x-middlewares": []
      },
      "post": {
        "operationId": "post-api-ia-admin-prompt-configs",
        "summary": "POST /prompt-configs",
        "description": "POST /prompt-configs",
        "tags": [
          "ia"
        ],
        "responses": {
          "201": {
            "description": "HTTP 201 response"
          },
          "255": {
            "description": "HTTP 255 response"
          },
          "400": {
            "description": "HTTP 400 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/ia-admin.ts:101"
        ],
        "x-middlewares": []
      }
    },
    "/api/ia/admin/prompt-configs/{id}": {
      "patch": {
        "operationId": "patch-api-ia-admin-prompt-configs-id",
        "summary": "PATCH /prompt-configs/{id}",
        "description": "PATCH /prompt-configs/{id}",
        "tags": [
          "ia"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "404": {
            "description": "HTTP 404 response"
          },
          "409": {
            "description": "HTTP 409 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/ia-admin.ts:133"
        ],
        "x-middlewares": []
      }
    },
    "/api/ia/admin/prompt-configs/{id}/archive": {
      "post": {
        "operationId": "post-api-ia-admin-prompt-configs-id-archive",
        "summary": "POST /prompt-configs/{id}/archive",
        "description": "POST /prompt-configs/{id}/archive",
        "tags": [
          "ia"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "404": {
            "description": "HTTP 404 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/ia-admin.ts:274"
        ],
        "x-middlewares": []
      }
    },
    "/api/ia/admin/prompt-configs/{id}/compare/{otherId}": {
      "get": {
        "operationId": "get-api-ia-admin-prompt-configs-id-compare-other-id",
        "summary": "GET /prompt-configs/{id}/compare/{otherId}",
        "description": "GET /prompt-configs/{id}/compare/{otherId}",
        "tags": [
          "ia"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "otherId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "404": {
            "description": "HTTP 404 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/ia-admin.ts:982"
        ],
        "x-middlewares": []
      }
    },
    "/api/ia/admin/prompt-configs/{id}/publish": {
      "post": {
        "operationId": "post-api-ia-admin-prompt-configs-id-publish",
        "summary": "POST /prompt-configs/{id}/publish",
        "description": "POST /prompt-configs/{id}/publish",
        "tags": [
          "ia"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "HTTP 400 response"
          },
          "404": {
            "description": "HTTP 404 response"
          },
          "409": {
            "description": "HTTP 409 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/ia-admin.ts:172"
        ],
        "x-middlewares": []
      }
    },
    "/api/ia/admin/prompt-configs/{id}/rollback": {
      "post": {
        "operationId": "post-api-ia-admin-prompt-configs-id-rollback",
        "summary": "POST /prompt-configs/{id}/rollback",
        "description": "POST /prompt-configs/{id}/rollback",
        "tags": [
          "ia"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "HTTP 400 response"
          },
          "404": {
            "description": "HTTP 404 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/ia-admin.ts:234"
        ],
        "x-middlewares": []
      }
    },
    "/api/ia/admin/subscribers": {
      "get": {
        "operationId": "get-api-ia-admin-subscribers",
        "summary": "GET /subscribers",
        "description": "GET /subscribers",
        "tags": [
          "ia"
        ],
        "responses": {
          "200": {
            "description": "HTTP 200 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/ia-admin.ts:827"
        ],
        "x-middlewares": []
      }
    },
    "/api/ia/admin/tests": {
      "get": {
        "operationId": "get-api-ia-admin-tests",
        "summary": "GET /tests",
        "description": "GET /tests",
        "tags": [
          "ia"
        ],
        "responses": {
          "200": {
            "description": "HTTP 200 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/ia-admin.ts:687"
        ],
        "x-middlewares": []
      },
      "post": {
        "operationId": "post-api-ia-admin-tests",
        "summary": "POST /tests",
        "description": "POST /tests",
        "tags": [
          "ia"
        ],
        "responses": {
          "201": {
            "description": "HTTP 201 response"
          },
          "400": {
            "description": "HTTP 400 response"
          },
          "503": {
            "description": "HTTP 503 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/ia-admin.ts:697"
        ],
        "x-middlewares": []
      }
    },
    "/api/ia/admin/tests/{id}": {
      "patch": {
        "operationId": "patch-api-ia-admin-tests-id",
        "summary": "PATCH /tests/{id}",
        "description": "PATCH /tests/{id}",
        "tags": [
          "ia"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "404": {
            "description": "HTTP 404 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/ia-admin.ts:784"
        ],
        "x-middlewares": []
      }
    },
    "/api/ia/admin/usage": {
      "get": {
        "operationId": "get-api-ia-admin-usage",
        "summary": "GET /usage",
        "description": "GET /usage",
        "tags": [
          "ia"
        ],
        "responses": {
          "200": {
            "description": "HTTP 200 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/ia-admin.ts:804"
        ],
        "x-middlewares": []
      }
    },
    "/api/ia/conversations": {
      "get": {
        "operationId": "get-api-ia-conversations",
        "summary": "GET /conversations",
        "description": "GET /conversations",
        "tags": [
          "ia"
        ],
        "responses": {
          "400": {
            "description": "HTTP 400 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/ia.ts:317"
        ],
        "x-middlewares": []
      },
      "post": {
        "operationId": "post-api-ia-conversations",
        "summary": "POST /conversations",
        "description": "POST /conversations",
        "tags": [
          "ia"
        ],
        "responses": {
          "201": {
            "description": "HTTP 201 response"
          },
          "255": {
            "description": "HTTP 255 response"
          },
          "400": {
            "description": "HTTP 400 response"
          },
          "403": {
            "description": "HTTP 403 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/ia.ts:337"
        ],
        "x-middlewares": []
      }
    },
    "/api/ia/conversations/{id}": {
      "patch": {
        "operationId": "patch-api-ia-conversations-id",
        "summary": "PATCH /conversations/{id}",
        "description": "PATCH /conversations/{id}",
        "tags": [
          "ia"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "255": {
            "description": "HTTP 255 response"
          },
          "400": {
            "description": "HTTP 400 response"
          },
          "404": {
            "description": "HTTP 404 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/ia.ts:377"
        ],
        "x-middlewares": []
      },
      "delete": {
        "operationId": "delete-api-ia-conversations-id",
        "summary": "DELETE /conversations/{id}",
        "description": "DELETE /conversations/{id}",
        "tags": [
          "ia"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "HTTP 400 response"
          },
          "404": {
            "description": "HTTP 404 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/ia.ts:395"
        ],
        "x-middlewares": []
      }
    },
    "/api/ia/conversations/{id}/messages": {
      "get": {
        "operationId": "get-api-ia-conversations-id-messages",
        "summary": "GET /conversations/{id}/messages",
        "description": "GET /conversations/{id}/messages",
        "tags": [
          "ia"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "HTTP 400 response"
          },
          "404": {
            "description": "HTTP 404 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/ia.ts:414"
        ],
        "x-middlewares": []
      },
      "post": {
        "operationId": "post-api-ia-conversations-id-messages",
        "summary": "POST /conversations/{id}/messages",
        "description": "POST /conversations/{id}/messages",
        "tags": [
          "ia"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "HTTP 400 response"
          },
          "403": {
            "description": "HTTP 403 response"
          },
          "404": {
            "description": "HTTP 404 response"
          },
          "429": {
            "description": "HTTP 429 response"
          },
          "503": {
            "description": "HTTP 503 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/ia.ts:438"
        ],
        "x-middlewares": []
      }
    },
    "/api/ia/messages/{id}/feedback": {
      "post": {
        "operationId": "post-api-ia-messages-id-feedback",
        "summary": "POST /messages/{id}/feedback",
        "description": "POST /messages/{id}/feedback",
        "tags": [
          "ia"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "100": {
            "description": "HTTP 100 response"
          },
          "201": {
            "description": "HTTP 201 response"
          },
          "400": {
            "description": "HTTP 400 response"
          },
          "404": {
            "description": "HTTP 404 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/ia.ts:628"
        ],
        "x-middlewares": []
      }
    },
    "/api/ia/profile": {
      "get": {
        "operationId": "get-api-ia-profile",
        "summary": "GET /profile",
        "description": "GET /profile",
        "tags": [
          "ia"
        ],
        "responses": {
          "200": {
            "description": "HTTP 200 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/ia.ts:258"
        ],
        "x-middlewares": []
      },
      "put": {
        "operationId": "put-api-ia-profile",
        "summary": "PUT /profile",
        "description": "PUT /profile",
        "tags": [
          "ia"
        ],
        "responses": {
          "400": {
            "description": "HTTP 400 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/ia.ts:269"
        ],
        "x-middlewares": []
      }
    },
    "/api/ia/status": {
      "get": {
        "operationId": "get-api-ia-status",
        "summary": "GET /status",
        "description": "GET /status",
        "tags": [
          "ia"
        ],
        "responses": {
          "400": {
            "description": "HTTP 400 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/ia.ts:190"
        ],
        "x-middlewares": []
      }
    },
    "/api/inspecoes/risk-assessments": {
      "get": {
        "operationId": "get-api-inspecoes-risk-assessments",
        "summary": "GET /",
        "description": "GET /",
        "tags": [
          "inspecoes"
        ],
        "responses": {
          "400": {
            "description": "HTTP 400 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/inspecoes-risk.ts:119"
        ],
        "x-middlewares": [
          "requirePermission(\"inspecoes\", \"read\")"
        ]
      },
      "post": {
        "operationId": "post-api-inspecoes-risk-assessments",
        "summary": "POST /",
        "description": "POST /",
        "tags": [
          "inspecoes"
        ],
        "responses": {
          "201": {
            "description": "HTTP 201 response"
          },
          "422": {
            "description": "HTTP 422 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/inspecoes-risk.ts:147"
        ],
        "x-middlewares": [
          "requirePermission(\"inspecoes\", \"write\")"
        ]
      }
    },
    "/api/inspecoes/risk-assessments/create-risk-item": {
      "post": {
        "operationId": "post-api-inspecoes-risk-assessments-create-risk-item",
        "summary": "POST /create-risk-item",
        "description": "POST /create-risk-item",
        "tags": [
          "inspecoes"
        ],
        "responses": {
          "201": {
            "description": "HTTP 201 response"
          },
          "404": {
            "description": "HTTP 404 response"
          },
          "422": {
            "description": "HTTP 422 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/inspecoes-risk.ts:180"
        ],
        "x-middlewares": [
          "requirePermission(\"inspecoes\", \"write\")"
        ]
      }
    },
    "/api/inspecoes/risk-assessments/latest": {
      "get": {
        "operationId": "get-api-inspecoes-risk-assessments-latest",
        "summary": "GET /latest",
        "description": "GET /latest",
        "tags": [
          "inspecoes"
        ],
        "responses": {
          "400": {
            "description": "HTTP 400 response"
          },
          "404": {
            "description": "HTTP 404 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/inspecoes-risk.ts:132"
        ],
        "x-middlewares": [
          "requirePermission(\"inspecoes\", \"read\")"
        ]
      }
    },
    "/api/inspecoes/risk-methodologies": {
      "get": {
        "operationId": "get-api-inspecoes-risk-methodologies",
        "summary": "GET /",
        "description": "GET /",
        "tags": [
          "inspecoes"
        ],
        "responses": {
          "200": {
            "description": "HTTP 200 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/inspecoes-risk.ts:30"
        ],
        "x-middlewares": [
          "requirePermission(\"inspecoes\", \"read\")"
        ]
      },
      "post": {
        "operationId": "post-api-inspecoes-risk-methodologies",
        "summary": "POST /",
        "description": "POST /",
        "tags": [
          "inspecoes"
        ],
        "responses": {
          "201": {
            "description": "HTTP 201 response"
          },
          "422": {
            "description": "HTTP 422 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/inspecoes-risk.ts:63"
        ],
        "x-middlewares": [
          "requirePermission(\"inspecoes\", \"write\")"
        ]
      }
    },
    "/api/inspecoes/risk-methodologies/{id}": {
      "get": {
        "operationId": "get-api-inspecoes-risk-methodologies-id",
        "summary": "GET /{id}",
        "description": "GET /{id}",
        "tags": [
          "inspecoes"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "404": {
            "description": "HTTP 404 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/inspecoes-risk.ts:53"
        ],
        "x-middlewares": [
          "requirePermission(\"inspecoes\", \"read\")"
        ]
      }
    },
    "/api/inspecoes/risk-methodologies/{id}/activate": {
      "patch": {
        "operationId": "patch-api-inspecoes-risk-methodologies-id-activate",
        "summary": "PATCH /{id}/activate",
        "description": "PATCH /{id}/activate",
        "tags": [
          "inspecoes"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "422": {
            "description": "HTTP 422 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/inspecoes-risk.ts:89"
        ],
        "x-middlewares": [
          "requirePermission(\"inspecoes\", \"write\")"
        ]
      }
    },
    "/api/inspecoes/risk-methodologies/{id}/archive": {
      "patch": {
        "operationId": "patch-api-inspecoes-risk-methodologies-id-archive",
        "summary": "PATCH /{id}/archive",
        "description": "PATCH /{id}/archive",
        "tags": [
          "inspecoes"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "422": {
            "description": "HTTP 422 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/inspecoes-risk.ts:102"
        ],
        "x-middlewares": [
          "requirePermission(\"inspecoes\", \"write\")"
        ]
      }
    },
    "/api/inspecoes/risk-methodologies/ensure-legacy": {
      "post": {
        "operationId": "post-api-inspecoes-risk-methodologies-ensure-legacy",
        "summary": "POST /ensure-legacy",
        "description": "POST /ensure-legacy",
        "tags": [
          "inspecoes"
        ],
        "responses": {
          "422": {
            "description": "HTTP 422 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/inspecoes-risk.ts:39"
        ],
        "x-middlewares": [
          "requirePermission(\"inspecoes\", \"write\")"
        ]
      }
    },
    "/api/laudos-tecnicos/{id}/revisions/{revId}/aet-recommendations/{entityId}/send-to-action-plan": {
      "post": {
        "operationId": "post-api-laudos-tecnicos-id-revisions-rev-id-aet-recommendations-entity-id-send-to-action-plan",
        "summary": "POST /{id}/revisions/{revId}/aet-recommendations/{entityId}/send-to-action-plan",
        "description": "POST /{id}/revisions/{revId}/aet-recommendations/{entityId}/send-to-action-plan",
        "tags": [
          "laudos-tecnicos"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "revId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "entityId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "HTTP 201 response"
          },
          "404": {
            "description": "HTTP 404 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/laudos-aet.ts:568"
        ],
        "x-middlewares": [
          "requirePermission(\"laudos\", \"write\")"
        ]
      }
    },
    "/api/laudos-tecnicos/{id}/revisions/{revId}/aet-task-comparison": {
      "get": {
        "operationId": "get-api-laudos-tecnicos-id-revisions-rev-id-aet-task-comparison",
        "summary": "GET /{id}/revisions/{revId}/aet-task-comparison",
        "description": "GET /{id}/revisions/{revId}/aet-task-comparison",
        "tags": [
          "laudos-tecnicos"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "revId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "HTTP 200 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/laudos-aet.ts:612"
        ],
        "x-middlewares": [
          "requirePermission(\"laudos\", \"read\")"
        ]
      }
    },
    "/api/laudos-tecnicos/{reportId}/compare-revisions": {
      "get": {
        "operationId": "get-api-laudos-tecnicos-report-id-compare-revisions",
        "summary": "GET /:reportId/compare-revisions Query: ?from=0&to=1",
        "description": "GET /:reportId/compare-revisions Query: ?from=0&to=1",
        "tags": [
          "laudos-tecnicos"
        ],
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "404": {
            "description": "HTTP 404 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/laudos-lifecycle.ts:1104"
        ],
        "x-middlewares": [
          "requirePermission(\"laudos\", \"read\")"
        ]
      }
    },
    "/api/laudos-tecnicos/{reportId}/emissions": {
      "get": {
        "operationId": "get-api-laudos-tecnicos-report-id-emissions",
        "summary": "GET /:reportId/emissions List all emissions for a report.",
        "description": "GET /:reportId/emissions List all emissions for a report.",
        "tags": [
          "laudos-tecnicos"
        ],
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "HTTP 200 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/laudos-lifecycle.ts:1184"
        ],
        "x-middlewares": [
          "requirePermission(\"laudos\", \"read\")"
        ]
      }
    },
    "/api/laudos-tecnicos/{reportId}/new-revision": {
      "post": {
        "operationId": "post-api-laudos-tecnicos-report-id-new-revision",
        "summary": "POST /:reportId/new-revision Body: { changeReason }",
        "description": "POST /:reportId/new-revision Body: { changeReason }",
        "tags": [
          "laudos-tecnicos"
        ],
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "HTTP 201 response"
          },
          "400": {
            "description": "HTTP 400 response"
          },
          "409": {
            "description": "HTTP 409 response"
          },
          "500": {
            "description": "HTTP 500 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/laudos-lifecycle.ts:899"
        ],
        "x-middlewares": [
          "requirePermission(\"laudos\", \"write\")"
        ]
      }
    },
    "/api/laudos-tecnicos/{reportId}/revisions/{revisionId}/approve": {
      "post": {
        "operationId": "post-api-laudos-tecnicos-report-id-revisions-revision-id-approve",
        "summary": "POST /:reportId/revisions/:revisionId/approve Body: { decision: \"approved\" | \"rejected\", comment",
        "description": "POST /:reportId/revisions/:revisionId/approve Body: { decision: \"approved\" | \"rejected\", comment? }",
        "tags": [
          "laudos-tecnicos"
        ],
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "revisionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "HTTP 400 response"
          },
          "403": {
            "description": "HTTP 403 response"
          },
          "409": {
            "description": "HTTP 409 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/laudos-lifecycle.ts:336"
        ],
        "x-middlewares": [
          "requirePermission(\"laudos\", \"approve\")"
        ]
      }
    },
    "/api/laudos-tecnicos/{reportId}/revisions/{revisionId}/cancel": {
      "post": {
        "operationId": "post-api-laudos-tecnicos-report-id-revisions-revision-id-cancel",
        "summary": "POST /:reportId/revisions/:revisionId/cancel Body: { reason }",
        "description": "POST /:reportId/revisions/:revisionId/cancel Body: { reason }",
        "tags": [
          "laudos-tecnicos"
        ],
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "revisionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "HTTP 400 response"
          },
          "409": {
            "description": "HTTP 409 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/laudos-lifecycle.ts:1143"
        ],
        "x-middlewares": [
          "requirePermission(\"laudos\", \"approve\")"
        ]
      }
    },
    "/api/laudos-tecnicos/{reportId}/revisions/{revisionId}/download": {
      "get": {
        "operationId": "get-api-laudos-tecnicos-report-id-revisions-revision-id-download",
        "summary": "GET /:reportId/revisions/:revisionId/download Download the official PDF (requires authorization).",
        "description": "GET /:reportId/revisions/:revisionId/download Download the official PDF (requires authorization).",
        "tags": [
          "laudos-tecnicos"
        ],
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "revisionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "403": {
            "description": "HTTP 403 response"
          },
          "404": {
            "description": "HTTP 404 response"
          },
          "500": {
            "description": "HTTP 500 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/laudos-lifecycle.ts:980"
        ],
        "x-middlewares": [
          "requirePermission(\"laudos\", \"read\")"
        ]
      }
    },
    "/api/laudos-tecnicos/{reportId}/revisions/{revisionId}/emit": {
      "post": {
        "operationId": "post-api-laudos-tecnicos-report-id-revisions-revision-id-emit",
        "summary": "Legacy endpoint retained as an explicit compatibility error.",
        "description": "Legacy endpoint retained as an explicit compatibility error.",
        "tags": [
          "laudos-tecnicos"
        ],
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "revisionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "410": {
            "description": "HTTP 410 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/laudos-lifecycle.ts:629"
        ],
        "x-middlewares": [
          "requirePermission(\"laudos\", \"approve\")"
        ]
      }
    },
    "/api/laudos-tecnicos/{reportId}/revisions/{revisionId}/issue": {
      "post": {
        "operationId": "post-api-laudos-tecnicos-report-id-revisions-revision-id-issue",
        "summary": "POST /:reportId/revisions/:revisionId/issue Officially issues an already prepared and signed artifact.",
        "description": "POST /:reportId/revisions/:revisionId/issue Officially issues an already prepared and signed artifact.",
        "tags": [
          "laudos-tecnicos"
        ],
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "revisionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "409": {
            "description": "HTTP 409 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/laudos-lifecycle.ts:832"
        ],
        "x-middlewares": [
          "requirePermission(\"laudos\", \"approve\")"
        ]
      }
    },
    "/api/laudos-tecnicos/{reportId}/revisions/{revisionId}/prepare-artifact": {
      "post": {
        "operationId": "post-api-laudos-tecnicos-report-id-revisions-revision-id-prepare-artifact",
        "summary": "POST /:reportId/revisions/:revisionId/prepare-artifact Idempotently freezes the snapshot and creates the official PDF",
        "description": "POST /:reportId/revisions/:revisionId/prepare-artifact Idempotently freezes the snapshot and creates the official PDF. This does not issue the document and does not activate public verification.",
        "tags": [
          "laudos-tecnicos"
        ],
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "revisionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "HTTP 201 response"
          },
          "409": {
            "description": "HTTP 409 response"
          },
          "503": {
            "description": "HTTP 503 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/laudos-lifecycle.ts:415"
        ],
        "x-middlewares": [
          "requirePermission(\"laudos\", \"approve\")"
        ]
      }
    },
    "/api/laudos-tecnicos/{reportId}/revisions/{revisionId}/preview": {
      "post": {
        "operationId": "post-api-laudos-tecnicos-report-id-revisions-revision-id-preview",
        "summary": "POST /:reportId/revisions/:revisionId/preview Generate preview PDF (watermarked, no snapshot persistence).",
        "description": "POST /:reportId/revisions/:revisionId/preview Generate preview PDF (watermarked, no snapshot persistence).",
        "tags": [
          "laudos-tecnicos"
        ],
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "revisionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "HTTP 200 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/laudos-lifecycle.ts:643"
        ],
        "x-middlewares": [
          "requirePermission(\"laudos\", \"read\")"
        ]
      }
    },
    "/api/laudos-tecnicos/{reportId}/revisions/{revisionId}/review": {
      "post": {
        "operationId": "post-api-laudos-tecnicos-report-id-revisions-revision-id-review",
        "summary": "POST /:reportId/revisions/:revisionId/review Body: { decision: \"approved\" | \"rejected\", comment",
        "description": "POST /:reportId/revisions/:revisionId/review Body: { decision: \"approved\" | \"rejected\", comment? }",
        "tags": [
          "laudos-tecnicos"
        ],
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "revisionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "HTTP 400 response"
          },
          "403": {
            "description": "HTTP 403 response"
          },
          "409": {
            "description": "HTTP 409 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/laudos-lifecycle.ts:270"
        ],
        "x-middlewares": [
          "requirePermission(\"laudos\", \"approve\")"
        ]
      }
    },
    "/api/laudos-tecnicos/{reportId}/revisions/{revisionId}/sign": {
      "post": {
        "operationId": "post-api-laudos-tecnicos-report-id-revisions-revision-id-sign",
        "summary": "POST /:reportId/revisions/:revisionId/sign Body: { signatureType: \"INTERNAL_ELECTRONIC\" | \"EXTERNAL_SIGNED_UPLOAD\" } For EXTERNAL_SIGNED_UPLOAD: include signedPdfBase64 (base64-encoded PDF)",
        "description": "POST /:reportId/revisions/:revisionId/sign Body: { signatureType: \"INTERNAL_ELECTRONIC\" | \"EXTERNAL_SIGNED_UPLOAD\" } For EXTERNAL_SIGNED_UPLOAD: include signedPdfBase64 (base64-encoded PDF). Validates: - Emission exists and is in PENDING state - Signer is a responsible professional for this report - For EXTERNAL_SIGNED_UPLOAD: validates PDF content type and stores separately - Signature is bound to snapshotHash + pdfHash",
        "tags": [
          "laudos-tecnicos"
        ],
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "revisionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "HTTP 400 response"
          },
          "403": {
            "description": "HTTP 403 response"
          },
          "409": {
            "description": "HTTP 409 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/laudos-lifecycle.ts:717"
        ],
        "x-middlewares": [
          "requirePermission(\"laudos\", \"approve\")"
        ]
      }
    },
    "/api/laudos-tecnicos/{reportId}/timeline": {
      "get": {
        "operationId": "get-api-laudos-tecnicos-report-id-timeline",
        "summary": "GET /:reportId/timeline Full audit timeline of the document.",
        "description": "GET /:reportId/timeline Full audit timeline of the document.",
        "tags": [
          "laudos-tecnicos"
        ],
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "HTTP 200 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/laudos-lifecycle.ts:1087"
        ],
        "x-middlewares": [
          "requirePermission(\"laudos\", \"read\")"
        ]
      }
    },
    "/api/laudos-tecnicos/{reportId}/workflow/gate": {
      "get": {
        "operationId": "get-api-laudos-tecnicos-report-id-workflow-gate",
        "summary": "GET /:reportId/workflow/gate Check if a transition is allowed without performing it.",
        "description": "GET /:reportId/workflow/gate Check if a transition is allowed without performing it.",
        "tags": [
          "laudos-tecnicos"
        ],
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "HTTP 400 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/laudos-lifecycle.ts:228"
        ],
        "x-middlewares": [
          "requirePermission(\"laudos\", \"read\")"
        ]
      }
    },
    "/api/laudos-tecnicos/{reportId}/workflow/transition": {
      "post": {
        "operationId": "post-api-laudos-tecnicos-report-id-workflow-transition",
        "summary": "POST /:reportId/workflow/transition Body: { targetStatus, reason?, acknowledgeWarnings",
        "description": "POST /:reportId/workflow/transition Body: { targetStatus, reason?, acknowledgeWarnings? }",
        "tags": [
          "laudos-tecnicos"
        ],
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "HTTP 200 response"
          },
          "400": {
            "description": "HTTP 400 response"
          },
          "409": {
            "description": "HTTP 409 response"
          },
          "422": {
            "description": "HTTP 422 response"
          },
          "500": {
            "description": "HTTP 500 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/laudos-lifecycle.ts:100"
        ],
        "x-middlewares": [
          "requirePermission(\"laudos\", \"write\")"
        ]
      }
    },
    "/api/laudos-tecnicos/verify/{verificationCode}": {
      "get": {
        "operationId": "get-api-laudos-tecnicos-verify-verification-code",
        "summary": "GET /verify/{verificationCode}",
        "description": "GET /verify/{verificationCode}",
        "tags": [
          "laudos-tecnicos"
        ],
        "parameters": [
          {
            "name": "verificationCode",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "404": {
            "description": "HTTP 404 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/laudos-lifecycle.ts:1047"
        ],
        "x-middlewares": []
      }
    },
    "/api/official-ca/{caNumber}": {
      "get": {
        "operationId": "get-api-official-ca-ca-number",
        "summary": "GET /{caNumber}",
        "description": "GET /{caNumber}",
        "tags": [
          "official-ca"
        ],
        "parameters": [
          {
            "name": "caNumber",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "HTTP 400 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/official-ca.ts:57"
        ],
        "x-middlewares": [
          "requirePermission(\"epi\", \"read\")"
        ]
      }
    },
    "/api/official-ca/{caNumber}/changes": {
      "get": {
        "operationId": "get-api-official-ca-ca-number-changes",
        "summary": "GET /{caNumber}/changes",
        "description": "GET /{caNumber}/changes",
        "tags": [
          "official-ca"
        ],
        "parameters": [
          {
            "name": "caNumber",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "HTTP 400 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/official-ca.ts:89"
        ],
        "x-middlewares": [
          "requirePermission(\"epi\", \"read\")"
        ]
      }
    },
    "/api/official-ca/{caNumber}/generations": {
      "get": {
        "operationId": "get-api-official-ca-ca-number-generations",
        "summary": "GET /{caNumber}/generations",
        "description": "GET /{caNumber}/generations",
        "tags": [
          "official-ca"
        ],
        "parameters": [
          {
            "name": "caNumber",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "HTTP 400 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/official-ca.ts:73"
        ],
        "x-middlewares": [
          "requirePermission(\"epi\", \"read\")"
        ]
      }
    },
    "/api/official-ca/changes/recent": {
      "get": {
        "operationId": "get-api-official-ca-changes-recent",
        "summary": "GET /changes/recent",
        "description": "GET /changes/recent",
        "tags": [
          "official-ca"
        ],
        "responses": {
          "200": {
            "description": "HTTP 200 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/official-ca.ts:48"
        ],
        "x-middlewares": [
          "requirePermission(\"epi\", \"read\")"
        ]
      }
    },
    "/api/official-ca/freshness": {
      "get": {
        "operationId": "get-api-official-ca-freshness",
        "summary": "GET /freshness",
        "description": "GET /freshness",
        "tags": [
          "official-ca"
        ],
        "responses": {
          "200": {
            "description": "HTTP 200 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/official-ca.ts:37"
        ],
        "x-middlewares": [
          "requirePermission(\"epi\", \"read\")"
        ]
      }
    },
    "/api/official-ca/search": {
      "get": {
        "operationId": "get-api-official-ca-search",
        "summary": "GET /search",
        "description": "GET /search",
        "tags": [
          "official-ca"
        ],
        "responses": {
          "200": {
            "description": "HTTP 200 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/official-ca.ts:23"
        ],
        "x-middlewares": [
          "requirePermission(\"epi\", \"read\")"
        ]
      }
    },
    "/api/usuarios": {
      "get": {
        "operationId": "get-api-usuarios",
        "summary": "GET /",
        "description": "GET /",
        "tags": [
          "usuarios"
        ],
        "responses": {
          "400": {
            "description": "HTTP 400 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/usuarios.ts:130"
        ],
        "x-middlewares": [
          "requirePermission(\"usuarios\", \"read\")"
        ]
      },
      "post": {
        "operationId": "post-api-usuarios",
        "summary": "POST /",
        "description": "POST /",
        "tags": [
          "usuarios"
        ],
        "responses": {
          "201": {
            "description": "HTTP 201 response"
          },
          "400": {
            "description": "HTTP 400 response"
          },
          "403": {
            "description": "HTTP 403 response"
          },
          "409": {
            "description": "HTTP 409 response"
          },
          "500": {
            "description": "HTTP 500 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/usuarios.ts:192"
        ],
        "x-middlewares": [
          "requirePermission(\"usuarios\", \"write\")"
        ]
      }
    },
    "/api/usuarios/{id}": {
      "put": {
        "operationId": "put-api-usuarios-id",
        "summary": "PUT /{id}",
        "description": "PUT /{id}",
        "tags": [
          "usuarios"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "404": {
            "description": "HTTP 404 response"
          },
          "409": {
            "description": "HTTP 409 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/usuarios.ts:286"
        ],
        "x-middlewares": [
          "requirePermission(\"usuarios\", \"write\")"
        ]
      },
      "delete": {
        "operationId": "delete-api-usuarios-id",
        "summary": "DELETE /{id}",
        "description": "DELETE /{id}",
        "tags": [
          "usuarios"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "HTTP 400 response"
          },
          "403": {
            "description": "HTTP 403 response"
          },
          "404": {
            "description": "HTTP 404 response"
          },
          "409": {
            "description": "HTTP 409 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/usuarios.ts:369"
        ],
        "x-middlewares": [
          "requirePermission(\"usuarios\", \"delete\")"
        ]
      }
    },
    "/api/usuarios/{id}/roles": {
      "post": {
        "operationId": "post-api-usuarios-id-roles",
        "summary": "POST /{id}/roles",
        "description": "POST /{id}/roles",
        "tags": [
          "usuarios"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "HTTP 201 response"
          },
          "400": {
            "description": "HTTP 400 response"
          },
          "403": {
            "description": "HTTP 403 response"
          },
          "404": {
            "description": "HTTP 404 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/usuarios.ts:422"
        ],
        "x-middlewares": [
          "requirePermission(\"usuarios\", \"write\")"
        ]
      }
    },
    "/api/usuarios/{id}/roles/{roleId}": {
      "delete": {
        "operationId": "delete-api-usuarios-id-roles-role-id",
        "summary": "DELETE /{id}/roles/{roleId}",
        "description": "DELETE /{id}/roles/{roleId}",
        "tags": [
          "usuarios"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "roleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "403": {
            "description": "HTTP 403 response"
          },
          "404": {
            "description": "HTTP 404 response"
          },
          "409": {
            "description": "HTTP 409 response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-source-locations": [
          "apps/api/src/routes/usuarios.ts:489"
        ],
        "x-middlewares": [
          "requirePermission(\"usuarios\", \"write\")"
        ]
      }
    },
    "/chat": {
      "post": {
        "operationId": "post-chat",
        "summary": "POST /",
        "description": "POST /",
        "tags": [
          "chat"
        ],
        "responses": {
          "400": {
            "description": "HTTP 400 response"
          },
          "502": {
            "description": "HTTP 502 response"
          }
        },
        "x-source-locations": [
          "apps/agente/src/routes/chat.ts:26"
        ],
        "x-middlewares": []
      }
    },
    "/health": {
      "get": {
        "operationId": "get-health",
        "summary": "GET /health",
        "description": "GET /health",
        "tags": [
          "health"
        ],
        "responses": {
          "200": {
            "description": "HTTP 200 response"
          }
        },
        "x-source-locations": [
          "apps/agente/src/index.ts:29",
          "apps/api/src/index.ts:145"
        ],
        "x-middlewares": []
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    }
  }
}
