{"openapi":"3.1.1","info":{"title":"Служба заказчика · Backend API","version":"1.0.0","description":"REST API учреждений, службы заказчика, городского кабинета и системной админки.\n\n**Вход:** откройте Swagger на домене нужного кабинета после входа или выполните POST /auth/login здесь. Для интеграций используйте Authorize → BearerAuth с персональным токеном nv_…. Системный и городской кабинеты используют отдельные сессии.\n\n**Запросы:** JSON, включая файлы в base64; multipart/form-data не используется. Для изменений через браузер нужны X-Requested-With: nevsky-app и X-CSRF-Token из текущей сессии. Swagger подставляет их автоматически.\n\n**Доступ:** права, назначения учреждений и включённые модули проверяются сервером. При конфликте revision обновите карточку. Для другого района откройте /api/digitization/districts/{districtId}/docs/.\n\nМодели ответов генерируются из общих TypeScript-типов, сметные запросы — из Zod. JsonObject означает расширяемый объект действия, а не строгую валидационную схему."},"servers":[{"url":".","description":"API на том же домене; путь вычисляется относительно адреса схемы"}],"tags":[{"name":"Сервис"},{"name":"Авторизация"},{"name":"Системная админка"},{"name":"Городской кабинет"},{"name":"Пользователи"},{"name":"Учреждения"},{"name":"Доступ к учреждениям"},{"name":"Кабинет учреждения"},{"name":"Заявки"},{"name":"Контракты"},{"name":"Подрядчики"},{"name":"Технадзор"},{"name":"Гостевой доступ подрядчика"},{"name":"Работы и оцифровка"},{"name":"Документы ремонта"},{"name":"Нормативные сметы"},{"name":"Выезды и приём"},{"name":"Уведомления"},{"name":"Консультации"},{"name":"Геопозиция сотрудников"},{"name":"Чертежи"},{"name":"Канбан"},{"name":"CMS"},{"name":"Аналитика и отчёты"},{"name":"AI и чат"}],"security":[{"BearerAuth":[]},{"SessionAuth":[]}],"paths":{"/health":{"get":{"tags":["Сервис"],"summary":"Состояние API","operationId":"get_health","description":"","security":[],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"type":"object","properties":{"service":{"type":"string"},"status":{"const":"ok"}},"required":["service","status"],"additionalProperties":true}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}}},"/district":{"get":{"tags":["Сервис"],"summary":"Текущий район","operationId":"get_district","description":"","security":[],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/District"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}}},"/bootstrap":{"get":{"tags":["Сервис"],"summary":"Реестр и рабочие данные доступных учреждений","operationId":"get_bootstrap","description":"","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Bootstrap"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}}},"/auth/login":{"post":{"tags":["Авторизация"],"summary":"Вход по email и паролю","operationId":"post_auth_login","description":"Сервер устанавливает HttpOnly-cookie. В Swagger на этом же домене она отправляется автоматически. Данные входа не сохраняются в localStorage.\n\nJSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[],"parameters":[{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthSession"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Login"}}}}}},"/auth/session":{"get":{"tags":["Авторизация"],"summary":"Текущая сессия и CSRF-токен","operationId":"get_auth_session","description":"","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthSession"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}}},"/auth/logout":{"post":{"tags":["Авторизация"],"summary":"Выход и отзыв сессии","operationId":"post_auth_logout","description":"JSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}}}},"/auth/password":{"post":{"tags":["Авторизация"],"summary":"Смена пароля","operationId":"post_auth_password","description":"JSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthSession"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordChange"}}}}}},"/system/auth/login":{"post":{"tags":["Системная админка"],"summary":"Вход по email и паролю","operationId":"post_system_auth_login","description":"Сервер устанавливает HttpOnly-cookie. В Swagger на этом же домене она отправляется автоматически. Данные входа не сохраняются в localStorage.\n\nИспользуется отдельная сессия этого кабинета. Районные Bearer-токены здесь не принимаются.\n\nJSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[],"parameters":[{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthSession"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Login"}}}},"x-auth-scope":"system"}},"/system/auth/session":{"get":{"tags":["Системная админка"],"summary":"Текущая сессия и CSRF-токен","operationId":"get_system_auth_session","description":"Используется отдельная сессия этого кабинета. Районные Bearer-токены здесь не принимаются.","security":[{"SystemSession":[]}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthSession"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"x-auth-scope":"system"}},"/system/auth/logout":{"post":{"tags":["Системная админка"],"summary":"Выход и отзыв сессии","operationId":"post_system_auth_logout","description":"Используется отдельная сессия этого кабинета. Районные Bearer-токены здесь не принимаются.\n\nJSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"SystemSession":[]}],"parameters":[{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"x-auth-scope":"system"}},"/system/auth/password":{"post":{"tags":["Системная админка"],"summary":"Смена пароля","operationId":"post_system_auth_password","description":"Используется отдельная сессия этого кабинета. Районные Bearer-токены здесь не принимаются.\n\nJSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"SystemSession":[]}],"parameters":[{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthSession"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordChange"}}}},"x-auth-scope":"system"}},"/city/auth/login":{"post":{"tags":["Городской кабинет"],"summary":"Вход по email и паролю","operationId":"post_city_auth_login","description":"Сервер устанавливает HttpOnly-cookie. В Swagger на этом же домене она отправляется автоматически. Данные входа не сохраняются в localStorage.\n\nИспользуется отдельная сессия этого кабинета. Районные Bearer-токены здесь не принимаются.\n\nJSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[],"parameters":[{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthSession"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Login"}}}},"x-auth-scope":"city"}},"/city/auth/session":{"get":{"tags":["Городской кабинет"],"summary":"Текущая сессия и CSRF-токен","operationId":"get_city_auth_session","description":"Используется отдельная сессия этого кабинета. Районные Bearer-токены здесь не принимаются.","security":[{"CitySession":[]}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthSession"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"x-auth-scope":"city"}},"/city/auth/logout":{"post":{"tags":["Городской кабинет"],"summary":"Выход и отзыв сессии","operationId":"post_city_auth_logout","description":"Используется отдельная сессия этого кабинета. Районные Bearer-токены здесь не принимаются.\n\nJSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"CitySession":[]}],"parameters":[{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"x-auth-scope":"city"}},"/city/auth/password":{"post":{"tags":["Городской кабинет"],"summary":"Смена пароля","operationId":"post_city_auth_password","description":"Используется отдельная сессия этого кабинета. Районные Bearer-токены здесь не принимаются.\n\nJSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"CitySession":[]}],"parameters":[{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthSession"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordChange"}}}},"x-auth-scope":"city"}},"/system/auth/second-factor":{"post":{"tags":["Системная админка"],"summary":"Подтверждение второго фактора","operationId":"post_system_auth_second_factor","description":"Используется отдельная сессия этого кабинета. Районные Bearer-токены здесь не принимаются.\n\nJSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"SystemSession":[]}],"parameters":[{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthSession"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","pattern":"^[0-9]{6}$"}},"required":["code"],"additionalProperties":true}}}},"x-auth-scope":"system"}},"/auth/invitations/preview":{"post":{"tags":["Авторизация"],"summary":"Проверить приглашение","operationId":"post_auth_invitations_preview","description":"Одноразовая ссылка действует 24 часа. Значения токенов в документацию не включены.\n\nJSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[],"parameters":[{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"}},"required":["token"],"additionalProperties":true}}}}}},"/auth/invitations/accept":{"post":{"tags":["Авторизация"],"summary":"Задать пароль и принять приглашение","operationId":"post_auth_invitations_accept","description":"Одноразовая ссылка действует 24 часа. Значения токенов в документацию не включены.\n\nJSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[],"parameters":[{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"},"password":{"type":"string","format":"password","writeOnly":true}},"required":["token","password"],"additionalProperties":true}}}}}},"/auth/profile":{"get":{"tags":["Авторизация"],"summary":"Свой профиль и состояние смены email","operationId":"get_auth_profile","description":"","security":[{"SessionAuth":[]}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}},"put":{"tags":["Авторизация"],"summary":"Изменить имя профиля","operationId":"put_auth_profile","description":"JSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"SessionAuth":[]}],"parameters":[{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"previousName":{"type":"string"}},"required":["name","previousName"],"additionalProperties":true}}}}}},"/auth/profile/avatar":{"put":{"tags":["Авторизация"],"summary":"Загрузить фотографию профиля","operationId":"put_auth_profile_avatar","description":"JSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"SessionAuth":[]}],"parameters":[{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"string","description":"Data URL изображения"},"previousAvatarId":{"type":"string"}},"required":["data"],"additionalProperties":true}}}}},"delete":{"tags":["Авторизация"],"summary":"Удалить фотографию профиля","operationId":"delete_auth_profile_avatar","description":"JSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"SessionAuth":[]}],"parameters":[{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"previousAvatarId":{"type":"string"}},"additionalProperties":true}}}}}},"/auth/avatars/{userId}/{avatarId}":{"get":{"tags":["Авторизация"],"summary":"Фотография профиля","operationId":"get_auth_avatars_userId_avatarId","description":"","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string"}},{"name":"avatarId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Файл; имя передаётся в Content-Disposition","content":{"image/jpeg":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}}},"/auth/email-change":{"post":{"tags":["Авторизация"],"summary":"Запросить смену email","operationId":"post_auth_email_change","description":"JSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"SessionAuth":[]}],"parameters":[{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"201":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email"},"currentPassword":{"type":"string","format":"password","writeOnly":true},"code":{"type":"string"},"id":{"type":"string"}},"additionalProperties":true}}}}}},"/auth/email-change/resend":{"post":{"tags":["Авторизация"],"summary":"Повторить письмо","operationId":"post_auth_email_change_resend","description":"JSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"SessionAuth":[]}],"parameters":[{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"201":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email"},"currentPassword":{"type":"string","format":"password","writeOnly":true},"code":{"type":"string"},"id":{"type":"string"}},"additionalProperties":true}}}}}},"/auth/email-change/confirm":{"post":{"tags":["Авторизация"],"summary":"Подтвердить смену email","operationId":"post_auth_email_change_confirm","description":"JSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"SessionAuth":[]}],"parameters":[{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email"},"currentPassword":{"type":"string","format":"password","writeOnly":true},"code":{"type":"string"},"id":{"type":"string"}},"additionalProperties":true}}}}}},"/auth/email-change/cancel":{"post":{"tags":["Авторизация"],"summary":"Отменить смену email","operationId":"post_auth_email_change_cancel","description":"JSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"SessionAuth":[]}],"parameters":[{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email"},"currentPassword":{"type":"string","format":"password","writeOnly":true},"code":{"type":"string"},"id":{"type":"string"}},"additionalProperties":true}}}}}},"/auth/tokens":{"get":{"tags":["Авторизация"],"summary":"Свои API-токены без секретных значений","operationId":"get_auth_tokens","description":"","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}},"post":{"tags":["Авторизация"],"summary":"Выпустить персональный Bearer-токен","operationId":"post_auth_tokens","description":"Секрет возвращается только при создании. Вставьте его в Authorize → BearerAuth. Срок — 30 дней; права совпадают с правами пользователя.\n\nJSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"SessionAuth":[]}],"parameters":[{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"201":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"],"additionalProperties":true}}}}}},"/auth/tokens/{tokenId}":{"delete":{"tags":["Авторизация"],"summary":"Отозвать API-токен","operationId":"delete_auth_tokens_tokenId","description":"JSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"tokenId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}}},"/admin/users":{"get":{"tags":["Пользователи"],"summary":"Пользователи района","operationId":"get_admin_users","description":"Права: users.manage. Доступ дополнительно ограничен назначениями учреждений и включёнными модулями.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ManagedUser"}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}},"post":{"tags":["Пользователи"],"summary":"Создать пользователя района","operationId":"post_admin_users","description":"Права: users.manage. Доступ дополнительно ограничен назначениями учреждений и включёнными модулями.\n\nJSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"201":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCreate"}}}}}},"/admin/users/{userId}":{"put":{"tags":["Пользователи"],"summary":"Изменить пользователя","operationId":"put_admin_users_userId","description":"Права: users.manage. Доступ дополнительно ограничен назначениями учреждений и включёнными модулями.\n\nJSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserUpdate"}}}}},"delete":{"tags":["Пользователи"],"summary":"Удалить пользователя","operationId":"delete_admin_users_userId","description":"Права: users.manage. Доступ дополнительно ограничен назначениями учреждений и включёнными модулями.\n\nJSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"revision":{"type":"integer","minimum":1}},"required":["revision"],"additionalProperties":true}}}}}},"/admin/users/{userId}/password":{"post":{"tags":["Пользователи"],"summary":"Сбросить пароль пользователя","operationId":"post_admin_users_userId_password","description":"Права: users.manage. Доступ дополнительно ограничен назначениями учреждений и включёнными модулями.\n\nJSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"password":{"type":"string","format":"password","writeOnly":true}},"required":["password"],"additionalProperties":true}}}}}},"/staff":{"get":{"tags":["Пользователи"],"summary":"Доступные сотрудники","operationId":"get_staff","description":"Права: users.read. Доступ дополнительно ограничен назначениями учреждений и включёнными модулями.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/User"}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}}},"/profile":{"get":{"tags":["Пользователи"],"summary":"Профиль и статистика сотрудника","operationId":"get_profile","description":"","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","enum":["30","90","all"]}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StaffProfile"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}}},"/staff/{userId}":{"get":{"tags":["Пользователи"],"summary":"Профиль и статистика сотрудника","operationId":"get_staff_userId","description":"","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string"}},{"name":"period","in":"query","required":false,"schema":{"type":"string","enum":["30","90","all"]}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StaffProfile"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}}},"/institutions":{"post":{"tags":["Учреждения"],"summary":"Создать учреждение","operationId":"post_institutions","description":"Права: institutions.create. Доступ дополнительно ограничен назначениями учреждений и включёнными модулями.\n\nJSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"201":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"address":{"type":"string"},"category":{"$ref":"#/components/schemas/Category"},"lat":{"type":"number"},"lon":{"type":"number"}},"required":["name","address","category","lat","lon"],"additionalProperties":true}}}}}},"/institutions/{buildingId}/profile":{"get":{"tags":["Учреждения"],"summary":"Полные сведения об учреждении","operationId":"get_institutions_buildingId_profile","description":"","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"buildingId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortalInstitution"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}},"patch":{"tags":["Учреждения"],"summary":"Изменить сведения об учреждении","operationId":"patch_institutions_buildingId_profile","description":"JSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"buildingId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"revision":{"type":"string","description":"Текущая revision из ответа профиля учреждения"},"requisites":{"$ref":"#/components/schemas/InstitutionRequisites"},"contacts":{"$ref":"#/components/schemas/BuildingContacts"}},"required":["revision"],"additionalProperties":true}}}}}},"/institutions/{buildingId}/shape":{"put":{"tags":["Учреждения"],"summary":"Указать форму здания","operationId":"put_institutions_buildingId_shape","description":"JSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"buildingId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"shape":{"$ref":"#/components/schemas/BuildingShape"}},"required":["shape"],"additionalProperties":true}}}}}},"/institutions/{buildingId}/requisites":{"put":{"tags":["Учреждения"],"summary":"Сохранить реквизиты учреждения","operationId":"put_institutions_buildingId_requisites","description":"JSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"buildingId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstitutionRequisites"}}}}}},"/contacts/{buildingId}":{"put":{"tags":["Учреждения"],"summary":"Сохранить контакты учреждения","operationId":"put_contacts_buildingId","description":"JSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"buildingId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuildingContacts"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuildingContacts"}}}}}},"/institutions/outlines":{"get":{"tags":["Учреждения"],"summary":"Контуры от 1 до 8 зданий","operationId":"get_institutions_outlines","description":"","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"ids","in":"query","required":true,"schema":{"type":"string","description":"Уникальные идентификаторы через запятую, максимум 8"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}}},"/institutions/{buildingId}/access":{"get":{"tags":["Учреждения"],"summary":"Настройки доступа учреждения для службы заказчика","operationId":"get_institutions_buildingId_access","description":"Права: institution.access.read. Доступ дополнительно ограничен назначениями учреждений и включёнными модулями.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"buildingId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}}},"/institutions/{buildingId}/users":{"get":{"tags":["Доступ к учреждениям"],"summary":"Пользователи и действующие приглашения","operationId":"get_institutions_buildingId_users","description":"","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"buildingId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}}},"/institutions/{buildingId}/users/{userId}":{"put":{"tags":["Доступ к учреждениям"],"summary":"Изменить роль сотрудника учреждения","operationId":"put_institutions_buildingId_users_userId","description":"JSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"buildingId","in":"path","required":true,"schema":{"type":"string"}},{"name":"userId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"revision":{"type":"string","description":"Текущая revision сотрудника из GET /institutions/{buildingId}/users"},"name":{"type":"string"},"email":{"type":"string","format":"email"},"role":{"$ref":"#/components/schemas/ObjectRole"},"active":{"type":"boolean"}},"required":["revision","name","email","role","active"],"additionalProperties":true}}}}},"delete":{"tags":["Доступ к учреждениям"],"summary":"Убрать доступ сотрудника учреждения","operationId":"delete_institutions_buildingId_users_userId","description":"JSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"buildingId","in":"path","required":true,"schema":{"type":"string"}},{"name":"userId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Revision"}}}}}},"/institutions/{buildingId}/users/invitations":{"post":{"tags":["Доступ к учреждениям"],"summary":"Отправить приглашение сотруднику","operationId":"post_institutions_buildingId_users_invitations","description":"JSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"buildingId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"201":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string","format":"email"},"role":{"$ref":"#/components/schemas/ObjectRole"}},"required":["name","email","role"],"additionalProperties":true}}}}}},"/institutions/{buildingId}/users/invitations/{invitationId}/resend":{"post":{"tags":["Доступ к учреждениям"],"summary":"Повторить приглашение","operationId":"post_institutions_buildingId_users_invitations_invitationId_resend","description":"JSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"buildingId","in":"path","required":true,"schema":{"type":"string"}},{"name":"invitationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"201":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}}}},"/institutions/{buildingId}/users/invitations/{invitationId}/revoke":{"post":{"tags":["Доступ к учреждениям"],"summary":"Отозвать приглашение","operationId":"post_institutions_buildingId_users_invitations_invitationId_revoke","description":"JSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"buildingId","in":"path","required":true,"schema":{"type":"string"}},{"name":"invitationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}}}},"/institution-portal":{"get":{"tags":["Кабинет учреждения"],"summary":"Учреждения текущего сотрудника","operationId":"get_institution_portal","description":"Требуется роль object_staff и назначение на учреждение.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstitutionPortal"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}}},"/institution-portal/institutions/{buildingId}":{"put":{"tags":["Кабинет учреждения"],"summary":"Сохранить сведения своего учреждения","operationId":"put_institution_portal_institutions_buildingId","description":"JSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"buildingId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortalInstitution"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"revision":{"type":"string"},"name":{"type":"string"},"address":{"type":"string"},"requisites":{"$ref":"#/components/schemas/InstitutionRequisites"},"director":{"$ref":"#/components/schemas/ContactPerson"},"people":{"type":"array","items":{"$ref":"#/components/schemas/ContactPerson"}}},"required":["revision","name","address","requisites","director","people"],"additionalProperties":true}}}}}},"/institution-portal/institutions/{buildingId}/access":{"get":{"tags":["Кабинет учреждения"],"summary":"Параметры доступа и Wi-Fi","operationId":"get_institution_portal_institutions_buildingId_access","description":"","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"buildingId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}},"put":{"tags":["Кабинет учреждения"],"summary":"Сохранить параметры доступа и Wi-Fi","operationId":"put_institution_portal_institutions_buildingId_access","description":"JSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"buildingId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}}}},"/institution-portal/institutions/{buildingId}/contracts":{"get":{"tags":["Кабинет учреждения"],"summary":"Контракты и контрольные даты своего учреждения","operationId":"get_institution_portal_institutions_buildingId_contracts","description":"","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"buildingId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}}},"/institution-portal/institutions/{buildingId}/contracts/{contractId}/attachments/{fileId}":{"get":{"tags":["Кабинет учреждения"],"summary":"Скачать вложение ЕИС","operationId":"get_institution_portal_institutions_buildingId_contracts_contractId_attachments_fileId","description":"","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"buildingId","in":"path","required":true,"schema":{"type":"string"}},{"name":"contractId","in":"path","required":true,"schema":{"type":"string"}},{"name":"fileId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Файл; имя передаётся в Content-Disposition","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}}},"/requests":{"get":{"tags":["Заявки"],"summary":"Список доступных заявок","operationId":"get_requests","description":"","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"buildingId","in":"query","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"kind","in":"query","required":false,"schema":{"type":"string"}},{"name":"q","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InstitutionRequest"}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}},"post":{"tags":["Заявки"],"summary":"Создать черновик заявки","operationId":"post_requests","description":"Права: requests.submit. Доступ дополнительно ограничен назначениями учреждений и включёнными модулями.\n\nJSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"201":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstitutionRequest"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestCreate"}}}}}},"/requests/locations":{"get":{"tags":["Заявки"],"summary":"Планы и помещения для заявки","operationId":"get_requests_locations","description":"","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"buildingId","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}}},"/requests/contracts":{"get":{"tags":["Заявки"],"summary":"Контракты для заявки","operationId":"get_requests_contracts","description":"","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"buildingId","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}}},"/requests/contact-users":{"get":{"tags":["Заявки"],"summary":"Контактные лица учреждения","operationId":"get_requests_contact_users","description":"","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"buildingId","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}}},"/requests/{requestId}":{"get":{"tags":["Заявки"],"summary":"Заявка с вложениями","operationId":"get_requests_requestId","description":"","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"requestId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestDetail"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}},"put":{"tags":["Заявки"],"summary":"Обновить черновик или уточнение","operationId":"put_requests_requestId","description":"JSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"requestId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstitutionRequest"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestUpdate"}}}}}},"/requests/{requestId}/actions":{"post":{"tags":["Заявки"],"summary":"Перевести заявку в следующий статус","operationId":"post_requests_requestId_actions","description":"JSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"requestId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstitutionRequest"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"revision":{"type":"integer","minimum":1},"status":{"$ref":"#/components/schemas/RequestStatus"},"comment":{"type":"string"},"attachment":{"type":"object","properties":{"fileName":{"type":"string"},"mediaType":{"type":"string"},"data":{"type":"string","description":"Содержимое файла в base64"},"revision":{"type":"integer","minimum":1},"stage":{"$ref":"#/components/schemas/AttachmentStage"},"checkpointId":{"type":"string"},"note":{"type":"string"},"uploadId":{"type":"string","format":"uuid"}},"additionalProperties":true}},"required":["revision","status"],"additionalProperties":true}}}}}},"/requests/{requestId}/print":{"get":{"tags":["Заявки"],"summary":"Печатная форма заявки","operationId":"get_requests_requestId_print","description":"","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"requestId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Файл; имя передаётся в Content-Disposition","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}}},"/requests/{requestId}/amendments":{"post":{"tags":["Заявки"],"summary":"Предложить изменения отправленной заявки","operationId":"post_requests_requestId_amendments","description":"JSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"requestId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RequestUpdate"},{"type":"object","properties":{"comment":{"type":"string"},"attachment":{"type":"object","properties":{"fileName":{"type":"string"},"mediaType":{"type":"string"},"data":{"type":"string","description":"Содержимое файла в base64"},"revision":{"type":"integer","minimum":1},"stage":{"$ref":"#/components/schemas/AttachmentStage"},"checkpointId":{"type":"string"},"note":{"type":"string"},"uploadId":{"type":"string","format":"uuid"}},"additionalProperties":true}},"additionalProperties":true}]}}}}}},"/requests/{requestId}/amendments/{amendmentId}/decision":{"post":{"tags":["Заявки"],"summary":"Решение по предложенным изменениям","operationId":"post_requests_requestId_amendments_amendmentId_decision","description":"JSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"requestId","in":"path","required":true,"schema":{"type":"string"}},{"name":"amendmentId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"revision":{"type":"integer","minimum":1},"decision":{"type":"string","enum":["approve","reject"]},"comment":{"type":"string"}},"required":["revision","decision"],"additionalProperties":true}}}}}},"/requests/{requestId}/attachments":{"post":{"tags":["Заявки"],"summary":"Прикрепить файл","operationId":"post_requests_requestId_attachments","description":"JSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"requestId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestDetail"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fileName":{"type":"string"},"mediaType":{"type":"string"},"data":{"type":"string","description":"Содержимое файла в base64"},"revision":{"type":"integer","minimum":1},"stage":{"$ref":"#/components/schemas/AttachmentStage"},"checkpointId":{"type":"string"},"note":{"type":"string"},"uploadId":{"type":"string","format":"uuid"}},"additionalProperties":true}}}}}},"/requests/{requestId}/attachments/{fileId}/content":{"get":{"tags":["Заявки"],"summary":"Скачать файл заявки","operationId":"get_requests_requestId_attachments_fileId_content","description":"","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"requestId","in":"path","required":true,"schema":{"type":"string"}},{"name":"fileId","in":"path","required":true,"schema":{"type":"string"}},{"name":"preview","in":"query","required":false,"schema":{"type":"string","enum":["1"]}}],"responses":{"200":{"description":"Файл; имя передаётся в Content-Disposition","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}},"image/jpeg":{"schema":{"type":"string","format":"binary"}},"image/png":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}}},"/requests/{requestId}/attachments/{fileId}":{"delete":{"tags":["Заявки"],"summary":"Удалить вложение","operationId":"delete_requests_requestId_attachments_fileId","description":"JSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"requestId","in":"path","required":true,"schema":{"type":"string"}},{"name":"fileId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestDetail"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"revision":{"type":"integer","minimum":1}},"required":["revision"],"additionalProperties":true}}}}}},"/requests/{requestId}/attachments/{fileId}/restore":{"post":{"tags":["Заявки"],"summary":"Восстановить вложение","operationId":"post_requests_requestId_attachments_fileId_restore","description":"JSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"requestId","in":"path","required":true,"schema":{"type":"string"}},{"name":"fileId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestDetail"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"revision":{"type":"integer","minimum":1}},"required":["revision"],"additionalProperties":true}}}}}},"/contracts":{"get":{"tags":["Контракты"],"summary":"Список контрактов с фильтрами","operationId":"get_contracts","description":"","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"buildingId","in":"query","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"type","in":"query","required":false,"schema":{"type":"string"}},{"name":"from","in":"query","required":false,"schema":{"type":"string"}},{"name":"to","in":"query","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Contract"}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}},"post":{"tags":["Контракты"],"summary":"Создать контракт","operationId":"post_contracts","description":"Права: contracts.write. Доступ дополнительно ограничен назначениями учреждений и включёнными модулями.\n\nJSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"201":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contract"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractWrite"}}}}}},"/contractors":{"get":{"tags":["Подрядчики"],"summary":"Реестр подрядчиков, пользователей и приглашений","operationId":"get_contractors","description":"","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractorCatalog"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}},"post":{"tags":["Подрядчики"],"summary":"Создать организацию подрядчика","operationId":"post_contractors","description":"Права: contracts.write. Доступ дополнительно ограничен назначениями учреждений и включёнными модулями.\n\nJSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"201":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractorCreation"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"inn":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"address":{"type":"string"},"contactName":{"type":"string"},"description":{"type":"string"},"profileRevision":{"type":"number"}},"required":["name"],"additionalProperties":true}}}}}},"/contractors/{contractorId}":{"put":{"tags":["Подрядчики"],"summary":"Изменить контакты подрядчика","operationId":"put_contractors_contractorId","description":"Права: contracts.write. Доступ дополнительно ограничен назначениями учреждений и включёнными модулями.\n\nJSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"contractorId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractorCreation"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"inn":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"address":{"type":"string"},"contactName":{"type":"string"},"description":{"type":"string"},"profileRevision":{"type":"number"}},"required":["name"],"additionalProperties":true}}}}}},"/contractors/{contractorId}/invite":{"post":{"tags":["Подрядчики"],"summary":"Пригласить пользователя подрядчика по email","operationId":"post_contractors_contractorId_invite","description":"Права: contracts.write. Доступ дополнительно ограничен назначениями учреждений и включёнными модулями.\n\nJSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"contractorId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}}}},"/contracts/{contractId}/contractor-sync":{"post":{"tags":["Подрядчики"],"summary":"Повторить привязку контракта к кабинету подрядчика","operationId":"post_contracts_contractId_contractor_sync","description":"Права: contracts.write. Доступ дополнительно ограничен назначениями учреждений и включёнными модулями.\n\nJSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"contractId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contract"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}}}},"/contracts/{contractId}":{"get":{"tags":["Контракты"],"summary":"Карточка контракта","operationId":"get_contracts_contractId","description":"","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"contractId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contract"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}},"put":{"tags":["Контракты"],"summary":"Изменить контракт и контрольные даты","operationId":"put_contracts_contractId","description":"Передайте текущую revision. При конфликте сервер вернёт 409.\n\nПрава: contracts.write. Доступ дополнительно ограничен назначениями учреждений и включёнными модулями.\n\nJSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"contractId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contract"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractWrite"}}}}}},"/contractors/{contractorId}/notes":{"get":{"tags":["Подрядчики"],"summary":"Служебные заметки о подрядчике","operationId":"get_contractors_contractorId_notes","description":"Доступны сотрудникам службы заказчика; сотрудникам учреждения и городскому наблюдателю недоступны.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"contractorId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ContractorNote"}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}},"post":{"tags":["Подрядчики"],"summary":"Добавить служебную заметку","operationId":"post_contractors_contractorId_notes","description":"Права: contracts.write. Доступ дополнительно ограничен назначениями учреждений и включёнными модулями.\n\nJSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"contractorId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"201":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractorNote"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string"}},"required":["text"],"additionalProperties":true}}}}}},"/contractors/{contractorId}/notes/{noteId}":{"put":{"tags":["Подрядчики"],"summary":"Изменить служебную заметку","operationId":"put_contractors_contractorId_notes_noteId","description":"Права: contracts.write. Доступ дополнительно ограничен назначениями учреждений и включёнными модулями.\n\nJSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"contractorId","in":"path","required":true,"schema":{"type":"string"}},{"name":"noteId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContractorNote"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string"},"revision":{"type":"integer","minimum":1}},"required":["text","revision"],"additionalProperties":true}}}}},"delete":{"tags":["Подрядчики"],"summary":"Удалить служебную заметку","operationId":"delete_contractors_contractorId_notes_noteId","description":"Права: contracts.write. Доступ дополнительно ограничен назначениями учреждений и включёнными модулями.\n\nJSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"contractorId","in":"path","required":true,"schema":{"type":"string"}},{"name":"noteId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"revision":{"type":"integer","minimum":1}},"required":["revision"],"additionalProperties":true}}}}}},"/contracts/eis/status":{"get":{"tags":["Контракты"],"summary":"Состояние синхронизации ЕИС","operationId":"get_contracts_eis_status","description":"","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EisSyncStatus"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}}},"/contracts/eis/sync":{"post":{"tags":["Контракты"],"summary":"Запустить синхронизацию ЕИС","operationId":"post_contracts_eis_sync","description":"Права: contracts.write. Доступ дополнительно ограничен назначениями учреждений и включёнными модулями.\n\nJSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"202":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EisSyncStatus"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}}},"/contracts/{contractId}/eis/attachments/{fileId}":{"get":{"tags":["Контракты"],"summary":"Скачать документ из ЕИС","operationId":"get_contracts_contractId_eis_attachments_fileId","description":"","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"contractId","in":"path","required":true,"schema":{"type":"string"}},{"name":"fileId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Файл; имя передаётся в Content-Disposition","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}}},"/contracts/{contractId}/inspections":{"get":{"tags":["Технадзор"],"summary":"Обходы контракта","operationId":"get_contracts_contractId_inspections","description":"","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"contractId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}},"post":{"tags":["Технадзор"],"summary":"Создать обход","operationId":"post_contracts_contractId_inspections","description":"JSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"contractId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"201":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}}}},"/contracts/{contractId}/inspections/plans":{"get":{"tags":["Технадзор"],"summary":"Планы помещений для обхода","operationId":"get_contracts_contractId_inspections_plans","description":"","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"contractId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}}},"/contracts/{contractId}/inspections/{inspectionId}":{"get":{"tags":["Технадзор"],"summary":"Карточка обхода и замечания","operationId":"get_contracts_contractId_inspections_inspectionId","description":"","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"contractId","in":"path","required":true,"schema":{"type":"string"}},{"name":"inspectionId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}}},"/contracts/{contractId}/inspections/{inspectionId}/actions":{"post":{"tags":["Технадзор"],"summary":"Действие технадзора","operationId":"post_contracts_contractId_inspections_inspectionId_actions","description":"JSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"contractId","in":"path","required":true,"schema":{"type":"string"}},{"name":"inspectionId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"revision":{"type":"integer","minimum":1},"action":{"type":"string","enum":["start","check","remark","finish","return","approve","link","revoke","verify"]},"comment":{"type":"string"}},"required":["revision","action"],"additionalProperties":true}}}}}},"/contracts/{contractId}/inspections/{inspectionId}/files":{"post":{"tags":["Технадзор"],"summary":"Файл обследования","operationId":"post_contracts_contractId_inspections_inspectionId_files","description":"JSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"contractId","in":"path","required":true,"schema":{"type":"string"}},{"name":"inspectionId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"201":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fileName":{"type":"string"},"mediaType":{"type":"string"},"data":{"type":"string","description":"Содержимое файла в base64"},"revision":{"type":"integer","minimum":1},"stage":{"$ref":"#/components/schemas/AttachmentStage"},"checkpointId":{"type":"string"},"note":{"type":"string"},"uploadId":{"type":"string","format":"uuid"}},"additionalProperties":true}}}}}},"/contracts/{contractId}/inspections/{inspectionId}/files/{fileId}":{"get":{"tags":["Технадзор"],"summary":"Скачать файл обследования","operationId":"get_contracts_contractId_inspections_inspectionId_files_fileId","description":"","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"contractId","in":"path","required":true,"schema":{"type":"string"}},{"name":"inspectionId","in":"path","required":true,"schema":{"type":"string"}},{"name":"fileId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Файл; имя передаётся в Content-Disposition","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}}},"/inspection-guests/{inspectionId}/{token}":{"get":{"tags":["Гостевой доступ подрядчика"],"summary":"Обход по персональной ссылке","operationId":"get_inspection_guests_inspectionId_token","description":"Токен из ссылки подрядчика; права ограничены одним обходом. Секреты в документации отсутствуют.","security":[],"parameters":[{"name":"inspectionId","in":"path","required":true,"schema":{"type":"string"}},{"name":"token","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}}},"/inspection-guests/{inspectionId}/{token}/actions":{"post":{"tags":["Гостевой доступ подрядчика"],"summary":"Ответить на замечание или отправить на проверку","operationId":"post_inspection_guests_inspectionId_token_actions","description":"JSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[],"parameters":[{"name":"inspectionId","in":"path","required":true,"schema":{"type":"string"}},{"name":"token","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"revision":{"type":"integer","minimum":1},"action":{"type":"string","enum":["reply","submit"]},"comment":{"type":"string"}},"required":["revision","action"],"additionalProperties":true}}}}}},"/inspection-guests/{inspectionId}/{token}/files":{"post":{"tags":["Гостевой доступ подрядчика"],"summary":"Прикрепить подтверждающий файл","operationId":"post_inspection_guests_inspectionId_token_files","description":"JSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[],"parameters":[{"name":"inspectionId","in":"path","required":true,"schema":{"type":"string"}},{"name":"token","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"201":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fileName":{"type":"string"},"mediaType":{"type":"string"},"data":{"type":"string","description":"Содержимое файла в base64"},"revision":{"type":"integer","minimum":1},"stage":{"$ref":"#/components/schemas/AttachmentStage"},"checkpointId":{"type":"string"},"note":{"type":"string"},"uploadId":{"type":"string","format":"uuid"}},"additionalProperties":true}}}}}},"/inspection-guests/{inspectionId}/{token}/files/{fileId}":{"get":{"tags":["Гостевой доступ подрядчика"],"summary":"Файл гостевого обхода","operationId":"get_inspection_guests_inspectionId_token_files_fileId","description":"","security":[],"parameters":[{"name":"inspectionId","in":"path","required":true,"schema":{"type":"string"}},{"name":"token","in":"path","required":true,"schema":{"type":"string"}},{"name":"fileId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Файл; имя передаётся в Content-Disposition","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}}},"/passports/{buildingId}":{"get":{"tags":["Работы и оцифровка"],"summary":"Паспорт здания с этажами и помещениями","operationId":"get_passports_buildingId","description":"","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"buildingId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Passport"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}}},"/passports":{"post":{"tags":["Работы и оцифровка"],"summary":"Сохранить паспорт здания","operationId":"post_passports","description":"JSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Passport"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Passport"}}}}}},"/works":{"post":{"tags":["Работы и оцифровка"],"summary":"Добавить работу в помещении","operationId":"post_works","description":"JSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"201":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Work"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkWrite"}}}}}},"/works/{workId}":{"put":{"tags":["Работы и оцифровка"],"summary":"Обновить работу","operationId":"put_works_workId","description":"JSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"workId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Work"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkWrite"}}}}}},"/works/{workId}/attachments":{"get":{"tags":["Работы и оцифровка"],"summary":"Материалы и файлы работы","operationId":"get_works_workId_attachments","description":"","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"workId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WorkAttachment"}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}},"post":{"tags":["Работы и оцифровка"],"summary":"Добавить файл работы","operationId":"post_works_workId_attachments","description":"JSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"workId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"201":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fileName":{"type":"string"},"mediaType":{"type":"string"},"data":{"type":"string","description":"Содержимое файла в base64"},"revision":{"type":"integer","minimum":1},"stage":{"$ref":"#/components/schemas/AttachmentStage"},"checkpointId":{"type":"string"},"note":{"type":"string"},"uploadId":{"type":"string","format":"uuid"}},"additionalProperties":true}}}}}},"/works/{workId}/attachments/{fileId}":{"put":{"tags":["Работы и оцифровка"],"summary":"Изменить описание файла","operationId":"put_works_workId_attachments_fileId","description":"JSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"workId","in":"path","required":true,"schema":{"type":"string"}},{"name":"fileId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}}},"delete":{"tags":["Работы и оцифровка"],"summary":"Удалить файл работы","operationId":"delete_works_workId_attachments_fileId","description":"JSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"workId","in":"path","required":true,"schema":{"type":"string"}},{"name":"fileId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}}}},"/works/{workId}/attachments/{fileId}/restore":{"post":{"tags":["Работы и оцифровка"],"summary":"Восстановить файл работы","operationId":"post_works_workId_attachments_fileId_restore","description":"JSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"workId","in":"path","required":true,"schema":{"type":"string"}},{"name":"fileId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}}}},"/works/{workId}/attachments/{fileId}/content":{"get":{"tags":["Работы и оцифровка"],"summary":"Скачать файл работы","operationId":"get_works_workId_attachments_fileId_content","description":"","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"workId","in":"path","required":true,"schema":{"type":"string"}},{"name":"fileId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Файл; имя передаётся в Content-Disposition","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}}},"/photos":{"post":{"tags":["Работы и оцифровка"],"summary":"Фотография помещения до или после ремонта","operationId":"post_photos","description":"JSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"201":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Photo"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"buildingId":{"type":"string"},"roomId":{"type":"string"},"title":{"type":"string"},"stage":{"type":"string","enum":["before","after","exterior"]},"dataUrl":{"type":"string"},"width":{"type":"number"},"height":{"type":"number"},"note":{"type":"string"}},"required":["buildingId","roomId","title","stage","dataUrl","width","height"],"additionalProperties":true}}}}}},"/photos/{photoId}/content":{"get":{"tags":["Работы и оцифровка"],"summary":"Фотография панорамы","operationId":"get_photos_photoId_content","description":"","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"photoId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Файл; имя передаётся в Content-Disposition","content":{"image/jpeg":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}}},"/reviews/{buildingId}":{"post":{"tags":["Работы и оцифровка"],"summary":"Передать паспорт на проверку или принять решение","operationId":"post_reviews_buildingId","description":"JSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"buildingId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["submitted","accepted","changes_requested"]},"comment":{"type":"string"}},"required":["status"],"additionalProperties":true}}}}}},"/estimates":{"get":{"tags":["Работы и оцифровка"],"summary":"Упрощённые расчёты стоимости работ","operationId":"get_estimates","description":"Нормативный сметный модуль находится в /smeta.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Estimate"}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}}},"/routes":{"post":{"tags":["Работы и оцифровка"],"summary":"Построить автомобильный маршрут","operationId":"post_routes","description":"JSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"buildingIds":{"type":"array","items":{"type":"string"},"maxItems":40},"origin":{"$ref":"#/components/schemas/Point"},"destination":{"$ref":"#/components/schemas/Point"}},"required":["buildingIds","origin"],"additionalProperties":true}}}}}},"/repair-records":{"get":{"tags":["Документы ремонта"],"summary":"Журналы, акты и файлы ремонта","operationId":"get_repair_records","description":"","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"building","in":"query","required":true,"schema":{"type":"string"}},{"name":"contract","in":"query","required":false,"schema":{"type":"string"}},{"name":"action","in":"query","required":false,"schema":{"type":"string","enum":["file","print","print-script"]}},{"name":"id","in":"query","required":false,"schema":{"type":"string"}},{"name":"kind","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"JSON-обзор; при action=file — файл, при action=print — HTML","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}},"application/octet-stream":{"schema":{"type":"string"}},"text/html":{"schema":{"type":"string"}},"text/javascript":{"schema":{"type":"string"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}},"post":{"tags":["Документы ремонта"],"summary":"Загрузить документ, создать акт или запись журнала","operationId":"post_repair_records","description":"JSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}},{"name":"building","in":"query","required":true,"schema":{"type":"string"}},{"name":"contract","in":"query","required":false,"schema":{"type":"string"}},{"name":"action","in":"query","required":true,"schema":{"type":"string","enum":["upload","act","entry"]}}],"responses":{"201":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}}}},"/smeta":{"get":{"tags":["Нормативные сметы"],"summary":"Сметы, источники данных, файлы и задачи агента","operationId":"get_smeta","description":"","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmetaOverview"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}}},"/smeta/estimates":{"post":{"tags":["Нормативные сметы"],"summary":"Создать смету","operationId":"post_smeta_estimates","description":"Права: estimates.write. Доступ дополнительно ограничен назначениями учреждений и включёнными модулями.\n\nJSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"201":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmetaEstimate"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"buildingId":{"type":"string"},"title":{"type":"string"}},"required":["buildingId","title"],"additionalProperties":true}}}}}},"/smeta/estimates/{estimateId}":{"get":{"tags":["Нормативные сметы"],"summary":"Смета и протокол расчёта","operationId":"get_smeta_estimates_estimateId","description":"","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"estimateId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmetaEstimate"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}},"put":{"tags":["Нормативные сметы"],"summary":"Сохранить обследование, профиль и позиции","operationId":"put_smeta_estimates_estimateId","description":"Права: estimates.write. Доступ дополнительно ограничен назначениями учреждений и включёнными модулями.\n\nJSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"estimateId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmetaEstimate"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmetaUpdate"}}}}}},"/smeta/estimates/{estimateId}/locations":{"get":{"tags":["Нормативные сметы"],"summary":"Планы и помещения объекта сметы","operationId":"get_smeta_estimates_estimateId_locations","description":"","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"estimateId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Passport"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}}},"/smeta/estimates/{estimateId}/actions":{"post":{"tags":["Нормативные сметы"],"summary":"Рассчитать, передать, утвердить или создать редакцию","operationId":"post_smeta_estimates_estimateId_actions","description":"Утверждение проверяет отдельное право estimates.approve. Расчёт выполняется детерминированно; при неполных нормативах итог блокируется.\n\nJSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"estimateId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmetaEstimate"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmetaAction"}}}}}},"/smeta/estimates/{estimateId}/files":{"post":{"tags":["Нормативные сметы"],"summary":"Загрузить материалы обследования или ревью","operationId":"post_smeta_estimates_estimateId_files","description":"JSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"estimateId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"201":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmetaFile"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"base64":{"type":"string","description":"Содержимое файла в base64"},"kind":{"type":"string","enum":["evidence","quotation","review"]}},"required":["name","base64"],"additionalProperties":true}}}}}},"/smeta/files/{fileId}":{"get":{"tags":["Нормативные сметы"],"summary":"Скачать оригинал файла","operationId":"get_smeta_files_fileId","description":"","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"fileId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Файл; имя передаётся в Content-Disposition","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}}},"/smeta/estimates/{estimateId}/agent":{"post":{"tags":["Нормативные сметы"],"summary":"Запустить подбор норм агентом","operationId":"post_smeta_estimates_estimateId_agent","description":"Асинхронно. Задача возвращается сразу, состояние доступно в /smeta. Предложения применяются отдельной операцией.\n\nПрава: estimates.write. Доступ дополнительно ограничен назначениями учреждений и включёнными модулями.\n\nJSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"estimateId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"202":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmetaJob"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"revision":{"type":"integer","minimum":1}},"required":["revision"],"additionalProperties":true}}}}}},"/smeta/estimates/{estimateId}/apply-agent":{"post":{"tags":["Нормативные сметы"],"summary":"Применить предложения агента","operationId":"post_smeta_estimates_estimateId_apply_agent","description":"JSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"estimateId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmetaEstimate"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"revision":{"type":"integer","minimum":1},"jobId":{"type":"string"}},"required":["revision","jobId"],"additionalProperties":true}}}}}},"/smeta/estimates/{estimateId}/review-diff":{"post":{"tags":["Нормативные сметы"],"summary":"Сравнить файл ревью с текущей сметой","operationId":"post_smeta_estimates_estimateId_review_diff","description":"Сравнивается собственный формат SmetaExchange JSON/XML.\n\nJSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"estimateId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fileId":{"type":"string"}},"required":["fileId"],"additionalProperties":true}}}}}},"/smeta/estimates/{estimateId}/validate-gge":{"post":{"tags":["Нормативные сметы"],"summary":"Проверить загруженный GGE по официальной XSD","operationId":"post_smeta_estimates_estimateId_validate_gge","description":"Проверка входного GGE RIM 3.01. Генерация GGE в текущей версии не реализована.\n\nJSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"estimateId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fileId":{"type":"string"}},"required":["fileId"],"additionalProperties":true}}}}}},"/smeta/estimates/{estimateId}/export":{"get":{"tags":["Нормативные сметы"],"summary":"Выгрузить смету","operationId":"get_smeta_estimates_estimateId_export","description":"","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"estimateId","in":"path","required":true,"schema":{"type":"string"}},{"name":"format","in":"query","required":false,"schema":{"type":"string","enum":["xlsx","pdf","json","xml"]}}],"responses":{"200":{"description":"Файл; имя передаётся в Content-Disposition","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"type":"string","format":"binary"}},"application/json":{"schema":{"type":"string","format":"binary"}},"application/xml":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}}},"/smeta/packages/import":{"post":{"tags":["Нормативные сметы"],"summary":"Импортировать выпуск норм, цен или правил","operationId":"post_smeta_packages_import","description":"Передайте base64 или разрешённый официальный URL. Поддерживаются JSON/XML/XLSX. Поля metadata и mapping сопоставляют исходный формат с CatalogImportData.\n\nПрава: estimates.catalog. Доступ дополнительно ограничен назначениями учреждений и включёнными модулями.\n\nJSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"201":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogPackage"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"base64":{"type":"string"},"url":{"type":"string","format":"uri"},"metadata":{"$ref":"#/components/schemas/JsonObject"},"mapping":{"$ref":"#/components/schemas/JsonObject"}},"required":["name"],"additionalProperties":true}}}}}},"/smeta/packages/{packageId}":{"get":{"tags":["Нормативные сметы"],"summary":"Выпуск нормативного справочника","operationId":"get_smeta_packages_packageId","description":"","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"packageId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogPackage"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}}},"/smeta/packages/{packageId}/search":{"get":{"tags":["Нормативные сметы"],"summary":"Поиск норм по коду и описанию","operationId":"get_smeta_packages_packageId_search","description":"","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"packageId","in":"path","required":true,"schema":{"type":"string"}},{"name":"q","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}}},"/smeta/packages/{packageId}/activate":{"post":{"tags":["Нормативные сметы"],"summary":"Подтвердить выпуск справочника","operationId":"post_smeta_packages_packageId_activate","description":"Права: estimates.catalog. Доступ дополнительно ограничен назначениями учреждений и включёнными модулями.\n\nJSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"packageId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"verified":{"const":true}},"required":["verified"],"additionalProperties":true}}}}}},"/smeta/packages/{packageId}/index":{"post":{"tags":["Нормативные сметы"],"summary":"Проиндексировать порцию норм для семантического поиска","operationId":"post_smeta_packages_packageId_index","description":"Права: estimates.catalog. Доступ дополнительно ограничен назначениями учреждений и включёнными модулями.\n\nJSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"packageId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"offset":{"type":"integer","minimum":0}},"additionalProperties":true}}}}}},"/visits":{"get":{"tags":["Выезды и приём"],"summary":"Выезды, специалисты и свободные слоты","operationId":"get_visits","description":"","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VisitsOverview"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}},"post":{"tags":["Выезды и приём"],"summary":"Записаться на выезд или приём","operationId":"post_visits","description":"JSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"201":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Visit"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"buildingId":{"type":"string"},"slotId":{"type":"string"},"requestId":{"type":"string"},"contractId":{"type":"string"},"checkpointId":{"type":"string"},"contractRevision":{"type":"integer","minimum":1},"purpose":{"type":"string"},"note":{"type":"string"}},"required":["buildingId","slotId","purpose"],"additionalProperties":true}}}}}},"/visits/{visitId}":{"post":{"tags":["Выезды и приём"],"summary":"Согласовать, перенести, отменить или завершить визит","operationId":"post_visits_visitId","description":"JSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"visitId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Visit"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Action"}}}}}},"/visits/departments":{"post":{"tags":["Выезды и приём"],"summary":"Добавить отдел приёма","operationId":"post_visits_departments","description":"JSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"201":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}}}},"/visits/departments/{departmentId}":{"put":{"tags":["Выезды и приём"],"summary":"Изменить отдел приёма","operationId":"put_visits_departments_departmentId","description":"JSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"departmentId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}}}},"/availability":{"post":{"tags":["Выезды и приём"],"summary":"Добавить свободный слот","operationId":"post_availability","description":"JSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"201":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}}}},"/availability/batch":{"post":{"tags":["Выезды и приём"],"summary":"Добавить расписание на несколько дней","operationId":"post_availability_batch","description":"JSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"201":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}}}},"/availability/{slotId}":{"delete":{"tags":["Выезды и приём"],"summary":"Удалить свободный слот","operationId":"delete_availability_slotId","description":"JSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"slotId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}}},"/visits/calendar-subscriptions":{"get":{"tags":["Выезды и приём"],"summary":"Подписки на календарь","operationId":"get_visits_calendar_subscriptions","description":"","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VisitCalendarSubscription"}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}},"post":{"tags":["Выезды и приём"],"summary":"Создать подписку на календарь","operationId":"post_visits_calendar_subscriptions","description":"JSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"201":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VisitCalendarSubscription"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"scope":{"type":"string","enum":["mine","all"]}},"required":["scope"],"additionalProperties":true}}}}}},"/visits/calendar-subscriptions/{scope}":{"delete":{"tags":["Выезды и приём"],"summary":"Отозвать подписку","operationId":"delete_visits_calendar_subscriptions_scope","description":"JSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"scope","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}}},"/visits/calendar/{token}.ics":{"get":{"tags":["Выезды и приём"],"summary":"iCalendar по персональной ссылке","operationId":"get_visits_calendar_token_ics","description":"","security":[],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Календарь; при совпадении If-None-Match возвращается 304","content":{"text/calendar":{"schema":{"type":"string"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}}},"/notifications":{"get":{"tags":["Уведомления"],"summary":"Уведомления текущего пользователя","operationId":"get_notifications","description":"","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VisitNotification"}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}}},"/notifications/{notificationId}/read":{"post":{"tags":["Уведомления"],"summary":"Отметить уведомление прочитанным","operationId":"post_notifications_notificationId_read","description":"JSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"notificationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}}}},"/push":{"get":{"tags":["Уведомления"],"summary":"Статус push и открытый VAPID-ключ","operationId":"get_push","description":"","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}}},"/push/subscriptions":{"post":{"tags":["Уведомления"],"summary":"Зарегистрировать push-подписку","operationId":"post_push_subscriptions","description":"JSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}}},"delete":{"tags":["Уведомления"],"summary":"Отозвать push-подписку","operationId":"delete_push_subscriptions","description":"JSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"deviceId":{"type":"string"}},"required":["deviceId"],"additionalProperties":true}}}}}},"/push/test":{"post":{"tags":["Уведомления"],"summary":"Отправить тестовое уведомление","operationId":"post_push_test","description":"JSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"deviceId":{"type":"string"}},"required":["deviceId"],"additionalProperties":true}}}}}},"/consultations":{"get":{"tags":["Консультации"],"summary":"Телефонные консультации и доступные специалисты","operationId":"get_consultations","description":"","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}},"post":{"tags":["Консультации"],"summary":"Создать консультацию","operationId":"post_consultations","description":"JSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"201":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}}}},"/consultations/{consultationId}":{"post":{"tags":["Консультации"],"summary":"Изменить состояние консультации","operationId":"post_consultations_consultationId","description":"JSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"consultationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Action"}}}}}},"/employee-locations":{"get":{"tags":["Геопозиция сотрудников"],"summary":"Геопозиции доступных сотрудников","operationId":"get_employee_locations","description":"Права: locations.read. Доступ дополнительно ограничен назначениями учреждений и включёнными модулями.","security":[{"SessionAuth":[]}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}}},"/employee-locations/me":{"get":{"tags":["Геопозиция сотрудников"],"summary":"Собственный статус передачи геопозиции","operationId":"get_employee_locations_me","description":"","security":[{"SessionAuth":[]}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}},"post":{"tags":["Геопозиция сотрудников"],"summary":"Передать геопозицию","operationId":"post_employee_locations_me","description":"JSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"SessionAuth":[]}],"parameters":[{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}}}},"/employee-locations/me/sharing":{"put":{"tags":["Геопозиция сотрудников"],"summary":"Включить или остановить передачу","operationId":"put_employee_locations_me_sharing","description":"JSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"SessionAuth":[]}],"parameters":[{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"revision":{"type":"integer","minimum":0}},"required":["enabled","revision"],"additionalProperties":true}}}}}},"/employee-locations/native-devices":{"post":{"tags":["Геопозиция сотрудников"],"summary":"Зарегистрировать устройство фоновой передачи","operationId":"post_employee_locations_native_devices","description":"JSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"SessionAuth":[]}],"parameters":[{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"201":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}}}},"/employee-locations/native/fix":{"post":{"tags":["Геопозиция сотрудников"],"summary":"Передать фоновую координату","operationId":"post_employee_locations_native_fix","description":"Требуется отдельный нативный Bearer-допуск в Authorization, выданный /employee-locations/native-devices. Обычный API-токен не подходит.\n\nJSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"NativeGrant":[]}],"parameters":[{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}}},"delete":{"tags":["Геопозиция сотрудников"],"summary":"Отозвать нативный допуск","operationId":"delete_employee_locations_native_fix","description":"Требуется отдельный нативный Bearer-допуск в Authorization, выданный /employee-locations/native-devices. Обычный API-токен не подходит.\n\nJSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"NativeGrant":[]}],"parameters":[{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}}}},"/drawings":{"get":{"tags":["Чертежи"],"summary":"Чертежи учреждения","operationId":"get_drawings","description":"","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"buildingId","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}},"post":{"tags":["Чертежи"],"summary":"Создать чертёж","operationId":"post_drawings","description":"JSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"201":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}}}},"/drawing-documents":{"post":{"tags":["Чертежи"],"summary":"Загрузить исходный документ","operationId":"post_drawing_documents","description":"JSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"201":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}}}},"/drawing-documents/{documentId}":{"get":{"tags":["Чертежи"],"summary":"Скачать исходный документ","operationId":"get_drawing_documents_documentId","description":"","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Файл; имя передаётся в Content-Disposition","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}},"application/pdf":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}}},"/drawings/{drawingId}":{"put":{"tags":["Чертежи"],"summary":"Сохранить чертёж","operationId":"put_drawings_drawingId","description":"JSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"drawingId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}}}},"/drawings/{drawingId}/actions":{"post":{"tags":["Чертежи"],"summary":"Передать чертёж или принять решение","operationId":"post_drawings_drawingId_actions","description":"JSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"drawingId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Action"}}}}}},"/native-documents/convert-pdf":{"post":{"tags":["Чертежи"],"summary":"Преобразовать DOCX в PDF","operationId":"post_native_documents_convert_pdf","description":"JSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Файл; имя передаётся в Content-Disposition","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"format":{"const":"docx"},"dataBase64":{"type":"string","description":"DOCX до 10 МБ в base64"}},"required":["format","dataBase64"],"additionalProperties":true}}}}}},"/kanban":{"get":{"tags":["Канбан"],"summary":"Доступные доски и задачи","operationId":"get_kanban","description":"","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KanbanData"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}}},"/kanban/boards":{"post":{"tags":["Канбан"],"summary":"Создать доску","operationId":"post_kanban_boards","description":"Персональная доска может иметь только access=members; участники добавляются явным назначением. Доски контрактов создаются автоматически.\n\nJSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"201":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"kind":{"type":"string","enum":["department","personal"]},"access":{"type":"string","enum":["district","members"]}},"required":["title"],"additionalProperties":true}}}}}},"/kanban/boards/{boardId}/actions":{"post":{"tags":["Канбан"],"summary":"Изменить доску, колонки, задачи или участников","operationId":"post_kanban_boards_boardId_actions","description":"JSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"boardId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Action"}}}}}},"/site/public":{"get":{"tags":["CMS"],"summary":"Опубликованные страницы и новости","operationId":"get_site_public","description":"","security":[],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}}},"/site":{"get":{"tags":["CMS"],"summary":"Черновик и опубликованная версия сайта","operationId":"get_site","description":"Права: site.manage. Доступ дополнительно ограничен назначениями учреждений и включёнными модулями.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}},"put":{"tags":["CMS"],"summary":"Сохранить черновик сайта","operationId":"put_site","description":"Права: site.manage. Доступ дополнительно ограничен назначениями учреждений и включёнными модулями.\n\nJSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"revision":{"type":"integer","minimum":0},"content":{"$ref":"#/components/schemas/JsonObject"}},"required":["revision","content"],"additionalProperties":true}}}}}},"/site/publish":{"post":{"tags":["CMS"],"summary":"Опубликовать сохранённую версию","operationId":"post_site_publish","description":"Права: site.manage. Доступ дополнительно ограничен назначениями учреждений и включёнными модулями.\n\nJSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"revision":{"type":"integer","minimum":0}},"required":["revision"],"additionalProperties":true}}}}}},"/analytics":{"get":{"tags":["Аналитика и отчёты"],"summary":"Сводные показатели и аналитика","operationId":"get_analytics","description":"","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"institution","in":"query","required":false,"schema":{"type":"string"}},{"name":"category","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Category"}},{"name":"year","in":"query","required":false,"schema":{"type":"integer","minimum":1900,"maximum":2200}},{"name":"month","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":12},"description":"Требуется year. Не совмещается с quarter."},{"name":"quarter","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":4},"description":"Требуется year. Не совмещается с month."}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyticsOverview"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}}},"/analytics/report":{"get":{"tags":["Аналитика и отчёты"],"summary":"Скачать аналитический отчёт","operationId":"get_analytics_report","description":"","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"institution","in":"query","required":false,"schema":{"type":"string"}},{"name":"category","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Category"}},{"name":"year","in":"query","required":true,"schema":{"type":"integer","minimum":1900,"maximum":2200}},{"name":"month","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":12},"description":"Требуется year. Не совмещается с quarter."},{"name":"quarter","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":4},"description":"Требуется year. Не совмещается с month."},{"name":"format","in":"query","required":true,"schema":{"type":"string","enum":["pdf","pptx"]}},{"name":"template","in":"query","required":false,"schema":{"type":"string","enum":["blank"]}}],"responses":{"200":{"description":"Файл; имя передаётся в Content-Disposition","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}}},"/reports/institutions":{"get":{"tags":["Аналитика и отчёты"],"summary":"Экспорт реестра учреждений","operationId":"get_reports_institutions","description":"","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"category","in":"query","required":false,"schema":{"type":"string"}},{"name":"buildingId","in":"query","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"}},{"name":"format","in":"query","required":true,"schema":{"type":"string","enum":["csv","xlsx"]}}],"responses":{"200":{"description":"Файл; имя передаётся в Content-Disposition","content":{"text/csv":{"schema":{"type":"string","format":"binary"}},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}}},"/reports/institutions/{id}.pdf":{"get":{"tags":["Аналитика и отчёты"],"summary":"Карточка учреждения в PDF","operationId":"get_reports_institutions_id_pdf","description":"","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"sections","in":"query","required":false,"schema":{"type":"string","description":"Разделы карточки через запятую"}}],"responses":{"200":{"description":"Файл; имя передаётся в Content-Disposition","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}}},"/reports/contracts":{"get":{"tags":["Аналитика и отчёты"],"summary":"Экспорт реестра контрактов","operationId":"get_reports_contracts","description":"","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"buildingId","in":"query","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"type","in":"query","required":false,"schema":{"type":"string"}},{"name":"from","in":"query","required":false,"schema":{"type":"string"}},{"name":"to","in":"query","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"}},{"name":"format","in":"query","required":true,"schema":{"type":"string","enum":["csv","xlsx"]}}],"responses":{"200":{"description":"Файл; имя передаётся в Content-Disposition","content":{"text/csv":{"schema":{"type":"string","format":"binary"}},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}}},"/reports/contracts/{id}.pdf":{"get":{"tags":["Аналитика и отчёты"],"summary":"Карточка контракта в PDF","operationId":"get_reports_contracts_id_pdf","description":"","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Файл; имя передаётся в Content-Disposition","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}}},"/chat/config":{"get":{"tags":["AI и чат"],"summary":"Доступные модели и состояние AI","operationId":"get_chat_config","description":"","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}}},"/chat/mcp":{"get":{"tags":["AI и чат"],"summary":"Проверить инструменты и MCP-подключения","operationId":"get_chat_mcp","description":"","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}}},"/chat/transcribe":{"post":{"tags":["AI и чат"],"summary":"Распознать аудио","operationId":"post_chat_transcribe","description":"JSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string"}},"required":["text"],"additionalProperties":true}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"audio":{"type":"string","description":"Base64 аудио до 4 МБ"},"mimeType":{"type":"string","enum":["audio/webm","audio/mp4","audio/ogg"]}},"required":["audio","mimeType"],"additionalProperties":true}}}}}},"/chats":{"get":{"tags":["AI и чат"],"summary":"Список своих чатов","operationId":"get_chats","description":"","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}},"post":{"tags":["AI и чат"],"summary":"Создать чат","operationId":"post_chats","description":"JSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"201":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string"},"buildingId":{"type":"string"},"folder":{"type":"string"},"model":{"type":"string"}},"additionalProperties":true}}}}}},"/chats/{chatId}":{"get":{"tags":["AI и чат"],"summary":"Чат с историей","operationId":"get_chats_chatId","description":"","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"chatId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}},"put":{"tags":["AI и чат"],"summary":"Изменить чат, папку, модель или учреждение","operationId":"put_chats_chatId","description":"JSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"chatId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}}},"delete":{"tags":["AI и чат"],"summary":"Удалить свой чат","operationId":"delete_chats_chatId","description":"JSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"chatId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}}},"/chats/{chatId}/events":{"get":{"tags":["AI и чат"],"summary":"Поток событий ответа агента","operationId":"get_chats_chatId_events","description":"","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"chatId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Server-Sent Events. Для длительного чтения используйте EventSource или HTTP-клиент с поддержкой потоков.","content":{"text/event-stream":{"schema":{"type":"string"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}}},"/chats/{chatId}/messages":{"post":{"tags":["AI и чат"],"summary":"Отправить сообщение агенту","operationId":"post_chats_chatId_messages","description":"JSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"chatId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"202":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string"},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/JsonObject"}},"model":{"type":"string"}},"required":["text"],"additionalProperties":true}}}}}},"/chats/{chatId}/cancel":{"post":{"tags":["AI и чат"],"summary":"Остановить текущий ответ","operationId":"post_chats_chatId_cancel","description":"JSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"chatId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}}}},"/chats/{chatId}/actions/{actionId}":{"post":{"tags":["AI и чат"],"summary":"Подтвердить или отклонить действие агента","operationId":"post_chats_chatId_actions_actionId","description":"JSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"chatId","in":"path","required":true,"schema":{"type":"string"}},{"name":"actionId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"approve":{"type":"boolean"}},"required":["approve"],"additionalProperties":true}}}}}},"/mcp":{"post":{"tags":["AI и чат"],"summary":"MCP Streamable HTTP / JSON-RPC","operationId":"post_mcp","description":"Протокольный endpoint MCP. Методы initialize, tools/list, tools/call; права проверяются для каждого инструмента.\n\nJSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"BearerAuth":[]},{"SessionAuth":[]}],"parameters":[{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"jsonrpc":{"const":"2.0"},"id":{},"method":{"type":"string"},"params":{"$ref":"#/components/schemas/JsonObject"}},"required":["jsonrpc","method"],"additionalProperties":true}}}}}},"/system/performance":{"get":{"tags":["Системная админка"],"summary":"Метрики производительности API","operationId":"get_system_performance","description":"Используется отдельная сессия этого кабинета. Районные Bearer-токены здесь не принимаются.","security":[{"SystemSession":[]}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"x-auth-scope":"system"}},"/system/status":{"get":{"tags":["Системная админка"],"summary":"Состояние сервисов и интеграций","operationId":"get_system_status","description":"Используется отдельная сессия этого кабинета. Районные Bearer-токены здесь не принимаются.","security":[{"SystemSession":[]}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"x-auth-scope":"system"}},"/system/users":{"get":{"tags":["Системная админка"],"summary":"Общий каталог учётных записей","operationId":"get_system_users","description":"Используется отдельная сессия этого кабинета. Районные Bearer-токены здесь не принимаются.","security":[{"SystemSession":[]}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"x-auth-scope":"system"}},"/system/operations/mail":{"get":{"tags":["Системная админка"],"summary":"Журнал отправки почты","operationId":"get_system_operations_mail","description":"Используется отдельная сессия этого кабинета. Районные Bearer-токены здесь не принимаются.","security":[{"SystemSession":[]}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"x-auth-scope":"system"}},"/system/operations/logs":{"get":{"tags":["Системная админка"],"summary":"Журнал операций","operationId":"get_system_operations_logs","description":"Используется отдельная сессия этого кабинета. Районные Bearer-токены здесь не принимаются.","security":[{"SystemSession":[]}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"x-auth-scope":"system"}},"/system/mcp":{"get":{"tags":["Системная админка"],"summary":"Настройки MCP","operationId":"get_system_mcp","description":"Используется отдельная сессия этого кабинета. Районные Bearer-токены здесь не принимаются.","security":[{"SystemSession":[]}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"x-auth-scope":"system"}},"/system/llm":{"get":{"tags":["Системная админка"],"summary":"Настройки языковых моделей","operationId":"get_system_llm","description":"Используется отдельная сессия этого кабинета. Районные Bearer-токены здесь не принимаются.","security":[{"SystemSession":[]}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"x-auth-scope":"system"},"put":{"tags":["Системная админка"],"summary":"Выбрать модели по умолчанию","operationId":"put_system_llm","description":"Используется отдельная сессия этого кабинета. Районные Bearer-токены здесь не принимаются.\n\nJSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"SystemSession":[]}],"parameters":[{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"x-auth-scope":"system"}},"/system/districts":{"get":{"tags":["Системная админка"],"summary":"Районы платформы","operationId":"get_system_districts","description":"Используется отдельная сессия этого кабинета. Районные Bearer-токены здесь не принимаются.","security":[{"SystemSession":[]}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"x-auth-scope":"system"},"post":{"tags":["Системная админка"],"summary":"Создать район и его администратора","operationId":"post_system_districts","description":"Используется отдельная сессия этого кабинета. Районные Bearer-токены здесь не принимаются.\n\nJSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"SystemSession":[]}],"parameters":[{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"201":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"x-auth-scope":"system"}},"/system/city-users":{"get":{"tags":["Системная админка"],"summary":"Городские наблюдатели","operationId":"get_system_city_users","description":"Используется отдельная сессия этого кабинета. Районные Bearer-токены здесь не принимаются.","security":[{"SystemSession":[]}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"x-auth-scope":"system"},"post":{"tags":["Системная админка"],"summary":"Создать пользователя кабинета","operationId":"post_system_city_users","description":"Используется отдельная сессия этого кабинета. Районные Bearer-токены здесь не принимаются.\n\nJSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"SystemSession":[]}],"parameters":[{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"201":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCreate"}}}},"x-auth-scope":"system"}},"/system/status/checks/{service}":{"post":{"tags":["Системная админка"],"summary":"Проверить SMTP, AI или хранилище","operationId":"post_system_status_checks_service","description":"Используется отдельная сессия этого кабинета. Районные Bearer-токены здесь не принимаются.\n\nJSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"SystemSession":[]}],"parameters":[{"name":"service","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"x-auth-scope":"system"}},"/system/users/{scope}/{scopeId}/{userId}/active":{"post":{"tags":["Системная админка"],"summary":"Изменить активность пользователя","operationId":"post_system_users_scope_scopeId_userId_active","description":"Используется отдельная сессия этого кабинета. Районные Bearer-токены здесь не принимаются.\n\nJSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"SystemSession":[]}],"parameters":[{"name":"scope","in":"path","required":true,"schema":{"type":"string"}},{"name":"scopeId","in":"path","required":true,"schema":{"type":"string"}},{"name":"userId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"x-auth-scope":"system"}},"/system/users/{scope}/{scopeId}/{userId}/sessions":{"post":{"tags":["Системная админка"],"summary":"Завершить сеансы пользователя","operationId":"post_system_users_scope_scopeId_userId_sessions","description":"Используется отдельная сессия этого кабинета. Районные Bearer-токены здесь не принимаются.\n\nJSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"SystemSession":[]}],"parameters":[{"name":"scope","in":"path","required":true,"schema":{"type":"string"}},{"name":"scopeId","in":"path","required":true,"schema":{"type":"string"}},{"name":"userId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"x-auth-scope":"system"}},"/system/users/{scope}/{scopeId}/{userId}/password":{"post":{"tags":["Системная админка"],"summary":"Сбросить пароль пользователя","operationId":"post_system_users_scope_scopeId_userId_password","description":"Используется отдельная сессия этого кабинета. Районные Bearer-токены здесь не принимаются.\n\nJSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"SystemSession":[]}],"parameters":[{"name":"scope","in":"path","required":true,"schema":{"type":"string"}},{"name":"scopeId","in":"path","required":true,"schema":{"type":"string"}},{"name":"userId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"x-auth-scope":"system"}},"/system/users/{scope}/{scopeId}/{userId}":{"delete":{"tags":["Системная админка"],"summary":"Удалить учётную запись","operationId":"delete_system_users_scope_scopeId_userId","description":"Используется отдельная сессия этого кабинета. Районные Bearer-токены здесь не принимаются.\n\nJSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"SystemSession":[]}],"parameters":[{"name":"scope","in":"path","required":true,"schema":{"type":"string"}},{"name":"scopeId","in":"path","required":true,"schema":{"type":"string"}},{"name":"userId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"revision":{"type":"integer","minimum":1}},"required":["revision"],"additionalProperties":true}}}},"x-auth-scope":"system"}},"/system/mcp/servers":{"post":{"tags":["Системная админка"],"summary":"Подключить MCP-сервер","operationId":"post_system_mcp_servers","description":"Используется отдельная сессия этого кабинета. Районные Bearer-токены здесь не принимаются.\n\nJSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"SystemSession":[]}],"parameters":[{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"201":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"x-auth-scope":"system"}},"/system/mcp/servers/{serverId}":{"put":{"tags":["Системная админка"],"summary":"Изменить MCP-подключение","operationId":"put_system_mcp_servers_serverId","description":"Используется отдельная сессия этого кабинета. Районные Bearer-токены здесь не принимаются.\n\nJSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"SystemSession":[]}],"parameters":[{"name":"serverId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"x-auth-scope":"system"},"delete":{"tags":["Системная админка"],"summary":"Удалить MCP-подключение","operationId":"delete_system_mcp_servers_serverId","description":"Используется отдельная сессия этого кабинета. Районные Bearer-токены здесь не принимаются.\n\nJSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"SystemSession":[]}],"parameters":[{"name":"serverId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"revision":{"type":"integer","minimum":1}},"required":["revision"],"additionalProperties":true}}}},"x-auth-scope":"system"}},"/system/mcp/servers/{serverId}/check":{"post":{"tags":["Системная админка"],"summary":"Проверить MCP-подключение","operationId":"post_system_mcp_servers_serverId_check","description":"Используется отдельная сессия этого кабинета. Районные Bearer-токены здесь не принимаются.\n\nJSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"SystemSession":[]}],"parameters":[{"name":"serverId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"x-auth-scope":"system"}},"/system/llm/connections":{"post":{"tags":["Системная админка"],"summary":"Добавить подключение к провайдеру","operationId":"post_system_llm_connections","description":"Используется отдельная сессия этого кабинета. Районные Bearer-токены здесь не принимаются.\n\nJSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"SystemSession":[]}],"parameters":[{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"201":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"x-auth-scope":"system"}},"/system/llm/connections/{connectionId}":{"put":{"tags":["Системная админка"],"summary":"Изменить подключение к провайдеру","operationId":"put_system_llm_connections_connectionId","description":"Используется отдельная сессия этого кабинета. Районные Bearer-токены здесь не принимаются.\n\nJSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"SystemSession":[]}],"parameters":[{"name":"connectionId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"x-auth-scope":"system"},"delete":{"tags":["Системная админка"],"summary":"Удалить подключение к провайдеру","operationId":"delete_system_llm_connections_connectionId","description":"Используется отдельная сессия этого кабинета. Районные Bearer-токены здесь не принимаются.\n\nJSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"SystemSession":[]}],"parameters":[{"name":"connectionId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"revision":{"type":"integer","minimum":1}},"required":["revision"],"additionalProperties":true}}}},"x-auth-scope":"system"}},"/system/llm/models":{"post":{"tags":["Системная админка"],"summary":"Получить модели провайдера","operationId":"post_system_llm_models","description":"Используется отдельная сессия этого кабинета. Районные Bearer-токены здесь не принимаются.\n\nJSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"SystemSession":[]}],"parameters":[{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"x-auth-scope":"system"}},"/system/llm/test":{"post":{"tags":["Системная админка"],"summary":"Проверить подключение к модели","operationId":"post_system_llm_test","description":"Используется отдельная сессия этого кабинета. Районные Bearer-токены здесь не принимаются.\n\nJSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"SystemSession":[]}],"parameters":[{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"x-auth-scope":"system"}},"/system/districts/{districtId}/llm":{"get":{"tags":["Системная админка"],"summary":"AI-настройки района","operationId":"get_system_districts_districtId_llm","description":"Используется отдельная сессия этого кабинета. Районные Bearer-токены здесь не принимаются.","security":[{"SystemSession":[]}],"parameters":[{"name":"districtId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"x-auth-scope":"system"},"put":{"tags":["Системная админка"],"summary":"Изменить AI-настройки района","operationId":"put_system_districts_districtId_llm","description":"Используется отдельная сессия этого кабинета. Районные Bearer-токены здесь не принимаются.\n\nJSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"SystemSession":[]}],"parameters":[{"name":"districtId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"x-auth-scope":"system"}},"/system/districts/{districtId}":{"put":{"tags":["Системная админка"],"summary":"Изменить параметры и состояние района","operationId":"put_system_districts_districtId","description":"Используется отдельная сессия этого кабинета. Районные Bearer-токены здесь не принимаются.\n\nJSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"SystemSession":[]}],"parameters":[{"name":"districtId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"x-auth-scope":"system"}},"/system/districts/{districtId}/modules":{"get":{"tags":["Системная админка"],"summary":"Модули района и пользователей","operationId":"get_system_districts_districtId_modules","description":"Используется отдельная сессия этого кабинета. Районные Bearer-токены здесь не принимаются.","security":[{"SystemSession":[]}],"parameters":[{"name":"districtId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"x-auth-scope":"system"},"put":{"tags":["Системная админка"],"summary":"Изменить доступные модули района","operationId":"put_system_districts_districtId_modules","description":"Используется отдельная сессия этого кабинета. Районные Bearer-токены здесь не принимаются.\n\nJSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"SystemSession":[]}],"parameters":[{"name":"districtId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"x-auth-scope":"system"}},"/system/districts/{districtId}/users/{userId}/modules":{"put":{"tags":["Системная админка"],"summary":"Изменить модули пользователя","operationId":"put_system_districts_districtId_users_userId_modules","description":"Используется отдельная сессия этого кабинета. Районные Bearer-токены здесь не принимаются.\n\nJSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"SystemSession":[]}],"parameters":[{"name":"districtId","in":"path","required":true,"schema":{"type":"string"}},{"name":"userId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"x-auth-scope":"system"}},"/system/city-users/{userId}":{"put":{"tags":["Системная админка"],"summary":"Изменить пользователя кабинета","operationId":"put_system_city_users_userId","description":"Используется отдельная сессия этого кабинета. Районные Bearer-токены здесь не принимаются.\n\nJSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"SystemSession":[]}],"parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserUpdate"}}}},"x-auth-scope":"system"},"delete":{"tags":["Системная админка"],"summary":"Удалить пользователя кабинета","operationId":"delete_system_city_users_userId","description":"Используется отдельная сессия этого кабинета. Районные Bearer-токены здесь не принимаются.\n\nJSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"SystemSession":[]}],"parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"revision":{"type":"integer","minimum":1}},"required":["revision"],"additionalProperties":true}}}},"x-auth-scope":"system"}},"/system/city-users/{userId}/password":{"post":{"tags":["Системная админка"],"summary":"Сбросить пароль пользователя","operationId":"post_system_city_users_userId_password","description":"Используется отдельная сессия этого кабинета. Районные Bearer-токены здесь не принимаются.\n\nJSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"SystemSession":[]}],"parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"x-auth-scope":"system"}},"/system/districts/{districtId}/users":{"get":{"tags":["Системная админка"],"summary":"Администраторы района","operationId":"get_system_districts_districtId_users","description":"Используется отдельная сессия этого кабинета. Районные Bearer-токены здесь не принимаются.","security":[{"SystemSession":[]}],"parameters":[{"name":"districtId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ManagedUser"}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"x-auth-scope":"system"},"post":{"tags":["Системная админка"],"summary":"Создать пользователя кабинета","operationId":"post_system_districts_districtId_users","description":"Используется отдельная сессия этого кабинета. Районные Bearer-токены здесь не принимаются.\n\nJSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"SystemSession":[]}],"parameters":[{"name":"districtId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"201":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCreate"}}}},"x-auth-scope":"system"}},"/system/districts/{districtId}/users/{userId}":{"put":{"tags":["Системная админка"],"summary":"Изменить пользователя кабинета","operationId":"put_system_districts_districtId_users_userId","description":"Используется отдельная сессия этого кабинета. Районные Bearer-токены здесь не принимаются.\n\nJSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"SystemSession":[]}],"parameters":[{"name":"districtId","in":"path","required":true,"schema":{"type":"string"}},{"name":"userId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserUpdate"}}}},"x-auth-scope":"system"},"delete":{"tags":["Системная админка"],"summary":"Удалить пользователя кабинета","operationId":"delete_system_districts_districtId_users_userId","description":"Используется отдельная сессия этого кабинета. Районные Bearer-токены здесь не принимаются.\n\nJSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"SystemSession":[]}],"parameters":[{"name":"districtId","in":"path","required":true,"schema":{"type":"string"}},{"name":"userId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"revision":{"type":"integer","minimum":1}},"required":["revision"],"additionalProperties":true}}}},"x-auth-scope":"system"}},"/system/districts/{districtId}/users/{userId}/password":{"post":{"tags":["Системная админка"],"summary":"Сбросить пароль пользователя","operationId":"post_system_districts_districtId_users_userId_password","description":"Используется отдельная сессия этого кабинета. Районные Bearer-токены здесь не принимаются.\n\nJSON-запрос. Swagger автоматически добавляет X-Requested-With и актуальный CSRF-токен браузерной сессии. При Bearer-авторизации CSRF-токен не требуется.","security":[{"SystemSession":[]}],"parameters":[{"name":"districtId","in":"path","required":true,"schema":{"type":"string"}},{"name":"userId","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Requested-With","in":"header","required":true,"schema":{"type":"string","const":"nevsky-app","default":"nevsky-app"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"x-auth-scope":"system"}},"/city/districts":{"get":{"tags":["Городской кабинет"],"summary":"Доступные районы","operationId":"get_city_districts","description":"Используется отдельная сессия этого кабинета. Районные Bearer-токены здесь не принимаются.","security":[{"CitySession":[]}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/District"}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"x-auth-scope":"city"}},"/city/overview":{"get":{"tags":["Городской кабинет"],"summary":"Сводка по доступным районам","operationId":"get_city_overview","description":"Используется отдельная сессия этого кабинета. Районные Bearer-токены здесь не принимаются.","security":[{"CitySession":[]}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"x-auth-scope":"city"}},"/city/districts/{districtId}/district":{"get":{"tags":["Городской кабинет"],"summary":"Текущий район","operationId":"city_get_district","description":"","security":[{"CitySession":[]}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/District"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"x-auth-scope":"city","parameters":[{"name":"districtId","in":"path","required":true,"schema":{"type":"string"}}]}},"/city/districts/{districtId}/bootstrap":{"get":{"tags":["Городской кабинет"],"summary":"Реестр и рабочие данные доступных учреждений","operationId":"city_get_bootstrap","description":"","security":[{"CitySession":[]}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Bootstrap"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"x-auth-scope":"city","parameters":[{"name":"districtId","in":"path","required":true,"schema":{"type":"string"}}]}},"/city/districts/{districtId}/profile":{"get":{"tags":["Городской кабинет"],"summary":"Профиль и статистика сотрудника","operationId":"city_get_profile","description":"","security":[{"CitySession":[]}],"parameters":[{"name":"districtId","in":"path","required":true,"schema":{"type":"string"}},{"name":"period","in":"query","required":false,"schema":{"type":"string","enum":["30","90","all"]}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StaffProfile"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"x-auth-scope":"city"}},"/city/districts/{districtId}/institutions/{buildingId}/profile":{"get":{"tags":["Городской кабинет"],"summary":"Полные сведения об учреждении","operationId":"city_get_institutions_buildingId_profile","description":"","security":[{"CitySession":[]}],"parameters":[{"name":"districtId","in":"path","required":true,"schema":{"type":"string"}},{"name":"buildingId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortalInstitution"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"x-auth-scope":"city"}},"/city/districts/{districtId}/institutions/outlines":{"get":{"tags":["Городской кабинет"],"summary":"Контуры от 1 до 8 зданий","operationId":"city_get_institutions_outlines","description":"","security":[{"CitySession":[]}],"parameters":[{"name":"districtId","in":"path","required":true,"schema":{"type":"string"}},{"name":"ids","in":"query","required":true,"schema":{"type":"string","description":"Уникальные идентификаторы через запятую, максимум 8"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"x-auth-scope":"city"}},"/city/districts/{districtId}/institutions/{buildingId}/access":{"get":{"tags":["Городской кабинет"],"summary":"Настройки доступа учреждения для службы заказчика","operationId":"city_get_institutions_buildingId_access","description":"Права: institution.access.read. Доступ дополнительно ограничен назначениями учреждений и включёнными модулями.","security":[{"CitySession":[]}],"parameters":[{"name":"districtId","in":"path","required":true,"schema":{"type":"string"}},{"name":"buildingId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"x-auth-scope":"city"}},"/city/districts/{districtId}/institutions/{buildingId}/users":{"get":{"tags":["Городской кабинет"],"summary":"Пользователи и действующие приглашения","operationId":"city_get_institutions_buildingId_users","description":"","security":[{"CitySession":[]}],"parameters":[{"name":"districtId","in":"path","required":true,"schema":{"type":"string"}},{"name":"buildingId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"x-auth-scope":"city"}},"/city/districts/{districtId}/requests":{"get":{"tags":["Городской кабинет"],"summary":"Список доступных заявок","operationId":"city_get_requests","description":"","security":[{"CitySession":[]}],"parameters":[{"name":"districtId","in":"path","required":true,"schema":{"type":"string"}},{"name":"buildingId","in":"query","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"kind","in":"query","required":false,"schema":{"type":"string"}},{"name":"q","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InstitutionRequest"}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"x-auth-scope":"city"}},"/city/districts/{districtId}/requests/locations":{"get":{"tags":["Городской кабинет"],"summary":"Планы и помещения для заявки","operationId":"city_get_requests_locations","description":"","security":[{"CitySession":[]}],"parameters":[{"name":"districtId","in":"path","required":true,"schema":{"type":"string"}},{"name":"buildingId","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"x-auth-scope":"city"}},"/city/districts/{districtId}/requests/contracts":{"get":{"tags":["Городской кабинет"],"summary":"Контракты для заявки","operationId":"city_get_requests_contracts","description":"","security":[{"CitySession":[]}],"parameters":[{"name":"districtId","in":"path","required":true,"schema":{"type":"string"}},{"name":"buildingId","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"x-auth-scope":"city"}},"/city/districts/{districtId}/requests/contact-users":{"get":{"tags":["Городской кабинет"],"summary":"Контактные лица учреждения","operationId":"city_get_requests_contact_users","description":"","security":[{"CitySession":[]}],"parameters":[{"name":"districtId","in":"path","required":true,"schema":{"type":"string"}},{"name":"buildingId","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"x-auth-scope":"city"}},"/city/districts/{districtId}/requests/{requestId}":{"get":{"tags":["Городской кабинет"],"summary":"Заявка с вложениями","operationId":"city_get_requests_requestId","description":"","security":[{"CitySession":[]}],"parameters":[{"name":"districtId","in":"path","required":true,"schema":{"type":"string"}},{"name":"requestId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestDetail"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"x-auth-scope":"city"}},"/city/districts/{districtId}/requests/{requestId}/print":{"get":{"tags":["Городской кабинет"],"summary":"Печатная форма заявки","operationId":"city_get_requests_requestId_print","description":"","security":[{"CitySession":[]}],"parameters":[{"name":"districtId","in":"path","required":true,"schema":{"type":"string"}},{"name":"requestId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Файл; имя передаётся в Content-Disposition","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"x-auth-scope":"city"}},"/city/districts/{districtId}/requests/{requestId}/attachments/{fileId}/content":{"get":{"tags":["Городской кабинет"],"summary":"Скачать файл заявки","operationId":"city_get_requests_requestId_attachments_fileId_content","description":"","security":[{"CitySession":[]}],"parameters":[{"name":"districtId","in":"path","required":true,"schema":{"type":"string"}},{"name":"requestId","in":"path","required":true,"schema":{"type":"string"}},{"name":"fileId","in":"path","required":true,"schema":{"type":"string"}},{"name":"preview","in":"query","required":false,"schema":{"type":"string","enum":["1"]}}],"responses":{"200":{"description":"Файл; имя передаётся в Content-Disposition","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}},"image/jpeg":{"schema":{"type":"string","format":"binary"}},"image/png":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"x-auth-scope":"city"}},"/city/districts/{districtId}/contracts":{"get":{"tags":["Городской кабинет"],"summary":"Список контрактов с фильтрами","operationId":"city_get_contracts","description":"","security":[{"CitySession":[]}],"parameters":[{"name":"districtId","in":"path","required":true,"schema":{"type":"string"}},{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"buildingId","in":"query","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"type","in":"query","required":false,"schema":{"type":"string"}},{"name":"from","in":"query","required":false,"schema":{"type":"string"}},{"name":"to","in":"query","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Contract"}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"x-auth-scope":"city"}},"/city/districts/{districtId}/contracts/{contractId}":{"get":{"tags":["Городской кабинет"],"summary":"Карточка контракта","operationId":"city_get_contracts_contractId","description":"","security":[{"CitySession":[]}],"parameters":[{"name":"districtId","in":"path","required":true,"schema":{"type":"string"}},{"name":"contractId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contract"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"x-auth-scope":"city"}},"/city/districts/{districtId}/contracts/eis/status":{"get":{"tags":["Городской кабинет"],"summary":"Состояние синхронизации ЕИС","operationId":"city_get_contracts_eis_status","description":"","security":[{"CitySession":[]}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EisSyncStatus"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"x-auth-scope":"city","parameters":[{"name":"districtId","in":"path","required":true,"schema":{"type":"string"}}]}},"/city/districts/{districtId}/contracts/{contractId}/eis/attachments/{fileId}":{"get":{"tags":["Городской кабинет"],"summary":"Скачать документ из ЕИС","operationId":"city_get_contracts_contractId_eis_attachments_fileId","description":"","security":[{"CitySession":[]}],"parameters":[{"name":"districtId","in":"path","required":true,"schema":{"type":"string"}},{"name":"contractId","in":"path","required":true,"schema":{"type":"string"}},{"name":"fileId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Файл; имя передаётся в Content-Disposition","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"x-auth-scope":"city"}},"/city/districts/{districtId}/contracts/{contractId}/inspections":{"get":{"tags":["Городской кабинет"],"summary":"Обходы контракта","operationId":"city_get_contracts_contractId_inspections","description":"","security":[{"CitySession":[]}],"parameters":[{"name":"districtId","in":"path","required":true,"schema":{"type":"string"}},{"name":"contractId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"x-auth-scope":"city"}},"/city/districts/{districtId}/contracts/{contractId}/inspections/plans":{"get":{"tags":["Городской кабинет"],"summary":"Планы помещений для обхода","operationId":"city_get_contracts_contractId_inspections_plans","description":"","security":[{"CitySession":[]}],"parameters":[{"name":"districtId","in":"path","required":true,"schema":{"type":"string"}},{"name":"contractId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"x-auth-scope":"city"}},"/city/districts/{districtId}/contracts/{contractId}/inspections/{inspectionId}":{"get":{"tags":["Городской кабинет"],"summary":"Карточка обхода и замечания","operationId":"city_get_contracts_contractId_inspections_inspectionId","description":"","security":[{"CitySession":[]}],"parameters":[{"name":"districtId","in":"path","required":true,"schema":{"type":"string"}},{"name":"contractId","in":"path","required":true,"schema":{"type":"string"}},{"name":"inspectionId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"x-auth-scope":"city"}},"/city/districts/{districtId}/contracts/{contractId}/inspections/{inspectionId}/files/{fileId}":{"get":{"tags":["Городской кабинет"],"summary":"Скачать файл обследования","operationId":"city_get_contracts_contractId_inspections_inspectionId_files_fileId","description":"","security":[{"CitySession":[]}],"parameters":[{"name":"districtId","in":"path","required":true,"schema":{"type":"string"}},{"name":"contractId","in":"path","required":true,"schema":{"type":"string"}},{"name":"inspectionId","in":"path","required":true,"schema":{"type":"string"}},{"name":"fileId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Файл; имя передаётся в Content-Disposition","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"x-auth-scope":"city"}},"/city/districts/{districtId}/passports/{buildingId}":{"get":{"tags":["Городской кабинет"],"summary":"Паспорт здания с этажами и помещениями","operationId":"city_get_passports_buildingId","description":"","security":[{"CitySession":[]}],"parameters":[{"name":"districtId","in":"path","required":true,"schema":{"type":"string"}},{"name":"buildingId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Passport"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"x-auth-scope":"city"}},"/city/districts/{districtId}/works/{workId}/attachments":{"get":{"tags":["Городской кабинет"],"summary":"Материалы и файлы работы","operationId":"city_get_works_workId_attachments","description":"","security":[{"CitySession":[]}],"parameters":[{"name":"districtId","in":"path","required":true,"schema":{"type":"string"}},{"name":"workId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WorkAttachment"}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"x-auth-scope":"city"}},"/city/districts/{districtId}/works/{workId}/attachments/{fileId}/content":{"get":{"tags":["Городской кабинет"],"summary":"Скачать файл работы","operationId":"city_get_works_workId_attachments_fileId_content","description":"","security":[{"CitySession":[]}],"parameters":[{"name":"districtId","in":"path","required":true,"schema":{"type":"string"}},{"name":"workId","in":"path","required":true,"schema":{"type":"string"}},{"name":"fileId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Файл; имя передаётся в Content-Disposition","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"x-auth-scope":"city"}},"/city/districts/{districtId}/photos/{photoId}/content":{"get":{"tags":["Городской кабинет"],"summary":"Фотография панорамы","operationId":"city_get_photos_photoId_content","description":"","security":[{"CitySession":[]}],"parameters":[{"name":"districtId","in":"path","required":true,"schema":{"type":"string"}},{"name":"photoId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Файл; имя передаётся в Content-Disposition","content":{"image/jpeg":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"x-auth-scope":"city"}},"/city/districts/{districtId}/estimates":{"get":{"tags":["Городской кабинет"],"summary":"Упрощённые расчёты стоимости работ","operationId":"city_get_estimates","description":"Нормативный сметный модуль находится в /smeta.","security":[{"CitySession":[]}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Estimate"}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"x-auth-scope":"city","parameters":[{"name":"districtId","in":"path","required":true,"schema":{"type":"string"}}]}},"/city/districts/{districtId}/drawings":{"get":{"tags":["Городской кабинет"],"summary":"Чертежи учреждения","operationId":"city_get_drawings","description":"","security":[{"CitySession":[]}],"parameters":[{"name":"districtId","in":"path","required":true,"schema":{"type":"string"}},{"name":"buildingId","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonObject"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"x-auth-scope":"city"}},"/city/districts/{districtId}/drawing-documents/{documentId}":{"get":{"tags":["Городской кабинет"],"summary":"Скачать исходный документ","operationId":"city_get_drawing_documents_documentId","description":"","security":[{"CitySession":[]}],"parameters":[{"name":"districtId","in":"path","required":true,"schema":{"type":"string"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Файл; имя передаётся в Content-Disposition","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}},"application/pdf":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"x-auth-scope":"city"}},"/city/districts/{districtId}/kanban":{"get":{"tags":["Городской кабинет"],"summary":"Доступные доски и задачи","operationId":"city_get_kanban","description":"","security":[{"CitySession":[]}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KanbanData"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"x-auth-scope":"city","parameters":[{"name":"districtId","in":"path","required":true,"schema":{"type":"string"}}]}},"/city/districts/{districtId}/analytics":{"get":{"tags":["Городской кабинет"],"summary":"Сводные показатели и аналитика","operationId":"city_get_analytics","description":"","security":[{"CitySession":[]}],"parameters":[{"name":"districtId","in":"path","required":true,"schema":{"type":"string"}},{"name":"institution","in":"query","required":false,"schema":{"type":"string"}},{"name":"category","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Category"}},{"name":"year","in":"query","required":false,"schema":{"type":"integer","minimum":1900,"maximum":2200}},{"name":"month","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":12},"description":"Требуется year. Не совмещается с quarter."},{"name":"quarter","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":4},"description":"Требуется year. Не совмещается с month."}],"responses":{"200":{"description":"Успешный ответ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyticsOverview"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"x-auth-scope":"city"}},"/city/districts/{districtId}/analytics/report":{"get":{"tags":["Городской кабинет"],"summary":"Скачать аналитический отчёт","operationId":"city_get_analytics_report","description":"","security":[{"CitySession":[]}],"parameters":[{"name":"districtId","in":"path","required":true,"schema":{"type":"string"}},{"name":"institution","in":"query","required":false,"schema":{"type":"string"}},{"name":"category","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Category"}},{"name":"year","in":"query","required":true,"schema":{"type":"integer","minimum":1900,"maximum":2200}},{"name":"month","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":12},"description":"Требуется year. Не совмещается с quarter."},{"name":"quarter","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":4},"description":"Требуется year. Не совмещается с month."},{"name":"format","in":"query","required":true,"schema":{"type":"string","enum":["pdf","pptx"]}},{"name":"template","in":"query","required":false,"schema":{"type":"string","enum":["blank"]}}],"responses":{"200":{"description":"Файл; имя передаётся в Content-Disposition","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"x-auth-scope":"city"}},"/city/districts/{districtId}/reports/institutions":{"get":{"tags":["Городской кабинет"],"summary":"Экспорт реестра учреждений","operationId":"city_get_reports_institutions","description":"","security":[{"CitySession":[]}],"parameters":[{"name":"districtId","in":"path","required":true,"schema":{"type":"string"}},{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"category","in":"query","required":false,"schema":{"type":"string"}},{"name":"buildingId","in":"query","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"}},{"name":"format","in":"query","required":true,"schema":{"type":"string","enum":["csv","xlsx"]}}],"responses":{"200":{"description":"Файл; имя передаётся в Content-Disposition","content":{"text/csv":{"schema":{"type":"string","format":"binary"}},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"x-auth-scope":"city"}},"/city/districts/{districtId}/reports/institutions/{id}.pdf":{"get":{"tags":["Городской кабинет"],"summary":"Карточка учреждения в PDF","operationId":"city_get_reports_institutions_id_pdf","description":"","security":[{"CitySession":[]}],"parameters":[{"name":"districtId","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"sections","in":"query","required":false,"schema":{"type":"string","description":"Разделы карточки через запятую"}}],"responses":{"200":{"description":"Файл; имя передаётся в Content-Disposition","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"x-auth-scope":"city"}},"/city/districts/{districtId}/reports/contracts":{"get":{"tags":["Городской кабинет"],"summary":"Экспорт реестра контрактов","operationId":"city_get_reports_contracts","description":"","security":[{"CitySession":[]}],"parameters":[{"name":"districtId","in":"path","required":true,"schema":{"type":"string"}},{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"buildingId","in":"query","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"type","in":"query","required":false,"schema":{"type":"string"}},{"name":"from","in":"query","required":false,"schema":{"type":"string"}},{"name":"to","in":"query","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"}},{"name":"format","in":"query","required":true,"schema":{"type":"string","enum":["csv","xlsx"]}}],"responses":{"200":{"description":"Файл; имя передаётся в Content-Disposition","content":{"text/csv":{"schema":{"type":"string","format":"binary"}},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"x-auth-scope":"city"}},"/city/districts/{districtId}/reports/contracts/{id}.pdf":{"get":{"tags":["Городской кабинет"],"summary":"Карточка контракта в PDF","operationId":"city_get_reports_contracts_id_pdf","description":"","security":[{"CitySession":[]}],"parameters":[{"name":"districtId","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Файл; имя передаётся в Content-Disposition","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}},"x-auth-scope":"city"}}},"components":{"securitySchemes":{"NativeGrant":{"type":"http","scheme":"bearer","bearerFormat":"native grant","description":"Отдельный допуск фоновой геопозиции. Даёт доступ только к /employee-locations/native/fix."},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"nv_…","description":"Персональный токен пользователя. Создаётся через POST /auth/tokens; не сохраняется Swagger между перезагрузками."},"SessionAuth":{"type":"apiKey","in":"cookie","name":"__Host-nevsky_session","description":"HttpOnly-cookie устанавливается POST /auth/login. Swagger отправляет её автоматически; вставлять cookie вручную не нужно."},"SystemSession":{"type":"apiKey","in":"cookie","name":"__Host-nevsky_session_system","description":"Отдельная сессия системного администратора."},"CitySession":{"type":"apiKey","in":"cookie","name":"__Host-nevsky_session_city","description":"Отдельная сессия городского наблюдателя."}},"schemas":{"Institution":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"category":{"$ref":"#/components/schemas/Category"},"institutionName":{"type":"string","description":"Full name retained from the source registry, separate from edited requisites."},"address":{"type":"string"},"source":{"type":"string"},"sourceName":{"type":"string"},"retrievedAt":{"type":"string"},"coordinateSource":{"type":"string"},"coordinateNote":{"type":"string"},"requisites":{"$ref":"#/components/schemas/InstitutionRequisites"},"shape":{"$ref":"#/components/schemas/BuildingShape"},"shapeAssessment":{"type":"object","properties":{"method":{"type":"string","enum":["outline","manual"]},"assessedAt":{"type":"string"},"sourceUrls":{"type":"array","items":{"type":"string"}},"note":{"type":"string"}},"required":["method","assessedAt"]},"profile":{"$ref":"#/components/schemas/InstitutionProfile"},"lat":{"type":"number"},"lon":{"type":"number"}},"required":["address","category","id","lat","lon","name","retrievedAt","source","sourceName"]},"Category":{"type":"string","enum":["school","kindergarten","health","culture","sport","youth","social","administration"]},"InstitutionRequisites":{"type":"object","properties":{"fullName":{"type":"string"},"inn":{"type":"string"},"ogrn":{"type":"string"},"kpp":{"type":"string"},"bankName":{"type":"string"},"bik":{"type":"string"},"settlementAccount":{"type":"string"},"correspondentAccount":{"type":"string"},"legalAddress":{"type":"string"},"postalAddress":{"type":"string"},"updatedAt":{"type":"string"}},"required":["fullName","inn","ogrn","kpp","bankName","bik","settlementAccount","correspondentAccount","legalAddress","postalAddress","updatedAt"]},"BuildingShape":{"type":"string","enum":["o","h","other","unknown"]},"InstitutionProfile":{"type":"object","properties":{"website":{"type":"string"},"fetchedAt":{"type":"string"},"audit":{"type":"object","properties":{"status":{"type":"string","enum":["verified","unavailable","needs_review"]},"checkedAt":{"type":"string"},"identitySignals":{"type":"array","items":{"type":"string"}},"pagesRead":{"type":"number"},"fieldsExtracted":{"type":"number"},"documentsIndexed":{"type":"number"},"scope":{"type":"string","const":"organization"},"note":{"type":"string"}},"required":["status","checkedAt","identitySignals","pagesRead","fieldsExtracted","documentsIndexed","scope","note"]},"sources":{"type":"array","items":{"$ref":"#/components/schemas/InstitutionProfileSource"}},"sections":{"type":"array","items":{"$ref":"#/components/schemas/InstitutionProfileSection"}},"equipment":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"sourceId":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"quantity":{"type":"string"}},"required":["name","quantity"]}}},"required":["title","sourceId","items"]}},"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"category":{"type":"string"},"sourceUrls":{"type":"array","items":{"type":"string"}},"reviewed":{"type":"boolean"}},"required":["id","title","url","category","sourceUrls","reviewed"]}},"issues":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"sourceIds":{"type":"array","items":{"type":"string"}}},"required":["title","description","sourceIds"]}}},"required":["website","fetchedAt","sources","sections","equipment","documents","issues"]},"InstitutionProfileSource":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"fetchedAt":{"type":"string"},"period":{"type":"string"}},"required":["id","title","url","fetchedAt"]},"InstitutionProfileSection":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/InstitutionProfileField"}}},"required":["id","title","fields"]},"InstitutionProfileField":{"type":"object","properties":{"label":{"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"sourceId":{"type":"string"},"note":{"type":"string"},"needsReview":{"type":"boolean"}},"required":["label","value","sourceId"]},"BuildingContacts":{"type":"object","properties":{"buildingId":{"type":"string"},"director":{"$ref":"#/components/schemas/ContactPerson"},"people":{"type":"array","items":{"$ref":"#/components/schemas/ContactPerson"}},"updatedAt":{"type":"string"}},"required":["buildingId","director","people","updatedAt"]},"ContactPerson":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"position":{"type":"string"},"phone":{"type":"string"},"email":{"type":"string"},"note":{"type":"string"}},"required":["id","name","position","phone","email","note"]},"Passport":{"type":"object","properties":{"buildingId":{"type":"string"},"title":{"type":"string"},"inventoryNumber":{"type":"string"},"year":{"type":["number","null"]},"floors":{"type":"array","items":{"$ref":"#/components/schemas/Floor"}},"demo":{"type":"boolean"},"fileName":{"type":"string"},"sourceText":{"type":"string"},"updatedAt":{"type":"string"}},"required":["buildingId","title","inventoryNumber","year","floors","demo","updatedAt"]},"Floor":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"number"},"rooms":{"type":"array","items":{"$ref":"#/components/schemas/Room"}}},"required":["id","number","rooms"]},"Room":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"x":{"type":"number"},"y":{"type":"number"},"width":{"type":"number"},"depth":{"type":"number"},"area":{"type":"number"}},"required":["id","name","x","y","width","depth","area"]},"Work":{"type":"object","properties":{"id":{"type":"string"},"buildingId":{"type":"string"},"floorId":{"type":"string"},"roomId":{"type":"string"},"title":{"type":"string"},"kind":{"type":"string","enum":["current","capital"]},"status":{"$ref":"#/components/schemas/WorkStatus"},"start":{"type":"string"},"end":{"type":"string"},"quantity":{"type":"number"},"rateId":{"type":"string"},"engineer":{"type":"string"},"note":{"type":"string"},"x":{"type":"number"},"y":{"type":"number"},"checkpoints":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"date":{"type":"string"},"done":{"type":"boolean"}},"required":["id","title","date","done"]}}},"required":["id","buildingId","floorId","roomId","title","kind","status","start","end","quantity","rateId","engineer","note","x","y","checkpoints"]},"WorkStatus":{"type":"string","enum":["planned","in_progress","completed"]},"WorkAttachment":{"type":"object","properties":{"id":{"type":"string"},"workId":{"type":"string"},"fileName":{"type":"string"},"size":{"type":"number"},"mediaType":{"type":"string"},"stage":{"$ref":"#/components/schemas/AttachmentStage"},"checkpointId":{"type":"string"},"note":{"type":"string"},"uploadedBy":{"type":"string"},"uploadedByName":{"type":"string"},"createdAt":{"type":"string"},"removedAt":{"type":"string"}},"required":["id","workId","fileName","size","mediaType","stage","note","uploadedBy","uploadedByName","createdAt"]},"AttachmentStage":{"type":"string","enum":["general","preparation","execution","acceptance","checkpoint"]},"Photo":{"type":"object","properties":{"id":{"type":"string"},"buildingId":{"type":"string"},"roomId":{"type":"string"},"title":{"type":"string"},"stage":{"type":"string","enum":["before","after","exterior"]},"dataUrl":{"type":"string"},"contentPath":{"type":"string","description":"Authenticated, workspace-relative endpoint for file-backed images."},"source":{"type":"object","properties":{"provider":{"type":"string","const":"yandex-panorama"},"kind":{"type":"string","const":"browser_panorama_screenshot"},"url":{"type":"string"},"captureYear":{"type":"number"},"retrievedAt":{"type":"string"},"view":{"type":"string","enum":["north","east","south","west"]},"reviewStatus":{"type":"string","enum":["needs_visual_review","visible_facade_checked","detail_view_checked","partly_obstructed"]},"reviewNote":{"type":"string"},"camera":{"type":"object","properties":{"lat":{"type":"number"},"lon":{"type":"number"}},"required":["lat","lon"]},"targetPoint":{"type":"object","properties":{"lat":{"type":"number"},"lon":{"type":"number"}},"required":["lat","lon"]},"locationSource":{"type":"string"},"locationNote":{"type":"string"}},"required":["provider","kind","url","captureYear","retrievedAt","view","reviewStatus","camera","targetPoint"]},"width":{"type":"number"},"height":{"type":"number"},"createdAt":{"type":"string"},"note":{"type":"string"}},"required":["id","buildingId","roomId","title","stage","dataUrl","width","height","createdAt","note"]},"Bootstrap":{"type":"object","properties":{"registry":{"$ref":"#/components/schemas/Registry"},"rates":{"type":"array","items":{"$ref":"#/components/schemas/Rate"}},"workspace":{"$ref":"#/components/schemas/Workspace"}},"required":["registry","rates","workspace"]},"Registry":{"type":"object","properties":{"institutions":{"type":"array","items":{"$ref":"#/components/schemas/Institution"}},"boundary":{"type":"array","items":{"$ref":"#/components/schemas/Point"}},"retrievedAt":{"type":"string"},"coverage":{"type":"string"},"complete":{"type":"boolean"}},"required":["institutions","boundary","retrievedAt","coverage","complete"]},"Point":{"type":"object","properties":{"lat":{"type":"number"},"lon":{"type":"number"}},"required":["lat","lon"]},"Rate":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"unit":{"type":"string"},"labor":{"type":"number"},"material":{"type":"string"},"materialUnit":{"type":"string"},"materialPerUnit":{"type":"number"},"packSize":{"type":"number"},"packPrice":{"type":"number"},"transport":{"type":"number"},"sources":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"url":{"type":"string"},"date":{"type":"string"},"note":{"type":"string"}},"required":["title","url","date","note"]}}},"required":["id","name","unit","labor","material","materialUnit","materialPerUnit","packSize","packPrice","transport","sources"]},"Workspace":{"type":"object","properties":{"institutions":{"type":"array","items":{"$ref":"#/components/schemas/Institution"},"description":"User-created institutions and overrides for imported institutions."},"reviews":{"type":"array","items":{"$ref":"#/components/schemas/BuildingReview"}},"version":{"type":"number"},"contacts":{"type":"array","items":{"$ref":"#/components/schemas/BuildingContacts"}},"passports":{"type":"array","items":{"$ref":"#/components/schemas/Passport"}},"works":{"type":"array","items":{"$ref":"#/components/schemas/Work"}},"photos":{"type":"array","items":{"$ref":"#/components/schemas/Photo"}}},"required":["institutions","version","contacts","passports","works","photos"]},"BuildingReview":{"type":"object","properties":{"buildingId":{"type":"string"},"status":{"type":"string","enum":["draft","submitted","changes_requested","accepted"]},"history":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string","enum":["draft","submitted","changes_requested","accepted"]},"comment":{"type":"string"},"actor":{"type":"string"},"at":{"type":"string"}},"required":["status","comment","actor","at"]}}},"required":["buildingId","status","history"]},"Estimate":{"type":"object","properties":{"workId":{"type":"string"},"labor":{"type":"number"},"materialQuantity":{"type":"number"},"packs":{"type":"number"},"materials":{"type":"number"},"transport":{"type":"number"},"reserve":{"type":"number"},"total":{"type":"number"}},"required":["workId","labor","materialQuantity","packs","materials","transport","reserve","total"]},"Visit":{"type":"object","properties":{"contractId":{"type":"string"},"checkpointId":{"type":"string"},"kind":{"$ref":"#/components/schemas/VisitKind"},"departmentId":{"type":"string"},"office":{"type":"object","properties":{"departmentName":{"type":"string"},"address":{"type":"string"},"room":{"type":"string"}},"required":["departmentName","address","room"],"description":"Reception location at booking time; later directory edits do not move a visit."},"requestId":{"type":"string"},"id":{"type":"string"},"buildingId":{"type":"string"},"specialistId":{"type":"string"},"requestedBy":{"type":"string"},"proposedBy":{"type":"string"},"slotId":{"type":"string"},"start":{"type":"string"},"end":{"type":"string"},"purpose":{"type":"string"},"status":{"$ref":"#/components/schemas/VisitStatus"},"revision":{"type":"number"},"history":{"type":"array","items":{"type":"object","properties":{"actor":{"type":"string"},"at":{"type":"string"},"status":{"$ref":"#/components/schemas/VisitStatus"},"comment":{"type":"string"},"start":{"type":"string"},"end":{"type":"string"}},"required":["actor","at","status","comment","start","end"]}}},"required":["id","buildingId","specialistId","requestedBy","proposedBy","slotId","start","end","purpose","status","revision","history"]},"VisitKind":{"type":"string","enum":["engineer_visit","office_reception"]},"VisitStatus":{"type":"string","enum":["pending_specialist","pending_institution","confirmed","rejected","cancelled"]},"VisitsOverview":{"type":"object","properties":{"departments":{"type":"array","items":{"$ref":"#/components/schemas/VisitDepartment"}},"specialists":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"role":{"$ref":"#/components/schemas/Role"}},"required":["id","name"]}},"slots":{"type":"array","items":{"type":"object","properties":{"available":{"type":"boolean"},"kind":{"$ref":"#/components/schemas/VisitKind","description":"Absent on legacy records: engineer_visit."},"departmentId":{"type":"string"},"id":{"type":"string"},"specialistId":{"type":"string"},"start":{"type":"string"},"end":{"type":"string"}},"required":["available","end","id","specialistId","start"]}},"visits":{"type":"array","items":{"$ref":"#/components/schemas/Visit"}}},"required":["specialists","slots","visits"]},"VisitDepartment":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"headId":{"type":"string"},"address":{"type":"string"},"room":{"type":"string"},"active":{"type":"boolean"},"revision":{"type":"number"}},"required":["id","name","headId","address","room","active","revision"]},"Role":{"type":"string","enum":["city_head","admin","department_head","inspector","engineer","repair_preparation_engineer","repair_support_engineer","viewer","object_staff"]},"VisitCalendarSubscription":{"type":"object","properties":{"scope":{"$ref":"#/components/schemas/VisitCalendarScope"},"path":{"type":"string","description":"District-relative API path; the unguessable link grants calendar reads only."},"createdAt":{"type":"string"}},"required":["scope","path","createdAt"]},"VisitCalendarScope":{"type":"string","enum":["mine","all"]},"VisitNotification":{"type":"object","properties":{"id":{"type":"string"},"visitId":{"type":"string"},"buildingId":{"type":"string"},"message":{"type":"string"},"at":{"type":"string"},"read":{"type":"boolean"}},"required":["id","visitId","buildingId","message","at","read"]},"District":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"city":{"type":"string"},"active":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"revision":{"type":"number"},"disabledModules":{"type":"array","items":{"$ref":"#/components/schemas/ModuleId"}}},"required":["id","name","city","active","createdAt","updatedAt","revision"],"description":"Each district owns an independent workspace and authorization store."},"ModuleId":{"type":"string","enum":["analytics","kanban","requests","website","ai","mcp","drawings","reviews","repairs","contracts","reports","logistics","photos","visits"]},"User":{"type":"object","properties":{"avatarId":{"type":"string","description":"Opaque version of the authenticated profile photograph."},"id":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"},"role":{"$ref":"#/components/schemas/Role"},"assignments":{"type":"array","items":{"$ref":"#/components/schemas/ObjectAssignment"},"description":"Missing assignments on legacy district accounts mean district access."},"disabledModules":{"type":"array","items":{"$ref":"#/components/schemas/ModuleId"}},"moduleRevision":{"type":"number"},"active":{"type":"boolean"},"mustChangePassword":{"type":"boolean"},"createdAt":{"type":"string"}},"required":["id","email","name","role","active","mustChangePassword","createdAt"]},"ObjectAssignment":{"type":"object","properties":{"buildingId":{"type":"string"},"role":{"$ref":"#/components/schemas/ObjectRole"}},"required":["buildingId","role"]},"ObjectRole":{"type":"string","enum":["manager","editor","viewer"]},"AuthSession":{"type":"object","properties":{"secondFactor":{"type":"object","properties":{"mode":{"type":"string","const":"demo"},"required":{"type":"boolean"}},"required":["mode","required"]},"user":{"$ref":"#/components/schemas/User"},"csrfToken":{"type":"string"},"modules":{"type":"array","items":{"$ref":"#/components/schemas/ModuleId"}},"districtModules":{"type":"array","items":{"$ref":"#/components/schemas/ModuleId"}}},"required":["user","csrfToken"]},"ManagedUser":{"type":"object","properties":{"canDelete":{"type":"boolean"},"deletionRevision":{"type":"number"},"deletionBlockedReason":{"type":"string"},"avatarId":{"type":"string","description":"Opaque version of the authenticated profile photograph."},"id":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"},"role":{"$ref":"#/components/schemas/Role"},"assignments":{"type":"array","items":{"$ref":"#/components/schemas/ObjectAssignment"},"description":"Missing assignments on legacy district accounts mean district access."},"disabledModules":{"type":"array","items":{"$ref":"#/components/schemas/ModuleId"}},"moduleRevision":{"type":"number"},"active":{"type":"boolean"},"mustChangePassword":{"type":"boolean"},"createdAt":{"type":"string"}},"required":["active","createdAt","email","id","mustChangePassword","name","role"]},"Contract":{"type":"object","properties":{"id":{"type":"string"},"buildingId":{"type":"string"},"number":{"type":"string"},"date":{"type":"string"},"title":{"type":"string"},"type":{"type":"string","enum":["repair","maintenance","estimate","design","supervision","other"]},"workType":{"type":"string"},"contractor":{"type":"string"},"contractorId":{"type":"string"},"contractorDelivery":{"type":"object","properties":{"status":{"type":"string","enum":["synced","failed"]},"message":{"type":"string"}},"required":["status","message"]},"phone":{"type":"string"},"start":{"type":"string"},"end":{"type":"string"},"amount":{"type":["number","null"]},"status":{"type":"string","enum":["active","archived"]},"description":{"type":"string"},"checkpoints":{"type":"array","items":{"$ref":"#/components/schemas/ContractCheckpoint"}},"eis":{"$ref":"#/components/schemas/ContractEisSource"},"revision":{"type":"number"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"updatedBy":{"type":"string"}},"required":["id","buildingId","number","date","title","type","workType","contractor","phone","start","end","amount","status","description","revision","createdAt","updatedAt","updatedBy"]},"ContractCheckpoint":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"date":{"type":"string"},"done":{"type":"boolean"}},"required":["id","title","date","done"]},"ContractEisSource":{"type":"object","properties":{"registryNumber":{"type":"string"},"noticeNumber":{"type":"string"},"customerInn":{"type":"string"},"customerName":{"type":"string"},"stage":{"type":"string","enum":["E","EC","ET","IN"]},"publishedAt":{"type":"string"},"checkedAt":{"type":"string"},"version":{"type":"number"},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/ContractEisAttachment"}},"snapshot":{"$ref":"#/components/schemas/ContractEisFields"},"preservedFields":{"type":"array","items":{"type":"string"}}},"required":["registryNumber","customerInn","customerName","stage","publishedAt","checkedAt"]},"ContractEisAttachment":{"type":"object","properties":{"id":{"type":"string"},"fileName":{"type":"string"},"url":{"type":"string"},"description":{"type":"string"},"kind":{"type":"string","enum":["contract","notice"]}},"required":["id","fileName","url","description","kind"]},"ContractEisFields":{"type":"object","properties":{"number":{"$ref":"#/components/schemas/Contract"},"date":{"$ref":"#/components/schemas/Contract"},"title":{"$ref":"#/components/schemas/Contract"},"contractor":{"$ref":"#/components/schemas/Contract"},"start":{"$ref":"#/components/schemas/Contract"},"end":{"$ref":"#/components/schemas/Contract"},"amount":{"$ref":"#/components/schemas/Contract"},"status":{"$ref":"#/components/schemas/Contract"},"description":{"$ref":"#/components/schemas/Contract"}},"required":["number","date","title","contractor","start","end","amount","status","description"]},"EisSyncStatus":{"type":"object","properties":{"enabled":{"type":"boolean"},"running":{"type":"boolean"},"intervalMinutes":{"type":"number"},"lastStartedAt":{"type":["string","null"]},"lastCompletedAt":{"type":["string","null"]},"nextRunAt":{"type":["string","null"]},"completed":{"type":"number"},"total":{"type":"number"},"failed":{"type":"number"},"error":{"type":["string","null"]}},"required":["enabled","running","intervalMinutes","lastStartedAt","lastCompletedAt","nextRunAt","completed","total","failed","error"]},"InstitutionRequest":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"createdBy":{"type":"string"},"createdByName":{"type":"string"},"status":{"$ref":"#/components/schemas/RequestStatus"},"revision":{"type":"number"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"submittedAt":{"type":"string"},"amendments":{"type":"array","items":{"$ref":"#/components/schemas/RequestAmendment"}},"locationPlan":{"type":"object","properties":{"floorId":{"type":"string"},"floorNumber":{"type":"number"},"roomId":{"type":"string"},"roomName":{"type":"string"},"revision":{"type":"string"},"demo":{"type":"boolean"},"rooms":{"type":"array","items":{"$ref":"#/components/schemas/RequestPlanRoom"}}},"required":["floorId","floorNumber","roomId","roomName","revision","demo"]},"history":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"$ref":"#/components/schemas/RequestStatus"},"action":{"type":"string"},"comment":{"type":"string"},"actor":{"type":"string"},"at":{"type":"string"},"attachmentIds":{"type":"array","items":{"type":"string"}},"amendmentId":{"type":"string"}},"required":["id","status","action","comment","actor","at"]}},"buildingId":{"type":"string"},"kind":{"type":"string","enum":["problem","contract","repair"]},"contractId":{"type":"string"},"contract":{"$ref":"#/components/schemas/RequestContract"},"priority":{"type":"string","enum":["normal","urgent"]},"administrationApproved":{"type":"boolean"},"administrationApprovalFileId":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"location":{"type":"string"},"locationMode":{"type":"string","enum":["text","plan"]},"floorId":{"type":"string"},"roomId":{"type":"string"},"planRevision":{"type":"string"},"planRooms":{"type":"array","items":{"$ref":"#/components/schemas/RequestPlanRoom"}},"contactName":{"type":"string"},"contactPhone":{"type":"string"},"contactEmail":{"type":"string"},"contacts":{"type":"array","items":{"$ref":"#/components/schemas/RequestContact"}}},"required":["buildingId","contactEmail","contactName","contactPhone","createdAt","createdBy","createdByName","description","history","id","kind","location","number","priority","revision","status","title","updatedAt"]},"RequestStatus":{"type":"string","enum":["draft","submitted","accepted","in_progress","changes_requested","approval_pending","completed","rejected","cancelled"]},"RequestAmendment":{"type":"object","properties":{"id":{"type":"string"},"before":{"$ref":"#/components/schemas/RequestFields"},"after":{"$ref":"#/components/schemas/RequestFields"},"returnStatus":{"$ref":"#/components/schemas/RequestStatus"},"proposedBy":{"type":"string"},"proposedByName":{"type":"string"},"proposedAt":{"type":"string"},"comment":{"type":"string"},"attachmentIds":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["pending","approved","rejected"]},"resolvedByName":{"type":"string"},"resolvedAt":{"type":"string"},"decisionComment":{"type":"string"}},"required":["id","before","after","returnStatus","proposedBy","proposedByName","proposedAt","comment","attachmentIds","status"]},"RequestFields":{"type":"object","properties":{"buildingId":{"type":"string"},"kind":{"type":"string","enum":["problem","contract","repair"]},"contractId":{"type":"string"},"contract":{"$ref":"#/components/schemas/RequestContract"},"priority":{"type":"string","enum":["normal","urgent"]},"administrationApproved":{"type":"boolean"},"administrationApprovalFileId":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"location":{"type":"string"},"locationMode":{"type":"string","enum":["text","plan"]},"floorId":{"type":"string"},"roomId":{"type":"string"},"planRevision":{"type":"string"},"planRooms":{"type":"array","items":{"$ref":"#/components/schemas/RequestPlanRoom"}},"contactName":{"type":"string"},"contactPhone":{"type":"string"},"contactEmail":{"type":"string"},"contacts":{"type":"array","items":{"$ref":"#/components/schemas/RequestContact"}}},"required":["buildingId","kind","priority","title","description","location","contactName","contactPhone","contactEmail"]},"RequestContract":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"date":{"type":"string"},"title":{"type":"string"}},"required":["id","number","date","title"]},"RequestPlanRoom":{"type":"object","properties":{"floorId":{"type":"string"},"roomId":{"type":"string"},"priority":{"$ref":"#/components/schemas/RequestRoomPriority"},"floorNumber":{"type":"number"},"roomName":{"type":"string"}},"required":["floorId","roomId"]},"RequestRoomPriority":{"type":"number"},"RequestContact":{"type":"object","properties":{"name":{"type":"string"},"phones":{"type":"array","items":{"type":"string"}},"email":{"type":"string"}},"required":["name","phones","email"]},"PortalInstitution":{"type":"object","properties":{"institution":{"$ref":"#/components/schemas/Institution"},"contacts":{"anyOf":[{"$ref":"#/components/schemas/BuildingContacts"},{"type":"null"}]},"revision":{"type":"string"},"prefilled":{"type":"object","properties":{"reviewedAt":{"type":"string"},"sources":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"url":{"type":"string"}},"required":["title","url"]}}},"required":["reviewedAt","sources"]}},"required":["institution","contacts","revision"]},"InstitutionPortal":{"type":"object","properties":{"institutions":{"type":"array","items":{"$ref":"#/components/schemas/PortalInstitution"}}},"required":["institutions"]},"RequestAttachment":{"type":"object","properties":{"id":{"type":"string"},"fileName":{"type":"string"},"size":{"type":"number"},"mediaType":{"type":"string"},"note":{"type":"string"},"uploadedBy":{"type":"string"},"uploadedByName":{"type":"string"},"createdAt":{"type":"string"},"removedAt":{"type":"string"}},"required":["id","fileName","size","mediaType","note","uploadedBy","uploadedByName","createdAt"]},"StaffProfile":{"type":"object","properties":{"user":{"$ref":"#/components/schemas/User"},"generatedAt":{"type":"string"},"period":{"$ref":"#/components/schemas/StaffPeriod"},"visits":{"type":"object","properties":{"eligible":{"type":"boolean"},"total":{"type":"number"},"pastConfirmed":{"type":"number"},"cancelled":{"type":"number"},"rejected":{"type":"number"},"institutions":{"type":"number"},"pending":{"type":"number"},"nextWeek":{"type":"number"},"availableSlots":{"type":"number"},"upcoming":{"type":"array","items":{"$ref":"#/components/schemas/StaffVisit"}},"history":{"type":"array","items":{"$ref":"#/components/schemas/StaffVisit"}},"monthly":{"type":"array","items":{"type":"object","properties":{"month":{"type":"string"},"confirmed":{"type":"number"},"cancelled":{"type":"number"}},"required":["month","confirmed","cancelled"]}},"topInstitutions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"count":{"type":"number"}},"required":["id","name","count"]}}},"required":["eligible","total","pastConfirmed","cancelled","rejected","institutions","pending","nextWeek","availableSlots","upcoming","history","monthly","topInstitutions"]},"tasks":{"type":"object","properties":{"open":{"type":"number"},"completed":{"type":"number"},"overdue":{"type":"number"},"archived":{"type":"number"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"boardId":{"type":"string"},"board":{"type":"string"},"column":{"type":"string"},"dueDate":{"type":"string"},"completed":{"type":"boolean"}},"required":["id","title","boardId","board","column","dueDate","completed"]}}},"required":["open","completed","overdue","archived","items"]}},"required":["user","generatedAt","period"]},"StaffPeriod":{"type":"string","enum":["30","90","all"]},"StaffVisit":{"type":"object","properties":{"id":{"type":"string"},"buildingId":{"type":"string"},"institution":{"type":"string"},"address":{"type":"string"},"start":{"type":"string"},"end":{"type":"string"},"status":{"$ref":"#/components/schemas/VisitStatus"},"purpose":{"type":"string"},"requestId":{"type":"string"}},"required":["id","buildingId","institution","address","start","end","status","purpose"]},"AnalyticsOverview":{"type":"object","properties":{"generatedAt":{"type":"string"},"today":{"type":"string"},"years":{"type":"array","items":{"type":"number"}},"institutions":{"type":"array","items":{"$ref":"#/components/schemas/AnalyticsInstitution"}},"objects":{"type":"object","properties":{"total":{"type":"number"},"passports":{"type":"number"},"contacts":{"type":"number"},"categories":{"type":"array","items":{"type":"object","properties":{"category":{"anyOf":[{"type":"object","properties":{}},{"type":"object","properties":{}},{"type":"object","properties":{}},{"type":"object","properties":{}},{"type":"object","properties":{}},{"type":"object","properties":{}},{"type":"object","properties":{}},{"type":"object","properties":{}}]},"count":{"type":"number"}},"required":["category","count"]}},"reviews":{"type":"object","properties":{"draft":{"type":"number"},"submitted":{"type":"number"},"changes_requested":{"type":"number"},"accepted":{"type":"number"}},"required":["draft","submitted","changes_requested","accepted"]}},"required":["total","passports","contacts","categories"]},"repairs":{"type":"object","properties":{"total":{"type":"number"},"planned":{"type":"number"},"inProgress":{"type":"number"},"completed":{"type":"number"},"overdue":{"type":"number"},"dueSoon":{"type":"number"},"deadlines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"buildingId":{"type":"string"},"title":{"type":"string"},"end":{"type":"string"},"status":{"$ref":"#/components/schemas/WorkStatus"},"engineer":{"type":"string"}},"required":["id","buildingId","title","end","status","engineer"]}},"engineers":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"active":{"type":"number"},"overdue":{"type":"number"}},"required":["name","active","overdue"]}}},"required":["total","planned","inProgress","completed","overdue","dueSoon","deadlines","engineers"]},"contracts":{"type":"object","properties":{"total":{"type":"number"},"active":{"type":"number"},"archived":{"type":"number"},"amount":{"type":"number"},"unknownAmount":{"type":"number"},"overdue":{"type":"number"}},"required":["total","active","archived","amount","unknownAmount","overdue"]},"requests":{"type":"object","properties":{"total":{"type":"number"},"submitted":{"type":"number"},"active":{"type":"number"},"completed":{"type":"number"},"urgent":{"type":"number"},"changesRequested":{"type":"number"}},"required":["total","submitted","active","completed","urgent","changesRequested"]},"attention":{"type":"array","items":{"$ref":"#/components/schemas/AnalyticsAttention"}}},"required":["generatedAt","today","years","institutions","objects","attention"]},"AnalyticsInstitution":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"address":{"type":"string"},"category":{"anyOf":[{"type":"object","properties":{}},{"type":"object","properties":{}},{"type":"object","properties":{}},{"type":"object","properties":{}},{"type":"object","properties":{}},{"type":"object","properties":{}},{"type":"object","properties":{}},{"type":"object","properties":{}}]}},"required":["id","name","address","category"]},"AnalyticsAttention":{"type":"object","properties":{"noPassport":{"type":"boolean"},"overdue":{"type":"number"},"pendingRequests":{"type":"number"},"review":{"type":"string","enum":["draft","submitted","changes_requested","accepted"]},"id":{"type":"string"},"name":{"type":"string"},"address":{"type":"string"},"category":{"anyOf":[{"type":"object","properties":{}},{"type":"object","properties":{}},{"type":"object","properties":{}},{"type":"object","properties":{}},{"type":"object","properties":{}},{"type":"object","properties":{}},{"type":"object","properties":{}},{"type":"object","properties":{}}]}},"required":["address","category","id","name","noPassport","overdue","pendingRequests"]},"SmetaEstimate":{"type":"object","properties":{"id":{"type":"string"},"buildingId":{"type":"string"},"contractId":{"type":"string"},"title":{"type":"string"},"revision":{"type":"number"},"edition":{"type":"number"},"previousId":{"type":"string"},"status":{"type":"string","enum":["draft","review","approved","returned"]},"profile":{"anyOf":[{"$ref":"#/components/schemas/SmetaProfile"},{"type":"null"}]},"observations":{"type":"array","items":{"$ref":"#/components/schemas/Observation"}},"lines":{"type":"array","items":{"$ref":"#/components/schemas/SmetaLine"}},"calculation":{"anyOf":[{"$ref":"#/components/schemas/SmetaCalculation"},{"type":"null"}]},"history":{"type":"array","items":{"$ref":"#/components/schemas/SmetaHistory"}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"createdBy":{"type":"string"}},"required":["id","buildingId","contractId","title","revision","edition","previousId","status","profile","observations","lines","calculation","history","createdAt","updatedAt","createdBy"]},"SmetaProfile":{"type":"object","properties":{"normPackageId":{"type":"string"},"pricePackageId":{"type":"string"},"rulePackageId":{"type":"string"},"method":{"anyOf":[{"$ref":"#/components/schemas/EstimateMethod"},{"type":"string","const":""}]},"region":{"type":"string"},"zone":{"type":"string"},"period":{"type":"string"},"moneyDigits":{"type":"number","const":2}},"required":["normPackageId","pricePackageId","rulePackageId","method","region","zone","period","moneyDigits"]},"EstimateMethod":{"type":"string","enum":["resource","resource-index","base-index"]},"Observation":{"type":"object","properties":{"id":{"type":"string"},"room":{"type":"string"},"floorId":{"type":"string"},"roomId":{"type":"string"},"description":{"type":"string"},"quantity":{"type":"string"},"unit":{"type":"string"},"formula":{"type":"string"},"conditions":{"type":"array","items":{"type":"string"}},"fileIds":{"type":"array","items":{"type":"string"}}},"required":["id","room","floorId","roomId","description","quantity","unit","formula","conditions","fileIds"]},"SmetaLine":{"type":"object","properties":{"id":{"type":"string"},"observationId":{"type":"string"},"normCode":{"type":"string"},"quantity":{"type":"string"},"ruleIds":{"type":"array","items":{"type":"string"}},"justification":{"type":"string"}},"required":["id","observationId","normCode","quantity","ruleIds","justification"]},"SmetaCalculation":{"type":"object","properties":{"engine":{"type":"string","const":"nevsky-resource-1"},"inputHash":{"type":"string"},"packages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"string"},"sha256":{"type":"string"}},"required":["id","version","sha256"]}},"lines":{"type":"array","items":{"$ref":"#/components/schemas/CalculatedLine"}},"issues":{"type":"array","items":{"$ref":"#/components/schemas/SmetaIssue"}},"direct":{"type":"string"},"overhead":{"type":"string"},"profit":{"type":"string"},"tax":{"type":"string"},"total":{"type":["string","null"]},"calculatedAt":{"type":"string"}},"required":["engine","inputHash","packages","lines","issues","direct","overhead","profit","tax","total","calculatedAt"]},"CalculatedLine":{"type":"object","properties":{"id":{"type":"string"},"normCode":{"type":"string"},"name":{"type":"string"},"unit":{"type":"string"},"quantity":{"type":"string"},"quantityBase":{"type":"string"},"resources":{"type":"array","items":{"$ref":"#/components/schemas/CalculatedResource"}},"direct":{"type":"string"},"wages":{"type":"string"},"overhead":{"type":"string"},"profit":{"type":"string"},"total":{"type":"string"},"ruleGrounds":{"type":"array","items":{"type":"string"}}},"required":["id","normCode","name","unit","quantity","quantityBase","resources","direct","wages","overhead","profit","total","ruleGrounds"]},"CalculatedResource":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"},"kind":{"$ref":"#/components/schemas/ResourceKind"},"unit":{"type":"string"},"consumption":{"type":"string"},"quantity":{"type":"string"},"price":{"type":"string"},"index":{"type":"string"},"coefficient":{"type":"string"},"total":{"type":"string"},"includedInDirect":{"type":"boolean"},"sourceDocument":{"type":"string"}},"required":["code","name","kind","unit","consumption","quantity","price","index","coefficient","total","includedInDirect","sourceDocument"]},"ResourceKind":{"type":"string","enum":["labor","driver","machine","material","transport"]},"SmetaIssue":{"type":"object","properties":{"severity":{"type":"string","enum":["error","warning"]},"code":{"type":"string"},"message":{"type":"string"},"lineId":{"type":"string"}},"required":["severity","code","message"]},"SmetaHistory":{"type":"object","properties":{"at":{"type":"string"},"actor":{"type":"string"},"action":{"type":"string"},"comment":{"type":"string"},"revision":{"type":"number"}},"required":["at","actor","action","comment","revision"]},"SmetaOverview":{"type":"object","properties":{"estimates":{"type":"array","items":{"$ref":"#/components/schemas/SmetaEstimate"}},"packages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["norms","prices","rules"]},"name":{"type":"string"},"version":{"type":"string"},"normVersion":{"type":"string"},"sourceUrl":{"type":"string"},"sourceName":{"type":"string"},"region":{"type":"string"},"zone":{"type":"string"},"period":{"type":"string"},"status":{"type":"string","enum":["staged","active"]},"sha256":{"type":"string"},"createdAt":{"type":"string"},"activatedAt":{"type":"string"},"activatedBy":{"type":"string"},"fileId":{"type":"string"}},"required":["id","kind","name","version","normVersion","sourceUrl","sourceName","region","zone","period","status","sha256","createdAt","fileId"]}},"counts":{"type":"object","additionalProperties":{"type":"object","properties":{"norms":{"type":"number"},"prices":{"type":"number"},"rules":{"type":"number"}},"required":["norms","prices","rules"]}},"files":{"type":"array","items":{"$ref":"#/components/schemas/SmetaFile"}},"jobs":{"type":"array","items":{"$ref":"#/components/schemas/SmetaJob"}},"integrations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["ready","manual","missing"]},"detail":{"type":"string"},"url":{"type":"string"}},"required":["id","name","status","detail"]}}},"required":["estimates","packages","counts","files","jobs","integrations"]},"SmetaFile":{"type":"object","properties":{"id":{"type":"string"},"blobId":{"type":"string"},"estimateId":{"type":"string"},"name":{"type":"string"},"mime":{"type":"string"},"size":{"type":"number"},"sha256":{"type":"string"},"kind":{"type":"string","enum":["evidence","quotation","review","catalog"]},"createdAt":{"type":"string"},"actor":{"type":"string"}},"required":["id","estimateId","name","mime","size","sha256","kind","createdAt","actor"]},"SmetaJob":{"type":"object","properties":{"id":{"type":"string"},"estimateId":{"type":"string"},"revision":{"type":"number"},"status":{"type":"string","enum":["queued","running","succeeded","failed"]},"createdAt":{"type":"string"},"finishedAt":{"type":"string"},"error":{"type":"string"},"questions":{"type":"array","items":{"type":"string"}},"proposals":{"type":"array","items":{"type":"object","properties":{"observationId":{"type":"string"},"normCode":{"type":"string"},"reason":{"type":"string"}},"required":["observationId","normCode","reason"]}},"trace":{"type":"array","items":{"type":"object","properties":{"tool":{"type":"string"},"query":{"type":"string"},"codes":{"type":"array","items":{"type":"string"}}},"required":["tool","query","codes"]}}},"required":["id","estimateId","revision","status","createdAt","questions","proposals","trace"]},"CatalogPackage":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["norms","prices","rules"]},"name":{"type":"string"},"version":{"type":"string"},"normVersion":{"type":"string"},"sourceUrl":{"type":"string"},"sourceName":{"type":"string"},"region":{"type":"string"},"zone":{"type":"string"},"period":{"type":"string"},"status":{"type":"string","enum":["staged","active"]},"sha256":{"type":"string"},"createdAt":{"type":"string"},"activatedAt":{"type":"string"},"activatedBy":{"type":"string"},"fileId":{"type":"string"},"norms":{"type":"array","items":{"$ref":"#/components/schemas/Norm"}},"prices":{"type":"array","items":{"$ref":"#/components/schemas/ResourcePrice"}},"rules":{"type":"array","items":{"$ref":"#/components/schemas/EstimateRule"}}},"required":["id","kind","name","version","normVersion","sourceUrl","sourceName","region","zone","period","status","sha256","createdAt","fileId","norms","prices","rules"]},"Norm":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"},"unit":{"type":"string"},"quantityBase":{"type":"string"},"workComposition":{"type":"array","items":{"type":"string"}},"conditions":{"type":"array","items":{"type":"string"}},"technicalReferences":{"type":"array","items":{"type":"string"}},"resources":{"type":"array","items":{"$ref":"#/components/schemas/NormResource"}}},"required":["code","name","unit","quantityBase","workComposition","conditions","technicalReferences","resources"]},"NormResource":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"},"unit":{"type":"string"},"kind":{"$ref":"#/components/schemas/ResourceKind"},"consumption":{"type":"string"}},"required":["code","name","unit","kind","consumption"]},"ResourcePrice":{"type":"object","properties":{"code":{"type":"string"},"unit":{"type":"string"},"price":{"type":"string"},"level":{"type":"string","enum":["current","base"]},"index":{"type":"string"},"sourceDocument":{"type":"string"}},"required":["code","unit","price","level"]},"EstimateRule":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string","enum":["coefficient","overhead","profit","tax"]},"value":{"type":"string"},"target":{"anyOf":[{"$ref":"#/components/schemas/ResourceKind"},{"type":"string","const":"all"},{"type":"string","const":"direct"},{"type":"string","const":"wages"}]},"condition":{"type":"string"},"basis":{"type":"string"}},"required":["id","name","kind","value","target","condition","basis"]},"Contractor":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"inn":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"address":{"type":"string"},"contactName":{"type":"string"},"createdAt":{"type":"string"},"description":{"type":"string"},"profileRevision":{"type":"number"},"updatedAt":{"type":"string"},"emailDelivery":{"type":"object","properties":{"status":{"type":"string","enum":["sent","failed","not_configured"]},"at":{"type":"string"}},"required":["status","at"]}},"required":["id","name","createdAt"]},"ContractorCatalog":{"type":"object","properties":{"organizations":{"type":"array","items":{"$ref":"#/components/schemas/Contractor"}},"users":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"active":{"type":"boolean"},"registered":{"type":"boolean"}},"required":["id","organizationId","name","email","active","registered"]}},"contracts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"number":{"type":"string"},"title":{"type":"string"},"object":{"type":"string"},"status":{"type":"string"},"date":{"type":"string"},"deadline":{"type":"string"},"address":{"type":"string"},"amount":{"type":["number","null"]},"stage":{"type":"string","enum":["E","EC","ET","IN"]},"createdAt":{"type":"string"},"estimates":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]}},"workSchedules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]}},"platformId":{"type":"string"},"platformRevision":{"type":"number"}},"required":["id","organizationId","number","title","object","status"]}},"invitations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"userId":{"type":"string"},"expiresAt":{"type":"string"},"usedAt":{"type":["string","null"]},"revokedAt":{"type":["string","null"]}},"required":["id","userId","expiresAt","usedAt","revokedAt"]}},"portalUrl":{"type":"string"}},"required":["organizations","users","contracts","invitations","portalUrl"]},"ContractorCreation":{"type":"object","properties":{"organization":{"$ref":"#/components/schemas/Contractor"},"emailDelivery":{"type":"object","properties":{"status":{"type":"string","enum":["sent","failed","not_configured"]},"message":{"type":"string"}},"required":["status","message"]}},"required":["organization","emailDelivery"]},"ContractorNote":{"type":"object","properties":{"id":{"type":"string"},"contractorId":{"type":"string"},"text":{"type":"string"},"revision":{"type":"number"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"author":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"updatedBy":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]}},"required":["id","contractorId","text","revision","createdAt","updatedAt","author","updatedBy"]},"KanbanData":{"type":"object","properties":{"boards":{"type":"array","items":{"$ref":"#/components/schemas/KanbanBoard"}},"members":{"type":"array","items":{"$ref":"#/components/schemas/KanbanMember"}},"canEdit":{"type":"boolean"},"canCreate":{"type":"boolean"}},"required":["boards","members","canEdit","canCreate"]},"KanbanBoard":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"revision":{"type":"number"},"columns":{"type":"array","items":{"$ref":"#/components/schemas/KanbanColumn"}},"labels":{"type":"array","items":{"$ref":"#/components/schemas/KanbanLabel"}},"cards":{"type":"array","items":{"$ref":"#/components/schemas/KanbanCard"}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"createdBy":{"type":"string"},"contract":{"$ref":"#/components/schemas/KanbanContract","description":"Source snapshot used to reconcile contract changes without resetting work."},"completionColumnId":{"type":"string"},"kind":{"$ref":"#/components/schemas/KanbanBoardKind","description":"Existing boards without a kind remain department boards."},"access":{"$ref":"#/components/schemas/KanbanAccess","description":"Missing membership settings retain the existing shared department board."},"members":{"type":"array","items":{"$ref":"#/components/schemas/KanbanBoardMember"}},"permissions":{"$ref":"#/components/schemas/KanbanPermissions","description":"Calculated for the current request; never persisted."}},"required":["id","title","description","revision","columns","labels","cards","createdAt","updatedAt"]},"KanbanColumn":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"color":{"$ref":"#/components/schemas/KanbanColor"}},"required":["id","title","color"]},"KanbanColor":{"type":"string","enum":["slate","purple","blue","amber","green","red"]},"KanbanLabel":{"$ref":"#/components/schemas/KanbanColumn"},"KanbanCard":{"type":"object","properties":{"id":{"type":"string"},"columnId":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"assigneeIds":{"type":"array","items":{"type":"string"}},"labelIds":{"type":"array","items":{"type":"string"}},"dueDate":{"type":"string"},"completed":{"type":"boolean"},"archived":{"type":"boolean"},"comments":{"type":"array","items":{"$ref":"#/components/schemas/KanbanComment"}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"createdBy":{"type":"string"},"contractCheckpointId":{"type":"string"},"contractTask":{"type":"string","const":"acceptance"}},"required":["id","columnId","title","description","assigneeIds","labelIds","dueDate","completed","archived","comments","createdAt","updatedAt","createdBy"]},"KanbanComment":{"type":"object","properties":{"id":{"type":"string"},"authorId":{"type":"string"},"author":{"type":"string"},"text":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","authorId","author","text","createdAt"]},"KanbanContract":{"type":"object","properties":{"id":{"type":"string"},"buildingId":{"type":"string"},"number":{"type":"string"},"date":{"type":"string"},"title":{"type":"string"},"contractor":{"type":"string"},"status":{"type":"string","enum":["active","archived"]},"start":{"type":"string"},"end":{"type":"string"},"revision":{"type":"number"},"checkpoints":{"type":"array","items":{"$ref":"#/components/schemas/ContractCheckpoint"}}},"required":["id","buildingId","number","date","title","contractor","status","start","end","revision"]},"KanbanBoardKind":{"type":"string","enum":["department","personal"]},"KanbanAccess":{"type":"string","enum":["district","members"]},"KanbanBoardMember":{"type":"object","properties":{"userId":{"type":"string"},"role":{"$ref":"#/components/schemas/KanbanRole"}},"required":["userId","role"]},"KanbanRole":{"type":"string","enum":["admin","editor","viewer"]},"KanbanPermissions":{"type":"object","properties":{"role":{"$ref":"#/components/schemas/KanbanRole"},"canEdit":{"type":"boolean"},"canManage":{"type":"boolean"}},"required":["role","canEdit","canManage"]},"KanbanMember":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"active":{"type":"boolean"},"canEdit":{"type":"boolean"},"isAdmin":{"type":"boolean"},"canReadContracts":{"type":"boolean"}},"required":["id","name","active","canEdit","isAdmin"]},"JsonObject":{"type":"object","additionalProperties":true,"description":"Объект с полями конкретной операции. Дополнительные поля зависят от действия, роли и подключённых модулей."},"Error":{"type":"object","properties":{"error":{"type":"string","description":"Сообщение для пользователя"},"code":{"type":"string","description":"Машиночитаемый код; присутствует не во всех ошибках"}},"required":["error"],"additionalProperties":true},"Ok":{"type":"object","properties":{"ok":{"const":true}},"required":["ok"],"additionalProperties":true},"Login":{"type":"object","properties":{"email":{"type":"string","format":"email"},"password":{"type":"string","format":"password","writeOnly":true}},"required":["email","password"],"additionalProperties":true},"PasswordChange":{"type":"object","properties":{"currentPassword":{"type":"string","format":"password","writeOnly":true},"newPassword":{"type":"string","format":"password","minLength":15,"maxLength":128,"writeOnly":true}},"required":["currentPassword","newPassword"],"additionalProperties":true},"UserCreate":{"type":"object","properties":{"email":{"type":"string"},"name":{"type":"string"},"role":{"$ref":"#/components/schemas/Role"},"assignments":{"type":"array","items":{"$ref":"#/components/schemas/ObjectAssignment"},"description":"Missing assignments on legacy district accounts mean district access."},"password":{"type":"string","format":"password","writeOnly":true}},"required":["email","name","role","password"],"additionalProperties":true},"UserUpdate":{"type":"object","properties":{"email":{"type":"string"},"name":{"type":"string"},"role":{"$ref":"#/components/schemas/Role"},"assignments":{"type":"array","items":{"$ref":"#/components/schemas/ObjectAssignment"},"description":"Missing assignments on legacy district accounts mean district access."},"active":{"type":"boolean"}},"required":["email","name","role","active"],"additionalProperties":true},"ContractWrite":{"type":"object","properties":{"buildingId":{"type":"string"},"number":{"type":"string"},"date":{"type":"string"},"title":{"type":"string"},"type":{"type":"string","enum":["repair","maintenance","estimate","design","supervision","other"]},"workType":{"type":"string"},"contractor":{"type":"string"},"phone":{"type":"string"},"start":{"type":"string"},"end":{"type":"string"},"amount":{"type":["number","null"]},"status":{"type":"string","enum":["active","archived"]},"description":{"type":"string"},"checkpoints":{"type":"array","items":{"$ref":"#/components/schemas/ContractCheckpoint"}},"revision":{"type":"integer","minimum":1},"contractorId":{"type":"string"}},"required":["buildingId","number","date","title","type","amount","status"],"additionalProperties":true,"anyOf":[{"required":["contractor"]},{"required":["contractorId"]}]},"RequestCreate":{"type":"object","properties":{"buildingId":{"type":"string"},"kind":{"type":"string","enum":["problem","contract","repair"]},"contractId":{"type":"string"},"contract":{"$ref":"#/components/schemas/RequestContract"},"priority":{"type":"string","enum":["normal","urgent"]},"administrationApproved":{"type":"boolean"},"administrationApprovalFileId":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"location":{"type":"string"},"locationMode":{"type":"string","enum":["text","plan"]},"floorId":{"type":"string"},"roomId":{"type":"string"},"planRevision":{"type":"string"},"planRooms":{"type":"array","items":{"$ref":"#/components/schemas/RequestPlanRoom"}},"contactName":{"type":"string"},"contactPhone":{"type":"string"},"contactEmail":{"type":"string"},"contacts":{"type":"array","items":{"$ref":"#/components/schemas/RequestContact"}},"clientId":{"type":"string","format":"uuid","description":"UUID v4, создаётся клиентом для идемпотентной отправки"}},"required":["buildingId","kind","priority","title","description","location","contactName","contactPhone","contactEmail","clientId"]},"RequestUpdate":{"type":"object","properties":{"buildingId":{"type":"string"},"kind":{"type":"string","enum":["problem","contract","repair"]},"contractId":{"type":"string"},"contract":{"$ref":"#/components/schemas/RequestContract"},"priority":{"type":"string","enum":["normal","urgent"]},"administrationApproved":{"type":"boolean"},"administrationApprovalFileId":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"location":{"type":"string"},"locationMode":{"type":"string","enum":["text","plan"]},"floorId":{"type":"string"},"roomId":{"type":"string"},"planRevision":{"type":"string"},"planRooms":{"type":"array","items":{"$ref":"#/components/schemas/RequestPlanRoom"}},"contactName":{"type":"string"},"contactPhone":{"type":"string"},"contactEmail":{"type":"string"},"contacts":{"type":"array","items":{"$ref":"#/components/schemas/RequestContact"}},"revision":{"type":"integer","minimum":1}},"required":["buildingId","kind","priority","title","description","location","contactName","contactPhone","contactEmail","revision"]},"RequestDetail":{"type":"object","properties":{"request":{"$ref":"#/components/schemas/InstitutionRequest"},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/RequestAttachment"}}},"required":["request","attachments"],"additionalProperties":true},"WorkWrite":{"type":"object","properties":{"buildingId":{"type":"string"},"roomId":{"type":"string"},"title":{"type":"string"},"kind":{"type":"string","enum":["current","capital"]},"status":{"$ref":"#/components/schemas/WorkStatus"},"start":{"type":"string"},"end":{"type":"string"},"quantity":{"type":"number"},"rateId":{"type":"string"},"engineer":{"type":"string"},"note":{"type":"string"},"x":{"type":"number"},"y":{"type":"number"},"checkpoints":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"date":{"type":"string"},"done":{"type":"boolean"}},"required":["id","title","date","done"]}}},"required":["buildingId","roomId","title","kind","status","start","end","quantity","rateId","engineer","note","x","y","checkpoints"],"additionalProperties":true},"SmetaUpdate":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"title":{"type":"string","minLength":1,"maxLength":500},"contractId":{"default":"","type":"string","maxLength":100},"profile":{"anyOf":[{"type":"object","properties":{"normPackageId":{"default":"","type":"string","maxLength":100},"pricePackageId":{"default":"","type":"string","maxLength":100},"rulePackageId":{"default":"","type":"string","maxLength":100},"method":{"type":"string","enum":["","resource","resource-index","base-index"]},"region":{"default":"","type":"string","maxLength":100},"zone":{"default":"","type":"string","maxLength":100},"period":{"default":"","type":"string","maxLength":100},"moneyDigits":{"default":2,"type":"number","const":2}},"required":["method"],"additionalProperties":false},{"type":"null"}]},"observations":{"maxItems":500,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100},"room":{"type":"string","minLength":1,"maxLength":300},"floorId":{"default":"","type":"string","maxLength":100},"roomId":{"default":"","type":"string","maxLength":100},"description":{"type":"string","minLength":1,"maxLength":6000},"quantity":{"type":"string","pattern":"^(?:0|[1-9]\\d{0,11})(?:\\.\\d{1,8})?$"},"unit":{"type":"string","minLength":1,"maxLength":50},"formula":{"type":"string","minLength":1,"maxLength":2000},"conditions":{"default":[],"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":300}},"fileIds":{"default":[],"maxItems":50,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["id","room","description","quantity","unit","formula"],"additionalProperties":false}},"lines":{"maxItems":1000,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100},"observationId":{"type":"string","minLength":1,"maxLength":100},"normCode":{"type":"string","minLength":1,"maxLength":120},"quantity":{"type":"string","pattern":"^(?:0|[1-9]\\d{0,11})(?:\\.\\d{1,8})?$"},"ruleIds":{"default":[],"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":100}},"justification":{"type":"string","minLength":1,"maxLength":4000}},"required":["id","observationId","normCode","quantity","justification"],"additionalProperties":false}}},"required":["revision","title","profile","observations","lines"],"additionalProperties":false},"SmetaAction":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"action":{"type":"string","enum":["calculate","submit","approve","return","revise"]},"comment":{"default":"","type":"string","maxLength":4000}},"required":["revision","action"],"additionalProperties":false},"CatalogImportData":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"kind":{"type":"string","enum":["norms","prices","rules"]},"name":{"type":"string","minLength":1,"maxLength":300},"version":{"type":"string","minLength":1,"maxLength":200},"normVersion":{"type":"string","minLength":1,"maxLength":200},"sourceUrl":{"default":"","anyOf":[{"type":"string","const":""},{"type":"string","maxLength":2000,"format":"uri"}]},"sourceName":{"type":"string","minLength":1,"maxLength":500},"region":{"default":"","type":"string","maxLength":100},"zone":{"default":"","type":"string","maxLength":100},"period":{"default":"","type":"string","maxLength":100},"norms":{"default":[],"maxItems":100000,"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":120},"name":{"type":"string","minLength":1,"maxLength":2000},"unit":{"type":"string","minLength":1,"maxLength":50},"quantityBase":{"type":"string","pattern":"^(?:0|[1-9]\\d{0,11})(?:\\.\\d{1,8})?$"},"workComposition":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":2000}},"conditions":{"default":[],"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":300}},"technicalReferences":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":4000}},"resources":{"minItems":1,"maxItems":1000,"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":120},"name":{"type":"string","minLength":1,"maxLength":1000},"unit":{"type":"string","minLength":1,"maxLength":50},"kind":{"type":"string","enum":["labor","driver","machine","material","transport"]},"consumption":{"type":"string","pattern":"^(?:0|[1-9]\\d{0,11})(?:\\.\\d{1,8})?$"}},"required":["code","name","unit","kind","consumption"]}}},"required":["code","name","unit","quantityBase","workComposition","technicalReferences","resources"],"additionalProperties":false}},"prices":{"default":[],"maxItems":200000,"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":120},"unit":{"type":"string","minLength":1,"maxLength":50},"price":{"type":"string","pattern":"^(?:0|[1-9]\\d{0,11})(?:\\.\\d{1,8})?$"},"level":{"type":"string","enum":["base","current"]},"index":{"type":"string","pattern":"^(?:0|[1-9]\\d{0,11})(?:\\.\\d{1,8})?$"},"sourceDocument":{"default":"","type":"string","maxLength":2000}},"required":["code","unit","price","level"],"additionalProperties":false}},"rules":{"default":[],"maxItems":10000,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":100},"name":{"type":"string","minLength":1,"maxLength":500},"kind":{"type":"string","enum":["coefficient","overhead","profit","tax"]},"value":{"type":"string","pattern":"^(?:0|[1-9]\\d{0,11})(?:\\.\\d{1,8})?$"},"target":{"type":"string","enum":["labor","driver","machine","material","transport","all","direct","wages"]},"condition":{"default":"","type":"string","maxLength":300},"basis":{"type":"string","minLength":1,"maxLength":4000}},"required":["id","name","kind","value","target","basis"],"additionalProperties":false}}},"required":["kind","name","version","normVersion","sourceName"],"additionalProperties":false},"FileUpload":{"type":"object","properties":{"name":{"type":"string"},"base64":{"type":"string","description":"Содержимое файла в base64"}},"required":["name","base64"],"additionalProperties":true},"Revision":{"type":"object","properties":{"revision":{"type":"integer","minimum":1}},"required":["revision"],"additionalProperties":true},"Action":{"type":"object","properties":{"revision":{"type":"integer","minimum":1},"action":{"type":"string","description":"Действие зависит от раздела и текущего статуса"},"comment":{"type":"string"}},"required":["revision","action"],"additionalProperties":true},"AttachmentUpload":{"type":"object","properties":{"fileName":{"type":"string"},"mediaType":{"type":"string"},"data":{"type":"string","description":"Содержимое файла в base64"},"revision":{"type":"integer","minimum":1},"stage":{"$ref":"#/components/schemas/AttachmentStage"},"checkpointId":{"type":"string"},"note":{"type":"string"},"uploadId":{"type":"string","format":"uuid"}},"additionalProperties":true}},"responses":{"Error400":{"description":"Некорректные данные","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Error401":{"description":"Необходим вход или токен недействителен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Error403":{"description":"Недостаточно прав, неверный CSRF, модуль или район отключён","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Error404":{"description":"Объект отсутствует или недоступен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Error409":{"description":"Конфликт редакции или состояния","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Error429":{"description":"Превышен лимит запросов или операция занята","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Error500":{"description":"Внутренняя ошибка","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Error503":{"description":"Интеграция временно недоступна","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}