openapi: 3.1.0
info:
  title: Vacancy API
  description: >-
    This API will allow you to configure and read vacancies with all their
    internal features.
  version: '2.0'
  license:
    name: Propietary software
    url: https://hunty.com
  contact:
    name: Enzo García
    email: enzo.garcia@hunty.com
tags:
  - name: Vacancy
    description: Endpoints for vacancy management and retrieval
servers:
  - url: https://k8s-exp-api-dev.hunty.cloud/v2/vacancies
    description: Development Server
  - url: https://k8s-exp-api-stg.hunty.cloud/v2/vacancies
    description: Production Server
paths:
  /{vacancyId}/company/{companyId}:
    get:
      operationId: getVacancyById
      summary: Retrieve a vacancy by id
      parameters:
        - name: vacancyId
          required: true
          in: path
          schema:
            type: string
        - name: companyId
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Vacancy'
        '404':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: number
                    example: 404
                  message:
                    type: string
                    example: Vacancy not found
      security:
        - bearer: []
        - apiKey: []
      tags:
        - Vacancy
  /company/{companyId}:
    post:
      operationId: createVacancy
      summary: Create a new vacancy
      parameters:
        - name: companyId
          required: true
          in: path
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateVacancy'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Vacancy'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: number
                    example: 401
                  message:
                    type: string
                    example: >-
                      authorization header should have a valid JWT token or
                      x-auth-api-key header: Api key not found
      security:
        - bearer: []
        - apiKey: []
      tags:
        - Vacancy
components:
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http
    apiKey:
      type: apiKey
      in: header
      name: x-auth-api-key
  schemas:
    Status:
      type: object
      properties:
        code:
          type: string
          enum:
            - SAVED
            - CLOSED
            - IN_PROGRESS
          example: SAVED
        createdAt:
          type: string
          format: date-time
          example: '2024-01-15T10:30:00Z'
      required:
        - code
        - createdAt
    FeatureAction:
      type: object
      properties:
        id:
          type: string
          example: start
        templateId:
          type: string
          example: 6705d9eb9f2f72a28f6c974f
      required:
        - id
        - templateId
    Feature:
      type: object
      properties:
        id:
          type: string
          example: 6705d9eb9f2f72a28f6c974f
        featureCode:
          type: string
          enum:
            - INTERVIEW
            - DOCUMENTS
            - AUTOMATIC_ENGLISH_EXAM
            - AUTOMATIC_SCHEDULING_VIRTUAL
            - AUTOMATIC_SCHEDULING_PRESENTIAL
            - AUTOMATIC_SCHEDULING_AUTO
            - AUTOMATIC_PSYCHOMETRIC
            - AUTOMATIC_FORM
          example: INTERVIEW
        order:
          type: number
          example: 1
        isAutomatic:
          type: boolean
          example: true
        color:
          type: string
          example: '#4A90E2'
        customName:
          type: string
          example: Entrevista inicial
        actions:
          type: array
          items:
            $ref: '#/components/schemas/FeatureAction'
        selfInit:
          type: boolean
          example: false
        jobAutomations:
          oneOf:
            - $ref: '#/components/schemas/EnglishExamFeatureJobAutomations'
            - $ref: '#/components/schemas/FormFeatureJobAutomations'
            - $ref: '#/components/schemas/PsychometricFeatureJobAutomations'
            - $ref: '#/components/schemas/SchedulingAutoFeatureJobAutomations'
            - $ref: '#/components/schemas/SchedulingPresentialFeatureJobAutomations'
            - $ref: '#/components/schemas/SchedulingVirtualFeatureJobAutomations'
            - $ref: '#/components/schemas/DocumentsFeatureJobAutomations'
      required:
        - id
        - featureCode
        - order
        - isAutomatic
        - color
        - customName
        - actions
        - selfInit
        - jobAutomations
    Task:
      type: object
      properties:
        id:
          type: string
          example: 6705d9eb9f2f72a28f6c974f
        order:
          type: number
          example: 1
        text:
          type: string
          example: Validar experiencia en el puesto
        source:
          type: string
          enum:
            - GPT
            - COMPANY
            - CUSTOM
          example: COMPANY
        type:
          type: string
          enum:
            - Qualifying
            - Informative
            - Disqualifier
          example: Qualifying
        relatedField:
          type:
            - string
            - 'null'
          example: experience
        version:
          type: number
          example: 1
        versionDate:
          type: string
          format: date-time
          example: '2024-01-15T10:30:00Z'
      required:
        - id
        - order
        - text
        - source
        - type
        - relatedField
        - version
        - versionDate
    JobAutomations:
      type: object
      properties:
        frozenDueToFinalistInactivityTime:
          type: number
          example: 7
        frozenDueToFinalistInactivityTimeUnit:
          type: string
          enum:
            - days
            - minutes
            - hours
          example: days
        frozenDueToSelectionInactivityTime:
          type: number
          example: 14
        frozenDueToSelectionInactivityTimeUnit:
          type: string
          enum:
            - days
            - minutes
            - hours
          example: days
      required:
        - frozenDueToFinalistInactivityTime
        - frozenDueToFinalistInactivityTimeUnit
        - frozenDueToSelectionInactivityTime
        - frozenDueToSelectionInactivityTimeUnit
    Vacancy:
      type: object
      properties:
        id:
          type: string
          example: 6705d9eb9f2f72a28f6c974f
        shortCode:
          type:
            - string
            - 'null'
          example: VAC-2024-001
        type:
          type: string
          enum:
            - Standard
          example: Standard
        companyId:
          type: string
          example: 6705d9eb9f2f72a28f6c974f
        locale:
          type: string
          example: es
        createdByUserId:
          type: string
          example: 6705d9eb9f2f72a28f6c974f
        locationId:
          type:
            - number
            - 'null'
          example: 12345
        country:
          type:
            - string
            - 'null'
          example: MX
        status:
          $ref: '#/components/schemas/Status'
        areaId:
          type: string
          example: 6705d9eb9f2f72a28f6c974f
        visibility:
          type: string
          enum:
            - PUBLIC
            - PRIVATE
          example: PUBLIC
        workModality:
          type: string
          enum:
            - ON_SITE
            - REMOTE
            - HYBRID
          example: HYBRID
        name:
          type: string
          example: Desarrollador Full Stack Senior
        maxCandidates:
          type:
            - number
            - 'null'
          example: 50
        jobDescription:
          type: string
          example: >-
            Buscamos un desarrollador Full Stack con experiencia en React y
            Node.js
        jobDescriptionHtml:
          type: string
          example: >-
            <p>Buscamos un desarrollador Full Stack con experiencia en
            <strong>React</strong> y <strong>Node.js</strong></p>
        requirements:
          type:
            - string
            - 'null'
          example: Experiencia mínima de 3 años en desarrollo web
        requirementsHtml:
          type:
            - string
            - 'null'
          example: <p>Experiencia mínima de 3 años en desarrollo web</p>
        contextAI:
          type:
            - string
            - 'null'
          example: Posición para equipo de desarrollo de producto
        features:
          type: array
          items:
            $ref: '#/components/schemas/Feature'
        hasFinalistsEnabled:
          type: boolean
        taskList:
          type: array
          items:
            $ref: '#/components/schemas/Task'
        refCode:
          type:
            - string
            - 'null'
          example: REF-2024-001
        jobAutomations:
          $ref: '#/components/schemas/JobAutomations'
        createdAt:
          type: string
          format: date-time
          example: '2024-01-15T10:30:00Z'
        updatedAt:
          type: string
          format: date-time
          example: '2024-01-20T15:45:00Z'
      required:
        - id
        - shortCode
        - type
        - companyId
        - locale
        - createdByUserId
        - locationId
        - country
        - status
        - areaId
        - visibility
        - workModality
        - name
        - maxCandidates
        - jobDescription
        - jobDescriptionHtml
        - requirements
        - requirementsHtml
        - contextAI
        - features
        - hasFinalistsEnabled
        - taskList
        - refCode
        - jobAutomations
        - createdAt
        - updatedAt
    SchedulingFeatureReminder:
      type: object
      properties:
        leadTime:
          type: number
          example: 24
        timeUnit:
          type: string
          example: hours
      required:
        - leadTime
        - timeUnit
    SchedulingPresentialFeaturePossibleDate:
      type: object
      properties:
        date:
          type: string
          format: date-time
          example: '2024-02-01T10:00:00Z'
        duration:
          type: number
          example: 60
      required:
        - date
        - duration
    SchedulingPresentialFeatureData:
      type: object
      properties:
        name:
          type: string
          example: Entrevista presencial
        timezone:
          type: string
          example: America/Mexico_City
        reminders:
          type: array
          items:
            $ref: '#/components/schemas/SchedulingFeatureReminder'
        location:
          type: string
          example: Oficinas centrales, Av. Reforma 123, CDMX
        additionalInformation:
          type: string
          example: Por favor traer identificación oficial
        possibleDates:
          type: array
          items:
            $ref: '#/components/schemas/SchedulingPresentialFeaturePossibleDate'
      required:
        - name
        - timezone
        - reminders
        - location
        - additionalInformation
        - possibleDates
    SchedulingPresentialFeatureJobAutomations:
      type: object
      properties:
        discardDueToInactivityInToScheduleTime:
          type: number
          example: 1440
        discardDueToInactivityInToScheduleTimeUnit:
          type: string
          enum:
            - days
            - minutes
            - hours
          example: days
        discardDueToInactivityInAttendanceValidationTime:
          type: number
          example: 1440
        discardDueToInactivityInAttendanceValidationTimeUnit:
          type: string
          enum:
            - days
            - minutes
            - hours
          example: days
        discardDueToInactivityInErrorTime:
          type: number
          example: 1440
        discardDueToInactivityInErrorTimeUnit:
          type: string
          enum:
            - days
            - minutes
            - hours
          example: days
        discardDueToInactivityAfterBeingCancelledTime:
          type: number
          example: 1440
        discardDueToInactivityAfterBeingCancelledTimeUnit:
          type: string
          enum:
            - days
            - minutes
            - hours
          example: days
        discardDueToLackOfInterestTime:
          type: number
          example: 1440
        discardDueToLackOfInterestTimeUnit:
          type: string
          enum:
            - days
            - minutes
            - hours
          example: days
      required:
        - discardDueToInactivityInToScheduleTime
        - discardDueToInactivityInToScheduleTimeUnit
        - discardDueToInactivityInAttendanceValidationTime
        - discardDueToInactivityInAttendanceValidationTimeUnit
        - discardDueToInactivityInErrorTime
        - discardDueToInactivityInErrorTimeUnit
        - discardDueToInactivityAfterBeingCancelledTime
        - discardDueToInactivityAfterBeingCancelledTimeUnit
        - discardDueToLackOfInterestTime
        - discardDueToLackOfInterestTimeUnit
    SchedulingPresentialFeature:
      type: object
      properties:
        id:
          type: string
          example: 6705d9eb9f2f72a28f6c974f
        order:
          type: number
          example: 0
        isAutomatic:
          type: boolean
          example: true
        color:
          type: string
          example: '#000000'
        customName:
          type: string
          example: Agendamiento Virtual
        featureCode:
          type: string
          example: AUTOMATIC_SCHEDULING_PRESENTIAL
          enum:
            - AUTOMATIC_SCHEDULING_PRESENTIAL
        actions:
          type: array
          items:
            $ref: '#/components/schemas/FeatureAction'
        selfInit:
          type: boolean
          example: false
        data:
          $ref: '#/components/schemas/SchedulingPresentialFeatureData'
        jobAutomations:
          $ref: '#/components/schemas/SchedulingPresentialFeatureJobAutomations'
      required:
        - id
        - order
        - isAutomatic
        - color
        - customName
        - featureCode
        - actions
        - selfInit
        - data
        - jobAutomations
    SchedulingVirtualFeatureData:
      type: object
      properties:
        name:
          type: string
          example: Entrevista virtual
        timezone:
          type: string
          example: America/Mexico_City
        reminders:
          type: array
          items:
            $ref: '#/components/schemas/SchedulingFeatureReminder'
        additionalInformation:
          type: string
          example: El enlace de la videollamada se enviará 15 minutos antes
        possibleDates:
          type: array
          items:
            type: string
            format: date-time
          example:
            - '2024-02-01T10:00:00Z'
            - '2024-02-02T14:00:00Z'
      required:
        - name
        - timezone
        - reminders
        - additionalInformation
        - possibleDates
    SchedulingVirtualFeatureJobAutomations:
      type: object
      properties:
        discardDueToInactivityInToScheduleTime:
          type: number
          example: 3
        discardDueToInactivityInToScheduleTimeUnit:
          type: string
          enum:
            - days
            - minutes
            - hours
          example: days
        discardDueToInactivityInAttendanceValidationTime:
          type: number
          example: 2
        discardDueToInactivityInAttendanceValidationTimeUnit:
          type: string
          enum:
            - days
            - minutes
            - hours
          example: days
        discardDueToInactivityInErrorTime:
          type: number
          example: 1
        discardDueToInactivityInErrorTimeUnit:
          type: string
          enum:
            - days
            - minutes
            - hours
          example: days
        discardDueToInactivityAfterBeingCancelledTime:
          type: number
          example: 5
        discardDueToInactivityAfterBeingCancelledTimeUnit:
          type: string
          enum:
            - days
            - minutes
            - hours
          example: days
        discardDueToLackOfInterestTime:
          type: number
          example: 7
        discardDueToLackOfInterestTimeUnit:
          type: string
          enum:
            - days
            - minutes
            - hours
          example: days
      required:
        - discardDueToInactivityInToScheduleTime
        - discardDueToInactivityInToScheduleTimeUnit
        - discardDueToInactivityInAttendanceValidationTime
        - discardDueToInactivityInAttendanceValidationTimeUnit
        - discardDueToInactivityInErrorTime
        - discardDueToInactivityInErrorTimeUnit
        - discardDueToInactivityAfterBeingCancelledTime
        - discardDueToInactivityAfterBeingCancelledTimeUnit
        - discardDueToLackOfInterestTime
        - discardDueToLackOfInterestTimeUnit
    SchedulingVirtualFeature:
      type: object
      properties:
        id:
          type: string
          example: 6705d9eb9f2f72a28f6c974f
        order:
          type: number
          example: 0
        isAutomatic:
          type: boolean
          example: false
        color:
          type: string
          example: '#000000'
        customName:
          type: string
          example: Agendamiento Virtual
        featureCode:
          type: string
          example: AUTOMATIC_SCHEDULING_VIRTUAL
        actions:
          type: array
          items:
            $ref: '#/components/schemas/FeatureAction'
        selfInit:
          type: boolean
          example: false
        data:
          $ref: '#/components/schemas/SchedulingVirtualFeatureData'
        jobAutomations:
          $ref: '#/components/schemas/SchedulingVirtualFeatureJobAutomations'
      required:
        - id
        - order
        - isAutomatic
        - color
        - customName
        - featureCode
        - actions
        - selfInit
        - data
        - jobAutomations
    SchedulingAutoFeatureData:
      type: object
      properties:
        name:
          type: string
          example: Agenda tu entrevista
        additionalInformation:
          type: string
          example: Selecciona el horario que mejor te convenga
        platformLink:
          type: string
          format: uri
          example: https://meet.google.com
    SchedulingAutoFeatureJobAutomations:
      type: object
      properties:
        discardDueToInactivityInToScheduleTime:
          type: number
        discardDueToInactivityInToScheduleTimeUnit:
          type: string
          enum:
            - days
            - minutes
            - hours
        discardDueToInactivityInAttendanceValidationTime:
          type: number
        discardDueToInactivityInAttendanceValidationTimeUnit:
          type: string
          enum:
            - days
            - minutes
            - hours
        discardDueToInactivityInErrorTime:
          type: number
        discardDueToInactivityInErrorTimeUnit:
          type: string
          enum:
            - days
            - minutes
            - hours
        discardDueToInactivityAfterBeingCancelledTime:
          type: number
        discardDueToInactivityAfterBeingCancelledTimeUnit:
          type: string
          enum:
            - days
            - minutes
            - hours
        discardDueToLackOfInterestTime:
          type: number
        discardDueToLackOfInterestTimeUnit:
          type: string
          enum:
            - days
            - minutes
            - hours
      required:
        - discardDueToInactivityInToScheduleTime
        - discardDueToInactivityInToScheduleTimeUnit
        - discardDueToInactivityInAttendanceValidationTime
        - discardDueToInactivityInAttendanceValidationTimeUnit
        - discardDueToInactivityInErrorTime
        - discardDueToInactivityInErrorTimeUnit
        - discardDueToInactivityAfterBeingCancelledTime
        - discardDueToInactivityAfterBeingCancelledTimeUnit
        - discardDueToLackOfInterestTime
        - discardDueToLackOfInterestTimeUnit
    SchedulingAutoFeature:
      type: object
      properties:
        id:
          type: string
        order:
          type: number
        isAutomatic:
          type: boolean
        color:
          type: string
        customName:
          type: string
        featureCode:
          type: string
          enum:
            - AUTOMATIC_SCHEDULING_AUTO
        actions:
          type: array
          items:
            $ref: '#/components/schemas/FeatureAction'
        selfInit:
          type: boolean
        data:
          $ref: '#/components/schemas/SchedulingAutoFeatureData'
        jobAutomations:
          $ref: '#/components/schemas/SchedulingAutoFeatureJobAutomations'
      required:
        - id
        - order
        - isAutomatic
        - color
        - customName
        - featureCode
        - actions
        - selfInit
        - data
        - jobAutomations
    PsychometricFeatureReminder:
      type: object
      properties:
        leadTime:
          type: number
          example: 48
        timeUnit:
          type: string
          example: hours
      required:
        - leadTime
        - timeUnit
    PsychometricFeatureData:
      type: object
      properties:
        id:
          type: number
          example: 1
        name:
          type: string
          example: Test de personalidad DISC
        validationSection:
          type: boolean
          example: true
        reminder:
          $ref: '#/components/schemas/PsychometricFeatureReminder'
      required:
        - id
        - name
        - validationSection
        - reminder
    PsychometricFeatureJobAutomations:
      type: object
      properties:
        discardDueToInactivityInResultValidationTime:
          type: number
        discardDueToInactivityInResultValidationTimeUnit:
          type: string
          enum:
            - days
            - minutes
            - hours
        discardDueToInactivityInErrorTime:
          type: number
        discardDueToInactivityInErrorTimeUnit:
          type: string
          enum:
            - days
            - minutes
            - hours
        discardDueToLackOfInterestTime:
          type: number
        discardDueToLackOfInterestTimeUnit:
          type: string
          enum:
            - days
            - minutes
            - hours
      required:
        - discardDueToInactivityInResultValidationTime
        - discardDueToInactivityInResultValidationTimeUnit
        - discardDueToInactivityInErrorTime
        - discardDueToInactivityInErrorTimeUnit
        - discardDueToLackOfInterestTime
        - discardDueToLackOfInterestTimeUnit
    PsychometricFeature:
      type: object
      properties:
        id:
          type: string
        order:
          type: number
        isAutomatic:
          type: boolean
        color:
          type: string
        customName:
          type: string
        featureCode:
          type: string
          enum:
            - AUTOMATIC_PSYCHOMETRIC
        actions:
          type: array
          items:
            $ref: '#/components/schemas/FeatureAction'
        selfInit:
          type: boolean
        data:
          $ref: '#/components/schemas/PsychometricFeatureData'
        jobAutomations:
          $ref: '#/components/schemas/PsychometricFeatureJobAutomations'
      required:
        - id
        - order
        - isAutomatic
        - color
        - customName
        - featureCode
        - actions
        - selfInit
        - data
        - jobAutomations
    FormFeatureReminder:
      type: object
      properties:
        leadTime:
          type: number
          example: 24
        timeUnit:
          type: string
          example: hours
      required:
        - leadTime
        - timeUnit
    FormFeatureData:
      type: object
      properties:
        formId:
          type: string
          example: form-123e4567-e89b-12d3-a456-426614174000
        formName:
          type: string
          example: Formulario de datos personales
        formReminder:
          $ref: '#/components/schemas/FormFeatureReminder'
        sendPreLinkMessage:
          type: boolean
          example: true
      required:
        - formId
        - formName
        - formReminder
        - sendPreLinkMessage
    FormFeatureJobAutomations:
      type: object
      properties:
        discardDueToInactivityInResultValidationTime:
          type: number
        discardDueToInactivityInResultValidationTimeUnit:
          type: string
          enum:
            - days
            - minutes
            - hours
        discardDueToInactivityInErrorTime:
          type: number
        discardDueToInactivityInErrorTimeUnit:
          type: string
          enum:
            - days
            - minutes
            - hours
        discardDueToExclusiveQuestionTime:
          type: number
          example: 1
        discardDueToExclusiveQuestionTimeUnit:
          type: string
          enum:
            - days
            - minutes
            - hours
          example: days
        discardDueToScoreTime:
          type: number
          example: 2
        discardDueToScoreTimeUnit:
          type: string
          enum:
            - days
            - minutes
            - hours
          example: days
        discardDueToLackOfInterestTime:
          type: number
          example: 7
        discardDueToLackOfInterestTimeUnit:
          type: string
          enum:
            - days
            - minutes
            - hours
          example: days
      required:
        - discardDueToInactivityInResultValidationTime
        - discardDueToInactivityInResultValidationTimeUnit
        - discardDueToInactivityInErrorTime
        - discardDueToInactivityInErrorTimeUnit
        - discardDueToExclusiveQuestionTime
        - discardDueToExclusiveQuestionTimeUnit
        - discardDueToScoreTime
        - discardDueToScoreTimeUnit
        - discardDueToLackOfInterestTime
        - discardDueToLackOfInterestTimeUnit
    FormFeature:
      type: object
      properties:
        id:
          type: string
        order:
          type: number
        isAutomatic:
          type: boolean
        color:
          type: string
        customName:
          type: string
        featureCode:
          type: string
          enum:
            - AUTOMATIC_FORM
        actions:
          type: array
          items:
            $ref: '#/components/schemas/FeatureAction'
        selfInit:
          type: boolean
        data:
          $ref: '#/components/schemas/FormFeatureData'
        jobAutomations:
          $ref: '#/components/schemas/FormFeatureJobAutomations'
      required:
        - id
        - order
        - isAutomatic
        - color
        - customName
        - featureCode
        - actions
        - selfInit
        - data
        - jobAutomations
    EnglishExamFeatureQuestionData:
      type: object
      properties:
        id:
          type: string
          example: question-123e4567-e89b-12d3-a456-426614174000
        text:
          type: string
          example: ¿Cuál es tu nivel de inglés?
        order:
          type: number
          example: 1
      required:
        - id
        - text
        - order
    EnglishExamFeatureData:
      type: object
      properties:
        language:
          type: string
          example: en
        minQuestions:
          type: number
          example: 10
        maxQuestions:
          type: number
          example: 20
        maxQuestionAttempts:
          type: number
          example: 2
        minCefrLevelCode:
          type: string
          example: B2
        questions:
          type: array
          items:
            $ref: '#/components/schemas/EnglishExamFeatureQuestionData'
      required:
        - language
        - minQuestions
        - maxQuestions
        - maxQuestionAttempts
        - minCefrLevelCode
        - questions
    EnglishExamFeatureJobAutomations:
      type: object
      properties:
        discardDueToInactivityInResultValidationTime:
          type: number
          example: 3
        discardDueToInactivityInResultValidationTimeUnit:
          type: string
          enum:
            - days
            - minutes
            - hours
          example: days
        discardDueToInactivityInErrorTime:
          type: number
          example: 2
        discardDueToInactivityInErrorTimeUnit:
          type: string
          enum:
            - days
            - minutes
            - hours
          example: days
        discardDueToLackOfInterestTime:
          type: number
          example: 7
        discardDueToLackOfInterestTimeUnit:
          type: string
          enum:
            - days
            - minutes
            - hours
          example: days
      required:
        - discardDueToInactivityInResultValidationTime
        - discardDueToInactivityInResultValidationTimeUnit
        - discardDueToInactivityInErrorTime
        - discardDueToInactivityInErrorTimeUnit
        - discardDueToLackOfInterestTime
        - discardDueToLackOfInterestTimeUnit
    EnglishExamFeature:
      type: object
      properties:
        id:
          type: string
        order:
          type: number
        isAutomatic:
          type: boolean
        color:
          type: string
        customName:
          type: string
        featureCode:
          type: string
          enum:
            - AUTOMATIC_ENGLISH_EXAM
        actions:
          type: array
          items:
            $ref: '#/components/schemas/FeatureAction'
        selfInit:
          type: boolean
        data:
          $ref: '#/components/schemas/EnglishExamFeatureData'
        jobAutomations:
          $ref: '#/components/schemas/EnglishExamFeatureJobAutomations'
      required:
        - id
        - order
        - isAutomatic
        - color
        - customName
        - featureCode
        - actions
        - selfInit
        - data
        - jobAutomations
    DocumentsDocumentFeatureData:
      type: object
      properties:
        documentId:
          type: string
        required:
          type: boolean
      required:
        - documentId
        - required
    DocumentsFeatureData:
      type: object
      properties:
        validationSection:
          type: boolean
        documents:
          type: array
          items:
            $ref: '#/components/schemas/DocumentsDocumentFeatureData'
      required:
        - validationSection
        - documents
    DocumentsFeatureJobAutomations:
      type: object
      properties:
        discardDueToInactivityInResultValidationTime:
          type: number
        discardDueToInactivityInResultValidationTimeUnit:
          type: string
          enum:
            - days
            - minutes
            - hours
        discardDueToInactivityInErrorTime:
          type: number
        discardDueToInactivityInErrorTimeUnit:
          type: string
          enum:
            - days
            - minutes
            - hours
        discardDueToLackOfInterestTime:
          type: number
        discardDueToLackOfInterestTimeUnit:
          type: string
          enum:
            - days
            - minutes
            - hours
      required:
        - discardDueToInactivityInResultValidationTime
        - discardDueToInactivityInResultValidationTimeUnit
        - discardDueToInactivityInErrorTime
        - discardDueToInactivityInErrorTimeUnit
        - discardDueToLackOfInterestTime
        - discardDueToLackOfInterestTimeUnit
    DocumentsFeature:
      type: object
      properties:
        id:
          type: string
        order:
          type: number
        isAutomatic:
          type: boolean
        color:
          type: string
        customName:
          type: string
        featureCode:
          type: string
          enum:
            - DOCUMENTS
        actions:
          type: array
          items:
            $ref: '#/components/schemas/FeatureAction'
        selfInit:
          type: boolean
        data:
          $ref: '#/components/schemas/DocumentsFeatureData'
        jobAutomations:
          $ref: '#/components/schemas/DocumentsFeatureJobAutomations'
    WithoutDataFeature:
      type: object
      properties:
        id:
          type: string
        order:
          type: number
        isAutomatic:
          type: boolean
        color:
          type: string
        customName:
          type: string
        featureCode:
          type: string
          example: INTERVIEW
          enum:
            - INTERVIEW
        actions:
          type: array
          items:
            $ref: '#/components/schemas/FeatureAction'
        selfInit:
          type: boolean
      required:
        - id
        - order
        - isAutomatic
        - color
        - customName
        - featureCode
        - actions
        - selfInit
    CreateVacancy:
      type: object
      properties:
        features:
          oneOf:
            - $ref: '#/components/schemas/SchedulingPresentialFeature'
            - $ref: '#/components/schemas/SchedulingVirtualFeature'
            - $ref: '#/components/schemas/SchedulingAutoFeature'
            - $ref: '#/components/schemas/WithoutDataFeature'
            - $ref: '#/components/schemas/PsychometricFeature'
            - $ref: '#/components/schemas/FormFeature'
            - $ref: '#/components/schemas/EnglishExamFeature'
            - $ref: '#/components/schemas/DocumentsFeature'
        type:
          type: string
          enum:
            - Standard
            - Branch
        name:
          type: string
        visibility:
          type: string
          enum:
            - PUBLIC
            - PRIVATE
        areaId:
          type: string
        country:
          type:
            - string
            - 'null'
        locationId:
          type:
            - number
            - 'null'
        workModality:
          type: string
          enum:
            - ON_SITE
            - REMOTE
            - HYBRID
        jobDescription:
          type: string
        jobDescriptionHtml:
          type: string
        requirements:
          type:
            - string
            - 'null'
        requirementsHtml:
          type:
            - string
            - 'null'
        contextAI:
          type:
            - string
            - 'null'
        hasFinalistsEnabled:
          type: boolean
        maxCandidates:
          type:
            - number
            - 'null'
        refCode:
          type:
            - number
            - 'null'
        jobAutomations:
          allOf:
            - $ref: '#/components/schemas/JobAutomations'
      required:
        - features
        - type
        - name
        - visibility
        - areaId
        - country
        - locationId
        - workModality
        - jobDescription
        - jobDescriptionHtml
        - requirements
        - requirementsHtml
        - contextAI
        - hasFinalistsEnabled
        - maxCandidates
        - refCode
        - jobAutomations
