openapi: 3.0.0
paths:
  /pbx/agent:
    post:
      operationId: AgentsController_createAgent
      summary: Cadastro de agente
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAgentDto'
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseAgentControllerDto'
      tags: &ref_0
        - Agentes
      security: &ref_1
        - basic: []
    get:
      operationId: AgentsController_getAgent
      summary: Retorna um agente
      parameters:
        - name: id
          required: true
          in: query
          description: ID do agente
          schema:
            type: string
        - name: sync_auth
          required: false
          in: query
          description: Atualizar a senha do ramal do agente
          schema:
            type: string
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseAgentControllerDto'
      tags: *ref_0
      security: *ref_1
    put:
      operationId: AgentsController_updateAgent
      summary: Atualiza um agente
      parameters:
        - name: id
          required: true
          in: query
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAgentDto'
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseAgentControllerDto'
      tags: *ref_0
      security: *ref_1
    delete:
      operationId: AgentsController_deleteOneAgent
      summary: Deleta um agente
      parameters:
        - name: id
          required: true
          in: query
          schema:
            type: string
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RemoveCommonResponse'
      tags: *ref_0
      security: *ref_1
  /pbx/agent/multi:
    post:
      operationId: AgentsController_createAgents
      summary: Cadastro de múltiplos agentes
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAgentDto'
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ResponseAgentControllerDto'
      tags: *ref_0
      security: *ref_1
  /pbx/agent/all:
    get:
      operationId: AgentsController_getAgents
      summary: Retorna lista de agentes
      parameters: []
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ResponseAgentControllerDto'
      tags: *ref_0
      security: *ref_1
    delete:
      operationId: AgentsController_deleteAllAgent
      summary: Deleta todos os agentes
      parameters: []
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RemoveCommonResponse'
      tags: *ref_0
      security: *ref_1
  /pbx/agent/reset_password:
    post:
      operationId: AgentsController_resetPassword
      summary: Envia email para trocar a senha do agent
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ResetPasswordAgentDto'
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseResetPasswordControllerDto'
      tags: *ref_0
      security: *ref_1
  /pbx/agent/pause:
    post:
      operationId: AgentsController_pauseAgent
      summary: Pausa um agente
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PauseManageQueueMemberDto'
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseAgentStatisticsController'
      tags: *ref_0
      security: *ref_1
  /pbx/agent/unpause:
    post:
      operationId: AgentsController_unpauseAgent
      summary: Despausar um agente
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UnpauseManageQueueMemberDto'
      responses:
        '201':
          description: ''
      tags: *ref_0
      security: *ref_1
  /pbx/agent/tabulation:
    post:
      operationId: AgentsController_applyTabulation
      summary: Aplica tabulação
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApplyTabulationDto'
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RemoveCommonResponse'
      tags: *ref_0
      security: *ref_1
  /pbx/tabulations:
    post:
      operationId: TabulationsController_createTabulation
      summary: Cadastro de tabulação
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTabulationDto'
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseTabulationControllerDto'
      tags: &ref_2
        - Tabulação
      security: &ref_3
        - basic: []
    put:
      operationId: TabulationsController_updateTabulation
      summary: Atualiza uma tabulação
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateTabulationDto'
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseTabulationControllerDto'
      tags: *ref_2
      security: *ref_3
    delete:
      operationId: TabulationsController_deleteTabulation
      summary: Deleta tabulações
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeleteTabulationDto'
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseDeleteTabulationControllerDto'
      tags: *ref_2
      security: *ref_3
    get:
      operationId: TabulationsController_getTabulations
      summary: Retorna lista de tabulações paginada
      parameters:
        - name: limit
          required: false
          in: query
          description: Quantidade de registros por página
          example: 10
          schema:
            default: 10
            type: number
        - name: page
          required: false
          in: query
          description: Número da página de registros que deverá ser exibida
          example: 1
          schema:
            default: 1
            type: number
        - name: sort
          required: false
          in: query
          description: 'Indica como deve ser a ordenação dos contatos internos: asc ou desc'
          example: ASC
          schema:
            default: ASC
            enum:
              - asc
              - desc
            type: string
        - name: sort_field
          required: false
          in: query
          description: 'Indica por qual campo deve ser a ordenação: name ou number'
          example: name
          schema:
            default: name
            type: string
        - name: search_value
          required: false
          in: query
          description: Indica o valor do campo onde deve ser feita a busca dos registros.
          example: John
          schema:
            type: string
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ResponseTabulationControllerDto'
      tags: *ref_2
      security: *ref_3
  /pbx/dashboard/monitoring/statistics:
    get:
      operationId: StatisticsController_getAgentStatistics
      summary: Retorna uma estatística
      parameters:
        - name: agent_id
          required: true
          in: query
          schema:
            type: string
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseAgentStatisticsController'
      tags: &ref_4
        - Statistics
      security: &ref_5
        - basic: []
  /pbx/dashboard/monitoring/statistics/call_queue_status:
    get:
      operationId: StatisticsController_callQueueStatus
      summary: Retorna uma estatística
      parameters:
        - name: agent_id
          required: true
          in: query
          schema:
            type: string
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseCallQueueStatusController'
      tags: *ref_4
      security: *ref_5
  /pbx/campaigns:
    post:
      operationId: CampaignsController_createCampaign
      summary: Cadastro de equipe
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCampaignDto'
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseCampaignControllerDto'
      tags: &ref_6
        - Equipes
      security: &ref_7
        - basic: []
    get:
      operationId: CampaignsController_getCampaign
      summary: Retorna uma equipe
      parameters:
        - name: id
          required: true
          in: query
          schema:
            type: string
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseCampaignControllerDto'
      tags: *ref_6
      security: *ref_7
    put:
      operationId: CampaignsController_updateCampaign
      summary: Atualiza uma equipe
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateCampaignDto'
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseCampaignControllerDto'
      tags: *ref_6
      security: *ref_7
    delete:
      operationId: CampaignsController_deleteCampaign
      summary: Deleta uma equipe
      parameters:
        - name: id
          required: true
          in: query
          schema:
            type: string
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RemoveCommonResponse'
      tags: *ref_6
      security: *ref_7
  /pbx/campaigns/all:
    get:
      operationId: CampaignsController_getCampaigns
      summary: Retorna lista de equipes
      parameters: []
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ResponseCampaignControllerDto'
      tags: *ref_6
      security: *ref_7
    delete:
      operationId: CampaignsController_deleteCampaigns
      summary: Deleta todas as equipes
      parameters: []
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RemoveCommonResponse'
      tags: *ref_6
      security: *ref_7
  /pbx/trunk:
    post:
      operationId: TrunksController_createTrunk
      summary: Cadastro de operadora
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTrunkDto'
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseTrunkControllerDto'
      tags: &ref_8
        - Operadoras
      security: &ref_9
        - basic: []
    get:
      operationId: TrunksController_getTrunk
      summary: Retorna uma operadora
      parameters:
        - name: id
          required: true
          in: query
          schema:
            type: string
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetTrunkControllerDto'
      tags: *ref_8
      security: *ref_9
    put:
      operationId: TrunksController_updateTrunk
      summary: Atualiza uma operadora
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateTrunkDto'
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseTrunkControllerDto'
      tags: *ref_8
      security: *ref_9
    delete:
      operationId: TrunksController_deleteOneTrunk
      summary: Deleta uma operadora
      parameters:
        - name: id
          required: true
          in: query
          schema:
            type: string
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RemoveCommonResponse'
      tags: *ref_8
      security: *ref_9
  /pbx/trunk/all:
    get:
      operationId: TrunksController_getTrunks
      summary: Retorna lista de operadoras
      parameters: []
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/GetTrunkControllerDto'
      tags: *ref_8
      security: *ref_9
    delete:
      operationId: TrunksController_deleteAllTrunk
      summary: Deleta todas as operadoras
      parameters: []
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RemoveCommonResponse'
      tags: *ref_8
      security: *ref_9
  /pbx/click2call:
    post:
      operationId: Click2callController_callToConfd
      summary: Realizar chamadas
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CallToConfControllerDto'
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseCallToConfControllerDto'
      tags:
        - Chamadas
      security:
        - basic: []
  /pbx/flow:
    post:
      operationId: FlowController_create
      summary: Cadastro de URA/fluxo
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateFlowDto'
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseFlowControllerDto'
      tags: &ref_10
        - URAS/Fluxos
      security: &ref_11
        - basic: []
    get:
      operationId: FlowController_getFlow
      summary: Retorna uma URA/fluxo
      parameters:
        - name: id
          required: true
          in: query
          schema:
            type: string
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseFlowControllerDto'
      tags: *ref_10
      security: *ref_11
    put:
      operationId: FlowController_update
      summary: Atualiza uma URA/fluxo
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateFlowDto'
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseFlowControllerDto'
      tags: *ref_10
      security: *ref_11
    delete:
      operationId: FlowController_deleteOne
      summary: Deleta uma URA/fluxo
      parameters:
        - name: id
          required: true
          in: query
          schema:
            type: string
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RemoveCommonResponse'
      tags: *ref_10
      security: *ref_11
  /pbx/flow/all:
    get:
      operationId: FlowController_getFlows
      summary: Retorna lista de URAS/fluxos
      parameters: []
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ResponseFlowControllerDto'
      tags: *ref_10
      security: *ref_11
    delete:
      operationId: FlowController_deleteAll
      summary: Deleta todas as URAS/fluxos
      parameters: []
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RemoveCommonResponse'
      tags: *ref_10
      security: *ref_11
  /pbx/playlists:
    post:
      operationId: PlaylistsController_createPlaylist
      summary: Cadastro de playlist
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePlaylistDto'
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponsePlaylistControllerDto'
      tags: &ref_12
        - Playlists
      security: &ref_13
        - basic: []
    get:
      operationId: PlaylistsController_getPlaylist
      summary: Retorna uma playlist
      parameters:
        - name: id
          required: true
          in: query
          schema:
            type: string
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponsePlaylistControllerDto'
      tags: *ref_12
      security: *ref_13
    put:
      operationId: PlaylistsController_updatePlaylist
      summary: Atualiza uma playlist
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdatePlaylistDto'
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponsePlaylistControllerDto'
      tags: *ref_12
      security: *ref_13
    delete:
      operationId: PlaylistsController_deletePlaylist
      summary: Deleta uma playlist
      parameters:
        - name: id
          required: true
          in: query
          schema:
            type: string
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RemoveCommonResponse'
      tags: *ref_12
      security: *ref_13
  /pbx/playlists/all:
    get:
      operationId: PlaylistsController_getPlaylists
      summary: Retorna lista de playlists
      parameters: []
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ResponsePlaylistControllerDto'
      tags: *ref_12
      security: *ref_13
    delete:
      operationId: PlaylistsController_deletePlaylists
      summary: Deleta todas as playlists
      parameters: []
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RemoveCommonResponse'
      tags: *ref_12
      security: *ref_13
  /pbx/playlists/audios:
    post:
      operationId: PlaylistsController_createAudio
      summary: Cadastro de áudio
      parameters:
        - name: playlist_id
          required: true
          in: query
          schema:
            type: string
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                audios:
                  type: array
                  items:
                    type: string
                    format: binary
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ResponseAudioControllerDto'
      tags: *ref_12
      security: *ref_13
    get:
      operationId: PlaylistsController_getAudioByPlaylistId
      summary: Retorna lista dos audios de uma playlist
      parameters:
        - name: id
          required: true
          in: query
          schema:
            type: string
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseAudioControllerDto'
      tags: *ref_12
      security: *ref_13
    delete:
      operationId: PlaylistsController_deleteAudioByPlaylistId
      summary: Deleta todos os audios de uma playlist
      parameters:
        - name: id
          required: true
          in: query
          schema:
            type: string
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RemoveCommonResponse'
      tags: *ref_12
      security: *ref_13
  /pbx/audios:
    get:
      operationId: AudiosController_getAudioById
      summary: Retorna um áudio
      parameters:
        - name: id
          required: true
          in: query
          schema:
            type: string
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ResponseAudioControllerDto'
      tags: &ref_14
        - Áudios
      security: &ref_15
        - basic: []
    delete:
      operationId: AudiosController_deleteAudioById
      summary: Deleta um áudio
      parameters:
        - name: id
          required: true
          in: query
          schema:
            type: string
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RemoveCommonResponse'
      tags: *ref_14
      security: *ref_15
  /pbx/incalls:
    post:
      operationId: IncallsController_createIncall
      summary: Cadastro de permissão de entrada
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateIncallDto'
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseIncallControllerDto'
      tags: &ref_16
        - Permissões de discagem de entrada
      security: &ref_17
        - basic: []
    get:
      operationId: IncallsController_getIncall
      summary: Retorna uma permissão de entrada
      parameters:
        - name: id
          required: true
          in: query
          schema:
            type: string
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseIncallControllerDto'
      tags: *ref_16
      security: *ref_17
    put:
      operationId: IncallsController_updateIncall
      summary: Atualiza uma permissão de entrada
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateIncallDto'
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseIncallControllerDto'
      tags: *ref_16
      security: *ref_17
    delete:
      operationId: IncallsController_deleteOneIncall
      summary: Deleta uma permissão de entrada
      parameters:
        - name: id
          required: true
          in: query
          schema:
            type: string
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RemoveCommonResponse'
      tags: *ref_16
      security: *ref_17
  /pbx/incalls/all:
    get:
      operationId: IncallsController_getIncalls
      summary: Retorna lista de permissões de entrada
      parameters: []
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ResponseIncallControllerDto'
      tags: *ref_16
      security: *ref_17
    delete:
      operationId: IncallsController_deleteAllIncalls
      summary: Deleta todas as permissões de entrada
      parameters: []
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RemoveCommonResponse'
      tags: *ref_16
      security: *ref_17
  /pbx/incalls/update_position:
    put:
      operationId: IncallsController_updatePositionIncallsRoute
      summary: Atualiza a posição das rotas
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdatePositionRouteDto'
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseUpdatePositionRouteBackendDto'
      tags: *ref_16
      security: *ref_17
  /pbx/internal_route:
    post:
      operationId: InternalRoutesController_createInternalRoute
      summary: Cadastro de permissão interna
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateInternalRouteDto'
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseInternalRouteControllerDto'
      tags: &ref_18
        - Permissões de discagem interna
      security: &ref_19
        - basic: []
    get:
      operationId: InternalRoutesController_getInternalRoute
      summary: Retorna uma permissão interna
      parameters:
        - name: id
          required: true
          in: query
          schema:
            type: string
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseInternalRouteControllerDto'
      tags: *ref_18
      security: *ref_19
    put:
      operationId: InternalRoutesController_updateInternalRoute
      summary: Atualiza uma permissão interna
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateInternalRouteDto'
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseInternalRouteControllerDto'
      tags: *ref_18
      security: *ref_19
    delete:
      operationId: InternalRoutesController_deleteOneInternalRoute
      summary: Deleta uma permissão interna
      parameters:
        - name: id
          required: true
          in: query
          schema:
            type: array
            items:
              type: string
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RemoveCommonResponse'
      tags: *ref_18
      security: *ref_19
  /pbx/internal_route/all:
    get:
      operationId: InternalRoutesController_getInternalRoutes
      summary: Retorna lista de permissões internas
      parameters: []
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ResponseInternalRouteControllerDto'
      tags: *ref_18
      security: *ref_19
  /pbx/internal_route/update_position:
    put:
      operationId: InternalRoutesController_updatePositionInternalRoute
      summary: Atualiza a posição das rotas
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdatePositionRouteDto'
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseUpdatePositionRouteBackendDto'
      tags: *ref_18
      security: *ref_19
  /pbx/outcalls:
    post:
      operationId: OutcallsController_createOutcall
      summary: Cadastro de permissão de saída
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateOutcallDto'
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseOutcallControllerDto'
      tags: &ref_20
        - Permissões de discagem de saída
      security: &ref_21
        - basic: []
    get:
      operationId: OutcallsController_getOutcall
      summary: Retorna uma permissão de saída
      parameters:
        - name: id
          required: true
          in: query
          schema:
            type: string
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseOutcallControllerDto'
      tags: *ref_20
      security: *ref_21
    put:
      operationId: OutcallsController_updateOutcall
      summary: Atualiza uma permissão de saída
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateOutcallDto'
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseOutcallControllerDto'
      tags: *ref_20
      security: *ref_21
    delete:
      operationId: OutcallsController_deleteOneOutcall
      summary: Deleta uma permissão de saída
      parameters:
        - name: id
          required: true
          in: query
          schema:
            type: string
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RemoveCommonResponse'
      tags: *ref_20
      security: *ref_21
  /pbx/outcalls/all:
    get:
      operationId: OutcallsController_getOutcalls
      summary: Retorna lista de permissões de saída
      parameters: []
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ResponseOutcallControllerDto'
      tags: *ref_20
      security: *ref_21
    delete:
      operationId: OutcallsController_deleteAllOutcalls
      summary: Deleta todas as permissões de saída
      parameters: []
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RemoveCommonResponse'
      tags: *ref_20
      security: *ref_21
  /pbx/outcalls/update_position:
    put:
      operationId: OutcallsController_updatePositionIncallsRoute
      summary: Atualiza a posição das rotas
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdatePositionRouteDto'
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseUpdatePositionRouteBackendDto'
      tags: *ref_20
      security: *ref_21
  /global/config:
    get:
      operationId: GlobalController_getVoiceApplication
      summary: Retorna configurações globais da plataforma
      parameters: []
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseGlobalControllerDto'
      tags: &ref_22
        - Configurações globais
      security: &ref_23
        - basic: []
    put:
      operationId: GlobalController_updateVoiceApplication
      summary: Atualiza uma configurações global
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateGlobalDto'
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseGlobalControllerDto'
      tags: *ref_22
      security: *ref_23
  /pbx/reports/cdr:
    get:
      operationId: ReportsController_getReport
      summary: Retorna lista de relatórios
      parameters:
        - name: disposition
          required: false
          in: query
          schema:
            type: string
        - name: number
          required: false
          in: query
          schema:
            type: string
        - name: protocol
          required: false
          in: query
          schema:
            type: string
        - name: until
          required: false
          in: query
          schema:
            type: string
        - name: from
          required: false
          in: query
          schema:
            type: string
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ResponseReportsControllerDto'
      tags: &ref_24
        - Relatório
      security: &ref_25
        - basic: []
  /pbx/reports/recents:
    get:
      operationId: ReportsController_getCallsRecents
      summary: Retona ligações recentes do agente
      parameters:
        - name: from
          required: false
          in: query
          example: '2019-08-24T00:00:00Z'
          description: >-
            Ignora chamadas que iniciaram antes desta Data/hora. O formato da
            Data/hora segue o padrão ISO_8601
          schema:
            type: string
        - name: until
          required: false
          in: query
          example: '2019-08-24T23:59:59Z'
          description: >-
            Ignora chamadas que iniciaram depois desta Data/hora. O formato da
            Data/hora segue o padrão ISO_8601
          schema:
            type: string
        - name: page
          required: false
          in: query
          example: '1'
          description: Número da página que deverá ser exibida
          schema:
            type: string
        - name: limit
          required: false
          in: query
          example: '100'
          description: Número máximo de registros a serem retornados
          schema:
            type: string
        - name: extension
          required: true
          in: query
          example: '1000'
          description: Número de origem ou destino da ligação.
          schema:
            type: string
        - name: disposition
          required: false
          in: query
          description: Status da chamada (opcional)
          schema:
            enum:
              - answered
              - noanswer
              - busy
            type: string
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ResponseReportsControllerDto'
      tags: *ref_24
      security: *ref_25
  /pbx/reports/timeline/resumed:
    get:
      operationId: ReportsController_getReportTimelineResumedPaginated
      summary: Retorna lista de relatórios
      parameters:
        - name: limit
          required: false
          in: query
          example: '10'
          schema:
            type: string
        - name: page
          required: false
          in: query
          example: '1'
          schema:
            type: string
        - name: status
          required: false
          in: query
          schema:
            type: string
        - name: numbers
          required: false
          in: query
          schema:
            type: string
        - name: protocol
          required: false
          in: query
          schema:
            type: string
        - name: until
          required: false
          in: query
          example: '2025-04-15 18:41:59'
          schema:
            type: string
        - name: from
          required: false
          in: query
          example: '2025-04-10 12:40:00'
          schema:
            type: string
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseReportsTimelineControllerDto'
      tags: *ref_24
      security: *ref_25
  /pbx/reports/timeline/detailed:
    get:
      operationId: ReportsController_getReportTimelineDetailedPaginated
      summary: Retorna lista de relatórios
      parameters:
        - name: protocol
          required: true
          in: query
          schema:
            type: string
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ResponseTimelineDetailedControllerDto'
      tags: *ref_24
      security: *ref_25
  /pbx/webhook:
    post:
      operationId: WebhooksController_createWebhook
      summary: Cadastro de webhook
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateWebhookDto'
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseWebhookControllerDto'
      tags: &ref_26
        - Webhooks
      security: &ref_27
        - basic: []
    get:
      operationId: WebhooksController_getWebhook
      summary: Retorna um webhook
      parameters:
        - name: id
          required: true
          in: query
          schema:
            type: string
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseWebhookControllerDto'
      tags: *ref_26
      security: *ref_27
    put:
      operationId: WebhooksController_updateWebhook
      summary: Atualiza um webhook
      parameters:
        - name: id
          required: true
          in: query
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateWebhookDto'
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseWebhookControllerDto'
      tags: *ref_26
      security: *ref_27
    delete:
      operationId: WebhooksController_deleteWebhook
      summary: Deleta um webhook
      parameters:
        - name: id
          required: true
          in: query
          schema:
            type: string
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RemoveCommonResponse'
      tags: *ref_26
      security: *ref_27
  /pbx/webhook/paginated:
    get:
      operationId: WebhooksController_getWebhooksPaginated
      summary: Retorna lista de webhooks paginada
      parameters:
        - name: limit
          required: false
          in: query
          schema:
            type: string
        - name: page
          required: false
          in: query
          schema:
            type: string
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseWebhookPaginatedControllerDto'
      tags: *ref_26
      security: *ref_27
  /pbx/simulator:
    get:
      operationId: RouteSimulatorController_getRouteSimulator
      summary: Simulador de rotas
      parameters:
        - name: origin
          required: true
          in: query
          schema:
            type: string
        - name: destiny
          required: true
          in: query
          schema:
            type: string
        - name: hour
          required: false
          in: query
          schema:
            type: string
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseRouteSimulatorControllerDto'
      tags:
        - Simulador de rotas
      security:
        - basic: []
  /pbx/cloneItem:
    post:
      operationId: CloneItemController_cloneItem
      summary: Clona um item
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CloneItemDto'
      responses:
        '201':
          description: ''
      tags:
        - Clone-item
      security:
        - basic: []
  /pbx/contacts/paginated:
    get:
      operationId: ContactsController_contacts
      summary: Lista os contatos
      parameters:
        - name: internal_limit
          required: false
          in: query
          description: Quantidade de contatos internos por página
          example: 10
          schema:
            default: 10
            type: number
        - name: internal_page
          required: false
          in: query
          description: Número da página de contatos internos que deverá ser exibida
          example: 1
          schema:
            default: 1
            type: number
        - name: internal_sort
          required: false
          in: query
          description: 'Indica como deve ser a ordenação dos contatos internos: asc ou desc'
          example: ASC
          schema:
            default: ASC
            enum:
              - asc
              - desc
            type: string
        - name: internal_sort_field
          required: false
          in: query
          description: >-
            Indica por qual campo deve ser a ordenação dos contatos internos:
            name ou number
          example: name
          schema:
            default: name
            enum:
              - name
              - number
            type: string
        - name: internal_search_value
          required: false
          in: query
          description: >-
            Indica o valor do campo onde deve ser feita a busca dos contatos
            internos. Internamente o backend procura este valor nos campos name
            e extension
          example: John
          schema:
            type: string
        - name: internal_hide_numbers
          required: false
          in: query
          description: Contato interno que não será exibido na lista de contatos
          example: 200,500
          schema:
            type: string
        - name: external_limit
          required: false
          in: query
          description: Quantidade de contatos externos por página
          example: 10
          schema:
            default: 10
            type: number
        - name: external_page
          required: false
          in: query
          description: Número da página de contatos externos que deverá ser exibida
          example: 1
          schema:
            default: 1
            type: number
        - name: external_sort
          required: false
          in: query
          description: 'Indica como deve ser a ordenação dos contatos externos: asc ou desc'
          example: ASC
          schema:
            default: ASC
            enum:
              - asc
              - desc
            type: string
        - name: external_sort_field
          required: false
          in: query
          description: >-
            Indica por qual campo deve ser a ordenação dos contatos externos:
            name ou number
          example: name
          schema:
            default: name
            enum:
              - name
              - number
            type: string
        - name: external_search_value
          required: false
          in: query
          description: >-
            Indica o valor do campo que deve onde ser feita a busca dos contatos
            externos. Internamente o backend procura este valor nos campos name
            e number
          example: Doe
          schema:
            type: string
        - name: external_hide_numbers
          required: false
          in: query
          description: Contato externo que não será exibido na lista de contatos
          example: 200,500
          schema:
            type: string
      responses:
        '200':
          description: ''
      tags: &ref_28
        - Contacts
      security: &ref_29
        - basic: []
  /pbx/contacts/call_history_by_contact:
    get:
      operationId: ContactsController_getCallHistoryByContact
      summary: Histórico de contato
      parameters:
        - name: id
          required: true
          in: query
          schema:
            type: string
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseCallHistoryByContact'
      tags: *ref_28
      security: *ref_29
  /pbx/pauses:
    post:
      operationId: PausesController_createPause
      summary: Cadastro de pausa
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePauseDto'
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponsePauseControllerDto'
      tags: &ref_30
        - Pausas
      security: &ref_31
        - basic: []
    put:
      operationId: PausesController_updatePause
      summary: Atualiza uma pausa
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdatePauseDto'
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponsePauseControllerDto'
      tags: *ref_30
      security: *ref_31
    get:
      operationId: PausesController_pauses
      summary: Retorna lista de pausas
      parameters:
        - name: limit
          required: false
          in: query
          description: Número máximo de itens por página.
          example: 10
          schema:
            default: 10
            type: number
        - name: page
          required: false
          in: query
          description: Número da página a ser retornada.
          example: 1
          schema:
            default: 1
            type: number
        - name: sort_order
          required: false
          in: query
          description: >-
            Ordem da listagem, podendo ser "ASC" para ascendente ou "DESC" para
            descendente.
          example: ASC
          schema:
            default: ASC
            enum:
              - asc
              - desc
            type: string
        - name: sort_field
          required: false
          in: query
          description: Campo pelo qual será ordenado.
          example: name
          schema:
            default: name
            type: string
        - name: search_fields
          required: false
          in: query
          description: Lista de campos a serem filtrados.
          schema:
            type: string
        - name: search_value
          required: false
          in: query
          description: Lista de valores correspondentes aos campos filtrados.
          schema:
            type: string
        - name: search_text
          required: false
          in: query
          description: Texto a ser usado para busca em todos os campos.
          schema:
            type: string
      responses:
        '200':
          description: ''
      tags: *ref_30
      security: *ref_31
    delete:
      operationId: PausesController_deletePauses
      summary: Deleta uma pausa
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeletePausesByIdDto'
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RemoveCommonResponse'
      tags: *ref_30
      security: *ref_31
  /license/status:
    get:
      operationId: LicenseController_getLicense
      summary: Retorna Licenses
      parameters: []
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseLicenseControllerDto'
      tags:
        - License
      security:
        - basic: []
  /storage/status:
    get:
      operationId: StorageController_getStorageStatus
      summary: Retorna Storage
      parameters: []
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseStorageControllerDto'
      tags:
        - Storage
      security:
        - basic: []
  /pbx/forwards:
    post:
      operationId: ForwardsController_createForward
      summary: Cadastro de desvio
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateForwardDto'
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseForwardControllerDto'
      tags: &ref_32
        - Desvios
      security: &ref_33
        - basic: []
    put:
      operationId: ForwardsController_updateForward
      summary: Atualiza uma desvio
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateForwardDto'
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseForwardControllerDto'
      tags: *ref_32
      security: *ref_33
    delete:
      operationId: ForwardsController_deleteForward
      summary: Deleta Desvios
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeleteForwardDto'
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseDeleteForwardControllerDto'
      tags: *ref_32
      security: *ref_33
    get:
      operationId: ForwardsController_getForwards
      summary: Retorna lista de Desvios paginada
      parameters:
        - name: limit
          required: false
          in: query
          description: Quantidade de registros por página
          example: 10
          schema:
            default: 10
            type: number
        - name: page
          required: false
          in: query
          description: Número da página de registros que deverá ser exibida
          example: 1
          schema:
            default: 1
            type: number
        - name: sort
          required: false
          in: query
          description: 'Indica como deve ser a ordenação dos contatos internos: asc ou desc'
          example: ASC
          schema:
            default: ASC
            enum:
              - asc
              - desc
            type: string
        - name: sort_field
          required: false
          in: query
          description: Indica por qual campo deve ser a ordenação
          example: agent_id
          schema:
            default: agent_id
            type: string
        - name: search_fields
          required: false
          in: query
          description: Indica o campo a ser filtrado.
          schema:
            type: string
        - name: search_values
          required: false
          in: query
          description: Lista de valores correspondentes aos campos filtrados.
          example: ''
          schema:
            type: string
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ResponseForwardControllerDto'
      tags: *ref_32
      security: *ref_33
  /version:
    get:
      operationId: VersionController_getVersion
      summary: Retorna a versão atual do sistema
      parameters: []
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseVersionControllerDto'
      tags:
        - Versão
      security:
        - basic: []
info:
  title: API pública do Voice
  description: The Voice API description
  version: '1.0'
  contact: {}
tags:
  - name: Voice
    description: ''
servers:
  - url: v1
components:
  securitySchemes:
    basic:
      type: http
      scheme: basic
  schemas:
    CreateAgentDto:
      type: object
      properties:
        name:
          type: string
          example: Agente 1
          description: Nome do agente
        extension:
          type: string
          example: '4040'
          description: Número do ramal do agente
        codename:
          type: string
          example: agente1
          description: codename do do agente
        email:
          type: string
          example: agente1@domain.com.br
          description: E-mail do agente para onde será enviado o link para criação da senha
        begin:
          type: string
          example: '08:00'
          description: Horário inicial de login do agente
        end:
          type: string
          example: '18:00'
          description: Horário final de login do agente
        campaign:
          type: string
          example: 642487adaf9690001f9e1651
          description: ID da equipe do agente
        tech:
          type: string
          example: msteams
          description: Tecnologia do ramal do agente
        country_code:
          type: string
          example: '+55'
          description: Código do país do ramal Microsoft Teams
        record_in:
          type: string
          example: 'on'
          description: Flag para gravar as chamadas recebidas pelo agente
        record_out:
          type: string
          example: 'on'
          description: Flag para gravar as chamadas realizadas pelo agente
        extension_lock:
          type: number
          example: 0
          description: Flag para solicitar senha ao discar ou não
        dtmf_mode:
          type: string
          example: rfc4733
          description: Tipo de DTMF do ramal utilizado pelo agente
        call_limit:
          type: number
          example: 2
          description: >-
            Número máximo de chamadas simultâneas suportadas pelo ramal do
            agente
        user_password:
          type: number
          example: 1234
          description: Senha solicitada quando o campo extension_lock está 1
        allowed_ips:
          type: string
          example: 10.0.0.0/8,172.16.0.0/12,192.168.0.0/16
          description: Lista de redes permitidas para autenticação no ramal do agente
        use_main_login:
          type: string
          example: 'true'
          description: Usar login como e-mail de recuperação
        email_forgot_password:
          type: string
          example: agente1@domain.com.br
          description: E-mail para recuperar senha
      required:
        - name
        - extension
        - codename
        - email
        - begin
        - end
        - campaign
        - tech
        - country_code
        - record_in
        - record_out
        - extension_lock
        - dtmf_mode
        - call_limit
        - user_password
        - allowed_ips
        - use_main_login
        - email_forgot_password
    ResponseAgentControllerDto:
      type: object
      properties:
        _id:
          type: string
          example: 63724b92c0ef93903y24dc45
          description: ID do agente
        name:
          type: string
          example: Agente 1
          description: Nome do agente
        extension:
          type: string
          example: '4040'
          description: Número do ramal do agente
        codename:
          type: string
          example: agente1
          description: codename do agente
        email:
          type: string
          example: agente1@domain.com.br
          description: E-mail do agente para onde será enviado o link para criação da senha
        begin:
          type: string
          example: '08:00'
          description: Horário inicial de login do agente
        end:
          type: string
          example: '18:00'
          description: Horário final de login do agente
        campaign:
          type: string
          example: 642487adaf9690001f9e1651
          description: ID da equipe do agente
        tech:
          type: string
          example: msteams
          description: Tecnologia do ramal do agente
        country_code:
          type: string
          example: '+55'
          description: Código do país do ramal Microsoft Teams
        record_in:
          type: string
          example: 'on'
          description: Flag para gravar as chamadas recebidas pelo agente
        record_out:
          type: string
          example: 'on'
          description: Flag para gravar as chamadas realizadas pelo agente
        extension_lock:
          type: number
          example: 0
          description: Flag para solicitar senha ao discar ou não
        dtmf_mode:
          type: string
          example: rfc4733
          description: Tipo de DTMF do ramal utilizado pelo agente
        call_limit:
          type: number
          example: 2
          description: >-
            Número máximo de chamadas simultâneas suportadas pelo ramal do
            agente
        user_password:
          type: number
          example: 1234
          description: Senha solicitada quando o campo extension_lock está 1
        allowed_ips:
          type: string
          example: 10.0.0.0/8,172.16.0.0/12,192.168.0.0/16
          description: Lista de redes permitidas para autenticação no ramal do agente
      required:
        - _id
        - name
        - extension
        - codename
        - email
        - begin
        - end
        - campaign
        - tech
        - country_code
        - record_in
        - record_out
        - extension_lock
        - dtmf_mode
        - call_limit
        - user_password
        - allowed_ips
    RemoveCommonResponse:
      type: object
      properties:
        count:
          type: number
          example: 1
          description: Quantidade de registros deletados
      required:
        - count
    ResetPasswordAgentDto:
      type: object
      properties:
        id:
          type: string
          example: 63ffc05755cb70006aecf873
          description: ID do agente
      required:
        - id
    ResponseResetPasswordControllerDto:
      type: object
      properties:
        message:
          type: string
          example: Password reset link sent
          description: Mensagem
      required:
        - message
    PauseManageQueueMemberDto:
      type: object
      properties:
        agent_id:
          type: string
          example: 66c4ca591cfce41d1f0631e2
          description: Id do agente
        pause_id:
          type: string
          example: 6712eab84863beaa5eb003e8
          description: Id da pausa
        metadata:
          type: object
          example:
            is_pause_personalized: true
            products:
              - chat
              - voice
          description: Objeto de informações extras
      required:
        - agent_id
        - pause_id
        - metadata
    ResponseAgentStatisticsController:
      type: object
      properties:
        paused:
          type: number
          example: 1
          description: ''
        cumulative_time:
          type: number
          example: 300
          description: ''
        _id:
          type: string
          example: 6718ff4995984c0011698796
          description: ''
        active:
          type: boolean
          example: true
          description: ''
        productive:
          type: boolean
          example: true
          description: ''
        cumulative:
          type: boolean
          example: true
          description: ''
        supervisioned:
          type: boolean
          example: true
          description: ''
        typeMessage:
          type: string
          example: ''
          description: ''
        name:
          type: string
          example: Almoço
          description: ''
        description:
          type: string
          example: Pausa para o almoço
          description: ''
        initialTime:
          type: string
          example: '00:00'
          description: ''
        maxTime:
          type: string
          example: '60'
          description: ''
        message:
          type: string
          example: ''
          description: ''
        created_at:
          type: string
          example: '2022-11-25 14:34:26'
          description: ''
        updated_at:
          type: string
          example: '2022-11-25 14:34:26'
          description: ''
        count_calls_in:
          type: number
          example: '5'
          description: ''
        count_calls_out:
          type: number
          example: '5'
          description: ''
        talk_time_average:
          type: string
          example: '00:00:00'
          description: ''
        total_talk_time:
          type: string
          example: '00:00:00'
          description: ''
        metadata:
          type: object
          example:
            is_pause_personalized: true
            products:
              - chat
              - voice
          description: Objeto de informações extras
      required:
        - paused
        - cumulative_time
        - _id
        - active
        - productive
        - cumulative
        - supervisioned
        - typeMessage
        - name
        - description
        - initialTime
        - maxTime
        - message
        - created_at
        - updated_at
        - count_calls_in
        - count_calls_out
        - talk_time_average
        - total_talk_time
        - metadata
    UnpauseManageQueueMemberDto:
      type: object
      properties:
        agent_id:
          type: string
          example: 66c4ca591cfce41d1f0631e2
          description: Id do agente
      required:
        - agent_id
    ApplyTabulationDto:
      type: object
      properties:
        tabulation_id:
          type: string
          example: 6717127f54d823d2299b7389
          description: Id da Tabulação
        agent_id:
          type: string
          example: 664f25672190f16d6dfd9eab
          description: Id do agente
        group_id:
          type: string
          example: 664f33402190f16d6dfda1aa
          description: Id do Grupo
        protocol:
          type: string
          example: '202410211255062682'
          description: Protocolo
        contact_id:
          type: string
          example: 6421dc5c12b2cd388e01c4b1
          description: Id do Contato
      required:
        - tabulation_id
        - agent_id
        - group_id
        - protocol
        - contact_id
    CreateTabulationDto:
      type: object
      properties:
        name:
          type: string
          example: Almoço
          description: Nome da Tabulação
      required:
        - name
    ResponseTabulationControllerDto:
      type: object
      properties:
        _id:
          type: string
          example: 63724b92c0ef93903y24dc45
          description: ID da Tabulação
        name:
          type: string
          example: Fixo local
          description: Nome da Tabulação
      required:
        - _id
        - name
    UpdateTabulationDto:
      type: object
      properties:
        name:
          type: string
          example: Almoço
          description: Nome da Tabulação
        _id:
          type: string
          example: 63724b92c0ef93903y24dc45
          description: ID da Tabulação
      required:
        - name
        - _id
    DeleteTabulationDto:
      type: object
      properties:
        ids:
          type: string
          example:
            - 6644fb4595e6b52e3762f233
            - 6644fb4595e6b52e3762f234
          description: IDs da Tabulação
      required:
        - ids
    ResponseDeleteTabulationControllerDto:
      type: object
      properties:
        success:
          type: boolean
          example: true
          description: Se a operação foi bem sucedida
        count:
          type: number
          example: 1
          description: Quantidade de registro deletados
        message:
          type: string
          example: ''
          description: Messagem caso ocorra algum erro
      required:
        - success
        - count
        - message
    ResponseCallQueueStatusController:
      type: object
      properties:
        in_call:
          example: 1
          description: ''
          type: array
          items:
            type: string
        calls_waiting_queues:
          example: 300
          description: ''
          type: array
          items:
            type: string
      required:
        - in_call
        - calls_waiting_queues
    RingGroup:
      type: object
      properties:
        agent_id:
          type: string
          example: 64039e61388735a60f299876
          description: ID do agente cadastrado
        forwarding:
          type: boolean
          example: false
          description: Habilitar o encaminhamento
        priority:
          type: number
          example: 1
          description: Prioridade
        order:
          type: number
          example: 1
          description: Ordem de exibição do agente dentro do grupo de toque
      required:
        - agent_id
        - forwarding
        - priority
        - order
    CreateCampaignDto:
      type: object
      properties:
        name:
          type: string
          example: dev
          description: Nome da equipe
        extension:
          type: string
          example: '200'
          description: Número da equipe
        ring_time:
          type: number
          example: 30
          description: Tempo de toque
        ring_type:
          type: string
          example: linear
          description: Tipo de toque
        allow_internal:
          type: boolean
          example: true
          description: Permite ou não chamadas entre agentes
        dialing_permissions:
          example: &ref_34
            - 63d7d9476648050011dc5d92
          description: Array dos IDs de rotas de saída
          type: array
          items:
            type: string
        capture_permissions:
          example: &ref_35
            - 63b703156648050011dc5d73
          description: Array dos IDs das campanhas
          type: array
          items:
            type: string
        ring_group:
          description: Lista de desvios por horário
          type: array
          items:
            $ref: '#/components/schemas/RingGroup'
        gogenier_integration:
          type: boolean
          example: true
          description: Indica se há integração ativa com o sistema GOgenier
        gogenier_pipeline:
          type: string
          example: f3842498-94ce-435e-9a52-c70d10b75806
          description: ID de uma pipeline do Gogenier
        gogenier_ai_id:
          type: string
          example: 675af3c364175500018bb3f0
          description: Representa o ID da IA cadastrada no Voice referente ao GOgenier
        max_waiting_time:
          type: number
          example: 30
          description: Tempo máximo de espera permitido (em segundos) de uma ligação.
        transhipment_by_time:
          type: string
          example: 63b703156648050011dc5d72
          description: Indica o ID da equipe para onde a chamada vai ser desviada.
        service_meta:
          type: number
          example: 100
          description: Meta de serviço
        answered_within_seconds:
          type: number
          example: 10
          description: Respondido em segundos
        abandoned_within_seconds:
          type: number
          example: 20
          description: Abandonado em segundos
      required:
        - name
        - extension
        - ring_time
        - ring_type
        - allow_internal
        - dialing_permissions
        - capture_permissions
        - ring_group
        - gogenier_integration
        - gogenier_pipeline
        - gogenier_ai_id
        - max_waiting_time
        - transhipment_by_time
        - service_meta
        - answered_within_seconds
        - abandoned_within_seconds
    ResponseCampaignControllerDto:
      type: object
      properties:
        _id:
          type: string
          example: 63724b92c0ef93903y24dc45
          description: ID da rota da equipe
        name:
          type: string
          example: dev
          description: Nome da equipe
        extension:
          type: string
          example: '200'
          description: Número da equipe
        ring_time:
          type: number
          example: 30
          description: Tempo de toque
        ring_type:
          type: string
          example: linear
          description: Tipo de toque
        allow_internal:
          type: boolean
          example: true
          description: Permite ou não chamadas entre agentes
        dialing_permissions:
          example:
            - 63d7d9476648050011dc5d92
          description: Array dos IDs de rotas de saída
          type: array
          items:
            type: string
        capture_permissions:
          example:
            - 63b703156648050011dc5d73
          description: Array dos IDs das campanhas
          type: array
          items:
            type: string
        ring_group:
          description: Lista de desvios por horário
          type: array
          items:
            $ref: '#/components/schemas/RingGroup'
        max_waiting_time:
          type: number
          example: 30
          description: Tempo máximo de espera permitido (em segundos) de uma ligação.
        transhipment_by_time:
          type: string
          example: 63b703156648050011dc5d72
          description: Indica o ID da equipe para onde a chamada vai ser desviada.
        service_meta:
          type: number
          example: 100
          description: Meta de serviço
        answered_within_seconds:
          type: number
          example: 10
          description: Respondido em segundos
        abandoned_within_seconds:
          type: number
          example: 20
          description: Abandonado em segundos
      required:
        - _id
        - name
        - extension
        - ring_time
        - ring_type
        - allow_internal
        - dialing_permissions
        - capture_permissions
        - ring_group
        - max_waiting_time
        - transhipment_by_time
        - service_meta
        - answered_within_seconds
        - abandoned_within_seconds
    UpdateCampaignDto:
      type: object
      properties:
        name:
          type: string
          example: dev
          description: Nome da equipe
        extension:
          type: string
          example: '200'
          description: Número da equipe
        ring_time:
          type: number
          example: 30
          description: Tempo de toque
        ring_type:
          type: string
          example: linear
          description: Tipo de toque
        allow_internal:
          type: boolean
          example: true
          description: Permite ou não chamadas entre agentes
        dialing_permissions:
          example: *ref_34
          description: Array dos IDs de rotas de saída
          type: array
          items:
            type: string
        capture_permissions:
          example: *ref_35
          description: Array dos IDs das campanhas
          type: array
          items:
            type: string
        ring_group:
          description: Lista de desvios por horário
          type: array
          items:
            $ref: '#/components/schemas/RingGroup'
        gogenier_integration:
          type: boolean
          example: true
          description: Indica se há integração ativa com o sistema GOgenier
        gogenier_pipeline:
          type: string
          example: f3842498-94ce-435e-9a52-c70d10b75806
          description: ID de uma pipeline do Gogenier
        gogenier_ai_id:
          type: string
          example: 675af3c364175500018bb3f0
          description: Representa o ID da IA cadastrada no Voice referente ao GOgenier
        max_waiting_time:
          type: number
          example: 30
          description: Tempo máximo de espera permitido (em segundos) de uma ligação.
        transhipment_by_time:
          type: string
          example: 63b703156648050011dc5d72
          description: Indica o ID da equipe para onde a chamada vai ser desviada.
        service_meta:
          type: number
          example: 100
          description: Meta de serviço
        answered_within_seconds:
          type: number
          example: 10
          description: Respondido em segundos
        abandoned_within_seconds:
          type: number
          example: 20
          description: Abandonado em segundos
        _id:
          type: string
          example: 63724b92c0ef93903y24dc45
          description: ID da rota da equipe
      required:
        - name
        - extension
        - ring_time
        - ring_type
        - allow_internal
        - dialing_permissions
        - capture_permissions
        - ring_group
        - gogenier_integration
        - gogenier_pipeline
        - gogenier_ai_id
        - max_waiting_time
        - transhipment_by_time
        - service_meta
        - answered_within_seconds
        - abandoned_within_seconds
        - _id
    LinkedNumber:
      type: object
      properties:
        country_code:
          type: string
          example: '55'
        ddd:
          type: string
          example: '84'
        number:
          type: string
          example: 30348100-30348199
      required:
        - country_code
        - ddd
        - number
    CreateTrunkDto:
      type: object
      properties:
        name:
          type: string
          example: Voip provider
          description: Nome da operadora
        auth_type:
          type: number
          example: 1
          description: >-
            Flag que indica se a operadora é "Com autenticação" (1), ou "Sem
            autenticação" (0)
        carrier_type:
          type: string
          example: voip
          description: Tipo da operadora
        carrier_rn_code:
          type: string
          example: '55222'
          description: Código RN (Routing Number) da operadora
        username:
          type: string
          example: '9529'
          description: Nome de usuário para se autenticar na operadora
        password:
          type: string
          example: e32e23e32e23e
          description: Senha para se autenticar na operadora
        protocol:
          type: string
          example: sip
          description: Protocolo de comunicação com a operadora
        from_domain:
          type: string
          example: domain.com.br
          description: Domínio do FQDN quando do Microsoft Teams da empresa
        dtmf_mode:
          type: string
          example: rfc4733
          description: DTMF da operadora
        codecs:
          example: '["alaw","ulaw"]'
          description: Lista de codecs utilizados pela operadora
          type: array
          items:
            type: string
        ip_host:
          type: string
          example: example.com
          description: IP/Host da operadora
        call_limit:
          type: number
          example: 30
          description: Número principal da operadora
        callerid_type:
          type: string
          example: fixed
          description: Tipo da bina da operadora
        callerid_number:
          type: number
          example: 30303030
          description: Número principal da operadora
        initial_did:
          type: string
          example: '8100'
          description: DDR inicial da operadora
        final_did:
          type: string
          example: '8199'
          description: DDR final da operadora
        enabled:
          type: number
          example: 0
          description: >-
            Indica se a operadora está ativada (1) ou não (0) na plataforma do
            Voice
        port:
          type: number
          example: 5060
          description: Número da porta da operadora
        endpoints:
          example: &ref_36
            - 127.168.1.1
            - 127.16.30.12
          description: >-
            É a lista de servidores SIP ao qual o Voice irá esperar os INVITES
            em uma chamada entrante. Este campo é usado em apenas operadoras que
            não possuem autenticação.
          type: array
          items:
            type: string
        linked_numbers:
          type: array
          items:
            $ref: '#/components/schemas/LinkedNumber'
        send_registration:
          type: boolean
          example: true
          description: Enviar registro para a operadora
      required:
        - name
        - auth_type
        - carrier_type
        - carrier_rn_code
        - username
        - password
        - protocol
        - from_domain
        - dtmf_mode
        - codecs
        - ip_host
        - call_limit
        - callerid_type
        - callerid_number
        - initial_did
        - final_did
        - enabled
        - port
        - endpoints
        - linked_numbers
        - send_registration
    ResponseTrunkControllerDto:
      type: object
      properties:
        _id:
          type: string
          example: 63724b92c0ef93903y24dc45
          description: Id da operadora
        name:
          type: string
          example: Voip provider
          description: Nome da operadora
        auth_type:
          type: number
          example: 1
          description: >-
            Flag que indica se a operadora é "Com autenticação" (1), ou "Sem
            autenticação" (0)
        carrier_type:
          type: string
          example: voip
          description: Tipo da operadora
        carrier_rn_code:
          type: string
          example: '55222'
          description: Código RN (Routing Number) da operadora
        username:
          type: string
          example: '9529'
          description: Nome de usuário para se autenticar na operadora
        protocol:
          type: string
          example: sip
          description: Protocolo de comunicação com a operadora
        from_domain:
          type: string
          example: domain.com.br
          description: Domínio do FQDN quando do Microsoft Teams da empresa
        dtmf_mode:
          type: string
          example: rfc4733
          description: DTMF da operadora
        codecs:
          example: '["alaw","ulaw"]'
          description: Lista de codecs utilizados pela operadora
          type: array
          items:
            type: string
        ip_host:
          type: string
          example: example.com
          description: IP/Host da operadora/tronco
        call_limit:
          type: number
          example: 30
          description: Número principal da operadora/tronco
        callerid_type:
          type: string
          example: fixed
          description: Tipo da bina da operadora/tronco
        callerid_number:
          type: number
          example: 30303030
          description: Número principal da operadora/tronco
        initial_did:
          type: string
          example: '8100'
          description: DDR inicial da operadora/tronco
        final_did:
          type: string
          example: '8199'
          description: DDR final da operadora/tronco
        enabled:
          type: number
          example: 0
          description: >-
            Indica se a operadora/tronco está ativada (1) ou não (0) na
            plataforma do Voice
        port:
          type: number
          example: 5060
          description: Número da porta da operadora
        endpoints:
          example:
            - 192.168.1.1
            - 172.16.30.12
          description: >-
            É a lista de servidores SIP ao qual o Voice irá esperar os INVITES
            em uma chamada entrante. Este campo é usado em apenas operadoras que
            não possuem autenticação.
          type: array
          items:
            type: string
        linked_numbers:
          type: array
          items:
            $ref: '#/components/schemas/LinkedNumber'
        status:
          example: Registered
          description: >-
            Status do registro com a operadora, valores possiveis: Registered,
            Unregistered, Rejected e Erro
          type: array
          items:
            type: string
        send_registration:
          type: boolean
          example: true
          description: Enviar registro para a operadora
      required:
        - _id
        - name
        - auth_type
        - carrier_type
        - carrier_rn_code
        - username
        - protocol
        - from_domain
        - dtmf_mode
        - codecs
        - ip_host
        - call_limit
        - callerid_type
        - callerid_number
        - initial_did
        - final_did
        - enabled
        - port
        - endpoints
        - linked_numbers
        - status
        - send_registration
    GetTrunkControllerDto:
      type: object
      properties:
        _id:
          type: string
          example: 63724b92c0ef93903y24dc45
          description: Id da operadora
        name:
          type: string
          example: Voip provider
          description: Nome da operadora
        auth_type:
          type: number
          example: 1
          description: >-
            Flag que indica se a operadora é "Com autenticação" (1), ou "Sem
            autenticação" (0)
        carrier_type:
          type: string
          example: voip
          description: Tipo da operadora
        carrier_rn_code:
          type: string
          example: '55222'
          description: Código RN (Routing Number) da operadora
        username:
          type: string
          example: '9529'
          description: Nome de usuário para se autenticar na operadora
        protocol:
          type: string
          example: sip
          description: Protocolo de comunicação com a operadora
        from_domain:
          type: string
          example: domain.com.br
          description: Domínio do FQDN quando do Microsoft Teams da empresa
        dtmf_mode:
          type: string
          example: rfc4733
          description: DTMF da operadora
        codecs:
          example: '["alaw","ulaw"]'
          description: Lista de codecs utilizados pela operadora
          type: array
          items:
            type: string
        ip_host:
          type: string
          example: example.com
          description: IP/Host da operadora/tronco
        call_limit:
          type: number
          example: 30
          description: Número principal da operadora/tronco
        callerid_type:
          type: string
          example: fixed
          description: Tipo da bina da operadora/tronco
        callerid_number:
          type: number
          example: 30303030
          description: Número principal da operadora/tronco
        initial_did:
          type: string
          example: '8100'
          description: DDR inicial da operadora/tronco
        final_did:
          type: string
          example: '8199'
          description: DDR final da operadora/tronco
        enabled:
          type: number
          example: 0
          description: >-
            Indica se a operadora/tronco está ativada (1) ou não (0) na
            plataforma do Voice
        port:
          type: number
          example: 5060
          description: Número da porta da operadora
        endpoints:
          example:
            - 192.168.1.1
            - 172.16.30.12
          description: >-
            É a lista de servidores SIP ao qual o Voice irá esperar os INVITES
            em uma chamada entrante. Este campo é usado em apenas operadoras que
            não possuem autenticação.
          type: array
          items:
            type: string
        linked_numbers:
          type: array
          items:
            $ref: '#/components/schemas/LinkedNumber'
        status:
          example: Registered
          description: >-
            Status do registro com a operadora, valores possiveis: Registered,
            Unregistered, Rejected e Erro
          type: array
          items:
            type: string
        send_registration:
          type: boolean
          example: true
          description: Enviar registro para a operadora
      required:
        - _id
        - name
        - auth_type
        - carrier_type
        - carrier_rn_code
        - username
        - protocol
        - from_domain
        - dtmf_mode
        - codecs
        - ip_host
        - call_limit
        - callerid_type
        - callerid_number
        - initial_did
        - final_did
        - enabled
        - port
        - endpoints
        - linked_numbers
        - status
        - send_registration
    UpdateTrunkDto:
      type: object
      properties:
        name:
          type: string
          example: Voip provider
          description: Nome da operadora
        auth_type:
          type: number
          example: 1
          description: >-
            Flag que indica se a operadora é "Com autenticação" (1), ou "Sem
            autenticação" (0)
        carrier_type:
          type: string
          example: voip
          description: Tipo da operadora
        carrier_rn_code:
          type: string
          example: '55222'
          description: Código RN (Routing Number) da operadora
        username:
          type: string
          example: '9529'
          description: Nome de usuário para se autenticar na operadora
        password:
          type: string
          example: e32e23e32e23e
          description: Senha para se autenticar na operadora
        protocol:
          type: string
          example: sip
          description: Protocolo de comunicação com a operadora
        from_domain:
          type: string
          example: domain.com.br
          description: Domínio do FQDN quando do Microsoft Teams da empresa
        dtmf_mode:
          type: string
          example: rfc4733
          description: DTMF da operadora
        codecs:
          example: '["alaw","ulaw"]'
          description: Lista de codecs utilizados pela operadora
          type: array
          items:
            type: string
        ip_host:
          type: string
          example: example.com
          description: IP/Host da operadora
        call_limit:
          type: number
          example: 30
          description: Número principal da operadora
        callerid_type:
          type: string
          example: fixed
          description: Tipo da bina da operadora
        callerid_number:
          type: number
          example: 30303030
          description: Número principal da operadora
        initial_did:
          type: string
          example: '8100'
          description: DDR inicial da operadora
        final_did:
          type: string
          example: '8199'
          description: DDR final da operadora
        enabled:
          type: number
          example: 0
          description: >-
            Indica se a operadora está ativada (1) ou não (0) na plataforma do
            Voice
        port:
          type: number
          example: 5060
          description: Número da porta da operadora
        endpoints:
          example: *ref_36
          description: >-
            É a lista de servidores SIP ao qual o Voice irá esperar os INVITES
            em uma chamada entrante. Este campo é usado em apenas operadoras que
            não possuem autenticação.
          type: array
          items:
            type: string
        linked_numbers:
          type: array
          items:
            $ref: '#/components/schemas/LinkedNumber'
        send_registration:
          type: boolean
          example: true
          description: Enviar registro para a operadora
        _id:
          type: string
          example: 63724b92c0ef93903y24dc45
          description: ID da operadora/tronco
      required:
        - name
        - auth_type
        - carrier_type
        - carrier_rn_code
        - username
        - password
        - protocol
        - from_domain
        - dtmf_mode
        - codecs
        - ip_host
        - call_limit
        - callerid_type
        - callerid_number
        - initial_did
        - final_did
        - enabled
        - port
        - endpoints
        - linked_numbers
        - send_registration
        - _id
    CallToConfControllerDto:
      type: object
      properties:
        src:
          type: string
          example: '1000'
          description: Número do ramal do agente
        dst:
          type: string
          example: '99999999999'
          description: Número do contato
        ringTime:
          type: number
          example: '45'
          description: >-
            Quantidade máxima de tempo em que a chamada ficará tocando até ser
            atendida
        whatsapp:
          type: boolean
          example: false
          description: Indica se a chamada é para um número de WhatsApp
      required:
        - src
        - dst
        - ringTime
        - whatsapp
    ResponseCallToConfControllerDto:
      type: object
      properties:
        response:
          type: string
          example: Success
          description: Resposta
        message:
          type: string
          example: Originate successfully queued
          description: Mensagem
        detail:
          type: string
          example: extension not found or check extension registration
          description: Detalhes
      required:
        - response
        - message
        - detail
    MaxAttempts:
      type: object
      properties:
        value:
          type: number
          example: 2
          description: Número máximo de tentativas inválidas na URA
        redirect:
          type: string
          example: 62794c92c0ef93903e14dc44
          description: >-
            Destino para onde a ligação será roteada, caso o número máximo de
            tentativas tenha sido atingido
        timeout_between_attempts:
          type: number
          example: 1
          description: Timeout entre as tentativas de digitação da opção da URA
        audios_on_retry:
          example:
            - 62794c92c0ef93903e14dc44
          description: >-
            Id dos Áudios que serão reproduzidos em cada tentativa quando o
            timeout for atingido
          type: array
          items:
            type: string
        audios_on_invalid:
          example:
            - 62794c92c0ef93903e14dc44
          description: >-
            Id dos Áudios que serão reproduzidos em cada tentativa inválida de
            digitação
          type: array
          items:
            type: string
      required:
        - value
        - redirect
        - timeout_between_attempts
        - audios_on_retry
        - audios_on_invalid
    Options:
      type: object
      properties:
        num:
          type: number
          example: 1
          description: Valor da opção da URA
        description:
          type: string
          example: Suporte SZ
          description: Descrição da opção
        redirect:
          type: string
          example: 62794c92c0ef93903e14dc44
          description: >-
            Id do Destino para onde a ligação será roteada, caso a opção seja
            digitada
        option_fail:
          type: boolean
          example: true
          description: ''
      required:
        - num
        - description
        - redirect
        - option_fail
    Condition:
      type: object
      properties:
        redirect:
          type: string
          example: 65973cd696dd0d00010bf06f
          description: String vazia ou Id do proximo component
        time_group_id:
          type: string
          example: 65973cd696dd0d00010bf06f
          description: Id do time group
      required:
        - redirect
        - time_group_id
    Question:
      type: object
      properties:
        audio_messages:
          example:
            - 62794c92c0ef93903e14dc44
          description: Lista de áudios da URA
          type: array
          items:
            type: string
        max_attempts:
          description: >-
            Configurações de número máximo de tentativas, redirecionamento em
            caso de falha, timeout, etc.
          type: array
          items:
            $ref: '#/components/schemas/MaxAttempts'
        valid_notes:
          example:
            - 1
            - 2
            - 3
            - 4
            - 5
            - 6
            - 7
            - 8
            - 9
          description: Lista das notas possiveis
          type: array
          items:
            type: number
      required:
        - audio_messages
        - max_attempts
        - valid_notes
    Flow:
      type: object
      properties:
        component:
          type: string
          example: menu
          description: Tipo do componente
        component_id:
          type: string
          example: 65973cd696dd0d00010bf06f
          description: Id do componente
        name:
          type: string
          example: Menu suporte
          description: Nome do componente
        message:
          type: string
          example: Olá, seja bem vindo!
          description: Mensagem que será falada quando o recurso de tts estiver ativado
        direct_access:
          type: boolean
          example: true
          description: Permite acesso aos ramais internos ou não através da URA
        audio_messages:
          example:
            - 62794c92c0ef93903e14dc44
          description: Lista de áudios da URA
          type: array
          items:
            type: string
        max_attempts:
          description: >-
            Configurações de número máximo de tentativas, redirecionamento em
            caso de falha, timeout, etc.
          type: array
          items:
            $ref: '#/components/schemas/MaxAttempts'
        options:
          description: Lista de opções
          type: array
          items:
            $ref: '#/components/schemas/Options'
        next_component:
          example:
            - 65a1320de1d80724300e616d
          description: Lista dos component_id dos proximos components
          type: array
          items:
            type: string
        continue:
          type: boolean
          example: true
          description: Continue
        audio_after_call:
          type: string
          example: 65a1320de1d80724300e616d
          description: Id do Áudio
        conditions:
          description: Lista de condições
          type: array
          items:
            $ref: '#/components/schemas/Condition'
        timeout:
          type: number
          example: 30
          description: Tempo limite de espera
        questions:
          description: Lista de Question
          type: array
          items:
            $ref: '#/components/schemas/Question'
      required:
        - component
        - component_id
        - name
        - message
        - direct_access
        - audio_messages
        - max_attempts
        - options
        - next_component
        - continue
        - audio_after_call
        - conditions
        - timeout
        - questions
    CreateFlowDto:
      type: object
      properties:
        name:
          type: string
          example: Fluxo de exemplo com 2 menus
          description: Nome do fluxo
        flow:
          example: &ref_37
            - component: start
              component_id: 64dd0707e90b9ded57f91449
              next_component:
                - 64dd070ee90b9ded57f9144a
            - component: menu
              component_id: 64dd070ee90b9ded57f9144a
              name: Menu inicial
              direct_access: true
              audio_messages:
                - 64dd0714e90b9ded57f9144b
                - 64dd0714e90b9ded57f9144c
              max_attempts:
                value: 2
                redirect: 64dd48361e4c6e705ac0bdab
                timeout_between_attempts: 5
                audios_on_retry:
                  - 64dd071de90b9ded57f9144d
                audios_on_invalid: []
              options:
                - num: 0
                  description: Suporte técnico especializado
                  redirect: 64dd0729e90b9ded57f9144e
                - num: 1
                  description: null
                  redirect: null
                - num: 7
                  description: Comercial
                  redirect: 64dd0747e90b9ded57f91453
                - num: 8
                  description: null
                  redirect: null
                - num: 9
                  description: Financeiro
                  redirect: 64dd075ee90b9ded57f91458
                - option_fail: true
                  description: Falha
            - component: audio_message
              component_id: 64dd48361e4c6e705ac0bdab
              audio_messages:
                - 64dd48361e4c6e705ac0bdac
              next_component:
                - 64dd407d1e4c6e705ac0bda7
            - component: campaign
              component_id: 64dd0729e90b9ded57f9144e
              campaign_id: 64dd0729e90b9ded57f9144f
              next_component:
                - post_closure: 64dd07dbe90b9ded57f9145b
                  timeout: false
              timeout: 30
            - component: survey
              component_id: 64dd07dbe90b9ded57f9145b
              name: Pesquisa Suporte
              next_component: null
              questions:
                - audio_messages:
                    - 64dd0a24e90b9ded57f9145c
                  max_attempts:
                    value: 2
                    timeout_between_attempts: 5
                  valid_notes:
                    - 1
                    - 2
                    - 3
                    - 4
                    - 5
                    - 10
                - audio_messages:
                    - 64dd0a24e90b9ded57f9145c
                  max_attempts:
                    value: 2
                    timeout_between_attempts: 5
                  valid_notes:
                    - 1
                    - 2
                    - 3
                    - 4
                    - 5
                    - 10
              audios_thankyou:
                - 64dd0aaae90b9ded57f9145d
              audios_on_invalid:
                - 64dd0aaae90b9ded57f9145e
            - component_id: 64601aebc6466181524bb648
              component: time_group
              conditions:
                - time_group_id: 65a91505ef0e37bcc40f5831
                  redirect: 64601aebc6466181524bbab1
                - time_group_id: 65a915097505ef6384da33e2
                  redirect: 64601aebc6466181524bb444
              next_component: 64dd072ae90b9ded57f91450
            - component: goto
              component_id: 64dd407d1e4c6e705ac0bda7
              next_component:
                - destination: 64dd407d1e4c6e705ac0bda8
                  destination_handle: null
            - component: gogenier
              component_id: 675af3c364175500018bb3f0
              name: teste
              gogenier_account: 675af3c364175500018bb3w2
              gogenier_agent: f3842498-94ce-435e-9a52-c70d10b75806
              intermediate_messages:
                - ok, um instante
                - estou verificando
              playlist_id: 675af3c364175500018bb3w2
              outputs:
                - condition: equal
                  value: '#HUMAN'
                  redirect: 64dd0729e90b9ded57f9144e
                - condition: contain
                  value: '#END'
                  redirect: null
              record: true
              random_intermediate_messages: false
          description: Lista de componentes que compoem o fluxo
          type: array
          items:
            $ref: '#/components/schemas/Flow'
      required:
        - name
        - flow
    ResponseFlowControllerDto:
      type: object
      properties:
        _id:
          type: string
          example: 63724b92c0ef93903y24dc45
          description: ID do fluxo
        name:
          type: string
          example: Fluxo de exemplo com 2 menus
          description: Nome do fluxo
        flow:
          description: Lista de componentes que compoem o fluxo
          type: array
          items:
            $ref: '#/components/schemas/Flow'
      required:
        - _id
        - name
        - flow
    UpdateFlowDto:
      type: object
      properties:
        name:
          type: string
          example: Fluxo de exemplo com 2 menus
          description: Nome do fluxo
        flow:
          example: *ref_37
          description: Lista de componentes que compoem o fluxo
          type: array
          items:
            $ref: '#/components/schemas/Flow'
        _id:
          type: string
          example: 63724b92c0ef93903y24dc45
          description: ID do fluxo
      required:
        - name
        - flow
        - _id
    CreatePlaylistDto:
      type: object
      properties:
        name:
          type: string
          example: Sertanejo
          description: Nome da playlist
        sort:
          type: string
          example: alpha
          description: Ordem de execução dos áudios da playlist
      required:
        - name
        - sort
    ResponsePlaylistControllerDto:
      type: object
      properties:
        _id:
          type: string
          example: 63724b92c0ef93903y24dc45
          description: ID da playlist
        name:
          type: string
          example: Sertanejo
          description: Nome da playlist
        sort:
          type: string
          example: alpha
          description: Ordem de execução dos áudios da playlist
      required:
        - _id
        - name
        - sort
    UpdatePlaylistDto:
      type: object
      properties:
        name:
          type: string
          example: Sertanejo
          description: Nome da playlist
        sort:
          type: string
          example: alpha
          description: Ordem de execução dos áudios da playlist
        _id:
          type: string
          example: 63724b92c0ef93903y24dc45
          description: ID da operadora/tronco
      required:
        - name
        - sort
        - _id
    ResponseAudioControllerDto:
      type: object
      properties:
        _id:
          type: string
          example: 63724b92c0ef93903y24dc45
          description: ID da rota da equipe
        name:
          type: string
          example: huga3
          description: Nome do áudio
        extension:
          type: string
          example: wav
          description: Extensão do arquivo de áudio (WAV ou mp3)
        size:
          type: string
          example: 0.029MB
          description: Tamanho do arquivo de áudio
        playlist_id:
          type: string
          example: 642487adaf9690001f9e1651
          description: 'ID da playlist '
      required:
        - _id
        - name
        - extension
        - size
        - playlist_id
    routeByTime:
      type: object
      properties:
        time_group_id:
          type: string
          example: 64039e61388735a60f299876
          description: 'ID de um grupo de horário '
        audio_ids:
          example:
            - 64039e5d388735a60f299874
          description: Ids dos áudios da playlist system
          type: array
          items:
            type: string
        dst_type:
          type: string
          example: agent
          description: Tipo do destino [agent, campaign, ivr, did]
        dst:
          type: string
          example: 645d050c3f0df3001f4d426d
          description: Destino da rota de entrada neste horário
      required:
        - time_group_id
        - audio_ids
        - dst_type
        - dst
    CreateIncallDto:
      type: object
      properties:
        name:
          type: string
          example: IN DDR 8XXX
          description: Nome da permissão de entrada
        did:
          type: string
          example: _8XXX
          description: DDR da permissão de entrada
        dst:
          type: string
          example: _8XXX
          description: Destino default da permissão de entrada
        enabled:
          type: number
          example: 1
          description: Flag que indica se a rota está ativa (1) ou não (0)
        tags:
          example: &ref_38
            - comercial
            - diretoria
          description: Lista de tags
          type: array
          items:
            type: string
        source_numbers:
          example: &ref_39
            - '85986251919'
            - _11X.
          description: Lista de expressões de números de origem
          type: array
          items:
            type: string
        trunk_id:
          type: string
          example: 64039e5d388735a60f299874
          description: >-
            Operadora associada à esta rota (campo id da collection
            voice_trunks)
        route_by_time:
          description: Lista de desvios por horário
          type: array
          items:
            $ref: '#/components/schemas/routeByTime'
        audio_ids:
          example: &ref_40
            - 64039e5d388735a60f299874
          description: Ids dos áudios da playlist system
          type: array
          items:
            type: string
        dst_type:
          type: string
          example: agent
          description: Tipo do destino [agent, campaign, ivr, did]
        direct_whatsapp_agent:
          type: boolean
          example: false
          description: Receber ligações do whatsapp
      required:
        - name
        - did
        - dst
        - enabled
        - tags
        - source_numbers
        - trunk_id
        - route_by_time
        - audio_ids
        - dst_type
        - direct_whatsapp_agent
    ResponseIncallControllerDto:
      type: object
      properties:
        _id:
          type: string
          example: 63724b92c0ef93903y24dc45
          description: ID da permissão de entrada
        name:
          type: string
          example: IN DDR 8XXX
          description: Nome da permissão de entrada
        did:
          type: string
          example: _8XXX
          description: DDR da permissão de entrada
        dst:
          type: string
          example: 645d050c3f0df3001f4d426d
          description: Destino da rota de entrada neste horário
        enabled:
          type: number
          example: 1
          description: Flag que indica se a rota está ativa (1) ou não (0)
        tags:
          example:
            - comercial
            - diretoria
          description: Lista de tags
          type: array
          items:
            type: string
        source_numbers:
          example:
            - '85986251919'
            - _11X.
          description: Lista de expressões de números de origem
          type: array
          items:
            type: string
        trunk_id:
          type: string
          example: 64039e5d388735a60f299874
          description: >-
            Operadora associada a esta rota (campo id da collection
            voice_trunks)
        route_by_time:
          description: Lista de desvios por horário
          type: array
          items:
            $ref: '#/components/schemas/routeByTime'
        audio_ids:
          example:
            - 64039e5d388735a60f299874
          description: Ids dos áudios da playlist system
          type: array
          items:
            type: string
        dst_type:
          type: string
          example: agent
          description: Tipo do destino [agent, group, ivr, outcall, by_did]
        direct_whatsapp_agent:
          type: boolean
          example: false
          description: Receber ligações do whatsapp
      required:
        - _id
        - name
        - did
        - dst
        - enabled
        - tags
        - source_numbers
        - trunk_id
        - route_by_time
        - audio_ids
        - dst_type
        - direct_whatsapp_agent
    UpdateIncallDto:
      type: object
      properties:
        name:
          type: string
          example: IN DDR 8XXX
          description: Nome da permissão de entrada
        did:
          type: string
          example: _8XXX
          description: DDR da permissão de entrada
        dst:
          type: string
          example: _8XXX
          description: Destino default da permissão de entrada
        enabled:
          type: number
          example: 1
          description: Flag que indica se a rota está ativa (1) ou não (0)
        tags:
          example: *ref_38
          description: Lista de tags
          type: array
          items:
            type: string
        source_numbers:
          example: *ref_39
          description: Lista de expressões de números de origem
          type: array
          items:
            type: string
        trunk_id:
          type: string
          example: 64039e5d388735a60f299874
          description: >-
            Operadora associada à esta rota (campo id da collection
            voice_trunks)
        route_by_time:
          description: Lista de desvios por horário
          type: array
          items:
            $ref: '#/components/schemas/routeByTime'
        audio_ids:
          example: *ref_40
          description: Ids dos áudios da playlist system
          type: array
          items:
            type: string
        dst_type:
          type: string
          example: agent
          description: Tipo do destino [agent, campaign, ivr, did]
        direct_whatsapp_agent:
          type: boolean
          example: false
          description: Receber ligações do whatsapp
        _id:
          type: string
          example: 63724b92c0ef93903y24dc45
          description: ID da permissão de entrada
      required:
        - name
        - did
        - dst
        - enabled
        - tags
        - source_numbers
        - trunk_id
        - route_by_time
        - audio_ids
        - dst_type
        - direct_whatsapp_agent
        - _id
    UpdatePositionRouteDto:
      type: object
      properties:
        old_position:
          type: number
          example: 4
          description: A antiga posição
        new_position:
          type: number
          example: 2
          description: A nova posição
      required:
        - old_position
        - new_position
    ResponseUpdatePositionRouteBackendDto:
      type: object
      properties:
        sucess:
          type: string
          example: 'true'
          description: ''
      required:
        - sucess
    DstIdentity:
      type: object
      properties:
        id:
          type: string
          example: 63724b92c0ef93903y24dc45
          description: ID da rota de destino
        component_id:
          type: string
          example: 63724b92c0ef93903y24dc44
          description: ID do componente de destino
      required:
        - id
        - component_id
    CreateInternalRouteDto:
      type: object
      properties:
        name:
          type: string
          example: RT URA Hotel
          description: Nome da rota interna
        extension:
          type: string
          example: '200'
          description: Número da rota interna
        type:
          type: string
          example: user
          description: Indica o tipo do criador da rota interna, "system" ou "user"
        dst_type:
          type: string
          example: ivr
          description: >-
            Indica o tipo do destino da rota interna, "agent", "campaign", ou
            "ivr"
        dst_identity:
          description: >-
            Objeto que indica o ID do destino da rota interna. Caso o destino
            seja uma URA, também será necessário repassar o component_id dentro
            do objeto.
          allOf:
            - $ref: '#/components/schemas/DstIdentity'
        enabled:
          type: number
          example: 1
          description: Indica se a rota está habilitada/desabilitada
      required:
        - name
        - extension
        - type
        - dst_type
        - dst_identity
        - enabled
    ResponseInternalRouteControllerDto:
      type: object
      properties:
        _id:
          type: string
          example: 63724b92c0ef93903y24dc45
          description: ID da rota interna
        name:
          type: string
          example: RT URA Hotel
          description: Nome da rota interna
        extension:
          type: string
          example: '200'
          description: Ramal da rota interna
        type:
          type: string
          example: user
          description: Tipo de rota interna
        dst_type:
          type: string
          example: ivr
          description: Tipo do destino da rota interna
        dst_identity:
          example: >-
            {id: 63724b92c0ef93903y24dc45, component_id:
            63724b92c0ef93903y24dc44}
          description: Id e component_id do destino
          type: array
          items:
            $ref: '#/components/schemas/DstIdentity'
        position:
          type: number
          example: 0
          description: Posição
        enabled:
          type: number
          example: 1
          description: Se a rota interna esta habilitada ou não
      required:
        - _id
        - name
        - extension
        - type
        - dst_type
        - dst_identity
        - position
        - enabled
    UpdateInternalRouteDto:
      type: object
      properties:
        name:
          type: string
          example: RT URA Hotel
          description: Nome da rota interna
        extension:
          type: string
          example: '200'
          description: Número da rota interna
        type:
          type: string
          example: user
          description: Indica o tipo do criador da rota interna, "system" ou "user"
        dst_type:
          type: string
          example: ivr
          description: >-
            Indica o tipo do destino da rota interna, "agent", "campaign", ou
            "ivr"
        dst_identity:
          description: >-
            Objeto que indica o ID do destino da rota interna. Caso o destino
            seja uma URA, também será necessário repassar o component_id dentro
            do objeto.
          allOf:
            - $ref: '#/components/schemas/DstIdentity'
        enabled:
          type: number
          example: 1
          description: Indica se a rota está habilitada/desabilitada
        _id:
          type: string
          example: 63724b92c0ef93903y24dc45
          description: ID da permissão de entrada
      required:
        - name
        - extension
        - type
        - dst_type
        - dst_identity
        - enabled
        - _id
    Transhipment:
      type: object
      properties:
        type:
          type: string
          example: main
          description: Tipo do transbordo.
        trunk_id:
          type: string
          example: F63d7d91f6648050011dc5d7e
          description: Operadora associada à esta rota
        del_initial_digits:
          type: number
          example: 0
          description: >-
            Quantidade de dígitos que devem ser removidos do início do número
            discado
        add_digits_before:
          type: string
          example: '01585'
          description: Dígitos que devem ser adicionados no início do número discado
        add_digits_after:
          type: string
          example: '1555'
          description: Dígitos que devem ser adicionados no final do número discado
        call_id:
          type: string
          example: '55456954'
          description: Identificador de chamadas.
        removal_starting_position:
          type: number
          example: '1'
          description: Posição inicial de remoção.
        number_of_digits_to_remove:
          type: number
          example: '1'
          description: Número de digitos para remover.
      required:
        - type
        - trunk_id
        - del_initial_digits
        - add_digits_before
        - add_digits_after
        - call_id
        - removal_starting_position
        - number_of_digits_to_remove
    CreateOutcallDto:
      type: object
      properties:
        name:
          type: string
          example: Fixo local
          description: Nome da permissão de saída
        number_format:
          type: string
          example: '[2-5]XXXXXXX'
          description: Expressão que representa o número de saída desta permissão de saída
        enabled:
          type: number
          example: 1
          description: Flag que indica se a rota está ativa (1) ou não (0)
        time_group_id:
          type: string
          example: 63f26d83f7dedc1249a039b7
          description: ID de um grupo de horários (campo id da collection time_groups)
        source:
          type: string
          example: '456954'
          description: Identifica a origem do número na rota de saída.
        transhipments:
          description: Lista de operadoras
          type: array
          items:
            $ref: '#/components/schemas/Transhipment'
        icon:
          type: string
          example: phone
          description: Ícone que vai ser exibido na tela de permissões de saída.
      required:
        - name
        - number_format
        - enabled
        - time_group_id
        - source
        - transhipments
        - icon
    ResponseOutcallControllerDto:
      type: object
      properties:
        _id:
          type: string
          example: 63724b92c0ef93903y24dc45
          description: ID da permissão de saída
        name:
          type: string
          example: Fixo local
          description: Nome da permissão de saída
        number_format:
          type: string
          example: '[2-5]XXXXXXX'
          description: Expressão que representa o número de saída desta permissão de saída
        enabled:
          type: number
          example: 1
          description: Flag que indica se a rota está ativa (1) ou não (0)
        time_group_id:
          type: string
          example: 63f26d83f7dedc1249a039b7
          description: ID de um grupo de horários (campo id da collection time_groups)
        source:
          type: string
          example: '456954'
          description: Identifica a origem do número na rota de saída.
        transhipments:
          description: Lista de operadoras
          type: array
          items:
            $ref: '#/components/schemas/Transhipment'
        icon:
          type: string
          example: phone
          description: Ícone que vai ser exibido na tela de permissões de saída.
      required:
        - _id
        - name
        - number_format
        - enabled
        - time_group_id
        - source
        - transhipments
        - icon
    UpdateOutcallDto:
      type: object
      properties:
        name:
          type: string
          example: Fixo local
          description: Nome da permissão de saída
        number_format:
          type: string
          example: '[2-5]XXXXXXX'
          description: Expressão que representa o número de saída desta permissão de saída
        enabled:
          type: number
          example: 1
          description: Flag que indica se a rota está ativa (1) ou não (0)
        time_group_id:
          type: string
          example: 63f26d83f7dedc1249a039b7
          description: ID de um grupo de horários (campo id da collection time_groups)
        source:
          type: string
          example: '456954'
          description: Identifica a origem do número na rota de saída.
        transhipments:
          description: Lista de operadoras
          type: array
          items:
            $ref: '#/components/schemas/Transhipment'
        icon:
          type: string
          example: phone
          description: Ícone que vai ser exibido na tela de permissões de saída.
        _id:
          type: string
          example: 63724b92c0ef93903y24dc45
          description: ID da permissão de saída
      required:
        - name
        - number_format
        - enabled
        - time_group_id
        - source
        - transhipments
        - icon
        - _id
    ResponseGlobalControllerDto:
      type: object
      properties:
        country_code:
          type: string
          example: '55'
          description: >-
            Código do país usado como prefixo do número no envio do link da
            gravação
        ddd:
          type: string
          example: '11'
          description: Código do DDD padrão do tenant
        sz4_send_recording_via_whatsapp:
          type: boolean
          example: false
          description: Flag que ativa/desativa o envio do link da gravação por Whatsapp
      required:
        - country_code
        - ddd
        - sz4_send_recording_via_whatsapp
    UpdateGlobalDto:
      type: object
      properties:
        country_code:
          type: string
          example: '55'
          description: >-
            Código do país usado como prefixo do número no envio do link da
            gravação
        ddd:
          type: string
          example: '11'
          description: Código do DDD padrão do tenant
        sz4_send_recording_via_whatsapp:
          type: boolean
          example: false
          description: Flag que ativa/desativa o envio do link da gravação por Whatsapp
      required:
        - country_code
        - ddd
        - sz4_send_recording_via_whatsapp
    ResponseReportsControllerDto:
      type: object
      properties:
        Datetime:
          type: string
          example: '2023-05-17 23:04:59'
          description: ID do agente
        Protocol:
          type: string
          example: '202305172304599986'
          description: Nome do agente
        CallerID:
          type: string
          example: '"Agente6" <1006>'
          description: Número do ramal do agente
        Source:
          type: string
          example: '1006'
          description: E-mail do agente para onde será enviado o link para criação da senha
        Destination:
          type: string
          example: '1005'
          description: Horário inicial de login do agente
        Duration:
          type: string
          example: '38'
          description: Horário final de login do agente
        BillableSeconds:
          type: string
          example: '0'
          description: ID da equipe do agente
        Disposition:
          type: string
          example: NO ANSWER
          description: Tecnologia do ramal do agente
        ContactName:
          type: string
          example: '8530315662'
          description: Nome do contato
        ContactPhoto:
          type: string
          example: https://fortics.sz.chat/photos/contact/64709cfa08bf655b0b603fff
          description: Foto do contato
      required:
        - Datetime
        - Protocol
        - CallerID
        - Source
        - Destination
        - Duration
        - BillableSeconds
        - Disposition
        - ContactName
        - ContactPhoto
    ResponseTimelineControllerDto:
      type: object
      properties:
        X_StartEventTimestamp:
          type: string
          example: '2025-06-01T18:35:55.200Z'
        Protocol:
          type: string
          example: '202305172304599986'
        X_FinalStatus:
          type: string
          example: success
        X_DestinationNumber:
          type: string
          example: '14155552671'
        X_CallType:
          type: string
          example: outgoing
        X_SourceNumber:
          type: string
          example: '1106'
      required:
        - X_StartEventTimestamp
        - Protocol
        - X_FinalStatus
        - X_DestinationNumber
        - X_CallType
        - X_SourceNumber
    Meta:
      type: object
      properties:
        totalItems:
          type: number
          example: 1
          description: Total de itens
        itemCount:
          type: number
          example: 1
          description: Quantidade de itens
        itemsPerPage:
          type: number
          example: 10
          description: Quantidade de itens por páginas
        totalPages:
          type: number
          example: 1
          description: Total de páginas
        currentPage:
          type: number
          example: 1
          description: Página atual
      required:
        - totalItems
        - itemCount
        - itemsPerPage
        - totalPages
        - currentPage
    ResponseReportsTimelineControllerDto:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/ResponseTimelineControllerDto'
        meta:
          description: Propriedades da paginação
          allOf:
            - $ref: '#/components/schemas/Meta'
      required:
        - items
        - meta
    ResponseTimelineDetailedControllerDto:
      type: object
      properties:
        X_SourceName:
          type: string
          example: Igor
        X_SourceNumber:
          type: string
          example: '14155552671'
        X_SourceId:
          type: string
          example: 6421dc5c12b2cd388e01c4b2
        X_DestinationName:
          type: string
          example: Igor
        X_DestinationNumber:
          type: string
          example: '8143'
        X_DestinationId:
          type: string
          example: 66f458ca41835eadf674c53b
        X_DestinationType:
          type: string
          example: incoming_route
        X_StartEventTimestamp:
          type: string
          example: '2025-04-10T18:08:00.200Z'
        X_CallType:
          type: string
          example: incoming
        X_TrunkInName:
          type: string
          example: Voip provider
        X_TrunkInId:
          type: string
          example: 65f9ae970de8256625e065ef
        X_TrunkOutName:
          type: string
          example: ''
        X_TrunkOutId:
          type: string
          example: ''
        X_FinalStatus:
          type: string
          example: loss
        X_RecordingFile:
          type: string
          example: ''
        X_RecordingStream:
          type: string
          example: ''
        X_ContactName:
          type: string
          example: Igor
        X_ContactPhoto:
          type: string
          example: https://example.com/photos/contact/6421dc5c12b2cd388e01c4b2
        X_GroupSourceIds:
          type: string
          example: ''
        X_Status:
          type: string
          example: busy
        Protocol:
          type: string
          example: '202504101808008027'
        Duration:
          type: string
          example: '39'
        BillableSeconds:
          type: string
          example: ''
      required:
        - X_SourceName
        - X_SourceNumber
        - X_SourceId
        - X_DestinationName
        - X_DestinationNumber
        - X_DestinationId
        - X_DestinationType
        - X_StartEventTimestamp
        - X_CallType
        - X_TrunkInName
        - X_TrunkInId
        - X_TrunkOutName
        - X_TrunkOutId
        - X_FinalStatus
        - X_RecordingFile
        - X_RecordingStream
        - X_ContactName
        - X_ContactPhoto
        - X_GroupSourceIds
        - X_Status
        - Protocol
        - Duration
        - BillableSeconds
    CreateWebhookDto:
      type: object
      properties:
        url:
          type: string
          example: https://server1.com.br/route
          description: URL que vai ser acionada neste webhook
        token:
          type: string
          example: mySecretToken
          description: >-
            Token que será enviado no cabeçalho X-Voice-token caso o cliente
            queira autenticar as requisições
        events:
          example: '["AgentConnect", "AgentComplete", "QueueSummary"]'
          description: Lista de eventos que serão enviados
          type: array
          items:
            type: string
        verify_ssl:
          type: boolean
          example: true
          description: Realiza (true) ou não (false) a verificação SSL
      required:
        - url
        - token
        - events
        - verify_ssl
    ResponseWebhookControllerDto:
      type: object
      properties:
        _id:
          type: string
          example: 63724b92c0ef93903y24dc45
          description: ID do webhook
        url:
          type: string
          example: https://server1.com.br/route
          description: URL que vai ser acionada neste webhook
        token:
          type: string
          example: mySecretToken
          description: >-
            Token que será enviado no cabeçalho X-Voice-token caso o cliente
            queira autenticar as requisições
        events:
          example:
            - AgentConnect
            - AgentComplete
            - QueueSummary
          description: Lista de eventos que serão enviados
          type: array
          items:
            type: string
        verify_ssl:
          type: boolean
          example: 'true'
          description: Realiza (true) ou não (false) a verificação SSL
      required:
        - _id
        - url
        - token
        - events
        - verify_ssl
    ResponseWebhookPaginatedControllerDto:
      type: object
      properties:
        items:
          description: Lista de Webhooks
          type: array
          items:
            $ref: '#/components/schemas/ResponseWebhookControllerDto'
        meta:
          description: Propriedades da paginação
          allOf:
            - $ref: '#/components/schemas/Meta'
      required:
        - items
        - meta
    ValidateHour:
      type: object
      properties:
        initial:
          type: string
          example: '08:00'
          description: Hora inicial
        final:
          type: string
          example: '19:00'
          description: Hora final
      required:
        - initial
        - final
    ResponseRouteSimulatorControllerDto:
      type: object
      properties:
        color:
          type: string
          example: '#E8FCEA'
          description: Cor para o frontend
        type:
          type: string
          example: out
          description: Tipo de rota se é entrada, interna ou saida
        origin:
          type: string
          example: '1000'
          description: Origem
        destiny:
          type: string
          example: '34825555'
          description: Destino
        dialing_permission:
          type: string
          example: Fixo local
          description: Permisao de discagem
        validate_hour:
          example: '{ "initial": "08:00", "final": "19:00"}'
          description: Hora valida
          type: array
          items:
            $ref: '#/components/schemas/ValidateHour'
        validate_day:
          example: '[1,2,3,4,5,6]'
          description: Dias validos
          type: array
          items:
            type: string
        permission_id:
          type: string
          example: 652fc17fefd4f6001f14a7aa
          description: ID da permissão
        time_group_name:
          type: string
          example: Horário comercial(Dias da semana)
          description: Nome do grupo de horario
      required:
        - color
        - type
        - origin
        - destiny
        - dialing_permission
        - validate_hour
        - validate_day
        - permission_id
        - time_group_name
    CloneItemDto:
      type: object
      properties:
        id:
          type: string
          example: 6482130326560f0013250c50
          description: Id do item para ser clonado
        type:
          type: string
          example: playlist
          description: O tipo do item que deseja clonar
      required:
        - id
        - type
    ResponseCallHistoryByContact:
      type: object
      properties:
        codename:
          type: string
          example: Alice
          description: >-
            Codinome ou identificador único usado para referenciar o agente de
            forma anônima dentro do sistema.
        date_time:
          type: string
          example: '2025-03-07T17:57:11.200Z'
          description: Data e hora
        contact_id:
          type: string
          example: 6421dc5c12b2cd388e01c4b3
          description: ID do contato
        contact_name:
          type: string
          example: Bob
          description: Nome do contato
        contact_number:
          type: string
          example: 11 99999-9999
          description: Número do contato
        contact_photo:
          type: string
          example: /photos/contact/6421dc5c12b2cd388e011234
          description: Foto do contato
        agent_name:
          type: string
          example: Alice
          description: Nome do agente
        agent_photo:
          type: string
          example: /photos/agent/6723fab28608a57f79e5d9fc?sz=67cb57e59f6e8901f1e51234
          description: Foto do agente
        disposition:
          type: string
          example: answered
          description: Disposição da chamada (atendida, ocupada, não atendida)
        call_type:
          type: string
          example: incoming
          description: Fluxo da chamada (Entrada, saída)
        recording_file:
          type: string
          example: >-
            https://example.com/voice/recording/file/6716a917a7a082a0c60918f2-bd7375a71fc3b768d42233ac29b1ba97
          description: Arquivo de gravação
        recording_path:
          type: string
          example: >-
            6716a917a7a082a0c60918f2/20250307/20250307-175658-IN-1199999-9999-1003-2174137021751.wav
          description: Caminho da gravação
        recording_stream:
          type: string
          example: >-
            https://example.com/voice/recording/stream/6716a917a7a082a0c60918f2-bd7375a71fc3b768d42233ac29b1ba97
          description: Link para ouvir a gravação
        transfer_type:
          type: string
          example: ATTENDEDTRANSFER
          description: Tipo de transferência, se houver, se não, o campo fica vazio
        transfer_source:
          type: string
          example: '1003'
          description: Número que transferiu
        source:
          type: string
          example: 11 99999-9999
          description: Origem da chamada
        destination:
          type: string
          example: '1002'
          description: Destino da chamada
      required:
        - codename
        - date_time
        - contact_id
        - contact_name
        - contact_number
        - contact_photo
        - agent_name
        - agent_photo
        - disposition
        - call_type
        - recording_file
        - recording_path
        - recording_stream
        - transfer_type
        - transfer_source
        - source
        - destination
    CreatePauseDto:
      type: object
      properties:
        active:
          type: boolean
          example: true
          description: Indica se a pausa está ativa ou não
        productive:
          type: boolean
          example: false
          description: Indica se a pausa é produtiva ou não
        cumulative:
          type: boolean
          example: false
          description: Indica se a pausa é do tipo acumulativa ou não
        supervisioned:
          type: boolean
          example: false
          description: Indica se a pausa é supervisionada ou não
        name:
          type: string
          example: Balcão
          description: Nome da pausa
        description:
          type: string
          example: Atendimento à cliente no balcão
          description: Descrição da pausa
        initialTime:
          type: string
          example: '15:00'
          description: Indica a partir de qual horário a pausa poderá ser usada
        maxTime:
          type: string
          example: '20'
          description: >-
            Indica a quantidade máxima de tempo em segundos que esta pausa será
            usada
        icon:
          type: string
          example: code
          description: Nome do ícone
      required:
        - active
        - productive
        - cumulative
        - supervisioned
        - name
        - description
        - initialTime
        - maxTime
        - icon
    ResponsePauseControllerDto:
      type: object
      properties:
        _id:
          type: string
          example: 63724b92c0ef93903y24dc45
          description: ID da playlist
        active:
          type: boolean
          example: true
          description: Indica se a pausa está ativa ou não
        productive:
          type: boolean
          example: false
          description: Indica se a pausa é produtiva ou não
        cumulative:
          type: boolean
          example: false
          description: Indica se a pausa é do tipo acumulativa ou não
        supervisioned:
          type: boolean
          example: false
          description: Indica se a pausa é supervisionada ou não
        name:
          type: string
          example: Balcão
          description: Nome da pausa
        description:
          type: string
          example: Atendimento à cliente no balcão
          description: Descrição da pausa
        initialTime:
          type: string
          example: '15:00'
          description: Indica a partir de qual horário a pausa poderá ser usada
        maxTime:
          type: string
          example: '20'
          description: >-
            Indica a quantidade máxima de tempo em segundos que esta pausa será
            usada
        icon:
          type: string
          example: code
          description: Nome do ícone
      required:
        - _id
        - active
        - productive
        - cumulative
        - supervisioned
        - name
        - description
        - initialTime
        - maxTime
        - icon
    UpdatePauseDto:
      type: object
      properties:
        active:
          type: boolean
          example: true
          description: Indica se a pausa está ativa ou não
        productive:
          type: boolean
          example: false
          description: Indica se a pausa é produtiva ou não
        cumulative:
          type: boolean
          example: false
          description: Indica se a pausa é do tipo acumulativa ou não
        supervisioned:
          type: boolean
          example: false
          description: Indica se a pausa é supervisionada ou não
        name:
          type: string
          example: Balcão
          description: Nome da pausa
        description:
          type: string
          example: Atendimento à cliente no balcão
          description: Descrição da pausa
        initialTime:
          type: string
          example: '15:00'
          description: Indica a partir de qual horário a pausa poderá ser usada
        maxTime:
          type: string
          example: '20'
          description: >-
            Indica a quantidade máxima de tempo em segundos que esta pausa será
            usada
        icon:
          type: string
          example: code
          description: Nome do ícone
        _id:
          type: string
          example: 63724b92c0ef93903y24dc45
          description: ID da operadora/tronco
      required:
        - active
        - productive
        - cumulative
        - supervisioned
        - name
        - description
        - initialTime
        - maxTime
        - icon
        - _id
    DeletePausesByIdDto:
      type: object
      properties:
        ids:
          example:
            - 66ff21b2578606ba115f9ee2
          description: Id das pausas a serem removidas
          type: array
          items:
            type: string
      required:
        - ids
    ResponseLicenseControllerDto:
      type: object
      properties:
        license_id:
          type: string
          example: 6491d357195fd021ae0da7d2
          description: Id da Licença
        license_status:
          type: string
          example: active
          description: Status da Licença
        license_updated_at:
          type: boolean
          example: false
          description: Data de atualização da Licença
        days_for_wait_before_deleted_resources:
          type: boolean
          example: false
          description: >-
            Quantidade de dias para esperar antes de deletar todos os recursos
            do cliente depois que a Licença estiver em canceled
        poc_expiration_date:
          type: boolean
          example: false
          description: Data de expiração da Licença
      required:
        - license_id
        - license_status
        - license_updated_at
        - days_for_wait_before_deleted_resources
        - poc_expiration_date
    ResponseStorageControllerDto:
      type: object
      properties:
        use_in_mb:
          type: number
          example: 8000
          description: Tamanho do bucket do cliente no GCP
        quota_in_mb:
          type: number
          example: 10000
          description: Valor do campo storage. total_gb (em mb)
        exceeded:
          type: boolean
          example: true
          description: Excedido
      required:
        - use_in_mb
        - quota_in_mb
        - exceeded
    ConditionsDto:
      type: object
      properties:
        always:
          type: string
          example: '1035'
          description: Desvio sempre
        busy:
          type: string
          example: '849751512'
          description: Desvio quando ocupado
        noanswer:
          type: string
          example: '1001'
          description: Desvio quando não tiver resposta
      required:
        - always
        - busy
        - noanswer
    CreateForwardDto:
      type: object
      properties:
        agent_id:
          type: string
          example: 667c6e50ee3b6439289b1780
          description: ID do agente ao qual a regra de desvio está associada.
        conditions:
          description: Lista de condições dos desvios
          allOf:
            - $ref: '#/components/schemas/ConditionsDto'
      required:
        - agent_id
        - conditions
    ResponseForwardControllerDto:
      type: object
      properties:
        _id:
          type: string
          example: 63724b92c0ef93903y24dc45
          description: ID do desvio
        agent_id:
          type: string
          example: 667c6e50ee3b6439289b1780
          description: ID do agente ao qual a regra de desvio está associada.
        conditions:
          description: Lista de condições dos desvios
          allOf:
            - $ref: '#/components/schemas/ConditionsDto'
      required:
        - _id
        - agent_id
        - conditions
    UpdateForwardDto:
      type: object
      properties:
        agent_id:
          type: string
          example: 667c6e50ee3b6439289b1780
          description: ID do agente ao qual a regra de desvio está associada.
        conditions:
          description: Lista de condições dos desvios
          allOf:
            - $ref: '#/components/schemas/ConditionsDto'
        _id:
          type: string
          example: 63724b92c0ef93903y24dc45
          description: ID do desvio
      required:
        - agent_id
        - conditions
        - _id
    DeleteForwardDto:
      type: object
      properties:
        ids:
          type: string
          example:
            - 6644fb4595e6b52e3762f233
            - 6644fb4595e6b52e3762f234
          description: IDs dos desvios
      required:
        - ids
    ResponseDeleteForwardControllerDto:
      type: object
      properties:
        success:
          type: boolean
          example: true
          description: Se a operação foi bem sucedida
        count:
          type: number
          example: 1
          description: Quantidade de registro deletados
        message:
          type: string
          example: ''
          description: Messagem caso ocorra algum erro
      required:
        - success
        - count
        - message
    ResponseVersionControllerDto:
      type: object
      properties:
        version:
          type: string
          example: 1.0.1
          description: Versão atual do sistema
      required:
        - version
