openapi: 3.0.3
info:
  title: TIIX Onboarding Admin API
  version: "2.0.0"
paths:
  /adm/api/OnboardingAdmin/funnel:
    post:
      summary: Funil por etapa do onboarding
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  type: object
                  properties:
                    from: { type: string, example: "2025-09-01 00:00:00" }
                    to:   { type: string, example: "2025-09-30 23:59:59" }
                    tipo: { type: string, example: "profissional" }
                    id_contrato: { type: integer, example: 57 }
      responses:
        "200":
          description: OK
  /adm/api/OnboardingAdmin/sla:
    post:
      summary: SLA médio (tempo entre etapas)
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  type: object
                  properties:
                    from: { type: string }
                    to: { type: string }
                    tipo: { type: string }
                    id_contrato: { type: integer }
      responses:
        "200": { description: OK }
  /adm/api/OnboardingAdmin/devices:
    post:
      summary: Abandono por device
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  type: object
                  properties:
                    from: { type: string }
                    to: { type: string }
                    tipo: { type: string }
                    id_contrato: { type: integer }
      responses:
        "200": { description: OK }
  /adm/api/Pdfs/welcome:
    post:
      summary: Gera PDF de boas-vindas (server-side)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  type: object
                  properties:
                    tipo: { type: string, example: "profissional" }
                    user:
                      type: object
                      properties:
                        id: { type: integer }
                        nome: { type: string }
                        email: { type: string }
                    contrato:
                      type: object
                      properties:
                        id: { type: integer }
                        nome: { type: string }
                    vars:
                      type: object
                      additionalProperties: true
      responses:
        "200": { description: OK }
