openapi: 3.0.3
info:
  title: TIIX Integrations API
  version: "2025-09-07"
paths:
  /adm/api/Integrations/events:
    post:
      summary: Emitir evento (autenticado)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  type: object
                  properties:
                    topic:   { type: string }
                    payload: { type: object }
                    meta:    { type: object }
      responses:
        "200": { description: OK }
        "401": { description: Não autenticado }
  /adm/api/IntegrationsPublic/events:
    post:
      summary: Emitir evento (público Webview via token)
      parameters:
        - in: header
          name: X-App-Token
          schema: { type: string }
          required: true
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  type: object
                  properties:
                    topic:   { type: string }
                    payload: { type: object }
                    meta:    { type: object }
      responses:
        "200": { description: OK }
        "401": { description: Não autenticado }
