openapi: 3.0.1
info:
  title: Contactplan API
  description: Contactplan API
  version: 1.75.0
servers:
  - url: https://api.contactlab.it/plan/api/v1
paths:
  /account/info:
    get:
      tags:
        - Account
      summary: Get account info
      description: Returns all informations about the current account
      operationId: getAccountInfo
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserInfoRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
  /account/settings:
    get:
      tags:
        - Account
      summary: Get account settings
      description: Returns the settings about the current account
      operationId: getAccountSettings
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserSettingsRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
    put:
      tags:
        - Account
      summary: Modify user settings
      description: Modify settings of the current account
      operationId: setAccountSettings
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
      requestBody:
        description: The account setting resource
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserSettingsRes'
        required: true
      responses:
        200:
          description: The resource was updated succesfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserSettingsRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
      x-codegen-request-body-name: setting
  /analytics/{statementName}:
    get:
      tags:
        - Datasets
      summary: Get a compressed analytics dataset
      description: Returns a paged list of results that match with the given query
      operationId: executeAnalyticCompressed
      deprecated: true
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: statementName
          in: path
          description: The name of the statement
          required: true
          schema:
            type: string
        - name: planId
          in: query
          description: The UUID of the plan
          schema:
            type: string
        - name: segmentId
          in: query
          description: The UUID of the segment
          schema:
            type: string
        - name: format
          in: query
          description: The format of the response
          schema:
            type: string
            default: extended
            enum:
              - extended
              - compressed
        - name: forceReload
          in: query
          description: Disable dataset cache. Default value is false (cache enabled)
          schema:
            type: boolean
            default: false
        - name: startDate
          in: query
          description: The begin of date interval
          schema:
            type: string
        - name: endDate
          in: query
          description: The end of date interval
          schema:
            type: string
        - name: limit
          in: query
          description: The maximum number of statements
          schema:
            type: integer
        - name: offset
          in: query
          description: Offset applied to retrieved statements list before returning
            the required number of statements
          schema:
            type: integer
        - name: order
          in: query
          description: Sort directions of statements
          schema:
            type: string
        - name: orderField
          in: query
          description: Sort field of statements
          schema:
            type: string
        - name: windowTime
          in: query
          description: Filter by window time
          schema:
            type: string
            enum:
              - DAY
              - MONTH
              - QUARTER
              - YEAR
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/DataSetExtendedRes'
                  - $ref: '#/components/schemas/DataSetCompressedRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
  /clab/campaigns/feedbacks:
    get:
      tags:
        - Clab
      summary: Get all feedbacks of all plans
      description: Returns all contactlab feedbacks of all plans
      operationId: getCampaignsFeedbacks
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: days
          in: query
          description: The number of days in the past
          schema:
            type: integer
            format: int32
            default: 30
        - name: includeAll
          in: query
          description: Include all
          schema:
            type: boolean
            default: false
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClabFeedbacksListRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
  /clab/campaigns/tests:
    post:
      tags:
        - Clab
      summary: Send a test email campaign
      description: Send a test email campaign using the contactlab platform
      operationId: sendTestEmailCampaignDeprecated
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
      requestBody:
        description: The test email campaign resource
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TestEmailCampaignRes'
        required: true
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TestEmailCampaignRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      deprecated: true
      security:
        - OAuth2:
            - CONFIGURATOR
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
      x-codegen-request-body-name: test campaign
  /clab/campaigns/email/tests:
    post:
      tags:
        - Clab
      summary: Send a test email campaign
      description: Send a test email campaign using the contactlab platform
      operationId: sendTestEmailCampaign
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
      requestBody:
        description: The test email campaign resource
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TestEmailCampaignRes'
        required: true
      responses:
        202:
          description: Accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TestEmailCampaignRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
      x-codegen-request-body-name: test campaign
  /clab/campaigns/sms/tests:
    post:
      tags:
        - Clab
      summary: Send a test sms campaign
      description: Send a test sms campaign using the contactlab platform
      operationId: sendTestSmsCampaign
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
      requestBody:
        description: The test sms campaign resource
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TestSmsCampaignRes'
        required: true
      responses:
        202:
          description: Accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TestSmsCampaignRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
      x-codegen-request-body-name: test campaign
  /clab/campaigns/{planUuid}/feedbacks:
    get:
      tags:
        - Clab
      summary: Get a feedback
      description: Returns contactlab feedbacks of the specified plan
      operationId: getCampaignFeedbacks
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: planUuid
          in: path
          description: The UUID of the plan
          required: true
          schema:
            type: string
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClabFeedbackRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
  /clab/filters:
    get:
      tags:
        - Clab
      summary: Get all test filters
      description: Returns a list of all test filters associated to the database in
        use, with a default pagination of 15 filters per page sorted by their identifiers
      operationId: getFilters
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PageableFilterResList'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
  /clab/filters/{id}:
    get:
      tags:
        - Clab
      summary: Get a filter
      description: Returns the filter with the given id
      operationId: getFilter
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: id
          in: path
          description: The ID of the filter
          required: true
          schema:
            type: integer
            format: int32
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FilterRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
  /clab/filters/email/test:
    post:
      tags:
        - Clab
      summary: Post a test filter
      description: Create a new email test filter
      operationId: postEmailFilter
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
      requestBody:
        description: The test email campaign resource
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TestFilterRes'
        required: true
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FilterRes'
        400:
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        500:
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
  /clab/filters/sms/test:
    post:
      tags:
        - Clab
      summary: Post a test filter
      description: Create a new sms test filter
      operationId: postSmsFilter
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
      requestBody:
        description: The test email campaign resource
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TestFilterRes'
        required: true
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FilterRes'
        400:
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        500:
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
  /clab/sendinggroups/email:
    get:
      tags:
        - Clab
      summary: Get all email sending groups
      description: Returns a list of all email sending groups associated to the user
        database in use
      operationId: getEmailSendingGroups
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmailGroupListRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
  /clab/sendinggroups/email/{id}:
    get:
      tags:
        - Clab
      summary: Get a email sending group
      description: Returns a email sending groups with the given id
      operationId: getEmailSendingGroupById
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: id
          in: path
          description: The ID of the email sending group
          required: true
          schema:
            type: integer
            format: int32
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmailGroupRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
  /clab/sendinggroups/sms:
    get:
      tags:
        - Clab
      summary: Get all sms sending groups
      description: Returns a list of all sms sending groups associated to the user
        database in use
      operationId: getSmsSendingGroups
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SmsGroupListRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
  /clab/sendinggroups/sms/{id}:
    get:
      tags:
        - Clab
      summary: Get a sms sending group
      description: Returns a sms sending groups with the given id
      operationId: getSmsSendingGroupById
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: id
          in: path
          description: The ID of the sms sending group
          required: true
          schema:
            type: integer
            format: int32
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SmsGroupRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
  /consumers:
    get:
      tags:
        - Consumers
      summary: Get all consumers
      description: Returns a list of consumers
      operationId: getTenantConsumers
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: tenant
          in: query
          description: The ID of the tenant
          schema:
            type: string
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlanJobListRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
  /contacts:
    get:
      tags:
        - Contacts
      summary: Get a contact list
      description: Returns a paged list of contacts that match with the given query
        and (optionally) satisfy the given DND policy for the given planification
        date
      operationId: getContacts
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: query
          in: query
          description: Json expression representing the query used to retrieve contacts
          schema:
            type: string
        - name: attributes
          in: query
          description: List of contact attributes
          style: form
          explode: true
          schema:
            type: array
            items:
              type: string
        - name: resultType
          in: query
          description: Result can be hits (count is returned), list (contacts id and
            email are returned), partial_list (only defined attributes are returned),
            full_list (all attributes are returned)
          schema:
            type: string
        - name: limit
          in: query
          description: The maximum number of contacts
          schema:
            type: integer
            format: int32
        - name: offset
          in: query
          description: Offset applied to retrieved contact list before returning the
            required number of contacts
          schema:
            type: integer
            format: int32
        - name: dnd
          in: query
          description: UUID of DND policy to be applied
          schema:
            type: string
        - name: dndRule
          in: query
          description: Json expression representing the DND policy to be applied
          schema:
            type: string
        - name: planificationDate
          in: query
          description: Target date in which contacts will be used for a marketing action.
            required for DND policy evaluation
          schema:
            type: string
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataSetRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      deprecated: true
      security:
        - OAuth2:
            - CONFIGURATOR
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
  /contacts.csv:
    post:
      tags:
        - Contacts
      summary: Download a contact list
      description: Returns a csv file with paged list of contacts that match with
        the given query and (optionally) satisfy the given DND policy for the given
        planification date
      operationId: downloadContacts
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: attributes
          in: query
          description: List of contact attributes
          style: form
          explode: true
          schema:
            type: array
            items:
              type: string
        - name: resultType
          in: query
          description: Result can be hits (count is returned), list (contacts id and
            email are returned), partial_list (only defined attributes are returned),
            full_list (all attributes are returned)
          schema:
            type: string
        - name: limit
          in: query
          description: The maximum number of contacts
          schema:
            type: integer
            format: int32
            default: 10
        - name: offset
          in: query
          description: Offset applied to retrieved contact list before returning the
            required number of contacts
          schema:
            type: integer
            format: int32
            default: 0
        - name: filename
          in: query
          description: Name of match list
          schema:
            type: string
            default: contacts.csv
        - name: dnd
          in: query
          description: UUID of DND policy to be applied
          schema:
            type: string
        - name: planificationDate
          in: query
          description: Target date in which contacts will be used for a marketing action.
            required for DND policy evaluation
          schema:
            type: string
      requestBody:
        description: Json expression representing the query used to retrieve contacts
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/QueryRes'
        required: false
      responses:
        200:
          description: Ok
          content: {}
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
            text/csv:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
            text/csv:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
            text/csv:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CLAB_OPERATOR
            - ADMIN
  /contacts/search:
    post:
      tags:
        - Contacts
      summary: Get a contact list
      description: Returns a paged list of contacts that match with the given query
        and (optionally) satisfy the given DND policy for the given planification
        date
      operationId: searchContacts
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: attributes
          in: query
          description: List of contact attributes
          style: form
          explode: true
          schema:
            type: array
            items:
              type: string
        - name: resultType
          in: query
          description: Result can be hits (count is returned), list (contacts id and
            email are returned), partial_list (only defined attributes are returned),
            full_list (all attributes are returned)
          schema:
            type: string
        - name: limit
          in: query
          description: The maximum number of contacts
          schema:
            type: integer
            format: int32
        - name: offset
          in: query
          description: Offset applied to retrieved contact list before returning the
            required number of contacts
          schema:
            type: integer
            format: int32
        - name: dnd
          in: query
          description: UUID of DND policy to be applied
          schema:
            type: string
        - name: dndRule
          in: query
          description: Json expression representing the DND policy to be applied
          schema:
            type: string
        - name: planificationDate
          in: query
          description: Target date in which contacts will be used for a marketing action.
            required for DND policy evaluation
          schema:
            type: string
      requestBody:
        description: Json expression representing the query used to retrieve contacts
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/QueryRes'
        required: false
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataSetRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
      x-codegen-request-body-name: query
  /contacts/{customerId}:
    get:
      tags:
        - Contacts
      summary: Get a contact
      description: Returns informations about the contact with the given customer
        id
      operationId: getContactById
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: customerId
          in: path
          description: Primary key of customer
          required: true
          schema:
            type: string
        - name: attributes
          in: query
          description: List of contact attributes
          style: form
          explode: true
          schema:
            type: array
            items:
              type: string
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataSetRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - DPO
            - CLAB_OPERATOR
            - ADMIN
    delete:
      tags:
        - Contacts
      summary: Delete a contact
      description: Delete a contact and all the events related by customer id
      operationId: deleteUserAndRelatedEventsByCustomerId
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: customerId
          in: path
          description: Primary key of customer
          required: true
          schema:
            type: string
      responses:
        202:
          description: Accepted
          content: {}
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - DPO
  /contacts/{customerId}/events:
    get:
      tags:
        - Events
      summary: Download the customer events
      description: Returns a zip file with list of all customer events
      operationId: downloadCustomerEvents
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: customerId
          in: path
          description: Primary key of customer
          required: true
          schema:
            type: string
      responses:
        200:
          description: Ok
          content:
            application/zip:
              schema:
                type: string
                format: binary
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
            text/csv:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
            text/csv:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - DPO
  /contacts/{customerId}/plans:
    get:
      tags:
        - Plans
      summary: Get a list of plans
      description: Return paged plans resource where contact is in associated list
      operationId: getPlansFromContactInList
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: customerId
          in: path
          description: Primary key of customer
          required: true
          schema:
            type: string
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PageablePlanResList'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - DPO
  /dashboards:
    get:
      tags:
        - Dashboard
      summary: Get all dashboard
      description: Returns a list of dashboards
      operationId: getAllDashboards
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: limit
          in: query
          description: The maximum number of results, Default = -1
          schema:
            type: integer
            format: int32
        - name: offset
          in: query
          description: The offset. Default = 0.
          schema:
            type: integer
            format: int32
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DashboardListRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
    post:
      tags:
        - Dashboard
      summary: 'Create a dashboard '
      description: Returns a dashboard
      operationId: postDashboard
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
      requestBody:
        description: The dashboard resource
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DashboardRes'
        required: true
      responses:
        201:
          description: The resource was created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DashboardRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        409:
          description: Resource Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CLAB_OPERATOR
      x-codegen-request-body-name: dashboard
  /dashboards/{dashboardUuid}/widgets/{widgetUuid}:
    delete:
      tags:
        - Dashboard
      summary: Delete a dashboard widget
      description: Delete a dashboard widget relationship
      operationId: deleteDashboardWidgets
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: dashboardUuid
          in: path
          description: The UUID of the dashboard
          required: true
          schema:
            type: string
        - name: widgetUuid
          in: path
          description: The UUID of the widget
          required: true
          schema:
            type: string
      responses:
        204:
          description: The resource was deleted successfully
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CLAB_OPERATOR
  /dashboards/{uuid}:
    get:
      tags:
        - Dashboard
      summary: Get a dashboard
      description: Returns a dashboard
      operationId: getDashboardPolicyById
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: uuid
          in: path
          description: The UUID of the dashboard
          required: true
          schema:
            type: string
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DashboardRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
    put:
      tags:
        - Dashboard
      summary: Modify a dashboard
      description: Returns a dashboard
      operationId: modifyDashboard
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: uuid
          in: path
          description: The UUID of the dashboard
          required: true
          schema:
            type: string
      requestBody:
        description: The dashboard resource
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DashboardRes'
        required: true
      responses:
        200:
          description: The resource was updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DashboardRes'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        409:
          description: Resource Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CLAB_OPERATOR
      x-codegen-request-body-name: dashboard
    delete:
      tags:
        - Dashboard
      summary: Delete a dashboard
      description: Delete a dashboard with the given uuid
      operationId: deleteDashboardById
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: uuid
          in: path
          description: The UUID of the dashboard
          required: true
          schema:
            type: string
      responses:
        204:
          description: The resource was deleted successfully
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CLAB_OPERATOR
  /dashboards/{uuid}/widgets:
    get:
      tags:
        - Dashboard
      summary: Get a dashboard widgets
      description: Returns a list of widgets
      operationId: getDashboardWidgets
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: uuid
          in: path
          description: The UUID of the dashboard
          required: true
          schema:
            type: string
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WidgetListRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
    put:
      tags:
        - Dashboard
      summary: Create a dashboard widget relationship
      description: Returns a dashboard
      operationId: postDashboardWidgets
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: uuid
          in: path
          description: The UUID of the dashboard
          required: true
          schema:
            type: string
      requestBody:
        description: The dashboard widget resource
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WidgetListRes'
        required: true
      responses:
        201:
          description: The resource was created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DashboardRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        409:
          description: Resource Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CLAB_OPERATOR
      x-codegen-request-body-name: widget
  /datasets/{statementId}:
    get:
      tags:
        - Datasets
      summary: Get a dataset
      description: Returns a paged list of results that match with the given query
      operationId: execute
      deprecated: true
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: statementId
          in: path
          description: The UUID of the statement
          required: true
          schema:
            type: string
        - name: planId
          in: query
          description: The UUID of the plan
          schema:
            type: string
        - name: segmentId
          in: query
          description: The UUID of the segment
          schema:
            type: string
        - name: format
          in: query
          description: The format of the response
          schema:
            type: string
            default: extended
            enum:
              - extended
              - compressed
        - name: forceReload
          in: query
          description: Disable dataset cache. Default value is false ( cache disabled
            )
          schema:
            type: boolean
            default: false
        - name: startDate
          in: query
          description: The begin of date interval
          schema:
            type: string
        - name: endDate
          in: query
          description: The end of date interval
          schema:
            type: string
        - name: limit
          in: query
          description: The maximum number of statements
          schema:
            type: integer
        - name: offset
          in: query
          description: Offset applied to retrieved statements list before returning
            the required number of statements
          schema:
            type: integer
        - name: order
          in: query
          description: Sort directions of statements
          schema:
            type: string
        - name: orderField
          in: query
          description: Sort field of statements
          schema:
            type: string
        - name: windowTime
          in: query
          description: Filter by window time
          schema:
            type: string
            enum:
              - DAY
              - MONTH
              - QUARTER
              - YEAR
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/DataSetExtendedRes'
                  - $ref: '#/components/schemas/DataSetCompressedRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
  /events/{category}:
    delete:
      tags:
        - Events
      summary: Delete the events category
      description: Delete the events with the given category
      operationId: deleteEventsCategory
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: category
          in: path
          description: Event category
          required: true
          schema:
            type: string
        - name: categoryName
          in: query
          description: Event category Name
          required: true
          schema:
            type: string
        - name: type
          in: query
          description: Event Type
          schema:
            type: string
      responses:
        204:
          description: The resource was deleted successfully
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CLAB_OPERATOR
            - ADMIN
  /extContents/automations:
    get:
      tags:
        - External Contents
      summary: Get all active automations
      description: Returns a list of active automations for a range of date
      operationId: getActiveAutomation
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: fromDate
          in: query
          description: Filter by automation fromDate before or equal to the specified date
          schema:
            type: string
            format: date-time
        - name: toDate
          in: query
          description: The end of date interval
          schema:
            type: string
            format: date-time
        - name: name
          in: query
          description: The automation's name
          schema:
            type: string
        - name: status
          in: query
          description: The automation status (default is COMMITTED, RUNNING, PAUSED)
          schema:
            type: string
            enum:
              - COMMITTED
              - PAUSED
              - RUNNING
              - ARCHIVED
              - DRAFT
              - ERROR
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionPageResourceAutomationRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
  /extContents/pagebuilderTemplates:
    get:
      tags:
        - External Contents
      summary: Get all templates
      description: Returns a list of templates
      operationId: getPageBuilderTemplates
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PageablePageBuilderTemplateResList'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
  /extContents/pagebuilderTemplates/{templateId}/pages:
    get:
      tags:
        - External Contents
      summary: Get all template pages
      description: Returns a list of template pages
      operationId: getPageBuilderPagesList
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: templateId
          in: path
          description: The ID of the template
          required: true
          schema:
            type: integer
            format: int32
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PageablePageBuilderPagesResList'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
  /extContents/pagebuilderTemplates/{templateId}/pages/{pageId}:
    get:
      tags:
        - External Contents
      summary: Get page content
      description: Returns a page content
      operationId: getPageBuilderPagesListByPageId
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: templateId
          in: path
          description: The ID of the template
          required: true
          schema:
            type: integer
            format: int32
        - name: pageId
          in: path
          description: The number of page
          required: true
          schema:
            type: integer
            format: int32
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PageBuilderPagesRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
  /extContents/emaildesigner:
    get:
      tags:
        - External Contents
      summary: Get information about email designer
      description: If response is true, it's possible use email designer
      operationId: getEmailDesignerInfo
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmailDesignerRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
  /extContents/linkProcessor/clabid:
    get:
      tags:
        - External Contents
      description: Returns the name of the send column that contains the hub customer id.
      parameters:
        - name: Authorization
          in: header
          required: true
          schema:
            type: string
        - name: tenant
          in: query
          description: The ID of the tenant
          schema:
            type: string
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClabIdRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
  /extContents/linkProcessor/extract:
    post:
      tags:
        - Link extract
      summary: Extracts all links found in the given template.
      description: Extracts all links found in body and alt body(body.source must
        be a valid html, altBody.source must be in plain text).
      parameters:
        - name: Authorization
          in: header
          required: true
          schema:
            type: string
      requestBody:
        description: The Message template.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MessageTemplate'
        required: true
      responses:
        200:
          description: The 200 (OK) status code indicates that the request has succeeded.
            Message template with bodyHtml.links popolated with links founded in bodyHtml.source
            passed as input and messageAltBody.links popolated with links founded
            in messageAltBody.source passed as input.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageTemplate'
        400:
          description: The 400 (Bad Request) status code indicates that the server
            cannot or will not process the request due to something that is perceived
            to be  a client error (e.g., malformed request syntax, invalid request  message
            framing, or deceptive request routing).  https://www.rfc-editor.org/info/rfc7231
          content: {}
        401:
          description: The 401 (Unauthorized) status code indicates that the request
            has not  been applied because it lacks valid authentication credentials
            for the target resource. https://www.rfc-editor.org/info/rfc7231
          content: {}
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      x-codegen-request-body-name: messageTemplate
  /extContents/linkProcessor/decorate:
    post:
      tags:
        - Template decorator
      summary: Decorate given templates with the tracked links
      description: Decorates and replaces all links(with field link.trackRequest=true)
        in the given  templates. The link list have to be in the same order of appearance
        in the body.
      parameters:
        - name: Authorization
          in: header
          required: true
          schema:
            type: string
      requestBody:
        description: message template
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MessageTemplate'
        required: true
      responses:
        200:
          description: The 200 (OK) status code indicates that the request has succeeded.
            Message template with bodyHtml.source enhanced with link decorated and
            messageAltBody.source enhanced with link decorated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageTemplate'
        400:
          description: The 400 (Bad Request) status code indicates that the server
            cannot or will not process the request due to something that is perceived
            to be  a client error (e.g., malformed request syntax, invalid request  message
            framing, or deceptive request routing).  https://www.rfc-editor.org/info/rfc7231
          content: {}
        401:
          description: The 401 (Unauthorized) status code indicates that the request
            has not  been applied because it lacks valid authentication credentials
            for the target resource. https://www.rfc-editor.org/info/rfc7231
          content: {}
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      x-codegen-request-body-name: messageTemplate
  /extContents/analytics:
    get:
      tags:
        - Analytics
      summary: Retrieves the available Analytic configurations
      description: Retrieves the available Analytics configurations for the current customer.
      parameters:
        - name: Authorization
          in: header
          required: true
          schema:
            type: string
      responses:
        200:
          description: The 200 (OK) status code indicates that the request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnalyticsRes'
        400:
          description: The 400 (Bad Request) status code indicates that the server
            cannot or will not process the request due to something that is perceived
            to be  a client error (e.g., malformed request syntax, invalid request  message
            framing, or deceptive request routing).  https://www.rfc-editor.org/info/rfc7231
          content: {}
        401:
          description: The 401 (Unauthorized) status code indicates that the request
            has not  been applied because it lacks valid authentication credentials
            for the target resource. https://www.rfc-editor.org/info/rfc7231
          content: {}
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
  /jobs:
    get:
      tags:
        - Jobs
      summary: Get all jobs
      description: Returns a list of jobs
      operationId: getJobs
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: tenant
          in: query
          description: The ID of the tenant
          schema:
            type: string
        - name: includeOrphan
          in: query
          description: Includes orphan job
          schema:
            type: boolean
            default: false
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TenantJobListRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
    post:
      tags:
        - Jobs
      summary: Launch a single job
      description: Launch a single job with the given tenant ID and plugin UUID
      operationId: launchSingleJob
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
      requestBody:
        description: The job resource
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TenantJobRes'
        required: true
      responses:
        202:
          description: Accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TenantJobRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CLAB_OPERATOR
      x-codegen-request-body-name: job
  /jobs/flow:
    post:
      tags:
        - Jobs
      summary: Launch a flow job
      description: Launch a flow job
      operationId: launchFlowJob
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: tenant
          in: query
          description: The ID of the tenant
          required: true
          schema:
            type: string
      responses:
        202:
          description: Accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TenantJobRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CLAB_OPERATOR
  /jobs/orphans:
    get:
      tags:
        - Jobs
      summary: Get all orphan jobs
      description: Returns a list of orphan jobs
      operationId: getOrphansJobs
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: tenant
          in: query
          description: The ID of the tenant
          schema:
            type: string
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TenantJobListRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
  /jobs/{uuid}:
    get:
      tags:
        - Jobs
      summary: Get a job
      description: Returns a job with the given UUID
      operationId: getJobByUuid
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: uuid
          in: path
          description: The UUID of the job
          required: true
          schema:
            type: string
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TenantJobRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
  /jobs/{uuid}/execution:
    post:
      tags:
        - Jobs
      summary: Launch a single job
      description: Launch a single job with the given UUID
      operationId: launchSingleJobByUuid
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: uuid
          in: path
          description: The UUID of the job
          required: true
          schema:
            type: string
      responses:
        202:
          description: Accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TenantJobRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
  /kpis:
    get:
      tags:
        - Kpis
      summary: Get all available kpis
      description: Returns a list of available kpis
      operationId: getKpis
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KpiListRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CLAB_OPERATOR
  /kpis/stats:
    get:
      tags:
        - Kpis
      summary: Get all tenants statistics
      description: Returns statistics about all tenants
      operationId: getTenantsStats
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TenantStatsKpiListRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CLAB_OPERATOR
  /kpis/tenants:
    get:
      tags:
        - Kpis
      summary: Get all tenants information
      description: Returns informations about all tenants
      operationId: getTenantsInfo
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TenantKpiListRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CLAB_OPERATOR
  /kpis/usage/plans:
    get:
      tags:
        - Kpis
      summary: Get usage kpis
      description: Returns a list of usage kpis about tenants' plans
      operationId: getPlanUsageKpis
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: tenant
          in: query
          description: Array of tenant ID
          style: form
          explode: true
          schema:
            type: array
            items:
              type: string
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KpiListUsageRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CLAB_OPERATOR
  /kpis/usage/segments:
    get:
      tags:
        - Kpis
      summary: Get usage kpis
      description: Returns a list of usage kpis about tenants' plans
      operationId: getSegmentUsageKpis
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: tenant
          in: query
          description: Array of tenant ID
          style: form
          explode: true
          schema:
            type: array
            items:
              type: string
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KpiListUsageRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CLAB_OPERATOR
  /lists/{listUuid}:
    get:
      tags:
        - Scheduled-lists
      summary: Get a contact list metadata
      description: Returns a contact list metadata with the given UUID
      operationId: getList
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: listUuid
          in: path
          description: The UUID of the list
          required: true
          schema:
            type: string
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContactListMetaRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
  /lists/{uuid}/contacts:
    get:
      tags:
        - Scheduled-lists
      summary: Get list contacts
      description: Returns the contacts contained in the list
      operationId: downloadContactsJson
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: uuid
          in: path
          description: The UUID of the list
          required: true
          schema:
            type: string
        - name: attributes
          in: query
          description: List of contact attributes
          style: form
          explode: true
          schema:
            type: array
            items:
              type: string
        - name: resultType
          in: query
          description: Result can be hits (count is returned), list (contacts id and
            email are returned), partial_list (only defined attributes are returned),
            full_list (all attributes are returned)
          schema:
            type: string
        - name: limit
          in: query
          description: The maximum number of contacts
          schema:
            type: integer
            format: int32
        - name: offset
          in: query
          description: Offset applied to retrieved contacts list before returning the
            required number of contacts
          schema:
            type: integer
            format: int32
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataSetRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
            - CLAB_OPERATOR
            - ADMIN
  /lists/{uuid}/contacts.csv:
    post:
      tags:
        - Scheduled-lists
      summary: Download a contact list
      description: Returns a csv file with paged list of contacts
      operationId: downloadContactsCsv
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: uuid
          in: path
          description: The UUID of the list
          required: true
          schema:
            type: string
        - name: attributes
          in: query
          description: List of contact attributes
          style: form
          explode: true
          schema:
            type: array
            items:
              type: string
        - name: resultType
          in: query
          description: Result can be hits (count is returned), list (contacts id and
            email are returned), partial_list (only defined attributes are returned),
            full_list (all attributes are returned)
          schema:
            type: string
        - name: filename
          in: query
          description: The name of the file
          required: true
          schema:
            type: string
        - name: limit
          in: query
          description: The maximum number of contacts
          schema:
            type: integer
            format: int32
        - name: offset
          in: query
          description: Offset applied to retrieved contacts list before returning the
            required number of contacts
          schema:
            type: integer
            format: int32
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContactListMetaRes'
            text/csv:
              schema:
                $ref: '#/components/schemas/ContactListMetaRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
            text/csv:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
            text/csv:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
            text/csv:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        409:
          description: The list is not materialized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
            text/csv:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
            - CLAB_OPERATOR
            - ADMIN
  /me:
    get:
      tags:
        - User
      summary: Get current user info
      description: Returns basic informations about the current user and a list of
        tenants on which it can operate
      operationId: getMe
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
  /models:
    get:
      tags:
        - Models
      summary: Get all metadata
      description: Returns the metadata
      operationId: getAllMeta
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: schema
          in: query
          description: 'Specify the metadata to read. Available values: events, contacts.
            If not specified returns all the metadata.'
          schema:
            type: string
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModelsRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
  /models/base-filter/attributes:
    get:
      tags:
        - Models
      summary: Get base filter meta
      description: Retrieve a list of metadata for every attribute within the base filter
      operationId: getBaseFilterAttributes
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaseFilterAttribute'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
  /models/contacts:
    get:
      tags:
        - Models
      summary: Get contact meta
      description: Return a paged list of metadata for all the attributes of the contact
      operationId: getContactMeta
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModelsRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
  /models/contacts/attributes/{attributeName}/bitmask:
    post:
      tags:
        - Models
      summary: Set contact attribute to bitmask
      description: Full refresh of attribute bitmask value
      operationId: setBitmaskContactsLovAttribute
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: attributeName
          in: path
          description: The attribute name
          required: true
          schema:
            type: string
      requestBody:
        description: The bitmask resource
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BitmaskRes'
        required: true
      responses:
        201:
          description: The resource was created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BitmaskRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CLAB_OPERATOR
            - ADMIN
      x-codegen-request-body-name: bitmask
    delete:
      tags:
        - Models
      summary: Delete contact attribute bitmask values
      operationId: deleteBitmaskContactsLovAttribute
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: attributeName
          in: path
          description: The attribute name
          required: true
          schema:
            type: string
      responses:
        204:
          description: The resource was deleted successfully
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CLAB_OPERATOR
            - ADMIN
  /models/contacts/attributes/{attributeName}/values:
    get:
      tags:
        - Models
      summary: list of value of a specific contact attribute
      description: Return a list of available values for the given attribute
      operationId: getContactsLov
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: attributeName
          in: path
          description: The attribute name
          required: true
          schema:
            type: string
        - name: parentAttributeValue
          in: query
          description: The parent attribute value
          schema:
            type: string
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LovsListRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
  /models/contacts/attributes/{attributeName}/values/{lovId}:
    get:
      tags:
        - Models
      summary: Gets a value from the LOV of a specific contact attribute given a lov
        ID
      description: Returns the values of the given contact LOV value
      operationId: getContactLovByLovId
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: attributeName
          in: path
          description: The attribute name
          required: true
          schema:
            type: string
        - name: lovId
          in: path
          description: The ID of lov
          required: true
          schema:
            type: string
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LovItemRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
  /models/contacts/attributes/{attributeName}:
    get:
      tags:
        - Models
      summary: Gets metadata for a specific contact attribute
      description: Returns the values of the given contact attribute
      operationId: getContactAttributeMetaByName
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: attributeName
          in: path
          description: The attribute name
          required: true
          schema:
            type: string
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModelAttributeRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
    patch:
      tags:
        - Models
      summary: Edits metadata associated to a contact attribute
      description: Returns the modified contact attribute metadata. Only visible, autoinclude, aggregable, label, inputFieldType, displayPosition are modifiable.
      operationId: patchContactAttributeMetaByName
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: attributeName
          in: path
          description: The attribute name
          required: true
          schema:
            type: string
      requestBody:
        description: 'The contact attribute resource. At least one of this properties is required: visible, autoinclude, aggregable, label, inputFieldType, displayPosition.'
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ModelAttributeRes'
        required: true
      responses:
        200:
          description: The resource was updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModelAttributeRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        409:
          description: Resource conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CLAB_OPERATOR
            - ADMIN
      x-codegen-request-body-name: contact attribute
  /models/dimensions/attributes/{attributeName}/values/{lovId}:
    get:
      tags:
        - Models
      summary: Gets a value from the LOV of a specific dimension attribute given a
        lov ID
      description: Returns the values of the given event LOV value
      operationId: getDimensionLovByLovId
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: attributeName
          in: path
          description: The attribute name
          required: true
          schema:
            type: string
        - name: lovId
          in: path
          description: The ID of lov
          required: true
          schema:
            type: string
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LovItemRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
  /models/dimensions/attributes/{attributeName}:
    get:
      tags:
        - Models
      summary: Gets metadata for a specific dimension attribute
      description: Return the values for the given dimension attribute
      operationId: getDimensionAttributeMetaByName
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: attributeName
          in: path
          description: The dimension name
          required: true
          schema:
            pattern: .+
            type: string
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LovItemRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
    patch:
      tags:
        - Models
      summary: Edits metadata associated to a dimension attribute
      description: Returns the modified dimension attribute metadata. Only visible, autoinclude, aggregable, label, inputFieldType, displayPosition are modifiable.
      operationId: patchDimensionAttributeMetaByName
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: attributeName
          in: path
          description: The dimension name
          required: true
          schema:
            pattern: .+
            type: string
      requestBody:
        description: 'The dimension attribute resource. At least one of this properties is required: visible, autoinclude, aggregable, label, inputFieldType, displayPosition.'
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ModelAttributeRes'
        required: true
      responses:
        200:
          description: The resource was updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModelAttributeRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        409:
          description: Resource conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CLAB_OPERATOR
            - ADMIN
      x-codegen-request-body-name: contact attribute
  /models/events:
    get:
      tags:
        - Models
      summary: Get all events meta
      description: Return metadata for all the events
      operationId: getAllEventsMeta
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModelsRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
  /models/events/{category}:
    get:
      tags:
        - Models
      summary: Get specific event meta
      description: Return metadata for all events in the given category
      operationId: getEventMetaByCategory
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: category
          in: path
          description: The event category
          required: true
          schema:
            type: string
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ModelsEventsRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
  /models/events/{category}/{type}:
    get:
      tags:
        - Models
      summary: Get specific event meta
      description: Return metadata for the event of specified type in the given category
      operationId: getEventMetaByCategoryAndType
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: category
          in: path
          description: The event category
          required: true
          schema:
            type: string
        - name: type
          in: path
          description: The type of event category
          required: true
          schema:
            type: string
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModelsEventsRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
  /models/events/{category}/{type}/attributes/{attributeName}/values:
    get:
      tags:
        - Models
      summary: Get list of value of a specific event attribute
      description: Return a list of available values for the given attribute
      operationId: getEventLov
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: category
          in: path
          description: The event category
          required: true
          schema:
            type: string
        - name: type
          in: path
          description: The type of event category
          required: true
          schema:
            type: string
        - name: attributeName
          in: path
          description: The attribute name
          required: true
          schema:
            type: string
        - name: parentAttributeValue
          in: query
          description: The parent attribute value
          schema:
            type: string
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LovsListRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
  /models/events/{category}/{type}/attributes/{attributeName}/values/{lovId}:
    get:
      tags:
        - Models
      summary: Gets a value from the LOV of a specific event attribute given a lov
        ID
      description: Returns the values of the given event LOV value
      operationId: getEventLovByLovId
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: category
          in: path
          description: The event category
          required: true
          schema:
            type: string
        - name: type
          in: path
          description: The type of event category
          required: true
          schema:
            type: string
        - name: attributeName
          in: path
          description: The attribute name
          required: true
          schema:
            type: string
        - name: lovId
          in: path
          description: The ID of lov
          required: true
          schema:
            type: string
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LovItemRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
  /models/events/{category}/{type}/attributes/{attributeName}:
    get:
      tags:
        - Models
      summary: Gets metadata for a specific event attribute
      description: Returns the values of the given event attribute
      operationId: getEventAttributeMetaByName
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: category
          in: path
          description: The event category
          required: true
          schema:
            type: string
        - name: type
          in: path
          description: The type of event category
          required: true
          schema:
            type: string
        - name: attributeName
          in: path
          description: The name of attribute
          required: true
          schema:
            pattern: .+
            type: string
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModelAttributeRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
    patch:
      tags:
        - Models
      summary: Edits metadata associated to a event attribute
      description: Returns the modified event attribute metadata. Only visible, autoinclude, aggregable, label, inputFieldType, displayPosition are modifiable.
      operationId: patchEventAttributeMetaByName
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: category
          in: path
          description: The event category
          required: true
          schema:
            type: string
        - name: type
          in: path
          description: The type of event category
          required: true
          schema:
            type: string
        - name: attributeName
          in: path
          description: The name of attribute
          required: true
          schema:
            pattern: .+
            type: string
      requestBody:
        description: 'The event attribute resource. At least one of this properties is required: visible, autoinclude, aggregable, label, inputFieldType, displayPosition.'
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ModelAttributeRes'
        required: true
      responses:
        200:
          description: The resource was updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModelAttributeRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        409:
          description: Resource conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CLAB_OPERATOR
            - ADMIN
      x-codegen-request-body-name: contact attribute
  /models/specials:
    get:
      tags:
        - Models
      summary: Get specials query meta
      description: Return a list of metadata for special query available
      operationId: getSpecialsQueryAvailable
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModelSpecialsListRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
  /models/specials/{subtype}:
    get:
      tags:
        - Models
      summary: Get specials query meta by subtype
      description: Return a list of metadata for special query available filtered
        by subtype
      operationId: getSpecialsQueryByCategoryAvailable
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: subtype
          in: path
          description: Subtype of special
          required: true
          schema:
            type: string
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModelSpecialsListRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
  /models/contacts/distribution:
    get:
      tags:
        - Field distribution
      summary: Get field distribution
      description: Returns a list of 20 most common contact attribute values paginated by attribute
      operationId: getFieldDistributions
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PageableFieldDistributionResList'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
  /monitors/logs:
    get:
      tags:
        - Traces
      summary: Get all feedbacks of the loaded data
      description: Returns a list of all the feedbacks of the loaded data
      operationId: getDataLoaderFeedbacks
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: tenant
          in: query
          description: The ID of the tenant
          required: true
          schema:
            type: string
        - name: startDate
          in: query
          description: The begin of date interval
          schema:
            type: string
        - name: endDate
          in: query
          description: The end of date interval
          schema:
            type: string
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PageableDataLoaderFlowResList'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
  /monitors/logs/{uuid}:
    get:
      tags:
        - Traces
      summary: Get the feedback of the loaded data
      description: Return the feedback of the loaded data
      operationId: getDataLoaderFeedback
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: uuid
          in: path
          description: The UUID of feedback
          required: true
          schema:
            type: string
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataLoaderFlowRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
  /plans:
    get:
      tags:
        - Plans
      summary: Get all plans
      description: Returns a list of plans. A compacted form of plans is returned
         if request contains a non-empty array of plugins
      operationId: findPlans
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: status
          in: query
          description: Array of plan status
          style: form
          explode: true
          schema:
            type: array
            items:
              type: string
        - name: start
          in: query
          description: The begin of date interval
          schema:
            type: string
        - name: end
          in: query
          description: The begin of date interval
          schema:
            type: string
        - name: name
          in: query
          description: Filter by name
          schema:
            type: string
        - name: segmentUuid
          in: query
          description: Filter by segment uuid
          schema:
            type: string
        - name: segmentName
          in: query
          description: Filter by segment name
          schema:
            type: string
        - name: plugins
          in: query
          description: Array of plugin identifiers
          style: form
          explode: true
          schema:
            type: array
            items:
              type: string
        - name: style
          in: query
          description: If equals to "compact", shows less elements in the response
          schema:
            type: string
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/PageablePlanResList'
                  - $ref: '#/components/schemas/PageablePlanResCompactList'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
    post:
      tags:
        - Plans
      summary: Create a plan
      description: Create a plan
      operationId: postPlan
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
      requestBody:
        description: The plan resource
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PlanRes'
        required: true
      responses:
        201:
          description: The resource was created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlanResResponse'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        409:
          description: Resource Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
      x-codegen-request-body-name: plan
  /plans/recurrences:
    get:
      tags:
        - Recurrences
      summary: Get all recurrences
      description: Returns a list of recurrences
      operationId: findRecurrences
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: status
          in: query
          description: Array of recurrences status
          style: form
          explode: true
          schema:
            type: array
            items:
              type: string
        - name: name
          in: query
          description: Filter by name
          schema:
            type: string
        - name: segmentUuid
          in: query
          description: Filter by segment uuid
          schema:
            type: string
        - name: segmentName
          in: query
          description: Filter by segment name
          schema:
            type: string
        - name: plugins
          in: query
          description: Array of plugin identifiers
          style: form
          explode: true
          schema:
            type: array
            items:
              type: string
        - name: style
          in: query
          description: If equals to "compact", shows less elements in the response
          schema:
            type: string
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PageablePlanResList'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
    post:
      tags:
        - Recurrences
      summary: Create a recurrence
      description: Create a recurrence with the given UUID
      operationId: postRecurrence
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
      requestBody:
        description: The recurrence resource
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PlanRes'
        required: true
      responses:
        201:
          description: The resource was created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlanResResponse'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        409:
          description: Resource Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
      x-codegen-request-body-name: recurrence
  /plans/recurrences/{uuid}:
    get:
      tags:
        - Recurrences
      summary: Get a recurrence
      description: Returns a recurrence with the given UUID
      operationId: getRecurrenceByUuid
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: uuid
          in: path
          description: The UUID of recurrence
          required: true
          schema:
            type: string
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlanResResponse'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
    put:
      tags:
        - Recurrences
      summary: Modify a recurrence
      description: Modify a recurrence with the given UUID
      operationId: putRecurrence
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: uuid
          in: path
          description: The UUID of recurrence
          required: true
          schema:
            type: string
      requestBody:
        description: The recurrence resource
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PlanRes'
        required: true
      responses:
        200:
          description: The resource was updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlanResResponse'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        409:
          description: Resource Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
      x-codegen-request-body-name: recurrence
    patch:
      tags:
        - Recurrences
      summary: Modify the status of a recurrence
      description: Modify the status of a recurrence with the given UUID
      operationId: patchRecurrence
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: uuid
          in: path
          description: The UUID of recurrence
          required: true
          schema:
            type: string
      requestBody:
        description: The recurrence resource
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PlanResRequestForPatch'
        required: true
      responses:
        200:
          description: The resource was updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlanResResponse'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        409:
          description: Resource Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
      x-codegen-request-body-name: recurrence
    delete:
      tags:
        - Recurrences
      summary: Delete a recurrence
      description: Delete a recurrence with the given UUID
      operationId: deleteRecurrence
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: uuid
          in: path
          description: The UUID of recurrence
          required: true
          schema:
            type: string
        - name: forced
          in: query
          description: Force delete archived recurrence
          schema:
            type: boolean
            default: true
      responses:
        202:
          description: Accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlanResResponse'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
  /plans/recurrences/{uuid}/instances:
    get:
      tags:
        - Recurrences
      summary: Get a list of recurrence instances
      description: Returns a list of instances of the recurrence with the given UUID
      operationId: getRecurrencePlansInstancesByUuidV2
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: uuid
          in: path
          description: The UUID of recurrence
          required: true
          schema:
            type: string
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PageablePlanRecurrenceResList'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
  /plans/recurrences/{uuid}/jobs:
    get:
      tags:
        - Plan-jobs
      summary: Get recurrence jobs
      description: Returns jobs of recurrence with the given UUID
      operationId: getRecurrencePlanJobs
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: uuid
          in: path
          description: The UUID of recurrence
          required: true
          schema:
            type: string
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlanJobListRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
  /plans/{planUuid}/externalinfo:
    get:
      tags:
        - Clab
      summary: Get external informations
      description: Returns every resource created by the specific plan on external
        systems
      operationId: getConsumerFeedbacksForPlan
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: planUuid
          in: path
          description: The UUID of the plan
          required: true
          schema:
            type: string
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlanWithExternalInfoRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
  /plans/{planUuid}/jobs/{consumerUuid}/callback:
    post:
      tags:
        - Callback
      summary: Webhook plan
      description: Altering the state of a plan
      operationId: callbackUpdatePlan
      parameters:
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: planUuid
          in: path
          description: The UUID of the plan
          required: true
          schema:
            type: string
        - name: consumerUuid
          in: path
          description: The UUID of job associated with the plan
          required: true
          schema:
            type: string
      responses:
        200:
          description: Ok
          content: {}
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
  /plans/{puid}/lists:
    get:
      tags:
        - Scheduled-lists
      summary: Get a plan lists metadata
      description: Returns a plan list metadata with the given plan UUID
      operationId: getListsFromPlan
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: puid
          in: path
          description: The UUID of the plan
          required: true
          schema:
            type: string
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContactListMetaRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
  /plans/{uuid}:
    get:
      tags:
        - Plans
      summary: Get a plan
      description: Returns a plan with the given UUID
      operationId: getPlanByUuid
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: uuid
          in: path
          description: The UUID of plan
          required: true
          schema:
            type: string
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlanResResponse'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
    put:
      tags:
        - Plans
      summary: Modify a plan
      description: Modify a plan with the given UUID
      operationId: putPlan
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: uuid
          in: path
          description: The UUID of plan
          required: true
          schema:
            type: string
      requestBody:
        description: The plan resource
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PlanRes'
        required: true
      responses:
        200:
          description: The resource was updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlanResResponse'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        409:
          description: Resource Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
      x-codegen-request-body-name: plan
    delete:
      tags:
        - Plans
      summary: Delete a plan
      description: Delete a plan with the given UUID
      operationId: deletePlan
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: uuid
          in: path
          description: The UUID of plan
          required: true
          schema:
            type: string
        - name: forced
          in: query
          description: Force delete archived plan
          schema:
            type: boolean
            default: true
      responses:
        202:
          description: Accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlanResResponse'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        409:
          description: Resource Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        422:
          description: Unprocessable entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
  /plans/{uuid}/contacts/{customerId}:
    delete:
      tags:
        - Plans
      summary: Remove a contact from a plan
      description: Remove a contact from a plan with the given UUID
      operationId: removeContactFromPlan
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: uuid
          in: path
          description: The UUID of plan
          required: true
          schema:
            type: string
        - name: customerId
          in: path
          description: Primary key of customer
          required: true
          schema:
            type: string
      responses:
        202:
          description: Accepted
          content: {}
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - DPO
  /plans/{uuid}/contacts/count:
    get:
      tags:
        - Plans
      summary: Counts the contacts in a plan
      description: Counts the number of contacts in a plan with the given UUID,
        either in materialized list or in segment (filtered by the dnd rule, if any)
      operationId: getContactsCountInPlan
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: uuid
          in: path
          description: The UUID of plan
          required: true
          schema:
            type: string
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CountRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
  /plans/{uuid}/jobs:
    get:
      tags:
        - Plan-jobs
      summary: Get plan jobs
      description: Returns jobs of plan with the given UUID
      operationId: getPlanJobs
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: uuid
          in: path
          description: The UUID of plan
          required: true
          schema:
            type: string
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlanJobListRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
  /plans/{uuid}/deliveries:
    get:
      tags:
        - Plans
      summary: Get plan deliveries
      description: Gets deliveries of plan with the given UUID
      operationId: getPlanDeliveries
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: uuid
          in: path
          description: The UUID of plan
          required: true
          schema:
            type: string
        - name: status
          in: query
          description: The deliveries status
          required: false
          schema:
            type: string
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PlanDeliveryRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
  /plans/{uuid}/deliveries/{id}:
    get:
      tags:
        - Plans
      summary: Get plan delivery
      description: Gets delivery of plan with the given UUID and the given delivery ID
      operationId: getPlanDelivery
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: uuid
          in: path
          description: The UUID of plan
          required: true
          schema:
            type: string
        - name: id
          in: path
          description: The ID of the delivery
          required: true
          schema:
            type: string
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlanDeliveryRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
  /plugins:
    get:
      tags:
        - Plugins
      summary: Get all plugins
      description: Returns a list of plugins
      operationId: getAllPlugin
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PluginListRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CLAB_OPERATOR
  /plugins/{uuid}:
    get:
      tags:
        - Plugins
      summary: Get a plugin
      description: Returns a plugin with the given UUID
      operationId: get
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: uuid
          in: path
          description: The UUID of plugin
          required: true
          schema:
            type: string
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PluginRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CLAB_OPERATOR
  /policies/dnds:
    get:
      tags:
        - Dnd-policies
      summary: Get all the dnd policies
      description: Returns a list of dnd policies
      operationId: getAllDndPolicy
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: limit
          in: query
          description: The maximum number of dnd policies, -1 for all
          schema:
            type: integer
            format: int32
        - name: offset
          in: query
          description: Offset applied to retrieved dnd policy list before returning
            the required number of dnd policies
          schema:
            type: integer
            format: int32
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DndPolicyListRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
    post:
      tags:
        - Dnd-policies
      summary: Create a dnd policy
      description: Create a dnd policy
      operationId: postDndPolicy
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
      requestBody:
        description: The dnd policy resource
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DndPolicyRes'
        required: true
      responses:
        201:
          description: The resource was created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuditedDndPolicyRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        409:
          description: Resource Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CLAB_OPERATOR
            - ADMIN
      x-codegen-request-body-name: dnd
  /policies/dnds/{uuid}:
    get:
      tags:
        - Dnd-policies
      summary: Get a dnd policy
      description: Returns a dnd policy with the given UUID
      operationId: getDndPolicyById
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: uuid
          in: path
          description: The UUID of dnd policy
          required: true
          schema:
            type: string
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuditedDndPolicyRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
    put:
      tags:
        - Dnd-policies
      summary: Modify a dnd policy
      description: Modify a dnd policy with the given UUID
      operationId: putDndPolicy
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: uuid
          in: path
          description: The UUID of dnd policy
          required: true
          schema:
            type: string
      requestBody:
        description: The dnd policy resource
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DndPolicyRes'
        required: true
      responses:
        200:
          description: The resource was updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuditedDndPolicyRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        409:
          description: Resource Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CLAB_OPERATOR
            - ADMIN
      x-codegen-request-body-name: dnd
    delete:
      tags:
        - Dnd-policies
      summary: Delete a dnd policy
      description: Delete a dnd policy with the given UUID
      operationId: deleteDndPolicyById
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: uuid
          in: path
          description: The UUID of dnd policy
          required: true
          schema:
            type: string
      responses:
        204:
          description: The resource was deleted successfully
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CLAB_OPERATOR
            - ADMIN
  /reports/plans/{planUuid}:
    get:
      tags:
        - Clab
      summary: Get a plan report
      description: Returns a report for the specified plan with contactlab feedbacks
        and associated automation
      operationId: getPlanFeedbacks
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: planUuid
          in: path
          description: The UUID of the plan
          required: true
          schema:
            type: string
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FeedbackRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
  /rules:
    get:
      tags:
        - Rules
      summary: Get all rules
      description: Returns a list of rules
      operationId: getRules
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: limit
          in: query
          description: The maximum number of rules
          schema:
            type: integer
            format: int32
        - name: category
          in: query
          description: The category of the rules
          schema:
            type: string
        - name: offset
          in: query
          description: Offset applied to retrieved rules list before returning the required
            number of rules
          schema:
            type: integer
            format: int32
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RulesListRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
    post:
      tags:
        - Rules
      summary: Create a rule
      description: Create a rule
      operationId: createRule
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
      requestBody:
        description: The rule resource
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RuleResRequest'
        required: true
      responses:
        201:
          description: The resource was created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RuleResResponse'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        409:
          description: Resource conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
      x-codegen-request-body-name: rule
  /rules/{uuid}:
    get:
      tags:
        - Rules
      summary: Get a rule
      description: Returns the rule with the given UUID
      operationId: getRule
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: uuid
          in: path
          description: The UUID of rule
          required: true
          schema:
            type: string
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RuleResResponse'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
    put:
      tags:
        - Rules
      summary: Modify a rule
      description: Modify the rule with the given UUID
      operationId: putRule
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: uuid
          in: path
          description: The UUID of rule
          required: true
          schema:
            type: string
      requestBody:
        description: The rule resource
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RuleResRequest'
        required: true
      responses:
        200:
          description: The resource was updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RuleResResponse'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        409:
          description: Resource conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
      x-codegen-request-body-name: rule
    delete:
      tags:
        - Rules
      summary: Delete rule
      description: Delete the rule with the given UUID
      operationId: deleteRule
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: uuid
          in: path
          description: The UUID of rule
          required: true
          schema:
            type: string
      responses:
        204:
          description: The resource was deleted successfully
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        409:
          description: Resource conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
  /rules/{uuid}/contacts:
    get:
      tags:
        - Rules
      summary: Get rule contacts
      description: Return the contacts contained in the rule
      operationId: getRuleContacts
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: uuid
          in: path
          description: The UUID of rule
          required: true
          schema:
            type: string
        - name: resultType
          in: query
          description: Result can be hits (count is returned), list (contacts id and
            email are returned), partial_list (only defined attributes are returned),
            full_list (all attributes are returned)
          schema:
            type: string
        - name: limit
          in: query
          description: The maximum number of contacts
          schema:
            type: integer
            format: int32
        - name: offset
          in: query
          description: Offset applied to retrieved contacts list before returning the
            required number of contacts
          schema:
            type: integer
            format: int32
        - name: attributes
          in: query
          description: List of contact attributes
          style: form
          explode: true
          schema:
            type: array
            items:
              type: string
        - name: dnd
          in: query
          description: UUID of DND policy to be applied
          schema:
            type: string
        - name: planificationDate
          in: query
          description: Target date in which contacts will be used for a marketing action.
            Required for DND policy evaluation
          schema:
            type: string
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataSetRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
  /rules/{uuid}/contacts.csv:
    get:
      tags:
        - Rules
      summary: Download a contact list
      description: Returns a csv file with paged list of contacts that match with
        the given rule query and (optionally) satisfy the given DND policy for the
        given planification date
      operationId: downloadRuleContacts
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: uuid
          in: path
          description: The UUID of rule
          required: true
          schema:
            type: string
        - name: resultType
          in: query
          description: Result can be hits (count is returned), list (contacts id and
            email are returned), partial_list (only defined attributes are returned),
            full_list (all attributes are returned)
          schema:
            type: string
        - name: limit
          in: query
          description: The maximum number of contacts
          schema:
            type: integer
            format: int32
        - name: offset
          in: query
          description: Offset applied to retrieved contacts list before returning the
            required number of contacts
          schema:
            type: integer
            format: int32
        - name: attributes
          in: query
          description: List of contact attributes
          style: form
          explode: true
          schema:
            type: array
            items:
              type: string
        - name: dnd
          in: query
          description: UUID of DND policy to be applied
          schema:
            type: string
        - name: planificationDate
          in: query
          description: Target date in which contacts will be used for a marketing action.
            Required for DND policy evaluation
          schema:
            type: string
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RuleResResponse'
            text/csv:
              schema:
                $ref: '#/components/schemas/RuleResResponse'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
            text/csv:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
            text/csv:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
            text/csv:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
  /segments:
    get:
      tags:
        - Segments
      summary: Get all segments
      description: Returns a list of segments
      operationId: getSegments
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: page
          in: query
          description: The page number of segments list
          schema:
            type: string
        - name: limit
          in: query
          description: The maximum number of segments
          schema:
            type: integer
            format: int32
        - name: offset
          in: query
          description: Offset applied to retrieved segments list before returning the
            required number of segments
          schema:
            type: integer
            format: int32
        - name: name
          in: query
          description: Filter by name
          schema:
            type: string
        - name: type
          in: query
          description: Filter by type
          schema:
            type: string
            enum:
              - ALL
              - COMBINED
              - SIMPLE
        - name: style
          in: query
          description: If equals to "compact", shows less elements in the response
          schema:
            type: string
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PageableSegmentResList'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
    post:
      tags:
        - Segments
      summary: Create segment
      description: Create a segment
      operationId: createSegment
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SegmentRes'
        required: false
      responses:
        201:
          description: The resource was created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuditedSegmentRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        409:
          description: Resource Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
      x-codegen-request-body-name: body
  /segments/combined:
    post:
      tags:
        - Segments
      summary: Create a combined segment
      description: Create a combined segment
      operationId: createCombinedSegment
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CombinedSegmentResExtended'
        required: false
      responses:
        201:
          description: The resource was created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuditedSegmentRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        409:
          description: Resource Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      deprecated: true
      security:
        - OAuth2:
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
      x-codegen-request-body-name: body
  /segments/combined/contacts:
    post:
      tags:
        - Segments
      summary: Get combined segment contacts
      description: Return the contacts contained in the combined segment
      operationId: getCombinedSegmentContacts
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: resultType
          in: query
          description: Result can be hits (count is returned), list (contacts id and
            email are returned), partial_list (only defined attributes are returned),
            full_list (all attributes are returned)
          schema:
            type: string
        - name: limit
          in: query
          description: The maximum number of segments
          schema:
            type: integer
            format: int32
        - name: offset
          in: query
          description: Offset applied to retrieved segments list before returning the
            required number of segments
          schema:
            type: integer
            format: int32
        - name: attributes
          in: query
          description: List of contact attributes
          style: form
          explode: true
          schema:
            type: array
            items:
              type: string
        - name: dnd
          in: query
          description: UUID of DND policy to be applied
          schema:
            type: string
        - name: planificationDate
          in: query
          description: Target date in which contacts will be used for a marketing action.
            Required for DND policy evaluation
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CombinedSegmentRes'
        required: false
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataSetRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
      x-codegen-request-body-name: body
  /segments/{uuid}:
    get:
      tags:
        - Segments
      summary: Get a segment
      description: Returns the segment with the given UUID
      operationId: getSegment
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: uuid
          in: path
          description: The UUID of the segment
          required: true
          schema:
            type: string
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuditedSegmentRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
    put:
      tags:
        - Segments
      summary: Modify segment
      description: Modify a segment with the given UUID
      operationId: putSegment
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: uuid
          in: path
          description: The UUID of the segment
          required: true
          schema:
            type: string
      requestBody:
        description: The segment resource
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SegmentRes'
        required: true
      responses:
        200:
          description: The resource was updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuditedSegmentRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        409:
          description: Resource Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
      x-codegen-request-body-name: segment
    delete:
      tags:
        - Segments
      summary: Delete segment
      description: Delete a segment with the given UUID
      operationId: deleteSegment
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: uuid
          in: path
          description: The UUID of the segment
          required: true
          schema:
            type: string
      responses:
        204:
          description: The resource was deleted successfully
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        409:
          description: Resource Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
  /segments/{uuid}/contacts:
    get:
      tags:
        - Segments
      summary: Get segment contacts
      description: Return the contacts contained in the segment
      operationId: getSegmentContacts
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: uuid
          in: path
          description: The UUID of the segment
          required: true
          schema:
            type: string
        - name: resultType
          in: query
          description: Result can be hits (count is returned), list (contacts id and
            email are returned), partial_list (only defined attributes are returned),
            full_list (all attributes are returned)
          schema:
            type: string
        - name: limit
          in: query
          description: The maximum number of segments
          schema:
            type: integer
            format: int32
        - name: offset
          in: query
          description: Offset applied to retrieved segments list before returning the
            required number of segments
          schema:
            type: integer
            format: int32
        - name: attributes
          in: query
          description: List of contact attributes
          style: form
          explode: true
          schema:
            type: array
            items:
              type: string
        - name: dnd
          in: query
          description: UUID of DND policy to be applied
          schema:
            type: string
        - name: dndRule
          in: query
          description: Json expression representing the DND policy to be applied
          schema:
            type: string
        - name: planificationDate
          in: query
          description: Target date in which contacts will be used for a marketing action.
            Required for DND policy evaluation
          schema:
            type: string
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataSetRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
  /segments/{uuid}/contacts.csv:
    post:
      tags:
        - Segments
      summary: Download a contact list
      description: Returns a csv file with paged list of contacts that match with
        the given segment query and (optionally) satisfy the given DND policy for
        the given planification date
      operationId: downloadSegmentContacts
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: uuid
          in: path
          description: The UUID of the segment
          required: true
          schema:
            type: string
        - name: resultType
          in: query
          description: Result can be hits (count is returned), list (contacts id and
            email are returned), partial_list (only defined attributes are returned),
            full_list (all attributes are returned)
          schema:
            type: string
        - name: limit
          in: query
          description: The maximum number of segments
          schema:
            type: integer
            format: int32
        - name: offset
          in: query
          description: Offset applied to retrieved segments list before returning the
            required number of segments
          schema:
            type: integer
            format: int32
        - name: attributes
          in: query
          description: List of contact attributes
          style: form
          explode: true
          schema:
            type: array
            items:
              type: string
        - name: dnd
          in: query
          description: UUID of DND policy to be applied
          schema:
            type: string
        - name: planificationDate
          in: query
          description: Target date in which contacts will be used for a marketing action.
            Required for DND policy evaluation
          schema:
            type: string
        - name: filename
          in: query
          description: Name of match list
          schema:
            type: string
            default: contacts.csv
      responses:
        200:
          description: Ok
          content: {}
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
            text/csv:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
            text/csv:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
            text/csv:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
  /segments/{uuid}/shares:
    get:
      tags:
        - Segments
      summary: Get all shared segment operations
      description: Return all the shared segment operations for the segment
      operationId: getShareSegments
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: uuid
          in: path
          description: The UUID of the segment
          required: true
          schema:
            type: string
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AllShareSegmentRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
    post:
      tags:
        - Segments
      summary: Share a new segment operations
      description: Share a new operation for the segment
      operationId: shareSegment
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: uuid
          in: path
          description: The UUID of the segment
          required: true
          schema:
            type: string
      requestBody:
        description: The share resource
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ShareSegmentResRequest'
        required: true
      responses:
        201:
          description: The resource was created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShareSegmentResResponse'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
  /statements:
    get:
      tags:
        - Statements
      summary: Get all statement
      description: Returns a list of statements
      operationId: getAllStatements
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: limit
          in: query
          description: The maximum number of statements
          schema:
            type: integer
            format: int32
            default: -1
        - name: offset
          in: query
          description: Offset applied to retrieved statement list before returning the
            required number of statements
          schema:
            type: integer
            format: int32
            default: 0
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatementListRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
    post:
      tags:
        - Statements
      summary: 'Creates a statement '
      description: Returns a statement
      operationId: postStatement
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
      requestBody:
        description: The statement resource
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StatementRes'
        required: true
      responses:
        201:
          description: The resource was created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatementRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        409:
          description: Resource Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CLAB_OPERATOR
      x-codegen-request-body-name: statement
  /statements/{uuid}:
    get:
      tags:
        - Statements
      summary: Get a statement
      description: Returns a statement with the given UUID
      operationId: getStatementPolicyById
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: uuid
          in: path
          description: The UUID of the statement
          required: true
          schema:
            type: string
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatementListRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CLAB_OPERATOR
    put:
      tags:
        - Statements
      summary: 'Modify a statement '
      description: Modify a statement with the given UUID
      operationId: modifyStatement
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: uuid
          in: path
          description: The UUID of the statement
          required: true
          schema:
            type: string
      requestBody:
        description: The statement resource
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StatementRes'
        required: true
      responses:
        200:
          description: The resource was updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatementRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        409:
          description: Resource Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CLAB_OPERATOR
      x-codegen-request-body-name: statement
    delete:
      tags:
        - Statements
      summary: Delete a statement
      description: Delete a statement with the given UUID
      operationId: deletestatementById
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: uuid
          in: path
          description: The UUID of the statement
          required: true
          schema:
            type: string
      responses:
        204:
          description: The resource was deleted successfully
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CLAB_OPERATOR
  /tenantconfig:
    get:
      tags:
        - Tenants
      summary: Get a tenant configuration
      description: Returns a tenant configuration
      operationId: getTenantConfig
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TenantResExtended'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
  /tenants:
    get:
      tags:
        - Tenants
      summary: Get all tenants
      description: If groupPk is not provided, returns all tenants. Otherwise, returns
        either the tenant custom configuration for each tenant owned by groupPk (if type is extended),
        or the list of tenants owned by groupPk (if type is collapsed)
      operationId: getTenantsByGroupPk
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: groupPk
          in: query
          description: Group pk of tenant
          schema:
            type: integer
            format: int64
        - name: type
          in: query
          description: The type of response
          schema:
            type: string
            default: extended
            enum:
              - extended
              - collapsed
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/CustomConfigList'
                  - $ref: '#/components/schemas/TenantCollapsedListRes'
                  - $ref: '#/components/schemas/TenantListRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
            - PLAN_READER
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
    put:
      tags:
        - Tenants
      summary: Modify tenant
      description: Modify the tenant with the given group pk and user db id
      operationId: modifyTenant
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: groupPk
          in: query
          description: Group pk of tenant
          required: true
          schema:
            type: string
        - name: userDbId
          in: query
          description: Users database ID of tenant
          required: true
          schema:
            type: string
      requestBody:
        description: The configuration resource
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PlanCustomConfig'
        required: true
      responses:
        202:
          description: Accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlanCustomConfig'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        409:
          description: Resource Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
      x-codegen-request-body-name: configuration
    post:
      tags:
        - Tenants
      summary: Create tenant
      description: Create the tenant with the given configuration
      operationId: createTenant
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
      requestBody:
        description: The configuration resource
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PlanCustomConfig'
        required: true
      responses:
        202:
          description: Accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlanCustomConfig'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        409:
          description: Resource Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
      x-codegen-request-body-name: configuration
    delete:
      tags:
        - Tenants
      summary: Delete tenant
      description: Delete the tenant with the given group pk and user db id
      operationId: deleteTenant
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: groupPk
          in: query
          description: Group pk of tenant
          required: true
          schema:
            type: string
        - name: userDbId
          in: query
          description: Users database ID of tenant
          required: true
          schema:
            type: string
        - name: force
          in: query
          description: Forced delete tenant
          schema:
            type: boolean
            default: false
      responses:
        202:
          description: Accepted
          content: {}
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        409:
          description: Resource Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
            - CLAB_OPERATOR
  /tenantusers:
    get:
      tags:
        - Tenants
      summary: Get all tenant users
      description: Returns all tenant users
      operationId: getTenantUsers
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TenantUsersRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CLAB_OPERATOR
            - ADMIN
  /tenant-nodes:
    get:
      tags:
        - FeatureFlag
      summary: Get workspace and node with feature flag 'importHubCustomer' enabled
      operationId: getTenantWithWorkspaceAndNode
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    workspaceId:
                      type: string
                    nodeId:
                      type: string
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - PLAN_READER
  /tenants/{id}/settings:
    patch:
      tags:
        - Tenants
      summary: Modify tenant settings
      description: Modify the settings of tenant with the given tenant ID
      operationId: modifyTenantSettings
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: id
          in: path
          description: The ID of the tenant
          required: true
          schema:
            type: string
      requestBody:
        description: The settings tenant resource
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TenantSettingsRes'
        required: false
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TenantSettingsRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        409:
          description: Resource Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
      x-codegen-request-body-name: settings
  /tenants/{id}/base-filter:
    get:
      tags:
        - Tenants
      summary: Get tenant base filter
      description: Get the base filter of tenant with the given tenant ID
      operationId: getTenantBaseFilter
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: id
          in: path
          description: The ID of the tenant
          required: true
          schema:
            type: string
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TenantBaseFilterRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
            - PLAN_READER
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
      x-codegen-request-body-name: settings
    put:
      tags:
        - Tenants
      summary: Modify tenant base filter
      description: Modify the base filter of tenant with the given tenant ID
      operationId: modifyTenantBaseFilter
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: id
          in: path
          description: The ID of the tenant
          required: true
          schema:
            type: string
      requestBody:
        description: The base filter tenant resource
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TenantBaseFilterRes'
        required: false
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TenantBaseFilterRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CLAB_OPERATOR
            - ADMIN
      x-codegen-request-body-name: settings
  /feature-flag/groups/{groupPk}/userdbs/{userDbId}:
    get:
      tags:
        - FeatureFlag
      summary: Get feature flag for tenant by groupPk and userDbId
      operationId: getFeatureFlag
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: groupPk
          in: path
          description: The groupPk
          required: true
          schema:
            type: integer
        - name: userDbId
          in: path
          description: The userDbId
          required: true
          schema:
            type: integer
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                type: object
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
            - PLAN_READER
  /traces/monitorlogs:
    get:
      tags:
        - Traces
      summary: Get all traces from monitor
      description: Returns a list of all the traces from monitor
      operationId: getLogs
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: limit
          in: query
          description: The maximum number of traces
          schema:
            type: integer
            format: int32
            default: 10
        - name: offset
          in: query
          description: Offset applied to retrieved trace list before returning the required
            number of traces
          schema:
            type: integer
            format: int32
            default: 0
        - name: startDate
          in: query
          description: The begin of date interval
          schema:
            type: string
        - name: endDate
          in: query
          description: The end of date interval
          schema:
            type: string
        - name: tenant
          in: query
          description: The ID of the tenant
          schema:
            type: string
        - name: agent
          in: query
          description: The agent info of traces
          schema:
            type: string
        - name: pclass
          in: query
          description: The process class of traces
          schema:
            type: string
        - name: pname
          in: query
          description: The process name of traces
          schema:
            type: string
        - name: pstatus
          in: query
          description: The process status of traces
          schema:
            type: string
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MonitorListRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CLAB_OPERATOR
            - ADMIN
  /traces/monitorlogs/{uuid}:
    get:
      tags:
        - Traces
      summary: Get a trace from monitor
      description: Returns a trace with the given UUID
      operationId: getLog
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: uuid
          in: path
          description: The UUID of the trace
          required: true
          schema:
            type: string
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MonitorRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CLAB_OPERATOR
            - ADMIN
  /utilities/calculateDates:
    get:
      tags:
        - Utilities
      summary: Get all scheduled recurrence
      description: Returns a list scheduled recurrence
      operationId: getSchedulation
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: recurrence
          in: query
          description: The recurrence resource
          required: true
          schema:
            type: string
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SchedulesRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
  /utilities/heuristicRules:
    get:
      tags:
        - Utilities
      summary: Get all heuristic rules
      description: Returns a list of heuristic rules
      operationId: getHeuristicRules
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: type
          in: query
          description: Type of heuristic rule
          schema:
            type: string
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HeuristicRuleListRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
  /widgets:
    get:
      tags:
        - Widgets
      summary: Get all widgets
      description: Returns a list of widgets, sorted by their "order" value
      operationId: getAllWidgets
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: range
          in: query
          schema:
            type: string
            enum:
              - GLOBAL
              - SEGMENT
        - name: type
          in: query
          schema:
            type: string
            enum:
              - DEMOGRAPHY
              - EVENTS
              - ATTRIBUTION
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/WidgetRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
    post:
      tags:
        - Widgets
      summary: Creates a widget
      description: Returns a widget
      operationId: createWidget
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
      requestBody:
        description: The widget resource
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WidgetExtendedRes'
        required: true
      responses:
        201:
          description: The resource was created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WidgetExtendedRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        409:
          description: Resource Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CLAB_OPERATOR
      x-codegen-request-body-name: widget
  /widgets/{uuid}:
    get:
      tags:
        - Widgets
      summary: Get a widget
      description: Returns a widget and the dataset associated to its statement
      operationId: getWidgetById
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: uuid
          in: path
          description: The UUID of widget
          required: true
          schema:
            type: string
        - name: segmentId
          in: query
          description: The UUID of a segment to query for the dataset
          schema:
            type: string
        - name: forceReload
          in: query
          description: Disable dataset cache. Default value is false (cache enabled)
          schema:
            type: boolean
            default: false
        - name: startDate
          in: query
          description: The begin of date interval for the dataset
          schema:
            type: string
            format: date-time
            default: "0000-01-01T00:00:00Z"
        - name: endDate
          in: query
          description: The end of date interval for the dataset
          schema:
            type: string
            format: date-time
            default: "9999-01-01T00:00:00Z"
        - name: deliveryId
          in: query
          description: The delivery ID to query for the dataset
          schema:
            type: integer
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WidgetExtendedWithDataRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
    put:
      tags:
        - Widgets
      summary: Modify a widget
      description: Returns a widget with the given UUID
      operationId: modifyWidget
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: uuid
          in: path
          description: The UUID of widget
          required: true
          schema:
            type: string
      requestBody:
        description: The widget resource
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WidgetExtendedRes'
        required: true
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WidgetExtendedRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        409:
          description: Resource Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CLAB_OPERATOR
      x-codegen-request-body-name: widget
    delete:
      tags:
        - Widgets
      summary: Delete a widget
      description: Delete a widget with the given UUID
      operationId: deleteWidgetById
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
        - name: uuid
          in: path
          description: The UUID of widget
          required: true
          schema:
            type: string
      responses:
        204:
          description: The resource was deleted successfully
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CLAB_OPERATOR
  /widgetStatementAttributes:
    get:
      tags:
        - WidgetStatementAttributes
      summary: Get all widget statement attributes
      description: Get all widget statement attributes used to build statements
      operationId: getWidgetStatementAttributes
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WidgetStatementAttributeListRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CONFIGURATOR
            - CLAB_OPERATOR
            - ADMIN
            - POWERUSER
            - USER
            - GUEST
    patch:
      tags:
        - WidgetStatementAttributes
      summary: Patch widget statement attributes
      description: Modify model attribute name of one or more widget statement attributes used to build statements
      operationId: patchWidgetStatementAttributes
      parameters:
        - name: Authorization
          in: header
          description: A valid OAuth2 token
          required: true
          schema:
            type: string
        - name: Tenant
          in: header
          description: The ID of the tenant to operate on
          required: true
          schema:
            type: integer
      requestBody:
        description: The widget statement attributes to modify
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WidgetStatementAttributeListRes'
        required: true
      responses:
        200:
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WidgetStatementAttributeListRes'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
        404:
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResource'
      security:
        - OAuth2:
            - CLAB_OPERATOR
            - ADMIN
components:
  schemas:
    AbstractAuditEntityRes:
      type: object
      properties:
        authorId:
          type: integer
          format: int64
          description: group pk of the user who created the resource
        author:
          type: string
          description: full name of the user who created the resource
        createdAt:
          type: string
          format: date-time
          description: UTC date of the creation of the resource
        updaterId:
          type: integer
          format: int64
          description: group pk of the last user who updated the resource
        updater:
          type: string
          description: full name of the last user who updated the resource
        updatedAt:
          type: string
          format: date-time
          description: UTC date of the last update to the resource
    AllShareSegmentRes:
      type: object
      properties:
        shared:
          type: array
          description: List of all shared segment operations
          items:
            $ref: '#/components/schemas/ShareSegmentResResponse'
    AnalyticRes:
      type: object
      properties:
        analyticCutOff:
          type: number
          format: double
        operator:
          type: string
    AnalyticsRes:
      type: object
      properties:
        analytics:
          type: array
          description: The list of available analytic configurations
          items:
            title: Analytic
            description: Analytic configuration representation
            type: object
            properties:
              id:
                type: integer
                description: Analytic configuration unique identifier
              name:
                type: string
                description: The Analytic configuration name
              values:
                description: The configuration's list of key/values
                type: array
                items:
                  title: Analytic configuration name
                  description: A representation of an Alaytic configuration value
                  type: object
                  properties:
                    key:
                      type: string
                      description: The configuration key
                    value:
                      type: string
                      description: The configuration value
    AuditedDndPolicyRes:
      allOf:
        - $ref: '#/components/schemas/AbstractAuditEntityRes'
        - $ref: '#/components/schemas/DndPolicyRes'
        - type: object
          required:
            - createdAt
            - updatedAt
    AuditedSegmentRes:
      allOf:
        - $ref: '#/components/schemas/AbstractAuditEntityRes'
        - $ref: '#/components/schemas/SegmentRes'
        - type: object
          required:
            - authorId
            - author
            - createdAt
            - updatedAt
    AutomationRes:
      type: object
      properties:
        uuid:
          type: string
        name:
          type: string
        description:
          type: string
        startDate:
          type: string
        endDate:
          type: string
        created:
          type: string
        author:
          type: string
        status:
          type: string
          enum:
            - COMMITTED
            - PAUSED
            - RUNNING
            - ARCHIVED
            - DRAFT
            - ERROR
    BaseConfig:
      type: object
      properties:
        name:
          type: string
        version:
          type: integer
          format: int32
    BaseFilterAttribute:
      type: array
      items:
        type: object
        properties:
          name:
            type: string
            description: the name of the base filter attribute
          label:
            type: string
            description: the label of the base filter attribute
          dataType:
            type: string
            description: the data type of the base filter attribute
        required:
          - name
          - label
          - dataType
    BitmaskFieldRes:
      type: object
      properties:
        uuid:
          type: string
        attributeName:
          type: string
        bitPosition:
          type: string
        label:
          type: string
    BitmaskRes:
      type: object
      properties:
        attributeName:
          type: string
        attribute:
          $ref: '#/components/schemas/ModelAttributeRes'
        bitmaskField:
          type: array
          items:
            $ref: '#/components/schemas/BitmaskFieldRes'
    CampaignFeedbackRes:
      type: object
      properties:
        medium:
          type: string
          enum:
            - EMAIL
            - SMS
        filterId:
          type: integer
          format: int32
        filterName:
          type: string
        deliveryId:
          type: integer
          format: int32
        deliveryName:
          type: string
        deliveryStatus:
          type: string
        subject:
          type: string
        removeDuplicates:
          type: boolean
          default: false
        sent:
          type: integer
          format: int32
        delivered:
          type: integer
          format: int32
        bounce:
          type: integer
          format: int32
        uniqueViews:
          type: integer
          format: int32
        totalViews:
          type: integer
          format: int32
        uniqueClicks:
          type: integer
          format: int32
        totalClicks:
          type: integer
          format: int32
        tafPageUrl:
          type: string
    ClabCampaignCreatorProperties:
      allOf:
        - $ref: '#/components/schemas/ClabConsumerProperties'
        - required:
            - subject
            - senderEmail
          type: object
          properties:
            subject:
              type: string
            htmlContent:
              type: string
            originalHtmlContent:
              type: string
            originalTextContent:
              type: string
            senderEmail:
              type: string
            senderReplyTo:
              type: string
            tafFileName:
              type: string
              deprecated: true
    ClabConsumerProperties:
      type: object
      properties:
        modelIdentifier:
          type: integer
          format: int32
          description: "Campaign model identifier, must be greater than zero"
        textContent:
          type: string
        senderName:
          type: string
        name:
          type: string
        removeDuplicates:
          type: boolean
          default: false
        notes:
          type: object
          additionalProperties:
            type: object
            properties: {}
          description: "Campaign notes, cannot have empty key"
      required:
        - modelIdentifier
        - senderName
        - name
    ClabFeedbackRes:
      type: object
      properties:
        deliveryId:
          type: integer
          format: int32
        filterId:
          type: integer
          format: int32
        filterName:
          type: string
        deliveryName:
          type: string
        deliveryStatus:
          type: string
        subject:
          type: string
        removeDuplicates:
          type: boolean
          default: false
        newsletter:
          type: string
        bounces:
          type: integer
          format: int32
        users:
          type: integer
          format: int32
        planificationDate:
          type: string
        test:
          type: integer
          format: int32
        medium:
          type: integer
          format: int32
        qualifierId:
          type: integer
          format: int32
        userDbId:
          type: integer
          format: int32
        category:
          type: integer
          format: int32
        numDomains:
          type: integer
          format: int32
        delivered:
          type: integer
          format: int32
        cancelled:
          type: integer
          format: int32
        fblComplains:
          type: integer
          format: int32
        abuse:
          type: integer
          format: int32
        listUnsuscribe:
          type: integer
          format: int32
        blacklisted:
          type: integer
          format: int32
        temporaryBlacklisted:
          type: integer
          format: int32
        errors:
          type: integer
          format: int32
        uniqueViews:
          type: integer
          format: int32
        views:
          type: integer
          format: int32
        hiddenViews:
          type: integer
          format: int32
        view_wm:
          type: integer
          format: int32
        view_ovu:
          type: integer
          format: int32
        view_mobile:
          type: integer
          format: int32
        uniqueClicks:
          type: integer
          format: int32
        clicks:
          type: integer
          format: int32
        uniqueTafClicks:
          type: integer
          format: int32
        tafClicks:
          type: integer
          format: int32
        unsubscribed:
          type: integer
          format: int32
        updates:
          type: integer
          format: int32
        blacklisting_temp:
          type: integer
          format: int32
        blacklisting_final:
          type: integer
          format: int32
        labels:
          type: array
          items:
            type: string
    ClabFeedbacksListRes:
      type: object
      properties:
        feedbacks:
          type: array
          items:
            $ref: '#/components/schemas/ClabFeedbackRes'
    ClabSmsCampaignCreatorProperties:
      allOf:
        - $ref: '#/components/schemas/ClabConsumerProperties'
        - required:
            - textContent
          type: object
          properties:
            textContentLimit:
              type: integer
              format: int32
    CollectionPageResourceAutomationRes:
      type: object
      properties:
        page:
          $ref: '#/components/schemas/Page'
        elements:
          type: array
          items:
            $ref: '#/components/schemas/AutomationRes'
    CombinedSegmentRes:
      type: object
      properties:
        operators:
          type: array
          items:
            type: string
        segments:
          type: array
          items:
            $ref: '#/components/schemas/SegmentBaseInfoRes'
    CombinedSegmentResExtended:
      type: object
      properties:
        operators:
          type: array
          items:
            type: string
        segments:
          type: array
          items:
            $ref: '#/components/schemas/SegmentBaseInfoRes'
        name:
          type: string
    CompareValueConditionRes:
      allOf:
        - $ref: '#/components/schemas/ConditionResFilterClause'
        - required:
            - attribute
            - lastValueCondition
            - previousValueCondition
          type: object
          properties:
            attribute:
              type: string
            lastValueCondition:
              $ref: '#/components/schemas/TimeseriesSubConditionRes'
            previousValueCondition:
              $ref: '#/components/schemas/TimeseriesSubConditionRes'
    ConditionAtomicRes:
      allOf:
        - $ref: '#/components/schemas/ConditionResFilterClause'
        - required:
            - attribute
            - operator
          type: object
          properties:
            attribute:
              type: string
            aggregator:
              type: string
            operator:
              type: string
            occurency:
              type: boolean
              default: false
            value:
              type: object
              properties: {}
            values:
              type: array
              items:
                type: object
                properties: {}
    ConditionCompositeRes:
      allOf:
        - $ref: '#/components/schemas/ConditionResFilterClause'
        - type: object
          properties:
            conjunction:
              type: string
            conditions:
              type: array
              items:
                $ref: '#/components/schemas/ConditionResObject'
    ConditionResFilterClause:
      type: object
      properties:
        name:
          type: string
        hidden:
          type: boolean
          default: false
        readOnly:
          type: boolean
          default: false
        type:
          type: string
      discriminator:
        propertyName: type
    ConditionResObject:
      type: object
      properties:
        name:
          type: string
        hidden:
          type: boolean
          default: false
        readOnly:
          type: boolean
          default: false
        type:
          type: string
      discriminator:
        propertyName: type
    ConfigLink:
      type: object
      properties:
        self:
          $ref: '#/components/schemas/Self'
    ConstantValueInPeriodConditionRes:
      allOf:
        - $ref: '#/components/schemas/ConditionResFilterClause'
        - required:
            - attribute
            - lastValueCondition
            - timeframe
          type: object
          properties:
            attribute:
              type: string
            negative:
              type: boolean
              default: false
            lastValueCondition:
              $ref: '#/components/schemas/TimeseriesSubConditionRes'
            timeframe:
              $ref: '#/components/schemas/TimeframeConditionRes'
    ConstraintsRes:
      description: Contains the strategy, defined by ifNot, to apply if materialization returns a number of contacts less than minContacts or greater than maxContacts
      required:
        - ifNot
      type: object
      properties:
        maxContacts:
          type: integer
          format: int32
        minContacts:
          type: integer
          format: int32
        ifNot:
          $ref: '#/components/schemas/IfNotRes'
    ConsumerListRes:
      type: object
      properties:
        consumers:
          type: array
          items:
            $ref: '#/components/schemas/ConsumerRes'
    ConsumerRes:
      type: object
      properties:
        uuid:
          type: string
        label:
          type: string
        plugin:
          type: string
        pluginIdentifier:
          type: string
        tenant:
          type: string
        properties:
          type: object
          additionalProperties:
            type: object
            properties: {}
    ContactFlowConsumerProperties:
      type: object
      properties:
        automationUuid:
          type: string
        attributes:
          type: array
          items:
            type: object
            properties:
              key:
                type: string
              constant:
                type: boolean
                default: false
              value:
                type: string
    ContactListMetaListRes:
      type: object
      properties:
        contactLists:
          type: array
          items:
            $ref: '#/components/schemas/ContactListMetaRes'
    ContactListMetaRes:
      type: object
      properties:
        id:
          type: integer
          format: int64
        segmentId:
          type: string
        creationDate:
          type: string
          format: date-time
        count:
          type: integer
          format: int64
        planificationDate:
          type: string
          format: date-time
        uuid:
          type: string
        materializationAttempts:
          type: integer
          format: int32
    CorrelationAtomicRes:
      allOf:
        - $ref: '#/components/schemas/CorrelationResFilterClause'
        - required:
            - operator
          type: object
          properties:
            datediff:
              type: array
              items:
                type: string
            queryPointer:
              type: integer
              format: int32
            unit:
              type: string
            operator:
              type: string
            offset:
              type: integer
              format: int32
    CorrelationCompositeRes:
      allOf:
        - $ref: '#/components/schemas/CorrelationResFilterClause'
        - type: object
          properties:
            conjunction:
              type: string
            correlations:
              type: array
              items:
                $ref: '#/components/schemas/CorrelationResObject'
    CorrelationResFilterClause:
      type: object
      properties:
        hidden:
          type: boolean
          default: false
        readOnly:
          type: boolean
          default: false
      discriminator:
        propertyName: type
    CorrelationResObject:
      type: object
      properties:
        hidden:
          type: boolean
          default: false
        readOnly:
          type: boolean
          default: false
      discriminator:
        propertyName: type
    CountRes:
      required:
        - count
      type: object
      properties:
        count:
          type: integer
          format: int64
    CustomConfigList:
      type: object
      properties:
        _embedded:
          type: object
          properties:
            customConfigResList:
              type: array
              items:
                $ref: '#/components/schemas/PlanCustomConfig'
    DashboardListRes:
      type: object
      properties:
        dashboards:
          type: array
          items:
            $ref: '#/components/schemas/DashboardRes'
    DashboardRes:
      type: object
      properties:
        uuid:
          type: string
        name:
          type: string
        label:
          type: string
        description:
          type: string
        industry:
          type: string
          enum:
            - ECOMMERCE
            - FASHION
            - MOBILITY
            - CONSUMER_GOOD
            - FINANCE
            - MEDIA_COMM_SPORT
            - NO_PROFIT
            - TRAVEL
            - THIRD_PTY
            - OTHER
            - PUBLIC_SECTOR
            - ALL
        enabled:
          type: boolean
          default: false
        range:
          type: string
          enum:
            - GLOBAL
            - SEGMENT
        widgets:
          type: array
          items:
            $ref: '#/components/schemas/WidgetExtendedRes'
    DataLoaderFlowRes:
      type: object
      properties:
        uuid:
          type: string
        startDate:
          type: string
          format: date-time
        endDate:
          type: string
          format: date-time
        status:
          type: string
          enum:
            - CTX_INITIALIZED
            - RUNNING
            - COMPLETED
            - ERROR
            - EXPIRED
            - FAILED
            - SCHEDULED
        dataLoaderJobs:
          type: array
          items:
            $ref: '#/components/schemas/DataLoaderJobRes'
    DataLoaderJobRes:
      type: object
      properties:
        processName:
          type: string
        startDate:
          type: string
          format: date-time
        endDate:
          type: string
          format: date-time
        status:
          type: string
          enum:
            - CTX_INITIALIZED
            - RUNNING
            - COMPLETED
            - ERROR
            - EXPIRED
            - FAILED
            - SCHEDULED
    DataSetCompressedRes:
      type: object
      properties:
        name:
          type: string
        label:
          type: string
        format:
          type: string
        parameters:
          type: object
          additionalProperties:
            type: object
            properties: {}
        headers:
          type: array
          items:
            type: string
        data:
          type: array
          items:
            type: array
            items:
              type: object
              properties: {}
    DataSetExtendedRes:
      type: object
      properties:
        name:
          type: string
        label:
          type: string
        format:
          type: string
        parameters:
          type: object
          additionalProperties:
            type: object
            properties: {}
        headers:
          type: object
          additionalProperties:
            type: object
            additionalProperties:
              type: string
        data:
          type: array
          items:
            type: object
            additionalProperties:
              type: object
              properties: {}
    DataSetRes:
      type: object
      properties:
        attributes:
          type: array
          items:
            $ref: '#/components/schemas/ModelAttributeRes'
        results:
          type: array
          items:
            type: array
            items:
              type: object
              properties: {}
        hits:
          type: integer
          format: int64
        pagination:
          $ref: '#/components/schemas/Pagination'
    DndPolicyListRes:
      type: object
      properties:
        dndPolicies:
          type: array
          items:
            $ref: '#/components/schemas/AuditedDndPolicyRes'
    DndPolicyRes:
      type: object
      properties:
        uuid:
          type: string
        name:
          type: string
        rule:
          $ref: '#/components/schemas/Rule'
        applyByDefault:
          type: boolean
          default: false
        isGlobal:
          type: boolean
          default: false
    EmailGroupRes:
      type: object
      properties:
        identifier:
          type: integer
          format: int32
        name:
          type: string
        description:
          type: string
        subject:
          type: string
        charset:
          type: string
        htmlContent:
          type: string
        textContent:
          type: string
        senderName:
          type: string
        senderEmail:
          type: string
        senderReplyTo:
          type: string
    EmailGroupListRes:
      type: object
      properties:
        elements:
          type: array
          items:
            $ref: '#/components/schemas/EmailGroupRes'
    ErrorResource:
      type: object
      properties:
        timestamp:
          type: integer
          format: int64
          deprecated: true
        status:
          type: integer
          format: int32
          deprecated: true
        error:
          type: string
          deprecated: true
        path:
          type: string
          deprecated: true
        message:
          description: Descriptive error message (English).
          type: string
        logref:
          description: Unique identifier that is reported in the application log.
          type: string
        data:
          type: object
          description: Specific error data.
        errors:
          type: array
          description: Sub-errors array.
          items:
            type: object
            properties:
              message:
                description: Descriptive error message (English).
                type: string
              path:
                type: string
                description: Json pointer that represents the error field path.
              data:
                type: object
                description: Specific error data.
              code:
                type: string
                description: Custom error code related to the path.
            required:
              - path
              - message
            additionalProperties: false
      required:
        - message
        - logref
      additionalProperties: false
    EventIdentifierRes:
      type: object
      properties:
        category:
          type: string
        type:
          type: string
        name:
          type: string
    ExternalInfoRes:
      type: object
      properties:
        type:
          type: string
          enum:
            - CONTACT_SEND
        medium:
          type: string
          description: available for email or sms
        filterId:
          type: integer
          description: available for email or sms
        filterName:
          type: string
          description: available for email or sms
        deliveryId:
          type: integer
          description: available for email or sms
        deliveryName:
          type: string
          description: available for email or sms
        deliveryStatus:
          type: string
          description: available for email or sms
        deliveryStartDate:
          type: string
          description: available for email or sms
        deliveryEndDate:
          type: string
          description: available for email or sms
    FeedbackRes:
      type: object
      properties:
        planUuid:
          type: string
        planName:
          type: string
        planificationDate:
          type: string
        segmentName:
          type: string
        plannedUsers:
          type: integer
          format: int64
        planStatus:
          type: string
        user:
          type: string
        creationDate:
          type: string
          format: date-time
        updater:
          type: string
        updateDate:
          type: string
          format: date-time
        consumer:
          type: string
        campaignFeedbacks:
          type: array
          items:
            $ref: '#/components/schemas/CampaignFeedbackRes'
        automationFeedbacks:
          $ref: '#/components/schemas/AutomationRes'
    FieldDistributionRes:
      type: object
      properties:
        field:
          type: string
        values:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
              total:
                type: integer
    FilterRes:
      type: object
      properties:
        content:
          type: string
        extensions:
          type: string
        identifier:
          type: integer
          format: int32
        name:
          type: string
        userDbId:
          type: integer
          format: int32
        type:
          type: string
          enum:
            - NORMAL
            - TEST
            - BOTH
    GraphRes:
      type: object
      enum:
        - analytics-count
        - bar-h
        - bar
        - pie
      properties:
        type:
          type: string
        heightRows:
          type: integer
        widthColumns:
          type: integer
        axisLabel:
          type: array
          items:
            type: string
      deprecated: true
    HeuristicRuleListRes:
      type: object
      properties:
        rules:
          type: array
          items:
            $ref: '#/components/schemas/HeuristicRuleRes'
    HeuristicRuleRes:
      type: object
      properties:
        type:
          type: string
        maxCardinality:
          type: integer
          format: int32
        minCardinality:
          type: integer
          format: int32
        inputFieldType:
          type: string
    IfNotPropertiesRes:
      description: Defines the strategy to adopt in order to increment the size of a materialized list that does not meet a constraint. If absolute, a non negative capRandom number of random contacts will be added to the materialized list. If percentage, a [0, 1) capRandom percentage of random contacts will be added to the materialized list.
      type: object
      properties:
        capRandom:
          type: number
          format: double
        type:
          type: string
          enum:
            - absolute
            - percentage
    IfNotRes:
      description: Defines the strategy to adopt for the plan if the size of its materialized list does not meet a constraint. If setError, the plan will be forced to the error state and will not be processed. If sendAnyway, the plan will be processed as if materialization met the constraints. If addContacts, a strategy defined by properties to increment the size of materialized list with random contacts from the same segment will be adopted before performing the plan action.
      required:
        - properties
      type: object
      properties:
        type:
          type: string
          enum:
            - setError
            - addContacts
            - sendAnyway
        properties:
          $ref: '#/components/schemas/IfNotPropertiesRes'
    JsonNode:
      type: object
      properties:
        float:
          type: boolean
          default: false
        nodeType:
          type: string
          enum:
            - ARRAY
            - BINARY
            - BOOLEAN
            - MISSING
            - NULL
            - NUMBER
            - OBJECT
            - POJO
            - STRING
        int:
          type: boolean
          default: false
        number:
          type: boolean
          default: false
        valueNode:
          type: boolean
          default: false
        containerNode:
          type: boolean
          default: false
        missingNode:
          type: boolean
          default: false
        object:
          type: boolean
          default: false
        pojo:
          type: boolean
          default: false
        integralNumber:
          type: boolean
          default: false
        floatingPointNumber:
          type: boolean
          default: false
        short:
          type: boolean
          default: false
        long:
          type: boolean
          default: false
        double:
          type: boolean
          default: false
        bigDecimal:
          type: boolean
          default: false
        bigInteger:
          type: boolean
          default: false
        textual:
          type: boolean
          default: false
        boolean:
          type: boolean
          default: false
        binary:
          type: boolean
          default: false
        array:
          type: boolean
          default: false
        null:
          type: boolean
          default: false
    KpiListRes:
      type: object
      properties:
        kpis:
          type: array
          items:
            type: string
            enum:
              - TENANTS
              - STATS
              - PLAN_USAGE
              - SEGMENT_USAGE
    KpiListUsageRes:
      type: object
      properties:
        tenants:
          type: array
          items:
            $ref: '#/components/schemas/KpiUsageRes'
    KpiUsageRes:
      type: object
      properties:
        tenantId:
          type: string
        tenantLabel:
          type: string
        groupPk:
          type: integer
          format: int64
        userDbId:
          type: string
        total:
          type: integer
          format: int64
        totalInLastWeek:
          type: integer
          format: int64
        totalInLastMonth:
          type: integer
          format: int64
        totalInLastYear:
          type: integer
          format: int64
    LastValueConditionRes:
      allOf:
        - $ref: '#/components/schemas/ConditionResFilterClause'
        - required:
            - attribute
            - getlastValueCondition
          type: object
          properties:
            attribute:
              type: string
            getlastValueCondition:
              $ref: '#/components/schemas/TimeseriesSubConditionRes'
    LovItemRes:
      type: object
      properties:
        lovId:
          type: string
        name:
          type: string
        value:
          type: string
        label:
          type: string
        parentValue:
          type: string
    LovsListRes:
      type: object
      properties:
        values:
          type: array
          items:
            $ref: '#/components/schemas/LovItemRes'
    MaterializationRes:
      required:
        - offset
      type: object
      properties:
        offset:
          type: integer
          format: int32
    ModelAttributeRes:
      type: object
      properties:
        name:
          type: string
        description:
          type: string
        dataType:
          type: string
        uuid:
          type: string
        label:
          type: string
        defaultValue:
          type: string
        maxValue:
          type: number
          format: double
        minValue:
          type: number
          format: double
        validationPattern:
          type: string
        attributeSize:
          type: integer
          format: int32
        attributePrecision:
          type: integer
          format: int32
        parentAttributeName:
          type: string
        inputFieldType:
          type: string
        inputFieldOperators:
          type: string
        visible:
          type: boolean
          default: false
        personal:
          type: boolean
          default: false
        lov:
          type: boolean
          default: false
        lovLastUpdate:
          type: string
        validate:
          type: boolean
          default: false
        validationInclusive:
          type: boolean
          default: false
        autoinclude:
          type: boolean
          default: false
        aggregable:
          type: boolean
          default: false
        inputFieldAggregators:
          type: string
        lovLocked:
          type: boolean
          default: false
        cardinality:
          type: integer
          format: int32
        heuristicOverride:
          type: boolean
          default: false
        allowedInputFieldType:
          type: string
        displayPosition:
          type: integer
    ModelContactRes:
      type: object
      properties:
        attributes:
          type: array
          items:
            $ref: '#/components/schemas/ModelAttributeRes'
    ModelDimensionRes:
      type: object
      properties:
        name:
          type: string
        description:
          type: string
        attributes:
          type: array
          items:
            $ref: '#/components/schemas/ModelAttributeRes'
    ModelSpecialsAttributeRes:
      type: object
      properties:
        name:
          type: string
        label:
          type: string
        defaultValue:
          type: string
        inputFieldType:
          type: string
        required:
          type: boolean
          default: false
        values:
          type: array
          items:
            $ref: '#/components/schemas/LovItemRes'
    ModelSpecialsListRes:
      type: object
      properties:
        specials:
          type: array
          items:
            $ref: '#/components/schemas/ModelSpecialsRes'
    ModelSpecialsRes:
      type: object
      properties:
        uuid:
          type: string
        criteria:
          type: string
        label:
          type: string
        subtype:
          type: string
        relatedEventCategory:
          type: string
        timeframeCapable:
          type: boolean
          default: false
        attributes:
          type: array
          items:
            $ref: '#/components/schemas/ModelSpecialsAttributeRes'
    ModelsEventsRes:
      type: object
      properties:
        name:
          type: string
        category:
          type: string
        type:
          type: string
        description:
          type: string
        label:
          type: string
        idAttibute:
          type: string
        attributes:
          type: array
          items:
            $ref: '#/components/schemas/ModelAttributeRes'
        dimensions:
          type: array
          items:
            $ref: '#/components/schemas/ModelDimensionRes'

    ModelsRes:
      type: object
      properties:
        contact:
          $ref: '#/components/schemas/ModelContactRes'
        events:
          type: array
          items:
            $ref: '#/components/schemas/ModelsEventsRes'
    MonitorListRes:
      type: object
      properties:
        monitors:
          type: array
          items:
            $ref: '#/components/schemas/MonitorRes'
    MonitorRes:
      type: object
      properties:
        uuid:
          type: string
        startDate:
          type: string
          format: date-time
        endDate:
          type: string
          format: date-time
        processClass:
          type: string
        processName:
          type: string
        processStatus:
          type: string
        processInfo:
          type: string
        tenantId:
          type: string
        agentInfo:
          type: string
        message:
          type: string
        parentProcessId:
          type: string
    Page:
      type: object
      properties:
        size:
          type: integer
          format: int32
        totalElements:
          type: integer
          format: int64
        totalUnfilteredElements:
          type: integer
          format: int64
        totalPages:
          type: integer
          format: int32
        number:
          type: integer
          format: int32
    PageableDataLoaderFlowResList:
      type: object
      properties:
        page:
          $ref: '#/components/schemas/Page'
        elements:
          type: array
          items:
            $ref: '#/components/schemas/DataLoaderFlowRes'
    PageableFieldDistributionResList:
      type: object
      properties:
        page:
          $ref: '#/components/schemas/Page'
        elements:
          type: array
          items:
            $ref: '#/components/schemas/FieldDistributionRes'
    PageableFilterResList:
      type: object
      properties:
        page:
          $ref: '#/components/schemas/Page'
        elements:
          type: array
          items:
            $ref: '#/components/schemas/FilterRes'
    PageablePlanResCompactList:
      type: object
      properties:
        page:
          $ref: '#/components/schemas/Page'
        elements:
          type: array
          items:
            $ref: '#/components/schemas/PlanResCompactResponse'
    PageablePlanResList:
      type: object
      properties:
        page:
          $ref: '#/components/schemas/Page'
        elements:
          type: array
          items:
            $ref: '#/components/schemas/PlanResResponse'
    PlanRecurrenceRes:
      required:
        - sequenceNumber
        - timezone
        - region
      type: object
      properties:
        planUuid:
          type: string
        sequenceNumber:
          type: integer
          format: int32
        startDate:
          type: string
          format: date-time
        timezone:
          type: string
        region:
          type: string
    PageablePlanRecurrenceResList:
      type: object
      properties:
        page:
          $ref: '#/components/schemas/Page'
        elements:
          type: array
          items:
            $ref: '#/components/schemas/PlanRecurrenceRes'
    PageableSegmentResList:
      type: object
      properties:
        page:
          $ref: '#/components/schemas/Page'
        elements:
          type: array
          items:
            $ref: '#/components/schemas/AuditedSegmentRes'
    PageablePageBuilderPagesResList:
      type: object
      properties:
        page:
          $ref: '#/components/schemas/Page'
        elements:
          type: array
          items:
            $ref: '#/components/schemas/PageBuilderPagesRes'
    PageBuilderPagesRes:
      type: object
      properties:
        templateId:
          type: integer
          format: int32
        id:
          type: integer
          format: int32
        pageContent:
          type: string
        name:
          type: string
    PageablePageBuilderTemplateResList:
      type: object
      properties:
        page:
          $ref: '#/components/schemas/Page'
        elements:
          type: array
          items:
            $ref: '#/components/schemas/PageBuilderTemplateRes'
    PageBuilderTemplateRes:
      type: object
      properties:
        id:
          type: integer
          format: int32
        name:
          type: string
    Pagination:
      type: object
      properties:
        limit:
          type: integer
          format: int32
        offset:
          type: integer
          format: int32
    PlanCustomConfig:
      type: object
      properties:
        base:
          $ref: '#/components/schemas/BaseConfig'
        customerId:
          type: integer
          format: int64
        userDbId:
          type: integer
          format: int64
        updatedBy:
          type: integer
          format: int64
        _links:
          $ref: '#/components/schemas/ConfigLink'
        properties:
          $ref: '#/components/schemas/PlanCustomConfigProperties'
    PlanCustomConfigProperties:
      type: object
      properties:
        tenantName:
          type: string
        tenantLabel:
          type: string
        customerIndustry:
          type: string
        hasMasterTenant:
          type: string
        masterTenantGroupName:
          type: string
        loadContacts:
          type: string
        contactsCron:
          type: string
        contactAttribute2Overwrite:
          type: string
        eventsDigitalMessagesDeliveryLabels:
          type: string
        digitalMessagesUserDbId:
          type: string
        skipBlacklist:
          type: string
        loadDigitalMessages:
          type: string
        enableHubPurchasesUpdates:
          type: string
        loadPurchases:
          type: string
        eventsPurchasesSftpPort:
          type: string
        contactdbJoinKey:
          type: string
        eventsPurchasesSftpDirectory:
          type: string
        consumeFile:
          type: string
        eventsPurchasesInput:
          type: string
        eventsPurchasesSftpPassword:
          type: string
        insertDirectCondition:
          type: string
        eventsPurchasesPks:
          type: string
        eventsPurchasesSftpHost:
          type: string
        eventsPurchasesSftpUsername:
          type: string
        ordersJoinKey:
          type: string
        updateLov:
          type: string
        enableHubIntegrationsUpdates:
          type: string
        hubIntegration:
          type: string
        hasSftpConsumer:
          type: string
        consumerSftpHost:
          type: string
        consumerSftpPort:
          type: string
        consumerSftpDirectory:
          type: string
        consumerSftpUsername:
          type: string
        consumerSftpPassword:
          type: string
        consumerSftpHeaders:
          type: string
        consumerSftpAttributes:
          type: string
        multipleSftpConsumers:
          type: string
        hasClabConsumer:
          type: string
        hasClabSmsConsumer:
          type: string
        clabApiKey:
          type: string
        clabUserKey:
          type: string
        clabSmsConsumerTextLimit:
          type: string
        contactFlowIntegration:
          type: string
        enableDataIntegrationsUpdates:
          type: string
        enableShareSegment:
          type: string
    PlanJobListRes:
      type: object
      properties:
        properties:
          type: object
          additionalProperties:
            type: object
            properties: {}
        consumer:
          $ref: '#/components/schemas/ConsumerRes'
        jobs:
          type: array
          items:
            $ref: '#/components/schemas/PlanJobRes'
    PlanJobRes:
      type: object
      properties:
        properties:
          type: object
          oneOf:
            - $ref: '#/components/schemas/ClabCampaignCreatorProperties'
            - $ref: '#/components/schemas/ClabSmsCampaignCreatorProperties'
            - $ref: '#/components/schemas/ContactFlowConsumerProperties'
            - $ref: '#/components/schemas/SFTPConsumerProperties'
        consumer:
          $ref: '#/components/schemas/ConsumerRes'
    PlanRes:
      type: object
      properties:
        uuid:
          type: string
        name:
          type: string
        segment:
          $ref: '#/components/schemas/SegmentRes'
        dndPolicy:
          $ref: '#/components/schemas/DndPolicyRes'
        excludeDnd:
          type: boolean
          default: false
        status:
          type: string
          enum:
            - draft
            - committed
            - archived
            - canceled
            - error
        locked:
          type: boolean
          default: false
        planification:
          $ref: '#/components/schemas/ScheduleRes'
        scheduleList:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/ScheduleListRes'
        materialization:
          $ref: '#/components/schemas/MaterializationRes'
        constraints:
          $ref: '#/components/schemas/ConstraintsRes'
        listId:
          type: string
        cpm:
          type: number
          format: double
        authorId:
          type: integer
          format: int64
        author:
          type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        properties:
          type: object
          additionalProperties:
            type: string
        workflowStatus:
          type: string
          enum:
            - PREPARATION
            - PLAN_CREATED
            - PLAN_CREATED_NOTIFIED
            - LIST_PREPARATION
            - LIST_CREATED
            - LIST_NOT_CREATED
            - LIST_CREATED_NOTIFIED
            - LIST_CONSUMED
            - LIST_CONSUMED_NOTIFIED
            - DELETE_CONTACT_FROM_LIST
            - PLAN_REOPENED_ACCEPTED
            - PLAN_REOPENED_NOTIFIED
            - PLAN_REOPENED
            - PLAN_CANCELED_ACCEPTED
            - PLAN_CANCELED_NOTIFIED
            - PLAN_CANCELED
        jobs:
          type: array
          items:
            $ref: '#/components/schemas/PlanJobRes'
    PlanResRequestForPatch:
      required:
        - status
      type: object
      properties:
        status:
          type: string
          enum:
            - draft
            - committed
    PlanResCompactResponse:
      allOf:
        - $ref: '#/components/schemas/AbstractAuditEntityRes'
        - type: object
          required:
            - uuid
            - name
            - excludeDnd
            - status
            - locked
            - authorId
            - author
            - createdAt
            - updatedAt
            - workflowStatus
          properties:
            uuid:
              type: string
            name:
              type: string
            segment:
              $ref: '#/components/schemas/SegmentRes'
            dndPolicy:
              $ref: '#/components/schemas/DndPolicyRes'
            excludeDnd:
              type: boolean
              default: false
            status:
              type: string
              enum:
                - draft
                - committed
                - archived
                - canceled
                - error
            locked:
              type: boolean
              default: false
            planification:
              $ref: '#/components/schemas/ScheduleRes'
            listId:
              type: string
            properties:
              type: object
              additionalProperties:
                type: string
            workflowStatus:
              type: string
              enum:
                - PREPARATION
                - PLAN_CREATED
                - PLAN_CREATED_NOTIFIED
                - LIST_PREPARATION
                - LIST_CREATED
                - LIST_NOT_CREATED
                - LIST_CREATED_NOTIFIED
                - LIST_CONSUMED
                - LIST_CONSUMED_NOTIFIED
                - DELETE_CONTACT_FROM_LIST
                - PLAN_REOPENED_ACCEPTED
                - PLAN_REOPENED_NOTIFIED
                - PLAN_REOPENED
                - PLAN_CANCELED_ACCEPTED
                - PLAN_CANCELED_NOTIFIED
                - PLAN_CANCELED
    PlanResResponse:
      allOf:
        - $ref: '#/components/schemas/AbstractAuditEntityRes'
        - type: object
          required:
            - uuid
            - name
            - excludeDnd
            - status
            - locked
            - authorId
            - author
            - createdAt
            - updatedAt
            - workflowStatus
            - constraints
          properties:
            uuid:
              type: string
            name:
              type: string
            segment:
              $ref: '#/components/schemas/SegmentRes'
            dndPolicy:
              $ref: '#/components/schemas/DndPolicyRes'
            excludeDnd:
              type: boolean
              default: false
            status:
              type: string
              enum:
                - draft
                - committed
                - archived
                - canceled
                - error
            locked:
              type: boolean
              default: false
            planification:
              $ref: '#/components/schemas/ScheduleRes'
            scheduleList:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/ScheduleListRes'
            materialization:
              $ref: '#/components/schemas/MaterializationRes'
            constraints:
              $ref: '#/components/schemas/ConstraintsRes'
            listId:
              type: string
            cpm:
              type: number
              format: double
            properties:
              type: object
            additionalProperties:
              type: string
            workflowStatus:
              type: string
              enum:
                - PREPARATION
                - PLAN_CREATED
                - PLAN_CREATED_NOTIFIED
                - LIST_PREPARATION
                - LIST_CREATED
                - LIST_NOT_CREATED
                - LIST_CREATED_NOTIFIED
                - LIST_CONSUMED
                - LIST_CONSUMED_NOTIFIED
                - DELETE_CONTACT_FROM_LIST
                - PLAN_REOPENED_ACCEPTED
                - PLAN_REOPENED_NOTIFIED
                - PLAN_REOPENED
                - PLAN_CANCELED_ACCEPTED
                - PLAN_CANCELED_NOTIFIED
                - PLAN_CANCELED
            jobs:
              type: array
              items:
                $ref: '#/components/schemas/PlanJobRes'
    PlanWithExternalInfoRes:
      type: object
      properties:
        uuid:
          type: string
        name:
          type: string
        externalEntities:
          type: array
          items:
            $ref: '#/components/schemas/ExternalInfoRes'
        errors:
          type: array
          items:
            type: object
            properties:
              type:
                type: string
                enum:
                  - warning
                  - error
              code:
                type: string
              msg:
                type: string
    PlanDeliveryRes:
      required:
        - id
        - name
        - status
        - startDate
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        status:
          type: string
        startDate:
          type: string
          format: date-time
        endDate:
          type: string
          format: date-time
    PluginListRes:
      type: object
      properties:
        plugins:
          type: array
          items:
            $ref: '#/components/schemas/PluginRes'
    PluginRes:
      type: object
      properties:
        uuid:
          type: string
        identifier:
          type: string
        type:
          type: string
        category:
          type: string
        properties:
          type: object
          additionalProperties:
            type: string
        label:
          type: string
        description:
          type: string
    QueryPartRes:
      type: object
      properties:
        event:
          $ref: '#/components/schemas/EventIdentifierRes'
        condition:
          $ref: '#/components/schemas/ConditionResFilterClause'
        aggregation:
          $ref: '#/components/schemas/ConditionResFilterClause'
        timeframe:
          $ref: '#/components/schemas/ConditionResFilterClause'
        correlation:
          $ref: '#/components/schemas/CorrelationResFilterClause'
    QueryRes:
      required:
        - type
      type: object
      properties:
        type:
          type: string
        conjunction:
          type: string
        combinationType:
          type: string
        queries:
          type: array
          items:
            $ref: '#/components/schemas/QueryRes'
        name:
          type: string
        are:
          $ref: '#/components/schemas/QueryPartRes'
        correlation:
          $ref: '#/components/schemas/CorrelationResObject'
        did:
          $ref: '#/components/schemas/QueryPartRes'
        analytic:
          $ref: '#/components/schemas/AnalyticRes'
        negative:
          type: boolean
          default: false
        join:
          type: string
        queryId:
          type: integer
          format: int32
        specialsInfo:
          $ref: '#/components/schemas/SpecialsInfoRes'
        class:
          type: string
    RecurrenceRes:
      required:
        - minutes
        - hours
        - dayOfMonth
        - dayOfWeek
        - months
      type: object
      properties:
        minutes:
          $ref: '#/components/schemas/TimeRes'
        hours:
          $ref: '#/components/schemas/TimeRes'
        dayOfMonth:
          $ref: '#/components/schemas/TimeRes'
        dayOfWeek:
          $ref: '#/components/schemas/TimeRes'
        months:
          $ref: '#/components/schemas/TimeRes'
        maxRepeat:
          type: integer
          format: int32
        repetitionEndDate:
          type: string
          format: date-time
        repetitionStartDate:
          type: string
          format: date-time
        timezone:
          type: string
        region:
          type: string
    Rule:
      type: object
      properties:
        type:
          type: string
        frequency:
          type: integer
          format: int32
        amount:
          type: integer
          format: int32
        period:
          type: string
        conditions:
          type: array
          items:
            $ref: '#/components/schemas/Rule'
        global:
          type: boolean
          default: false
    RuleResRequest:
      type: object
      properties:
        name:
          type: string
        category:
          type: string
        group:
          type: string
        query:
          $ref: '#/components/schemas/QueryRes'
      required:
        - name
        - category
        - group
        - query
    RuleResResponse:
      allOf:
        - $ref: '#/components/schemas/AbstractAuditEntityRes'
        - type: object
          properties:
            uuid:
              type: string
            name:
              type: string
            category:
              type: string
            group:
              type: string
            query:
              $ref: '#/components/schemas/QueryRes'
          required:
            - uuid
            - name
            - category
            - group
            - query
            - createdAt
            - updatedAt
    RulesListRes:
      type: object
      properties:
        rules:
          type: array
          items:
            $ref: '#/components/schemas/RuleResResponse'
    ScheduleListRes:
      type: object
      properties:
        uuid:
          type: string
        materializationId:
          type: integer
          format: int64
        date:
          type: string
          format: date-time
        listSize:
          type: integer
          format: int64
    SchedulesRes:
      type: object
      properties:
        planifications:
          type: array
          items:
            $ref: '#/components/schemas/ScheduleRes'
    ScheduleRes:
      required:
        - timezone
      type: object
      properties:
        startDate:
          type: string
          format: date-time
        timezone:
          type: string
        region:
          type: string
        recurrence:
          $ref: '#/components/schemas/RecurrenceRes'
    SegmentBaseInfoRes:
      type: object
      properties:
        uuid:
          type: string
        name:
          type: string
    SegmentRes:
      type: object
      properties:
        uuid:
          type: string
        name:
          type: string
        query:
          $ref: '#/components/schemas/QueryRes'
        combined:
          type: boolean
          default: false
        editable:
          type: boolean
          default: false
        deleted:
          type: boolean
          default: false
        uses:
          $ref: '#/components/schemas/CombinedSegmentRes'
        usedBy:
          type: array
          items:
            $ref: '#/components/schemas/SegmentBaseInfoRes'
    Self:
      type: object
      properties:
        href:
          type: string
    SFTPConsumerProperties:
      type: object
      properties:
        host:
          type: string
        port:
          type: integer
          format: int32
        user:
          type: string
        password:
          type: string
        path:
          type: string
        attributes:
          type: string
        headers:
          type: string
        separator:
          type: string
          nullable: true
          enum:
            - ","
            - ";"
            - "|"
            - "\\t"
          default: ","
        quote:
          type: string
          nullable: true
          enum:
            - "\""
            - "'"
        lineTerminator:
          type: string
          nullable: true
          enum:
            - "\\r\\n"
            - "\\n"
            - "\\r"
          default: "\\r\\n"
        escape:
          type: string
          nullable: true
          enum:
            - "\\"
          default: "\\"
        fileName:
          type: string
          nullable: true
        fileExtension:
          type: string
          nullable: true
          enum:
            - csv
            - txt
    SmsGroupRes:
      type: object
      properties:
        identifier:
          type: integer
          format: int32
        name:
          type: string
        description:
          type: string
        charset:
          type: string
        textContent:
          type: string
        senderName:
          type: string
    SmsGroupListRes:
      type: object
      properties:
        elements:
          type: array
          items:
            $ref: '#/components/schemas/SmsGroupRes'
    SpecialsInfoRes:
      type: object
      properties:
        subtype:
          type: string
        criteria:
          type: string
        timeframe:
          $ref: '#/components/schemas/ConditionResObject'
    StatementListRes:
      type: object
      properties:
        statements:
          type: array
          items:
            $ref: '#/components/schemas/StatementRes'
    StatementRes:
      type: object
      properties:
        uuid:
          type: string
        name:
          type: string
        label:
          type: string
        type:
          type: string
          enum:
            - GLOBAL
            - SEGMENT
        query:
          type: string
        public:
          type: boolean
          default: false
    TenantCollapsedRes:
      required:
        - tenantId
        - tenantName
        - tenantLabel
        - groupName
        - groupPk
        - userDbId
        - workspaceId
        - contacts
        - totalEvents
        - digitalMessages
        - purchases
        - ecommerces
        - retails
        - creationDate
      type: object
      properties:
        defaultUtcOffset:
          type: integer
          format: int32
        defaultRegion:
          type: string
        defaultLocale:
          type: string
        defaultFirstDayOfWeek:
          type: integer
          format: int32
        alertEmail:
          type: string
          description: email for job failure notification
        tenantId:
          type: string
        tenantName:
          type: string
        tenantLabel:
          type: string
        groupName:
          type: string
        groupPk:
          type: integer
          format: int64
        userDbId:
          type: string
        contacts:
          type: integer
          format: int64
        totalEvents:
          type: integer
          format: int64
        digitalMessages:
          type: integer
          format: int64
        purchases:
          type: integer
          format: int64
        ecommerces:
          type: integer
          format: int64
        retails:
          type: integer
          format: int64
        creationDate:
          type: string
          format: date-time
        workspaceId:
          type: string
    TenantCollapsedListRes:
      type: object
      properties:
        tenants:
          type: array
          items:
            $ref: '#/components/schemas/TenantCollapsedRes'
    TenantResExtended:
      required:
        - tenantId
        - tenantName
        - tenantLabel
        - groupName
        - groupPk
        - userDbId
        - workspaceId
        - timeSeriesDashboard
        - enableShareSegment
      type: object
      properties:
        defaultUtcOffset:
          type: integer
          format: int32
        defaultRegion:
          type: string
        defaultLocale:
          type: string
        defaultFirstDayOfWeek:
          type: integer
          format: int32
        alertEmail:
          type: string
          description: email for job failure notification
        tenantId:
          type: string
        tenantName:
          type: string
        tenantLabel:
          type: string
        groupName:
          type: string
        groupPk:
          type: integer
          format: int64
        userDbId:
          type: string
        idAttribute:
          type: string
        mailAttribute:
          type: string
        smsAttribute:
          type: string
        hubIdAttribute:
          type: string
        timeSeriesDashboard:
          type: boolean
        enableShareSegment:
          type: boolean
        planRetentionMonths:
          type: integer
          format: int32
        workspaceId:
          type: string
    TenantJobListRes:
      type: object
      properties:
        tasks:
          type: array
          items:
            $ref: '#/components/schemas/TenantJobRes'
    TenantJobRes:
      type: object
      properties:
        taskId:
          type: string
        tenant:
          $ref: '#/components/schemas/TenantRes'
        plugin:
          $ref: '#/components/schemas/PluginRes'
        cronExpression:
          type: string
        properties:
          type: object
          additionalProperties:
            type: object
            properties: {}
        taskName:
          type: string
        monitorUuid:
          type: string
    TenantKpiListRes:
      type: object
      properties:
        totalTenants:
          type: integer
          format: int32
        totalGroupPks:
          type: integer
          format: int32
        tenants:
          type: array
          items:
            $ref: '#/components/schemas/TenantKpiRes'
    TenantKpiRes:
      type: object
      properties:
        tenantId:
          type: string
        tenantLabel:
          type: string
        groupPk:
          type: integer
          format: int64
        userDbId:
          type: string
        creationDate:
          type: string
          format: date-time
    TenantListRes:
      type: object
      properties:
        tenants:
          type: array
          items:
            $ref: '#/components/schemas/TenantRes'
    TenantRes:
      required:
        - tenantId
        - tenantName
        - tenantLabel
        - groupName
        - groupPk
        - userDbId
        - workspaceId
      type: object
      properties:
        defaultUtcOffset:
          type: integer
          format: int32
        defaultRegion:
          type: string
        defaultLocale:
          type: string
        defaultFirstDayOfWeek:
          type: integer
          format: int32
        alertEmail:
          type: string
          description: email for job failure notification
        tenantId:
          type: string
        tenantName:
          type: string
        tenantLabel:
          type: string
        groupName:
          type: string
        groupPk:
          type: integer
          format: int64
        userDbId:
          type: string
        nodeId:
          type: string
        workspaceId:
          type: string
    TenantSettingsRes:
      required:
        - defaultUtcOffset
        - defaultLocale
        - defaultFirstDayOfWeek
      type: object
      properties:
        defaultUtcOffset:
          type: integer
          format: int32
        defaultRegion:
          type: string
        defaultLocale:
          type: string
        defaultFirstDayOfWeek:
          type: integer
          format: int32
        alertEmail:
          type: string
          description: email for job failure notification
    TenantBaseFilterRes:
      type: object
      properties:
        conjunction:
          type: string
          enum:
            - and
            - or
        applyBlacklist:
          type: boolean
        conditions:
          type: array
          items:
            type: object
            properties:
              attribute:
                type: string
              operator:
                type: string
                enum:
                  - BETWEEN
                  - EQUALS
                  - GT
                  - GTE
                  - IS_NOT_NULL
                  - IS_NULL
                  - LIKE
                  - LT
                  - LTE
                  - NOT_EQUALS
              value:
                type: string
            required:
              - attribute
              - operator
      required:
        - conjunction
        - applyBlacklist
        - conditions
    TenantStatsKpiListRes:
      type: object
      properties:
        tenantsStatistics:
          type: array
          items:
            $ref: '#/components/schemas/TenantStatsKpiRes'
    TenantStatsKpiRes:
      type: object
      properties:
        tenantId:
          type: string
        tenantLabel:
          type: string
        groupPk:
          type: integer
          format: int64
        userDbId:
          type: string
        creationDate:
          type: string
          format: date-time
        contacts:
          type: integer
          format: int64
        totalEvents:
          type: integer
          format: int64
        digitalMessages:
          type: integer
          format: int64
        purchases:
          type: integer
          format: int64
        ecommerces:
          type: integer
          format: int64
        retails:
          type: integer
          format: int64
    TestFilterRes:
      type: object
      properties:
        recipients:
          type: array
          items:
            type: string
        name:
          type: string
    TestEmailCampaignRes:
      type: object
      properties:
        identifier:
          type: integer
          format: int32
        name:
          type: string
        modelIdentifier:
          type: integer
          format: int32
        senderName:
          type: string
        senderEmail:
          type: string
        senderReplyTo:
          type: string
        selectionId:
          type: integer
          format: int32
        filterId:
          type: integer
          format: int32
        emails:
          type: array
          items:
            type: string
        subject:
          type: string
        htmlContent:
          type: string
        textContent:
          type: string
        removeDuplicates:
          type: boolean
          default: false
        deferred:
          type: boolean
          default: false
        payloadValid:
          type: boolean
          default: false
    TestSmsCampaignRes:
      type: object
      properties:
        identifier:
          type: integer
          format: int32
        name:
          type: string
        modelIdentifier:
          type: integer
          format: int32
        senderName:
          type: string
        selectionId:
          type: integer
          format: int32
        filterId:
          type: integer
          format: int32
        phones:
          type: array
          items:
            type: string
        textContent:
          type: string
        removeDuplicates:
          type: boolean
          default: false
        deferred:
          type: boolean
          default: false
        payloadValid:
          type: boolean
          default: false
    TenantUsersRes:
      type: object
      properties:
        users:
          type: array
          items:
            $ref: '#/components/schemas/TenantUserRes'
    TenantUserRes:
      type: object
      properties:
        userPk:
          type: integer
        name:
          type: string
          description: name of the user
        surname:
          type: string
          description: surname of the user
        email:
          type: string
          description: email of the user
        username:
          type: string
          description: username of the user
        status:
          type: string
          description: status (always ACTIVE)
    TimeRes:
      required:
        - mode
        - value
      type: object
      properties:
        mode:
          type: string
          enum:
            - at
            - every
        value:
          type: array
          items:
            type: string
    TimeframeConditionRes:
      type: object
      properties:
        type:
          type: string
        attribute:
          type: string
        operator:
          type: string
        value:
          type: object
          properties: {}
    TimeseriesSubConditionRes:
      type: object
      properties:
        type:
          type: string
        operator:
          type: string
        value:
          type: object
          properties: {}
        values:
          type: array
          items:
            type: object
            properties: {}
    UserBaseRes:
      type: object
      properties:
        userPk:
          type: integer
          format: int64
        name:
          type: string
        surname:
          type: string
        username:
          type: string
        email:
          type: string
        picture:
          type: string
        lang:
          type: string
        timezone:
          type: string
        roles:
          type: array
          items:
            type: string
    UserInfoRes:
      type: object
      properties:
        userPk:
          type: integer
          format: int64
        name:
          type: string
        surname:
          type: string
    UserRes:
      type: object
      properties:
        base:
          $ref: '#/components/schemas/UserBaseRes'
        extended:
          $ref: '#/components/schemas/TenantListRes'
    UserSettingsRes:
      type: object
      properties:
        userPk:
          type: integer
          format: int64
        preferences:
          $ref: '#/components/schemas/JsonNode'
    WidgetListRes:
      type: array
      items:
        $ref: '#/components/schemas/WidgetExtendedRes'
    WidgetRes:
      type: object
      properties:
        uuid:
          type: string
        name:
          type: string
        label:
          type: string
        range:
          type: string
          enum:
            - GLOBAL
            - SEGMENT
        statement:
          type: string
          deprecated: true
        order:
          type: integer
          format: int32
        type:
          type: string
          enum:
            - DEMOGRAPHY
            - EVENTS
            - ATTRIBUTION
        subtype:
          type: string
          enum:
            - CLICK
            - OPEN_NO_CLICK
            - RECEIVE_NO_OPEN_NO_CLICK
            - NO_RECEIVE
        graph:
          type: object
          $ref: '#/components/schemas/GraphRes'
          deprecated: true
    WidgetExtendedRes:
      allOf:
        - $ref: '#/components/schemas/WidgetRes'
        - type: object
          properties:
            kind:
              type: string
              enum:
                - analytics-count
                - bar-h
                - bar
                - pie
            xAxis:
              type: string
              description: Label of x axis (if kind is bar or bar-h)
            yAxis:
              type: string
              description: Label of y axis (if kind is bar or bar-h)
    WidgetExtendedWithDataRes:
      allOf:
        - $ref: '#/components/schemas/WidgetExtendedRes'
        - type: object
          properties:
            data:
              type: object
              oneOf:
                  - $ref: '#/components/schemas/WidgetAnalyticsCountDataRes'
                  - $ref: '#/components/schemas/WidgetIterableDataRes'
            timeseries:
              type: string
              description: Temporal aggregation type if widget data contains a date
              enum:
                - DAILY
                - WEEKLY
                - MONTHLY
                - QUARTERLY
                - YEARLY
    WidgetAnalyticsCountDataRes:
      required:
        - key
        - value
      type: object
      description: Resource for analytics-count graph kind
      properties:
        key:
          type: string
        value:
          type: number
    WidgetBarDataRes:
      required:
        - x
        - y
      type: object
      description: Resource for bar graph kind
      properties:
        x:
          type: string
        y:
          type: number
    WidgetBarHDataRes:
      required:
        - x
        - y
      type: object
      description: Resource for bar-h graph kind
      properties:
        x:
          type: number
        y:
          type: string
    WidgetPieDataRes:
      required:
        - key
        - value
      type: object
      description: Resource for pie graph kind
      properties:
        key:
          type: string
        value:
          type: number
    WidgetIterableDataRes:
      type: array
      description: Resource for bar-h, bar or pie graph kinds
      items:
        oneOf:
          - $ref: '#/components/schemas/WidgetBarDataRes'
          - $ref: '#/components/schemas/WidgetBarHDataRes'
          - $ref: '#/components/schemas/WidgetPieDataRes'
    WidgetStatementAttributeListRes:
      type: object
      properties:
        attributes:
          type: array
          items:
            $ref: '#/components/schemas/WidgetStatementAttributeRes'
    WidgetStatementAttributeRes:
      type: object
      properties:
        widgetKey:
          type: string
        modelAttributeName:
          type: string
        widgetKeyDescription:
          type: string
    ShareSegmentResRequest:
      required:
        - tenants
      type: object
      properties:
        tenants:
          type: array
          items:
            $ref: '#/components/schemas/TenantShareSegmentRes'
    ShareSegmentResResponse:
      allOf:
        - $ref: '#/components/schemas/AbstractAuditEntityRes'
        - type: object
          properties:
            requestUuid:
              type: string
              readOnly: true
            tenants:
              type: array
              items:
                $ref: '#/components/schemas/TenantShareSegmentRes'
          required:
            - requestUuid
            - authorId
            - author
            - createdAt
            - tenants
    TenantShareSegmentRes:
      required:
        - id
      type: object
      properties:
        id:
          type: integer
          description: tenant id
        segmentUuid:
          type: string
          description: Segment created on tenant
          readOnly: true
        error:
          type: string
          description: Message in case of error
          readOnly: true
    EmailDesignerRes:
      type: object
      properties:
        enabled:
          type: boolean
          description: If it's true, user can use email designer
    ClabIdRes:
      type: object
      properties:
        value:
          type: string
          description: the name of the send column that contains the hub customer id
    MessageTemplate:
      title: message template
      type: object
      properties:
        bodyHtml:
          $ref: '#/components/schemas/MessageBody'
        bodyText:
          $ref: '#/components/schemas/MessageBody'
    MessageBody:
      title: message body
      type: object
      properties:
        source:
          type: string
          description: Contains the source of message(html or text) where links will
            be searched and decorated
        links:
          type: array
          items:
            $ref: '#/components/schemas/Link'
    Link:
      title: link
      type: object
      properties:
        link:
          type: string
          description: In the extractor, this field contains the real link called
        originalLink:
          type: string
          description: the original link as it appears in the body
        trackedPreview:
          type: string
          description: In the extracotr, if trackable is true this field contains
            the preview of tracked link
        schemeHostAndPath:
          type: string
          description: the parsed link up to the query part
        map:
          type: boolean
          description: the link was found inside an <area> tag
        description:
          type: string
          description: the link's text
        manual:
          type: boolean
          description: manual tracking
        trackable:
          type: boolean
          description: the link is automatically trackable
        tracked:
          type: boolean
          description: the link is tracked
        categoryId:
          type: integer
          description: the category id, defaults to '1'
        social:
          type: boolean
          description: the link points to a social network
        analytics:
          type: array
          items:
            $ref: '#/components/schemas/AnalyticElement'
        oldAnalyticStyle:
          type: boolean
          description: used only when extract, it is true if the analytics are present
            only in the old style (with clabtrack query parameter and without clabtrack2
            query parameter)
        clabtrack:
          type: integer
          description: the value of the clabtrack query parameter
        clabid:
          type: string
          description: the value of the hub customer id query parameter
    AnalyticValue:
      title: analytic value
      type: object
      properties:
        key:
          type: string
          description: the analytic key
        value:
          type: string
          description: the analytic value
    AnalyticElement:
      title: analytic element
      type: object
      properties:
        id:
          type: integer
          description: the analytic id
        values:
          type: array
          items:
            $ref: '#/components/schemas/AnalyticValue'
  parameters:
    AuthorizationHeader:
      name: Authorization
      in: header
      description: A valid OAuth2 token
      required: true
      schema:
        type: string
    TenantHeader:
      name: Tenant
      in: header
      description: The ID of the tenant to operate on
      required: true
      schema:
        type: integer
  securitySchemes:
    OAuth2:
      type: oauth2
      description: |
        The following table provides brief descriptions of the built-in OAuth2 scopes of this API.
        In this context, scopes are generally intended as application roles.
      flows:
        implicit:
          authorizationUrl: https://login.contactlab.it/o/oauth2/auth
          scopes:
            DPO: Data Protection Officer
            CONFIGURATOR: Customer Care Representative
            CLAB_OPERATOR: Contactlab Admin
            ADMIN: Admin
            POWERUSER: Poweruser
            USER: User
            GUEST: Guest
