{
  "openapi": "3.0.4",
  "info": {
    "title": "ВОКА-ТЕК API",
    "version": "v1.0"
  },
  "paths": {
    "/api/agents": {
      "get": {
        "tags": [
          "Agents"
        ],
        "summary": "Список агентов компании",
        "description": "Возвращает неудаленных агентов компании API-ключа, включая архивные с признаком isArchived.",
        "responses": {
          "200": {
            "description": "AgentDto[]",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AgentDto"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AgentDto"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AgentDto"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/agent-batches": {
      "get": {
        "tags": [
          "Agents"
        ],
        "summary": "Список пакетных запусков агентов за период",
        "parameters": [
          {
            "name": "period",
            "in": "query",
            "description": "Период выборки по дате создания пакетного запуска (обязательный)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "agentId",
            "in": "query",
            "description": "Фильтр по ID агента",
            "schema": {
              "type": "integer",
              "format": "int64",
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "AgentBatchDto[]",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AgentBatchDto"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AgentBatchDto"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AgentBatchDto"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Период не указан"
          }
        }
      }
    },
    "/api/agent-batches/{id}": {
      "get": {
        "tags": [
          "Agents"
        ],
        "summary": "Детали пакетного запуска агента",
        "description": "Возвращает метаданные запуска и список effective-запусков — последнюю попытку\nкаждой цели. Исторические retry-попытки и тела результатов в ответ не входят.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "ID пакетного запуска (обязательный)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "AgentBatchDetailsDto",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/AgentBatchDetailsDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentBatchDetailsDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentBatchDetailsDto"
                }
              }
            }
          },
          "404": {
            "description": "Пакетный запуск не найден"
          }
        }
      }
    },
    "/api/agent-runs/{id}/result": {
      "get": {
        "tags": [
          "Agents"
        ],
        "summary": "Результат запуска агента как документ",
        "description": "Отдает тело результата завершенного запуска с Content-Type запрошенного формата.\nДля Markdown-запусков format=md возвращает сохраненный markdown, format=html —\nтематический HTML-документ того же экспорт-конвейера, что скачивание из ЛК (без favicon).\nДля RawHtml-запусков format=html возвращает санитизированный HTML; format=md недоступен.\nБез параметра format используется формат по умолчанию, соответствующий формату вывода запуска.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "ID запуска (обязательный)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "format",
            "in": "query",
            "description": "Формат тела ответа: md или html",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Тело результата (text/markdown или text/html)"
          },
          "400": {
            "description": "Запуск не завершен, результат пуст или формат недоступен для формата вывода"
          },
          "404": {
            "description": "Запуск не найден"
          }
        }
      }
    },
    "/api/agent-runs/{id}/report-link": {
      "get": {
        "tags": [
          "Agents"
        ],
        "summary": "Публичная ссылка на HTML-отчет RawHtml-запуска",
        "description": "Возвращает непросроченную ссылку запуска или создает новую со сроком действия 7 дней.\nДоступна только для завершенных RawHtml-запусков с непустым результатом.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "ID запуска (обязательный)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "AgentReportLinkDto",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/AgentReportLinkDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentReportLinkDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentReportLinkDto"
                }
              }
            }
          },
          "400": {
            "description": "Запуск не является завершенным RawHtml-запуском"
          },
          "404": {
            "description": "Запуск не найден"
          }
        }
      }
    },
    "/api/audio/records/{id}/audio": {
      "get": {
        "tags": [
          "Audio"
        ],
        "summary": "Получение аудиозаписи по идентификатору",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "ID аудио-файла (обязательный)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "FileStreamResult"
          },
          "404": {
            "description": "Файл не найден"
          }
        }
      }
    },
    "/api/audio/record/{id}": {
      "get": {
        "tags": [
          "Audio"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "deprecated": true
      }
    },
    "/api/audio/records": {
      "get": {
        "tags": [
          "Audio"
        ],
        "summary": "Получение списка аудиозаписей",
        "parameters": [
          {
            "name": "period",
            "in": "query",
            "description": "Дата в формате sdd.MM.yyyyTHH-mmedd.MM.yyyyTHH-mm (например, s01.05.2021T00-00e15.05.2021T00-00)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "receivePeriod",
            "in": "query",
            "description": "Дата получения записей сервером в формате sdd.MM.yyyyTHH-mmedd.MM.yyyyTHH-mm (например, s01.05.2021T00-00e15.05.2021T00-00",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "units",
            "in": "query",
            "description": "Подразделения",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "employee",
            "in": "query",
            "description": "ID сотрудника",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "device",
            "in": "query",
            "description": "ID бэйджа",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/RawAudioRecordDto"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/RawAudioRecordDto"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/RawAudioRecordDto"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Audio"
        ],
        "summary": "Загрузка аудиозаписи (на одну запись создается одна группа)",
        "parameters": [
          {
            "name": "creationDate",
            "in": "query",
            "description": "Дата начала в формате yyyy-MM-ddTHH:mm:ss",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "deviceId",
            "in": "query",
            "description": "ID микрофона",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "employeeId",
            "in": "query",
            "description": "ID сотрудника",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "required": [
                  "file"
                ],
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "description": "Аудио (wav, ogg, mp3, mp4)",
                    "format": "binary"
                  }
                }
              },
              "encoding": {
                "file": {
                  "style": "form"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/audio/records/{id}/transcript": {
      "get": {
        "tags": [
          "Audio"
        ],
        "summary": "Транскрипция аудиозаписи",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "ID аудиозаписи (обязательный)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/DeviceDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeviceDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeviceDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/checklists": {
      "get": {
        "tags": [
          "Checklists"
        ],
        "summary": "Список чек-листов за период",
        "parameters": [
          {
            "name": "period",
            "in": "query",
            "description": "Дата в формате sdd.MM.yyyyTHH-mmedd.MM.yyyyTHH-mm (например, s01.05.2021T00-00e15.05.2021T00-00, обязательный)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "query",
            "description": "ID шаблонов чек-листов; для нескольких ID повторите параметр id. Без фильтра возвращаются все чек-листы за период.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int64"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ChecklistsDto"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ChecklistsDto"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ChecklistsDto"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/conversations": {
      "get": {
        "tags": [
          "Conversations"
        ],
        "summary": "Список обслуживаний за период",
        "parameters": [
          {
            "name": "period",
            "in": "query",
            "description": "Период выборки (по локальной дате начала обслуживания)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "receivePeriod",
            "in": "query",
            "description": "Период выборки по дате получения обслуживания сервером",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "units",
            "in": "query",
            "description": "Фильтр по подразделениям",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "employee",
            "in": "query",
            "description": "Фильтр по ID сотрудника",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "category",
            "in": "query",
            "description": "Фильтр по ID категории",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ConversationDtoIEnumerator"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConversationDtoIEnumerator"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConversationDtoIEnumerator"
                }
              }
            }
          }
        }
      }
    },
    "/api/conversations/{id}": {
      "get": {
        "tags": [
          "Conversations"
        ],
        "summary": "Обслуживание по ID",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "ID обслуживания (обязательный)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ConversationDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConversationDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConversationDto"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Conversations"
        ],
        "summary": "Редактирование параметров обслуживания",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "description": "",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConversationEditRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ConversationEditRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ConversationEditRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/conversations/{id}/transcript": {
      "get": {
        "tags": [
          "Conversations"
        ],
        "summary": "Транскрипция обслуживания",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "ID обслуживания (обязательный)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/TranscriptionDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TranscriptionDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/TranscriptionDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/conversations/transcriptions": {
      "get": {
        "tags": [
          "Conversations"
        ],
        "summary": "Выгрузка транскрипций обслуживаний за определенный период",
        "parameters": [
          {
            "name": "period",
            "in": "query",
            "description": "Период выборки (по локальной дате начала обслуживания)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "receivePeriod",
            "in": "query",
            "description": "Период выборки по дате получения обслуживания сервером",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "units",
            "in": "query",
            "description": "Фильтр по подразделениям",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "employee",
            "in": "query",
            "description": "Фильтр по ID сотрудника",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "category",
            "in": "query",
            "description": "Фильтр по ID категории",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TranscriptionShortDto"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TranscriptionShortDto"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TranscriptionShortDto"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/conversations/{id}/audio": {
      "get": {
        "tags": [
          "Conversations"
        ],
        "summary": "Аудиозапись обслуживания",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "ID обслуживания (обязательный)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/conversations/markup": {
      "post": {
        "tags": [
          "Conversations"
        ],
        "summary": "Создать обслуживание",
        "requestBody": {
          "description": "",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConversationMarkupRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ConversationMarkupRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ConversationMarkupRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/devices": {
      "get": {
        "tags": [
          "Devices"
        ],
        "summary": "Список всех устройств",
        "parameters": [
          {
            "name": "units",
            "in": "query",
            "schema": {
              "type": "string",
              "default": ""
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/DeviceDtoIEnumerator"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeviceDtoIEnumerator"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeviceDtoIEnumerator"
                }
              }
            }
          }
        }
      }
    },
    "/api/devices/{id}": {
      "get": {
        "tags": [
          "Devices"
        ],
        "summary": "Устройство по ID",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "ID устройства",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/DeviceDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeviceDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeviceDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/devices/activities": {
      "get": {
        "tags": [
          "Devices"
        ],
        "summary": "Список состояний бейджей за период",
        "parameters": [
          {
            "name": "period",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "units",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "device",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "employee",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/DeviceActivityDtoIEnumerator"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeviceActivityDtoIEnumerator"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeviceActivityDtoIEnumerator"
                }
              }
            }
          }
        }
      }
    },
    "/api/employees": {
      "get": {
        "tags": [
          "Employees"
        ],
        "summary": "Список всех сотрудников",
        "parameters": [
          {
            "name": "units",
            "in": "query",
            "schema": {
              "type": "string",
              "default": ""
            }
          }
        ],
        "responses": {
          "200": {
            "description": "EmployeeDto[]",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EmployeeDto"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EmployeeDto"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EmployeeDto"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Employees"
        ],
        "summary": "Создание нового сотрудника",
        "requestBody": {
          "description": "EmployeeDto",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmployeeDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/EmployeeDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EmployeeDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "EmployeeDto",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/EmployeeDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmployeeDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmployeeDto"
                }
              }
            }
          },
          "400": {
            "description": "Не найдено подразделение с Id = EmployeeDto.UnitId"
          }
        }
      }
    },
    "/api/employees/{id}": {
      "get": {
        "tags": [
          "Employees"
        ],
        "summary": "Сотрудник по ID",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "ID сотрудника",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EmployeeDto"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EmployeeDto"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EmployeeDto"
                  }
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Employees"
        ],
        "summary": "Редактирование сотрудника",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "ID сотрудника",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "description": "EmployeeDto",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmployeeDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/EmployeeDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EmployeeDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "204": {
            "description": "Изменения сохранены"
          },
          "404": {
            "description": "Сотрудник с данным ID не найден"
          },
          "400": {
            "description": "Не найдено подразделение с Id = EmployeeDto.UnitId"
          }
        }
      },
      "delete": {
        "tags": [
          "Employees"
        ],
        "summary": "Удаление сотрудника",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "ID сотрудника",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "204": {
            "description": "Сотрудник удален"
          },
          "404": {
            "description": "Сотрудник с данным ID не найден"
          }
        }
      }
    },
    "/api/employees/number-{number}": {
      "get": {
        "tags": [
          "Employees"
        ],
        "summary": "Сотрудник по табельному номеру",
        "parameters": [
          {
            "name": "number",
            "in": "path",
            "description": "Табельный номер сотрудника",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EmployeeDto"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EmployeeDto"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EmployeeDto"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/employees/{id}/archive": {
      "put": {
        "tags": [
          "Employees"
        ],
        "summary": "Архивация сотрудника (в случае увольнения)",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "ID сотрудника",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "204": {
            "description": "Сотрудник заархивирован"
          },
          "404": {
            "description": "Сотрудник с данным ID не найден"
          }
        }
      }
    },
    "/api/employees/authenticate": {
      "post": {
        "tags": [
          "Employees"
        ],
        "summary": "Авторизация сотрудника на бэйдже",
        "parameters": [
          {
            "name": "employeeId",
            "in": "query",
            "description": "ID сотрудника (если не указан, то берется из employeeNumber)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "deviceId",
            "in": "query",
            "description": "ID бэйджа (если не указан, то берется из deviceCode)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "employeeNumber",
            "in": "query",
            "description": "Табельный номер сотрудника",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "deviceCode",
            "in": "query",
            "description": "Код бэйджа из QR-кода",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/keyphrases": {
      "get": {
        "tags": [
          "Keyphrases"
        ],
        "summary": "Список ключевых фраз",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/KeyphraseDto"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/KeyphraseDto"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/KeyphraseDto"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/keyphrases/groups": {
      "get": {
        "tags": [
          "Keyphrases"
        ],
        "summary": "Список групп КФ",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/KeyphraseDto"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/KeyphraseDto"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/KeyphraseDto"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/keyphrases/matches": {
      "get": {
        "tags": [
          "Keyphrases"
        ],
        "summary": "Список зафиксированных КФ (мэтчей)",
        "parameters": [
          {
            "name": "period",
            "in": "query",
            "description": "Период выборки (обязательный параметр)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "conversationId",
            "in": "query",
            "description": "Идентификатор обслуживания",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "units",
            "in": "query",
            "description": "Фильтр по подразделениям",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "employee",
            "in": "query",
            "description": "Фильтр по сотруднику",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "keyphrase",
            "in": "query",
            "description": "Фильтр по КФ",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "keyphraseGroup",
            "in": "query",
            "description": "Фильтр по группе КФ",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/KeyphraseDto"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/KeyphraseDto"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/KeyphraseDto"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/devices/live-recordings": {
      "get": {
        "tags": [
          "LiveRecordings"
        ],
        "summary": "Возвращает устройства и их готовность к запуску онлайн-записи.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/LiveRecordingDeviceDto"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/LiveRecordingDeviceDto"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/LiveRecordingDeviceDto"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/devices/live-recordings/{commandId}": {
      "get": {
        "tags": [
          "LiveRecordings"
        ],
        "summary": "Возвращает состояние записи по команде запуска, включая завершённые и неудачные записи.",
        "parameters": [
          {
            "name": "commandId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/LiveRecordingStatusDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LiveRecordingStatusDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/LiveRecordingStatusDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/devices/{id}/live-recordings": {
      "post": {
        "tags": [
          "LiveRecordings"
        ],
        "summary": "Создаёт ожидающую live-сессию и передаёт устройству желаемое состояние запуска.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/devices/{id}/live-recordings/stop": {
      "post": {
        "tags": [
          "LiveRecordings"
        ],
        "summary": "Останавливает активную live-запись и возвращает идентификаторы созданных обслуживаний.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/metrics": {
      "get": {
        "tags": [
          "Metrics"
        ],
        "summary": "Список всех метрик",
        "responses": {
          "200": {
            "description": "MetricGroupDto[]",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MetricDto"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MetricDto"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MetricDto"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/metrics-groups": {
      "get": {
        "tags": [
          "MetricsGroups"
        ],
        "summary": "Список всех групп метрик",
        "responses": {
          "200": {
            "description": "MetricGroupDto[]",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MetricGroupDto"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MetricGroupDto"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MetricGroupDto"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/metrics-groups/{id}/metrics": {
      "get": {
        "tags": [
          "MetricsGroups"
        ],
        "summary": "Список всех метрик внутри группы",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "ID группы",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "MetricDto[]",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MetricDto"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MetricDto"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MetricDto"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "400": {
            "description": "Группа не найдена"
          }
        }
      }
    },
    "/api/reports/employeestimetable": {
      "get": {
        "tags": [
          "Reports"
        ],
        "summary": "Табель сотрудников",
        "parameters": [
          {
            "name": "period",
            "in": "query",
            "description": "Дата в строковом формате\n            (например, s{dd.MM.yyyy}e{dd.MM.yyyy}, обязательный)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "units",
            "in": "query",
            "description": "Id подразделений, указанных через запятую (например \"100,101,200\")",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "employeePosition",
            "in": "query",
            "description": "Список должностей для фильтрации",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/reports/conversations": {
      "get": {
        "tags": [
          "Reports"
        ],
        "summary": "Отчет по группе метрик в разрезе обслуживаний",
        "parameters": [
          {
            "name": "period",
            "in": "query",
            "description": "Период (обязательный)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "units",
            "in": "query",
            "description": "Подразделения",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "employee",
            "in": "query",
            "description": "ID сотрудника",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "metricsGroup",
            "in": "query",
            "description": "ID группы метрик",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "categories",
            "in": "query",
            "description": "Список категорий обслуживаний",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "skipEmptyResults",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/reports/employees": {
      "get": {
        "tags": [
          "Reports"
        ],
        "summary": "Отчет по группе метрик в разрезе сотрудников",
        "parameters": [
          {
            "name": "period",
            "in": "query",
            "description": "Период (обязательный)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "units",
            "in": "query",
            "description": "Подразделения",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "metricsGroup",
            "in": "query",
            "description": "ID группы метрик",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/reports/units": {
      "get": {
        "tags": [
          "Reports"
        ],
        "summary": "Отчет по группе метрик в разрезе подразделений",
        "parameters": [
          {
            "name": "period",
            "in": "query",
            "description": "Период (обязательный)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "units",
            "in": "query",
            "description": "Подразделения",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "metricsGroup",
            "in": "query",
            "description": "",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/reports/conversations-metrics": {
      "get": {
        "tags": [
          "Reports"
        ],
        "summary": "Список обслуживаний с метриками",
        "parameters": [
          {
            "name": "period",
            "in": "query",
            "description": "Период (обязательный)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "units",
            "in": "query",
            "description": "Подразделения",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "employee",
            "in": "query",
            "description": "",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "categories",
            "in": "query",
            "description": "",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/reports": {
      "get": {
        "tags": [
          "Reports"
        ],
        "summary": "Отчет по группе метрик в разрезе подразделений и сотрудников (\"Аналитика-Общая\")",
        "parameters": [
          {
            "name": "period",
            "in": "query",
            "description": "Дата в строковом формате\n            (например, s{dd.MM.yyyy}e{dd.MM.yyyy}, обязательный)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "units",
            "in": "query",
            "description": "Id подразделений, указанных через запятую (например \"100,101,200\")",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "metricsGroup",
            "in": "query",
            "description": "ID группы метрик (обязательный)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/reports/dynamics": {
      "get": {
        "tags": [
          "Reports"
        ],
        "summary": "Отчет по группе метрик в динамике",
        "parameters": [
          {
            "name": "period",
            "in": "query",
            "description": "Период (обязательный)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "units",
            "in": "query",
            "description": "Подразделения",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "metricsGroup",
            "in": "query",
            "description": "ID группы метрик (обязательный)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/reports/metric/dynamics": {
      "get": {
        "tags": [
          "Reports"
        ],
        "summary": "Отчет по метрике в динамике",
        "parameters": [
          {
            "name": "period",
            "in": "query",
            "description": "Период (обязательный)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "units",
            "in": "query",
            "description": "Подразделения",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "metric",
            "in": "query",
            "description": "ID метрики (обязательный)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "employee",
            "in": "query",
            "description": "ID сотрудника",
            "schema": {
              "type": "integer",
              "format": "int64",
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/reports/metric/employees": {
      "get": {
        "tags": [
          "Reports"
        ],
        "summary": "Отчет по метрике в разрезе сотрудников",
        "parameters": [
          {
            "name": "period",
            "in": "query",
            "description": "Период (обязательный)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "units",
            "in": "query",
            "description": "Подразделения",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "metric",
            "in": "query",
            "description": "ID метрики (обязательный)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/reports/metric/units": {
      "get": {
        "tags": [
          "Reports"
        ],
        "summary": "Отчет по метрике в разрезе подразделений",
        "parameters": [
          {
            "name": "period",
            "in": "query",
            "description": "Период (обязательный)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "units",
            "in": "query",
            "description": "Подразделения",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "metric",
            "in": "query",
            "description": "ID метрики (обязательный)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/units": {
      "get": {
        "tags": [
          "Units"
        ],
        "summary": "Список всех подразделений",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/UnitDto"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/UnitDto"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/UnitDto"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Units"
        ],
        "summary": "Создание нового подразделения",
        "requestBody": {
          "description": "UnitDto",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UnitDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UnitDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UnitDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "UnitDto",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/UnitDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnitDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnitDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/units/{id}": {
      "get": {
        "tags": [
          "Units"
        ],
        "summary": "Получить подразделение по id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "ID подразделения",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/UnitDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnitDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnitDto"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Units"
        ],
        "summary": "Редактирование подразделения",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "ID подразделения",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "description": "UnitDto",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UnitDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UnitDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UnitDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "204": {
            "description": "Изменения сохранены"
          },
          "404": {
            "description": "Подразделение с таким ID не найдено"
          },
          "400": {
            "description": "ParentId является потомком Unit.Id -> кольцевая ссылка"
          }
        }
      }
    },
    "/api/units/{id}/devices": {
      "get": {
        "tags": [
          "Units"
        ],
        "summary": "Список устройств конкретного подразделения",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "ID подразделения",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "DeviceDto[]",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DeviceDto"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DeviceDto"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DeviceDto"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Подразделение не найдено"
          }
        },
        "deprecated": true
      }
    },
    "/api/units/{id}/employees": {
      "get": {
        "tags": [
          "Units"
        ],
        "summary": "Список сотрудников конкретного подразделения",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "ID подразделения",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "EmployeeDto[]",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EmployeeDto"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EmployeeDto"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EmployeeDto"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Подразделение не найдено"
          }
        },
        "deprecated": true
      }
    },
    "/api/units/{id}/archive": {
      "put": {
        "tags": [
          "Units"
        ],
        "summary": "Архивация подразделения",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "204": {
            "description": "Операция выполнена"
          },
          "404": {
            "description": "Подразделение с таким ID не найдено"
          }
        }
      }
    },
    "/api/users/login": {
      "post": {
        "tags": [
          "Users"
        ],
        "summary": "Аутентификация по эл. почте и паролю — способ входа пользовательских клиентских приложений.",
        "requestBody": {
          "description": "",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoginRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/LoginRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/LoginRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JWT токен",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              },
              "application/json": {
                "schema": {
                  "type": "string"
                }
              },
              "text/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Некорректный логин/пароль"
          }
        }
      }
    },
    "/api/users/me": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "Возвращает текущего пользователя и название его компании по пользовательскому JWT.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/UserDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/users": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "Список всех пользователей",
        "responses": {
          "200": {
            "description": "UserDto[]",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/UserDto"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/UserDto"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/UserDto"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/users/{id}": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "Пользователь по ID",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "ID пользователя",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "UserDto",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/UserDto"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/UserDto"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/UserDto"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Пользователь не найден"
          }
        }
      }
    },
    "/api/users/actions": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "Получение списка действий пользователей за выбранный период.\nАналог в ЛК: Настройка-Пользователи-Действия",
        "parameters": [
          {
            "name": "period",
            "in": "query",
            "description": "Период (обязательный)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "units",
            "in": "query",
            "description": "Подразделения",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "section",
            "in": "query",
            "description": "Название раздела",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "action",
            "in": "query",
            "description": "Тип действия",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "object",
            "in": "query",
            "description": "Тип объекта действия",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/UserActionDto"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/UserActionDto"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/UserActionDto"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/Vats": {
      "post": {
        "tags": [
          "Vats"
        ],
        "summary": "Загрузка звонка для обработки",
        "parameters": [
          {
            "name": "callDate",
            "in": "query",
            "description": "Дата звонка yyyy-MM-ddTHH:mm:ss",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "callDirection",
            "in": "query",
            "description": "Тип звонка In/Out",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "operatorId",
            "in": "query",
            "description": "Идентификатор оператора в системе заказчика",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "callId",
            "in": "query",
            "description": "Идентификатора звонка в системе заказчика",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "customerPhone",
            "in": "query",
            "description": "Номер телефона клиента",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "category",
            "in": "query",
            "description": "Категория звонка",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "categories",
            "in": "query",
            "description": "Список категорий звонка",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "required": [
                  "file"
                ],
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "description": "Аудио файл звонка (.wav, .mp3, .mp4)",
                    "format": "binary"
                  }
                }
              },
              "encoding": {
                "file": {
                  "style": "form"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Звонок загружен"
          }
        }
      }
    },
    "/api/Vats/error": {
      "get": {
        "tags": [
          "Vats"
        ],
        "summary": "Генерация синтетического исключения для проверки механизма логирования",
        "parameters": [
          {
            "name": "message",
            "in": "query",
            "description": "",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AgentBatchDetailsDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "agentId": {
            "type": "integer",
            "format": "int64"
          },
          "triggerType": {
            "type": "string",
            "description": "Источник запуска: Scheduled или Manual.",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "Агрегированный статус пакетного запуска.",
            "nullable": true
          },
          "periodDateFrom": {
            "type": "string",
            "description": "Начало периода анализа запуска.",
            "format": "date-time"
          },
          "periodDateTo": {
            "type": "string",
            "description": "Конец периода анализа запуска.",
            "format": "date-time"
          },
          "creationDate": {
            "type": "string",
            "format": "date-time"
          },
          "completeDate": {
            "type": "string",
            "format": "date-time"
          },
          "targetCount": {
            "type": "integer",
            "format": "int32"
          },
          "runsCreated": {
            "type": "integer",
            "format": "int32"
          },
          "runsCompleted": {
            "type": "integer",
            "format": "int32"
          },
          "runsFailed": {
            "type": "integer",
            "format": "int32"
          },
          "taskPrompt": {
            "type": "string",
            "description": "Снимок пользовательской задачи на момент старта запуска.",
            "nullable": true
          },
          "modelId": {
            "type": "string",
            "description": "Машиночитаемый идентификатор модели (registry-id) на момент старта запуска.",
            "nullable": true
          },
          "modelName": {
            "type": "string",
            "description": "Отображаемое имя модели, разрешенное по паре снимков ModelId/Model.",
            "nullable": true
          },
          "errorText": {
            "type": "string",
            "description": "Причина skipped или failed состояния на уровне пакетного запуска.",
            "nullable": true
          },
          "runs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AgentBatchRunDto"
            },
            "description": "Effective-запуски: последняя попытка каждой цели. Исторические retry-попытки не входят.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Детали пакетного запуска агента: метаданные, снимок задачи и модели, effective-запуски.\nТела результатов в ответ не входят: доступность результата отражает признак hasResult."
      },
      "AgentBatchDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "agentId": {
            "type": "integer",
            "format": "int64"
          },
          "triggerType": {
            "type": "string",
            "description": "Источник запуска: Scheduled или Manual.",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "Агрегированный статус пакетного запуска: Queued, Running, Completed, PartiallyFailed, Failed, Skipped, Cancelled, PartiallyCancelled.",
            "nullable": true
          },
          "periodDateFrom": {
            "type": "string",
            "description": "Начало периода анализа запуска.",
            "format": "date-time"
          },
          "periodDateTo": {
            "type": "string",
            "description": "Конец периода анализа запуска.",
            "format": "date-time"
          },
          "creationDate": {
            "type": "string",
            "format": "date-time"
          },
          "completeDate": {
            "type": "string",
            "format": "date-time"
          },
          "targetCount": {
            "type": "integer",
            "description": "Сколько целей выполнения было рассчитано до создания запусков.",
            "format": "int32"
          },
          "runsCreated": {
            "type": "integer",
            "format": "int32"
          },
          "runsCompleted": {
            "type": "integer",
            "format": "int32"
          },
          "runsFailed": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "Пакетный запуск агента для списка Integration API."
      },
      "AgentBatchRunDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "status": {
            "type": "string",
            "description": "Статус запуска: Queued, Running, Completed, Failed, Cancelled.",
            "nullable": true
          },
          "recipientName": {
            "type": "string",
            "description": "Имя получателя для recipient-запусков. Для запусков в контексте компании пусто.",
            "nullable": true
          },
          "startDate": {
            "type": "string",
            "format": "date-time"
          },
          "completeDate": {
            "type": "string",
            "format": "date-time"
          },
          "executionTimeSec": {
            "type": "integer",
            "format": "int32"
          },
          "errorText": {
            "type": "string",
            "nullable": true
          },
          "hasResult": {
            "type": "boolean",
            "description": "Признак доступности тела результата через метод результата запуска."
          }
        },
        "additionalProperties": false,
        "description": "Effective-запуск (последняя попытка цели) в деталях пакетного запуска.\nЗаполняется проекцией из БД: тела результатов не загружаются."
      },
      "AgentDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "outputFormat": {
            "type": "string",
            "description": "Формат вывода результата: Markdown или RawHtml.",
            "nullable": true
          },
          "isArchived": {
            "type": "boolean",
            "description": "Признак архивного агента. Архивные агенты не запускаются,\nно их исторические запуски остаются доступны через методы батчей и результатов."
          }
        },
        "additionalProperties": false,
        "description": "Агент компании для справочника Integration API."
      },
      "AgentReportLinkDto": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "description": "Публичный URL отчета. Доступен без аутентификации до даты истечения.",
            "nullable": true
          },
          "creationDate": {
            "type": "string",
            "format": "date-time"
          },
          "expiresDate": {
            "type": "string",
            "description": "Дата истечения ссылки. После нее доступ по токену запрещен.",
            "format": "date-time"
          }
        },
        "additionalProperties": false,
        "description": "Публичная ссылка на HTML-отчет RawHtml-запуска агента."
      },
      "ChecklistData": {
        "type": "object",
        "properties": {
          "question": {
            "type": "string",
            "nullable": true
          },
          "responseText": {
            "type": "string",
            "nullable": true
          },
          "responseValue": {
            "type": "integer",
            "format": "int32"
          },
          "responseComment": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ChecklistsDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "checklistName": {
            "type": "string",
            "nullable": true
          },
          "creationDate": {
            "type": "string",
            "format": "date-time"
          },
          "unitId": {
            "type": "integer",
            "format": "int64"
          },
          "unitName": {
            "type": "string",
            "nullable": true
          },
          "employeeId": {
            "type": "integer",
            "format": "int64"
          },
          "employeeName": {
            "type": "string",
            "nullable": true
          },
          "operatorId": {
            "type": "integer",
            "format": "int64"
          },
          "operatorFullname": {
            "type": "string",
            "nullable": true
          },
          "result": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "conclusion": {
            "type": "string",
            "nullable": true
          },
          "conversationId": {
            "type": "integer",
            "format": "int64"
          },
          "audioRecordId": {
            "type": "integer",
            "format": "int64"
          },
          "interactionDate": {
            "type": "string",
            "format": "date-time"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChecklistData"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ConversationDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "guid": {
            "type": "string",
            "nullable": true
          },
          "creationDate": {
            "type": "string",
            "format": "date-time"
          },
          "receiveDate": {
            "type": "string",
            "format": "date-time"
          },
          "endDate": {
            "type": "string",
            "format": "date-time"
          },
          "durationSec": {
            "type": "integer",
            "format": "int32"
          },
          "employeeId": {
            "type": "integer",
            "format": "int64"
          },
          "employeeExternalId": {
            "type": "string",
            "nullable": true
          },
          "employeeNumber": {
            "type": "integer",
            "format": "int32"
          },
          "employeeName": {
            "type": "string",
            "nullable": true
          },
          "employeePosition": {
            "type": "string",
            "nullable": true
          },
          "deviceId": {
            "type": "integer",
            "format": "int64"
          },
          "deviceDescription": {
            "type": "string",
            "nullable": true
          },
          "unitId": {
            "type": "integer",
            "format": "int64"
          },
          "unitName": {
            "type": "string",
            "nullable": true
          },
          "unitCode": {
            "type": "string",
            "nullable": true
          },
          "categoryId": {
            "type": "integer",
            "format": "int64",
            "deprecated": true
          },
          "categoryName": {
            "type": "string",
            "nullable": true,
            "deprecated": true
          },
          "categories": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "callDirection": {
            "type": "string",
            "nullable": true
          },
          "contactInfo": {
            "type": "string",
            "nullable": true
          },
          "externalData": {
            "type": "string",
            "nullable": true
          },
          "isValid": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "ConversationDtoIEnumerator": {
        "type": "object",
        "properties": {
          "current": {
            "$ref": "#/components/schemas/ConversationDto"
          }
        },
        "additionalProperties": false
      },
      "ConversationEditRequest": {
        "type": "object",
        "properties": {
          "externalData": {
            "type": "string",
            "nullable": true
          },
          "creationDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "endDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "categories": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "isValid": {
            "type": "boolean",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ConversationMarkupRequest": {
        "required": [
          "creationDate",
          "employeeNumber",
          "endDate"
        ],
        "type": "object",
        "properties": {
          "creationDate": {
            "type": "string",
            "format": "date-time"
          },
          "endDate": {
            "type": "string",
            "format": "date-time"
          },
          "employeeNumber": {
            "type": "integer",
            "format": "int32"
          },
          "categories": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "contact": {
            "type": "string",
            "nullable": true
          },
          "externalData": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "DeviceActivityDto": {
        "type": "object",
        "properties": {
          "startDate": {
            "type": "string",
            "format": "date-time"
          },
          "startDateUtc": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "state": {
            "type": "string",
            "nullable": true
          },
          "deviceId": {
            "type": "integer",
            "format": "int64"
          },
          "deviceDescription": {
            "type": "string",
            "nullable": true
          },
          "employeeId": {
            "type": "integer",
            "format": "int64"
          },
          "employeeNumber": {
            "type": "integer",
            "format": "int32"
          },
          "employeeName": {
            "type": "integer",
            "format": "int32"
          },
          "unitId": {
            "type": "integer",
            "format": "int64"
          },
          "unitName": {
            "type": "string",
            "nullable": true
          },
          "unitCode": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "DeviceActivityDtoIEnumerator": {
        "type": "object",
        "properties": {
          "current": {
            "$ref": "#/components/schemas/DeviceActivityDto"
          }
        },
        "additionalProperties": false
      },
      "DeviceDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "unitId": {
            "type": "integer",
            "format": "int64"
          },
          "employeeId": {
            "type": "integer",
            "format": "int64"
          },
          "macAddress": {
            "type": "string",
            "nullable": true
          },
          "softwareVersion": {
            "type": "string",
            "nullable": true
          },
          "unsentFilesCount": {
            "type": "integer",
            "format": "int32"
          },
          "lastActivity": {
            "type": "string",
            "format": "date-time"
          },
          "isArchived": {
            "type": "boolean"
          },
          "isBlocked": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "DeviceDtoIEnumerator": {
        "type": "object",
        "properties": {
          "current": {
            "$ref": "#/components/schemas/DeviceDto"
          }
        },
        "additionalProperties": false
      },
      "EmployeeDto": {
        "required": [
          "firstname",
          "lastname",
          "position",
          "unitId"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "number": {
            "type": "integer",
            "format": "int32"
          },
          "externalId": {
            "type": "string",
            "nullable": true
          },
          "lastname": {
            "minLength": 1,
            "type": "string"
          },
          "firstname": {
            "minLength": 1,
            "type": "string"
          },
          "fathername": {
            "type": "string",
            "nullable": true
          },
          "position": {
            "minLength": 1,
            "type": "string"
          },
          "unitId": {
            "maximum": 9223372036854776000,
            "minimum": 1,
            "type": "integer",
            "format": "int64"
          },
          "unitName": {
            "type": "string",
            "nullable": true
          },
          "isArchived": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "KeyphraseDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "pattern": {
            "type": "string",
            "nullable": true
          },
          "examples": {
            "type": "string",
            "nullable": true
          },
          "groups": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "LiveRecordingDeviceDto": {
        "type": "object",
        "properties": {
          "deviceId": {
            "type": "integer",
            "format": "int64"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "installedFirmwareVersion": {
            "type": "string",
            "nullable": true
          },
          "supportsLiveRecording": {
            "type": "boolean"
          },
          "isOnline": {
            "type": "boolean"
          },
          "lastActivity": {
            "type": "string",
            "description": "Последняя сохранённая активность устройства в серверном времени; null, если данных ещё нет.",
            "format": "date-time",
            "nullable": true
          },
          "recordingState": {
            "type": "string",
            "nullable": true
          },
          "isRecording": {
            "type": "boolean"
          },
          "canStart": {
            "type": "boolean"
          },
          "unavailableReason": {
            "type": "string",
            "nullable": true
          },
          "commandId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "conversationId": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "conversationIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "nullable": true
          },
          "conversationUrl": {
            "type": "string",
            "description": "Готовая ссылка на последнее обслуживание текущей записи в личном кабинете; null, если обслуживание ещё не создано.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Готовность устройства к онлайн-записи и состояние текущей live-сессии."
      },
      "LiveRecordingStatusDto": {
        "type": "object",
        "properties": {
          "commandId": {
            "type": "string",
            "format": "uuid"
          },
          "deviceId": {
            "type": "integer",
            "format": "int64"
          },
          "recordingState": {
            "type": "string",
            "nullable": true
          },
          "errorReason": {
            "type": "string",
            "nullable": true
          },
          "conversationIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "nullable": true
          },
          "conversationUrl": {
            "type": "string",
            "description": "Готовая ссылка на последнее обслуживание записи в личном кабинете; null, если обслуживание ещё не создано.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Состояние логической записи и её обслуживания, доступные после завершения записи."
      },
      "LoginRequest": {
        "required": [
          "password",
          "userName"
        ],
        "type": "object",
        "properties": {
          "userName": {
            "minLength": 1,
            "type": "string"
          },
          "password": {
            "minLength": 1,
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "MetricDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "type": "string",
            "nullable": true
          },
          "suffix": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "goalValue": {
            "type": "number",
            "format": "double"
          },
          "goalDirection": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "MetricGroupDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "name": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "detail": {
            "type": "string",
            "nullable": true
          },
          "instance": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": { }
      },
      "RawAudioRecordDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "creationDate": {
            "type": "string",
            "format": "date-time"
          },
          "receiveDate": {
            "type": "string",
            "format": "date-time"
          },
          "endDate": {
            "type": "string",
            "format": "date-time"
          },
          "durationSec": {
            "type": "integer",
            "format": "int32"
          },
          "employeeId": {
            "type": "integer",
            "format": "int64"
          },
          "employeeNumber": {
            "type": "integer",
            "format": "int32"
          },
          "employeeName": {
            "type": "string",
            "nullable": true
          },
          "employeePosition": {
            "type": "string",
            "nullable": true
          },
          "deviceId": {
            "type": "integer",
            "format": "int64"
          },
          "deviceDescription": {
            "type": "string",
            "nullable": true
          },
          "unitId": {
            "type": "integer",
            "format": "int64"
          },
          "unitName": {
            "type": "string",
            "nullable": true
          },
          "unitCode": {
            "type": "string",
            "nullable": true
          },
          "isExpired": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "TranscriptionDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "text": {
            "type": "string",
            "nullable": true
          },
          "summary": {
            "type": "string",
            "nullable": true
          },
          "words": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TranscriptionWordDto"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "TranscriptionShortDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "text": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "TranscriptionWordDto": {
        "type": "object",
        "properties": {
          "offset": {
            "type": "number",
            "format": "double"
          },
          "end": {
            "type": "number",
            "format": "double"
          },
          "text": {
            "type": "string",
            "nullable": true
          },
          "speaker": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "UnitDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "code": {
            "type": "string",
            "nullable": true
          },
          "parentId": {
            "type": "integer",
            "format": "int64"
          },
          "timeZoneId": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "UserActionDto": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "format": "date-time"
          },
          "userId": {
            "type": "integer",
            "format": "int64"
          },
          "userFullName": {
            "type": "string",
            "nullable": true
          },
          "userEmail": {
            "type": "string",
            "nullable": true
          },
          "blockName": {
            "type": "string",
            "nullable": true
          },
          "sectionName": {
            "type": "string",
            "nullable": true
          },
          "actionName": {
            "type": "string",
            "nullable": true
          },
          "actionType": {
            "type": "string",
            "nullable": true
          },
          "objectType": {
            "type": "string",
            "nullable": true
          },
          "objectId": {
            "type": "integer",
            "format": "int64"
          },
          "sectionCode": {
            "type": "string",
            "description": "Стабильный код раздела (enum-name Section) для round-trip в параметр section",
            "nullable": true
          },
          "actionTypeCode": {
            "type": "string",
            "description": "Стабильный код типа действия (enum-name UserActionType) для round-trip в параметр action",
            "nullable": true
          },
          "objectTypeCode": {
            "type": "string",
            "description": "Стабильный код типа объекта (enum-name ObjectType) для round-trip в параметр object",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "UserDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "firstname": {
            "type": "string",
            "nullable": true
          },
          "lastname": {
            "type": "string",
            "nullable": true
          },
          "role": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "companyName": {
            "type": "string",
            "description": "Название компании пользователя для отображения в клиентских приложениях.",
            "nullable": true
          },
          "units": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "nullable": true
          },
          "lastActivity": {
            "type": "string",
            "format": "date-time"
          },
          "isBlocked": {
            "type": "boolean"
          },
          "isTelegramBinded": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "Bearer": {
        "type": "apiKey",
        "description": "JWT Authorization header using the Bearer scheme. <br/>\n                      Enter 'Bearer' [space] and then your token in the text input below.\n                      <br/><br/> Example: 'Bearer 12345abcdef'",
        "name": "Authorization",
        "in": "header"
      },
      "ApiKey": {
        "type": "apiKey",
        "description": "Введите ваш API Key в заголовке",
        "name": "X-API-KEY",
        "in": "header"
      }
    }
  },
  "security": [
    {
      "Bearer": [ ],
      "ApiKey": [ ]
    }
  ]
}