{
  "openapi": "3.1.0",
  "info": {
    "title": "Simbiose Digital Public API",
    "version": "1.0.0",
    "description": "API pública e somente de leitura para consultar as soluções e os agentes comerciais da Simbiose Digital. A versão principal faz parte do caminho. Campos podem ser adicionados de maneira compatível; consumidores devem ignorar campos desconhecidos. Mudanças incompatíveis criam uma nova versão. Versões descontinuadas são anunciadas com os cabeçalhos Deprecation e Sunset, link de migração e antecedência mínima de 90 dias.",
    "termsOfService": "https://simbiosedigital.com/termos",
    "contact": {
      "name": "Simbiose Digital",
      "url": "https://simbiosedigital.com/contact",
      "email": "contato@simbiosedigital.com"
    },
    "license": {
      "name": "Uso público somente para consulta",
      "url": "https://simbiosedigital.com/termos"
    }
  },
  "servers": [
    {
      "url": "https://simbiosedigital.com/api/v1",
      "description": "Produção"
    }
  ],
  "x-api-versioning": {
    "strategy": "URL path with a major version",
    "currentVersion": "v1",
    "compatibleChanges": "New optional response fields may be added within v1. Consumers must ignore unknown fields."
  },
  "x-deprecation-policy": {
    "noticeDays": 90,
    "headers": ["Deprecation", "Sunset", "Link"],
    "documentation": "https://simbiosedigital.com/developers"
  },
  "paths": {
    "/catalog": {
      "get": {
        "operationId": "getPublicCatalog",
        "summary": "Lista as soluções e os agentes públicos",
        "description": "Retorna apenas informações comerciais públicas. Não inclui preços, dados de clientes, leads, agenda nem credenciais.",
        "tags": ["Catálogo"],
        "parameters": [
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Escolhe quais coleções incluir. A coleção omitida continua presente como uma lista vazia.",
            "schema": {
              "type": "string",
              "enum": ["all", "solutions", "agents"],
              "default": "all"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "Parâmetro include inválido",
            "content": {
              "application/problem+json": {
                "schema": { "$ref": "#/components/schemas/Problem" }
              }
            }
          },
          "200": {
            "description": "Catálogo público",
            "headers": {
              "API-Version": {
                "description": "Versão do contrato da resposta.",
                "schema": { "type": "string", "example": "1.0" }
              },
              "RateLimit-Limit": {
                "description": "Quantidade máxima de requisições na janela.",
                "schema": { "type": "integer", "example": 120 }
              },
              "RateLimit-Remaining": {
                "description": "Quantidade restante na janela atual.",
                "schema": { "type": "integer", "example": 119 }
              },
              "RateLimit-Reset": {
                "description": "Segundos até a renovação da janela.",
                "schema": { "type": "integer", "example": 60 }
              },
              "RateLimit-Policy": {
                "description": "Política de limite aplicada.",
                "schema": { "type": "string", "example": "120;w=60" }
              }
            },
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/Catalog" }
              }
            }
          },
          "429": {
            "description": "Limite de requisições excedido",
            "headers": {
              "Retry-After": {
                "description": "Segundos que o consumidor deve aguardar.",
                "schema": { "type": "integer" }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": { "$ref": "#/components/schemas/Problem" }
              }
            }
          }
        }
      },
      "head": {
        "operationId": "headPublicCatalog",
        "summary": "Valida a disponibilidade do catálogo",
        "responses": {
          "200": { "description": "Catálogo disponível" },
          "429": { "description": "Limite de requisições excedido" }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Catalog": {
        "type": "object",
        "required": ["schemaVersion", "generatedAt", "organization", "solutions", "agents"],
        "properties": {
          "schemaVersion": { "type": "string", "example": "1.0" },
          "generatedAt": { "type": "string", "format": "date-time" },
          "organization": { "$ref": "#/components/schemas/Organization" },
          "solutions": {
            "type": "array",
            "items": { "$ref": "#/components/schemas/Solution" }
          },
          "agents": {
            "type": "array",
            "items": { "$ref": "#/components/schemas/Agent" }
          }
        }
      },
      "Organization": {
        "type": "object",
        "required": ["name", "url", "description", "market"],
        "properties": {
          "name": { "type": "string" },
          "url": { "type": "string", "format": "uri" },
          "description": { "type": "string" },
          "market": { "type": "string" }
        }
      },
      "Solution": {
        "type": "object",
        "required": ["id", "name", "summary", "meetingUrl"],
        "properties": {
          "id": {
            "type": "string",
            "enum": ["demanda", "atendimento_ia", "operacao_vendas"]
          },
          "name": { "type": "string" },
          "summary": { "type": "string" },
          "meetingUrl": { "type": "string", "format": "uri" }
        }
      },
      "Agent": {
        "type": "object",
        "required": ["slug", "name", "role", "solves", "outcome", "includedIn", "commercialStatus", "pageUrl"],
        "properties": {
          "slug": { "type": "string" },
          "name": { "type": "string" },
          "role": { "type": "string" },
          "solves": { "type": "string" },
          "outcome": { "type": "string" },
          "includedIn": { "type": "string" },
          "commercialStatus": {
            "type": "string",
            "enum": ["solucao-contratavel", "incluido-na-solucao"]
          },
          "pageUrl": { "type": "string", "format": "uri" }
        }
      },
      "Problem": {
        "type": "object",
        "required": ["type", "title", "status", "detail", "instance", "documentation"],
        "properties": {
          "type": { "type": "string", "format": "uri" },
          "title": { "type": "string" },
          "status": { "type": "integer" },
          "detail": { "type": "string" },
          "instance": { "type": "string" },
          "documentation": { "type": "string", "format": "uri" }
        }
      }
    }
  },
  "tags": [
    {
      "name": "Catálogo",
      "description": "Informações comerciais públicas da Simbiose Digital."
    }
  ],
  "externalDocs": {
    "description": "Portal para desenvolvedores e agentes",
    "url": "https://simbiosedigital.com/developers"
  }
}
