{"openapi":"3.1.0","info":{"title":"ҰБТ Көмекші API","description":"Бэкенд образовательной платформы подготовки к ҰБТ.\n\nСоглашения и полный перечень эндпоинтов — `docs/spec/12-api.md`.","version":"0.1.0"},"paths":{"/healthz":{"get":{"tags":["health"],"summary":"Жив ли процесс","description":"Не трогает базу: отвечает, пока жив сам процесс.","operationId":"healthz_healthz_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Healthz Healthz Get"}}}}}}},"/readyz":{"get":{"tags":["health"],"summary":"Готов ли принимать трафик","description":"Проверяет базу. Балансировщик снимает трафик, если она недоступна.","operationId":"readyz_readyz_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Readyz Readyz Get"}}}}}}},"/v1/auth/google":{"post":{"tags":["auth"],"summary":"Вход через Google","operationId":"login_google_v1_auth_google_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SocialLoginIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenPairOut"}}}},"401":{"description":"Токен провайдера недействителен"},"429":{"description":"`rate_limited`, `details.retry_after_sec`"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/apple":{"post":{"tags":["auth"],"summary":"Вход через Apple","description":"Apple отдаёт имя только при первом входе — клиент обязан передать его в поле full_name, второго шанса не будет.","operationId":"login_apple_v1_auth_apple_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SocialLoginIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenPairOut"}}}},"401":{"description":"Токен провайдера недействителен"},"429":{"description":"`rate_limited`, `details.retry_after_sec`"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/staff/options":{"get":{"tags":["auth"],"summary":"Что спрашивать на входе в панель","description":"Нужен ли код второго фактора. Панель рисует поле по этому ответу, а не по своей сборке: включают и выключают фактор окружением (ADR-0028).","operationId":"staff_options_v1_auth_staff_options_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StaffAuthOptions"}}}}}}},"/v1/auth/staff/login":{"post":{"tags":["auth"],"summary":"Вход сотрудника в панель управления","description":"E-mail, пароль и код TOTP. Второй фактор обязателен, пока не выключен окружением (`STAFF_MFA_REQUIRED=false`, ADR-0028); присланный код проверяется в любом случае. После серии неудач по одному адресу почты вход по нему временно закрывается — 429. Панели в браузере refresh уходит своей httpOnly-cookie `aida_staff_refresh` (путь `/v1/auth/staff`, ADR-0034), не той, что у кабинета: без неё сотрудник вводил бы пароль каждые полчаса, а с общей вход в кабинет выкидывал бы из панели.","operationId":"login_staff_v1_auth_staff_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StaffLoginIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenPairOut"}}}},"401":{"description":"Неверные данные или нет прав сотрудника"},"429":{"description":"`rate_limited`, `details.retry_after_sec`"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/link/{provider}":{"post":{"tags":["auth"],"summary":"Привязать второго провайдера","operationId":"link_provider_v1_auth_link__provider__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"provider","in":"path","required":true,"schema":{"$ref":"#/components/schemas/AuthProvider"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SocialLoginIn"}}}},"responses":{"204":{"description":"Successful Response"},"409":{"description":"Провайдер уже привязан к другому аккаунту"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/identities":{"get":{"tags":["auth"],"summary":"Способы входа","description":"Через что можно войти в этот аккаунт, в порядке привязки (E1-175). Адрес-ретранслятор Apple отмечен `email_hidden`. Привязать ещё один способ — `POST /v1/auth/link/{provider}`.","operationId":"list_identities_v1_auth_identities_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/IdentityOut"},"type":"array","title":"Response List Identities V1 Auth Identities Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/auth/staff/totp/start":{"post":{"tags":["auth"],"summary":"Начать подключение второго фактора","description":"Отдаёт секрет и ссылку `otpauth://` тому, кто знает пароль. QR панель рисует сама — картинка по сети не ходит. Подключённый фактор заменить нельзя: 409.","operationId":"start_totp_v1_auth_staff_totp_start_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TotpEnrollStartIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TotpEnrollStartOut"}}}},"401":{"description":"Неверная почта или пароль"},"409":{"description":"Второй фактор уже подключён"},"429":{"description":"`rate_limited`, `details.retry_after_sec`"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/staff/totp/confirm":{"post":{"tags":["auth"],"summary":"Подтвердить второй фактор кодом и войти","description":"Код из приложения делает выданный секрет рабочим и сразу впускает в панель: вводить пароль второй раз подряд незачем.","operationId":"confirm_totp_v1_auth_staff_totp_confirm_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TotpEnrollConfirmIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenPairOut"}}}},"401":{"description":"Неверные данные, неверный код или секрет устарел"},"409":{"description":"Второй фактор уже подключён"},"429":{"description":"`rate_limited`, `details.retry_after_sec`"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/staff/refresh":{"post":{"tags":["auth"],"summary":"Обновить токены панели","description":"Как `/refresh`, но по cookie панели `aida_staff_refresh` (ADR-0034): у панели и кабинета разные cookie, и вход в одном не выкидывает из другого. Refresh ротируется, сессия продлевается на `STAFF_SESSION_TTL_HOURS`; учётной записи без прав сотрудника — 401, а её сессия закрывается.","operationId":"refresh_staff_v1_auth_staff_refresh_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenPairOut"}}}},"401":{"description":"Сессия истекла, завершена или нет прав сотрудника"}}}},"/v1/auth/staff/logout":{"post":{"tags":["auth"],"summary":"Выход из панели","description":"Токен — из cookie панели; она стирается в любом случае. Сессия кабинета в том же браузере не трогается (ADR-0034).","operationId":"logout_staff_v1_auth_staff_logout_post","responses":{"204":{"description":"Successful Response"}}}},"/v1/auth/refresh":{"post":{"tags":["auth"],"summary":"Обновить токены","description":"Refresh ротируется: старый становится недействительным. Повторное использование израсходованного токена отзывает всю сессию. Веб-кабинет токен в теле не шлёт: он приходит и обновляется в httpOnly-cookie.","operationId":"refresh_v1_auth_refresh_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/RefreshIn"},{"type":"null"}],"title":"Data"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenPairOut"}}}},"401":{"description":"Сессия истекла, завершена или скомпрометирована"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/logout":{"post":{"tags":["auth"],"summary":"Выход с устройства","description":"Токен — из тела или из cookie веб-кабинета; cookie стирается в любом случае.","operationId":"logout_v1_auth_logout_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/RefreshIn"},{"type":"null"}],"title":"Data"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/claim-guest":{"post":{"tags":["auth"],"summary":"Перенести состояние гостя на аккаунт","description":"После входа: закладки с устройства — в сохранённое, просмотры ленты по `X-Device-Id` — на аккаунт. Повтор безвреден: уже перенесённое не считается.","operationId":"claim_guest_v1_auth_claim_guest_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-Device-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Device-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClaimGuestIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClaimGuestOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/logout-all":{"post":{"tags":["auth"],"summary":"Выход со всех устройств","operationId":"logout_all_v1_auth_logout_all_post","responses":{"204":{"description":"Successful Response"}},"security":[{"HTTPBearer":[]}]}},"/v1/auth/sessions":{"get":{"tags":["auth"],"summary":"Активные устройства","description":"Где сейчас открыт кабинет. `is_current` отмечает устройство, с которого пришёл запрос, — по заголовку `X-Device-Id`.","operationId":"list_sessions_v1_auth_sessions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-Device-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Device-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SessionOut"},"title":"Response List Sessions V1 Auth Sessions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/sessions/{token_id}":{"delete":{"tags":["auth"],"summary":"Отключить устройство","operationId":"revoke_session_v1_auth_sessions__token_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"token_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Token Id"}}],"responses":{"204":{"description":"Successful Response"},"404":{"description":"Сессия не найдена"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/users/{user_id}/confirm-phone":{"post":{"tags":["console:staff"],"summary":"Подтвердить номер ученика: staff_confirmed","description":"Предварительные зачисления на этот номер активируются той же транзакцией (E1-63); повтор ничего не меняет. SMS нет — подтверждает человек (ADR-0011).","operationId":"confirm_phone_v1_console_users__user_id__confirm_phone_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneConfirmOut"}}}},"404":{"description":"Пользователь не найден"},"422":{"description":"У аккаунта нет номера"}}}},"/v1/console/staff":{"get":{"tags":["console:staff"],"summary":"Сотрудники: для выбора кураторов и авторов","description":"Все действующие сотрудники; `role` оставляет только с этой ролью.","operationId":"list_staff_v1_console_staff_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"role","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Role"},{"type":"null"}],"title":"Role"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/StaffOut"},"title":"Response List Staff V1 Console Staff Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/me/phone":{"put":{"tags":["profile"],"summary":"Указать или изменить номер","description":"Номер в любом написании, хранится в E.164; после смены — `unverified`, подтверждает сотрудник или Telegram-бот. SMS нет (ADR-0011).","operationId":"set_phone_v1_me_phone_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneOut"}}}},"409":{"description":"Номер уже указан в другом аккаунте (`details.reason = phone_taken`)"},"422":{"description":"Номер не в международном формате"}},"security":[{"HTTPBearer":[]}]}},"/v1/me/phone/telegram-link":{"post":{"tags":["profile"],"summary":"Ссылка на Telegram-бот для подтверждения номера","description":"Одноразовый параметр старта живёт полчаса. Бот попросит нажать «Отправить номер» и подтвердит номер, проверенный самим Telegram.","operationId":"telegram_link_v1_me_phone_telegram_link_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelegramLinkOut"}}}},"409":{"description":"Бот не подключён (`details.reason = telegram_not_configured`)"}},"security":[{"HTTPBearer":[]}]}},"/v1/webhooks/apple":{"post":{"tags":["webhooks"],"summary":"Серверные события Sign in with Apple","description":"Apple шлёт JWT формой в поле `payload`: отзыв согласия, удаление Apple ID, смена ретранслятора почты. Подпись проверяется ключами Apple; чужой токен — 401. Адрес прописывается у App ID как Server-to-Server Notification Endpoint.","operationId":"apple_events_v1_webhooks_apple_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_apple_events_v1_webhooks_apple_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Apple Events V1 Webhooks Apple Post"}}}},"401":{"description":"Токен провайдера недействителен"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/me/profile":{"get":{"tags":["profile"],"summary":"Мой профиль","operationId":"read_profile_v1_me_profile_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileOut"}}}}},"security":[{"HTTPBearer":[]}]},"patch":{"tags":["profile"],"summary":"Изменить профиль","operationId":"update_profile_v1_me_profile_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileOut"}}}},"422":{"description":"Ник не годится или занят, город не найден или стёрт"}},"security":[{"HTTPBearer":[]}]}},"/v1/me/subjects":{"put":{"tags":["profile"],"summary":"Профильные предметы","description":"Ровно два. Обязательные блоки ҰБТ сдают все и здесь не выбираются.","operationId":"set_subjects_v1_me_subjects_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubjectsUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileOut"}}}},"422":{"description":"Не два предмета, дубликаты или обязательный блок"}},"security":[{"HTTPBearer":[]}]}},"/v1/me/goals":{"put":{"tags":["profile"],"summary":"Цель: балл и вуз","operationId":"update_goals_v1_me_goals_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoalsUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/me/onboarding/complete":{"post":{"tags":["profile"],"summary":"Завершить онбординг","description":"Идемпотентно: повторный вызов обновляет ответы, дату не сдвигает. Ник необязателен — без него сервер придумает свой.","operationId":"complete_onboarding_v1_me_onboarding_complete_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingComplete"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileOut"}}}},"422":{"description":"Ошибка в выборе предметов, городе или нике"}},"security":[{"HTTPBearer":[]}]}},"/v1/me/nickname/check":{"get":{"tags":["profile"],"summary":"Годится ли ник","description":"Для подсказки на лету: формат, запрещённые слова, занятость. Свой нынешний ник — годится.","operationId":"check_nickname_v1_me_nickname_check_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"value","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"title":"Value"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NicknameCheckOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/me/nickname/suggestion":{"get":{"tags":["profile"],"summary":"Придумать ник","description":"Свободный сгенерированный ник для кнопки «придумать за меня». Не бронируется.","operationId":"suggest_nickname_v1_me_nickname_suggestion_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NicknameSuggestionOut"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/me/avatar/upload":{"post":{"tags":["profile"],"summary":"Куда класть фото профиля","description":"Фото — личный файл в приватном бакете: это снимок школьника.","operationId":"avatar_upload_v1_me_avatar_upload_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadTicket"}}}},"422":{"description":"Не JPEG, PNG или WebP, либо больше 5 МБ"}},"security":[{"HTTPBearer":[]}]}},"/v1/me/avatar":{"put":{"tags":["profile"],"summary":"Поставить загруженное фото","description":"Файл долетел до хранилища — он становится фото профиля, прежнее удаляется.","operationId":"set_avatar_v1_me_avatar_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvatarIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileOut"}}}},"422":{"description":"Файл не найден, чужой или больше 5 МБ"}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["profile"],"summary":"Убрать фото профиля","operationId":"delete_avatar_v1_me_avatar_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileOut"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/me/export":{"get":{"tags":["account"],"summary":"Выгрузка своих данных","description":"Право на выгрузку (docs/spec/10-nonfunctional.md): профиль, потоки, прогресс с названиями курсов и уроков, настройки уведомлений и активные устройства. Ответ отдаётся файлом — браузер сохранит его, а не покажет.","operationId":"export_data_v1_me_export_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataExport"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/me/account":{"delete":{"tags":["account"],"summary":"Удалить аккаунт","description":"Право на удаление: учётная запись обезличивается сразу, все сессии закрываются, места в потоках освобождаются. Учебные данные остаются без связи с человеком. Действие необратимо — подтверждение спрашивает интерфейс.","operationId":"delete_account_v1_me_account_delete","responses":{"204":{"description":"Successful Response"}},"security":[{"HTTPBearer":[]}]}},"/v1/console/users":{"get":{"tags":["console:users"],"summary":"Люди: ученики и сотрудники","description":"Свежие сверху. `q` ищет по имени, нику (с `@` или без), почте и номеру; `role` — по роли, `is_active` отделяет заблокированных, `city_id` — ученики города.","operationId":"list_users_v1_console_users_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Q"}},{"name":"role","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Role"},{"type":"null"}],"title":"Role"}},{"name":"is_active","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},{"name":"city_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"City Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":20,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_ConsoleUserRow_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["console:users"],"summary":"Завести сотрудника","description":"Пароль выдаёт сервер и показывает один раз: на сервере он хранится только хешем. Второй фактор сотрудник подключает сам при первом входе (ADR-0028).","operationId":"create_staff_v1_console_users_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StaffCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StaffPasswordOut"}}}},"409":{"description":"Сотрудник с такой почтой уже есть"},"422":{"description":"Нужна роль сотрудника"}}}},"/v1/console/users/{user_id}/password":{"post":{"tags":["console:users"],"summary":"Выдать новый пароль","description":"Для тех, кто забыл пароль или потерял телефон: второй фактор снимается и подключается заново при следующем входе, все сессии закрываются.","operationId":"reissue_password_v1_console_users__user_id__password_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StaffPasswordOut"}}}},"404":{"description":"Пользователь не найден"},"422":{"description":"Это не учётная запись сотрудника"}}}},"/v1/console/users/{user_id}":{"get":{"tags":["console:users"],"summary":"Карточка человека","description":"Профиль, провайдеры входа, телефон, роли, потоки, устройства и журнал.","operationId":"user_card_v1_console_users__user_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCard"}}}},"404":{"description":"Пользователь не найден"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["console:users"],"summary":"Удалить аккаунт по обращению","description":"Обезличивание, как при самостоятельном удалении: сессии закрываются, места в потоках освобождаются, учебные данные остаются без связи с человеком. Свой аккаунт так не удаляется — для этого есть кнопка в приложении.","operationId":"delete_user_v1_console_users__user_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"204":{"description":"Successful Response"},"404":{"description":"Пользователь не найден"},"422":{"description":"Свой аккаунт удаляется в приложении"}}}},"/v1/console/users/{user_id}/roles":{"put":{"tags":["console:users"],"summary":"Изменить роли","description":"Присылается полный набор ролей. `student` остаётся всегда: приложение проверяет её на своих экранах.","operationId":"set_roles_v1_console_users__user_id__roles_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RolesIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCard"}}}},"404":{"description":"Пользователь не найден"},"422":{"description":"Нельзя снять с себя администратора"}}}},"/v1/console/users/{user_id}/block":{"post":{"tags":["console:users"],"summary":"Заблокировать","description":"Вход закрывается, все живые сессии отзываются сразу.","operationId":"block_user_v1_console_users__user_id__block_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCard"}}}},"404":{"description":"Пользователь не найден"},"422":{"description":"Нельзя заблокировать себя"}}}},"/v1/console/users/{user_id}/unblock":{"post":{"tags":["console:users"],"summary":"Разблокировать","operationId":"unblock_user_v1_console_users__user_id__unblock_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCard"}}}},"404":{"description":"Пользователь не найден"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/users/{user_id}/export":{"get":{"tags":["console:users"],"summary":"Выгрузить данные человека","description":"Тот же файл, что человек забирает сам, — для обращений, где он просит выгрузку письмом. Выдача попадает в журнал.","operationId":"export_user_v1_console_users__user_id__export_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataExport"}}}},"404":{"description":"Пользователь не найден"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/dashboard":{"get":{"tags":["console:dashboard"],"summary":"Дашборд администратора","description":"Ученики и преподаватели, активные, зачисления и заявки, учёба, лента, рост нарастающим итогом, разрезы, топы и плашки за `days` дней (по Алматы) — со сравнением с предыдущим таким же периодом. Ручка только читает готовые дневные итоги: их пересчитывает воркер раз в 15 минут (ADR-0035), время пересчёта — в `computed_at`.","operationId":"dashboard_v1_console_dashboard_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"$ref":"#/components/schemas/DashboardPeriod","description":"Период, дней","default":30},"description":"Период, дней"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/subjects":{"get":{"tags":["catalog"],"summary":"Список предметов","description":"Публичный справочник. Доступен гостю без авторизации.","operationId":"list_subjects_v1_subjects_get","parameters":[{"name":"Accept-Language","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SubjectOut"},"title":"Response List Subjects V1 Subjects Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/subjects/{subject_id}":{"get":{"tags":["catalog"],"summary":"Предмет","operationId":"get_subject_v1_subjects__subject_id__get","parameters":[{"name":"subject_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Subject Id"}},{"name":"Accept-Language","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubjectOut"}}}},"404":{"description":"Предмет не найден"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/subjects/{subject_id}/topics":{"get":{"tags":["catalog"],"summary":"Дерево тем предмета","operationId":"list_topics_v1_subjects__subject_id__topics_get","parameters":[{"name":"subject_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Subject Id"}},{"name":"Accept-Language","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TopicOut"},"title":"Response List Topics V1 Subjects  Subject Id  Topics Get"}}}},"404":{"description":"Предмет не найден"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/regions":{"get":{"tags":["catalog"],"summary":"Области","operationId":"list_regions_v1_regions_get","parameters":[{"name":"Accept-Language","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RegionOut"},"title":"Response List Regions V1 Regions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/cities":{"get":{"tags":["catalog"],"summary":"Города","operationId":"list_cities_v1_cities_get","parameters":[{"name":"region_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Region Id"}},{"name":"Accept-Language","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CityOut"},"title":"Response List Cities V1 Cities Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/universities":{"get":{"tags":["catalog"],"summary":"Вузы","operationId":"list_universities_v1_universities_get","parameters":[{"name":"Accept-Language","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UniversityOut"},"title":"Response List Universities V1 Universities Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/feed":{"get":{"tags":["feed"],"summary":"Лента","description":"Публичная лента: хронология с фильтрами, доступна гостю без входа (ADR-0025). Без `language` — посты на обоих языках, и гостю, и вошедшему: язык обучения из профиля ленту не сужает (решение 2026-10-30). На первой странице основной ленты есть `pinned`.","operationId":"feed_v1_feed_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"language","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Locale"},{"type":"null"}],"description":"Язык материала. Вошедшему без параметра — из профиля","title":"Language"},"description":"Язык материала. Вошедшему без параметра — из профиля"},{"name":"subject_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Предмет","title":"Subject Id"},"description":"Предмет"},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/PostType"},{"type":"null"}],"description":"Тип поста","title":"Type"},"description":"Тип поста"},{"name":"tag","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"description":"Метка (slug)","title":"Tag"},"description":"Метка (slug)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":20,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedPage"}}}},"422":{"description":"Некорректный курсор или параметры"}}}},"/v1/posts/{slug}":{"get":{"tags":["feed"],"summary":"Пост целиком","description":"Слаг уникален в паре с языком. Явный `language` выбирает версию; без него — язык зрителя из профиля, иначе самая свежая. Ссылки на файлы из блоков — в `media_urls` по `media_id`.","operationId":"get_post_v1_posts__slug__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"language","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Locale"},{"type":"null"}],"description":"Язык материала. Вошедшему без параметра — из профиля","title":"Language"},"description":"Язык материала. Вошедшему без параметра — из профиля"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostOut"}}}},"404":{"description":"Пост не найден или ещё не опубликован"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/posts/{slug}/related":{"get":{"tags":["feed"],"summary":"Похожие посты","description":"До трёх постов на том же языке: сначала та же тема, потом тот же предмет.","operationId":"related_posts_v1_posts__slug__related_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"language","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Locale"},{"type":"null"}],"description":"Язык материала. Вошедшему без параметра — из профиля","title":"Language"},"description":"Язык материала. Вошедшему без параметра — из профиля"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PostCardOut"},"title":"Response Related Posts V1 Posts  Slug  Related Get"}}}},"404":{"description":"Пост не найден"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/posts/{post_id}/view":{"post":{"tags":["feed"],"summary":"Отметка просмотра","description":"Один просмотр на зрителя в сутки; повторный вызов с `read_complete` дописывает «дочитал» в тот же просмотр. Гость считается по заголовку `X-Device-Id`.","operationId":"record_view_v1_posts__post_id__view_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Post Id"}},{"name":"X-Device-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Device-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ViewIn"},{"type":"null"}],"title":"Body"}}}},"responses":{"204":{"description":"Successful Response"},"404":{"description":"Пост не найден"},"422":{"description":"Нет ни входа, ни X-Device-Id"}}}},"/v1/posts/{post_id}/like":{"post":{"tags":["feed"],"summary":"Лайк","description":"Идемпотентно: повторный лайк ничего не меняет. Гостю — 401, шторка входа на клиенте.","operationId":"like_v1_posts__post_id__like_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Post Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReactionOut"}}}},"401":{"description":"Требуется вход"},"404":{"description":"Пост не найден"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["feed"],"summary":"Снять лайк","description":"Идемпотентно: снять отсутствующий лайк — не ошибка.","operationId":"unlike_v1_posts__post_id__like_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Post Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReactionOut"}}}},"401":{"description":"Требуется вход"},"404":{"description":"Пост не найден"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/posts/{post_id}/report":{"post":{"tags":["feed"],"summary":"Пожаловаться на пост","description":"«Ошибка в разборе»: сообщение о неверном посте, доступно всем, включая гостей (`X-Device-Id`). Комментарий необязателен. Повторная жалоба того же зрителя на тот же пост не создаёт новую — обновляет открытую.","operationId":"report_post_v1_posts__post_id__report_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Post Id"}},{"name":"X-Device-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Device-Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/PostReportIn"},{"type":"null"}],"title":"Body"}}}},"responses":{"204":{"description":"Successful Response"},"404":{"description":"Пост не найден"},"422":{"description":"Нет ни входа, ни X-Device-Id"}}}},"/v1/me/saved":{"get":{"tags":["saved"],"summary":"Сохранённое","description":"Единый список разнородных элементов: пост, конспект урока, фрагмент конспекта, формула. Свежие сверху. `source_id` — урок-источник: так экран урока узнаёт, что из его конспекта уже сохранено.","operationId":"list_saved_v1_me_saved_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"item_type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/SavedItemType"},{"type":"null"}],"title":"Item Type"}},{"name":"subject_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Subject Id"}},{"name":"source_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Source Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":20,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_SavedItemOut_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["saved"],"summary":"Сохранить","description":"Идемпотентно: повторное сохранение возвращает ту же запись со статусом 200. У фрагмента и формулы своей записи нет: `item_id` придумывает приложение, `source_id` — урок, а снимок содержимого лежит в `payload` (`text` у фрагмента, `latex` у формулы).","operationId":"save_v1_me_saved_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedItemCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedItemOut"}}}},"201":{"description":"Сохранено"},"404":{"description":"Элемент не найден или не опубликован"},"422":{"description":"Тип не поддерживается или снимок пуст"}}}},"/v1/me/saved/{item_type}/{item_id}":{"delete":{"tags":["saved"],"summary":"Убрать из сохранённого","description":"По типу и идентификатору элемента, а не по id записи: клиент знает пост, не закладку.","operationId":"remove_v1_me_saved__item_type___item_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"item_type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/SavedItemType"}},{"name":"item_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Item Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/me/plan":{"get":{"tags":["study_plan"],"summary":"Моё расписание по дням","description":"Свои пункты за дни с `from` по `to` (по умолчанию — сегодня, не больше месяца). В сегодняшнем дне — ещё и автопункты плана дня: урок потока с ближайшим дедлайном или вернувшееся на доработку задание, урок, которым продолжить, и тема с наибольшим числом ошибок за месяц. Сделанное сегодня остаётся отмеченным.","operationId":"my_plan_v1_me_plan_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"From"}},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"To"}},{"name":"Accept-Language","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/me/plan/items":{"post":{"tags":["study_plan"],"summary":"Добавить свой пункт","description":"День и время — по часам ученика. Напоминание ставит телефон (локальное `schedule_reminder`), поэтому оно только у пункта со временем.","operationId":"add_item_v1_me_plan_items_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanItemIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanItemOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/me/plan/items/{item_id}":{"patch":{"tags":["study_plan"],"summary":"Изменить свой пункт или отметить «сделано»","description":"Меняется только переданное; `null` очищает время, предмет, длительность или напоминание. `done` ставит и снимает отметку.","operationId":"update_item_v1_me_plan_items__item_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Item Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanItemPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanItemOut"}}}},"404":{"description":"Пункт не найден"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["study_plan"],"summary":"Удалить свой пункт","operationId":"delete_item_v1_me_plan_items__item_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Item Id"}}],"responses":{"204":{"description":"Successful Response"},"404":{"description":"Пункт не найден"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/me/progress/weekly":{"get":{"tags":["weekly_report"],"summary":"Мой недельный отчёт","description":"Неделя с понедельника по воскресенье по часам ученика: время уроков, тесты и точность по предметам, сдвиг готовности за неделю. `week` — любой день нужной недели; без него — прошлая законченная, а у пришедшего на этой неделе — текущая. Раньше недели прихода и позже текущей — 422.","operationId":"my_week_v1_me_progress_weekly_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"week","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Любой день нужной недели","title":"Week"},"description":"Любой день нужной недели"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WeeklyReportOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/teachers":{"get":{"tags":["teachers"],"summary":"Преподаватели","operationId":"list_public_v1_teachers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/TeacherOut"},"type":"array","title":"Response List Public V1 Teachers Get"}}}}}}},"/v1/teachers/{teacher_id}":{"get":{"tags":["teachers"],"summary":"Преподаватель","operationId":"get_public_v1_teachers__teacher_id__get","parameters":[{"name":"teacher_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Teacher Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeacherOut"}}}},"404":{"description":"Преподаватель не найден"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/subjects":{"get":{"tags":["console:catalog"],"summary":"Предметы для панели: с переводами и выключенными","operationId":"list_console_subjects_v1_console_subjects_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/SubjectConsoleOut"},"type":"array","title":"Response List Console Subjects V1 Console Subjects Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["console:catalog"],"summary":"Создать предмет","operationId":"create_subject_v1_console_subjects_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubjectCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubjectConsoleOut"}}}},"409":{"description":"Код уже занят"},"422":{"description":"Ошибка валидации"}},"security":[{"HTTPBearer":[]}]}},"/v1/console/subjects/{subject_id}":{"get":{"tags":["console:catalog"],"summary":"Предмет для панели","operationId":"get_console_subject_v1_console_subjects__subject_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"subject_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Subject Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubjectConsoleOut"}}}},"404":{"description":"Предмет не найден"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["console:catalog"],"summary":"Изменить предмет","operationId":"update_subject_v1_console_subjects__subject_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"subject_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Subject Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubjectUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubjectConsoleOut"}}}},"404":{"description":"Предмет не найден"},"422":{"description":"Ошибка валидации"}}}},"/v1/console/subjects/{subject_id}/topics":{"get":{"tags":["console:catalog"],"summary":"Темы предмета для панели: деревом, с выключенными и счётчиками","description":"На темах держатся банк вопросов, тесты уроков и «темы к повторению», поэтому у каждой видно, сколько на ней вопросов и уроков.","operationId":"list_console_topics_v1_console_subjects__subject_id__topics_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"subject_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Subject Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TopicConsoleOut"},"title":"Response List Console Topics V1 Console Subjects  Subject Id  Topics Get"}}}},"404":{"description":"Предмет не найден"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["console:catalog"],"summary":"Создать тему","operationId":"create_topic_v1_console_subjects__subject_id__topics_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"subject_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Subject Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopicCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopicConsoleOut"}}}},"404":{"description":"Предмет не найден"},"409":{"description":"Код уже занят"},"422":{"description":"Ошибка валидации"}}}},"/v1/console/topics/{topic_id}":{"patch":{"tags":["console:catalog"],"summary":"Изменить тему","operationId":"update_topic_v1_console_topics__topic_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"topic_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Topic Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopicUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopicConsoleOut"}}}},"404":{"description":"Тема не найдена"},"422":{"description":"Ошибка валидации"}}},"delete":{"tags":["console:catalog"],"summary":"Удалить тему","description":"Только пустую. Тему с вопросами, уроками или подтемами выключают: она уходит из выбора, а связи остаются целыми.","operationId":"delete_topic_v1_console_topics__topic_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"topic_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Topic Id"}}],"responses":{"204":{"description":"Successful Response"},"404":{"description":"Тема не найдена"},"409":{"description":"На теме есть вопросы, уроки или подтемы"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/regions":{"get":{"tags":["console:catalog"],"summary":"Области для панели: с переводами и выключенными","operationId":"list_console_regions_v1_console_regions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/RegionConsoleOut"},"type":"array","title":"Response List Console Regions V1 Console Regions Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["console:catalog"],"summary":"Создать область","operationId":"create_region_v1_console_regions_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegionCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegionConsoleOut"}}}},"409":{"description":"Код уже занят"},"422":{"description":"Ошибка валидации"}},"security":[{"HTTPBearer":[]}]}},"/v1/console/regions/{region_id}":{"patch":{"tags":["console:catalog"],"summary":"Изменить область","operationId":"update_region_v1_console_regions__region_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"region_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Region Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegionUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegionConsoleOut"}}}},"404":{"description":"Область не найдена"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/cities":{"get":{"tags":["console:catalog"],"summary":"Города для панели","operationId":"list_console_cities_v1_console_cities_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CityConsoleOut"},"type":"array","title":"Response List Console Cities V1 Console Cities Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["console:catalog"],"summary":"Создать город","operationId":"create_city_v1_console_cities_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CityCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CityConsoleOut"}}}},"409":{"description":"Код уже занят"},"422":{"description":"Ошибка валидации"}},"security":[{"HTTPBearer":[]}]}},"/v1/console/cities/{city_id}":{"patch":{"tags":["console:catalog"],"summary":"Изменить город","operationId":"update_city_v1_console_cities__city_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"city_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"City Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CityUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CityConsoleOut"}}}},"404":{"description":"Город не найден"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/universities":{"get":{"tags":["console:catalog"],"summary":"Вузы для панели","operationId":"list_console_universities_v1_console_universities_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/UniversityConsoleOut"},"type":"array","title":"Response List Console Universities V1 Console Universities Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["console:catalog"],"summary":"Создать вуз","operationId":"create_university_v1_console_universities_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UniversityCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UniversityConsoleOut"}}}},"409":{"description":"Код уже занят"},"422":{"description":"Ошибка валидации"}},"security":[{"HTTPBearer":[]}]}},"/v1/console/universities/{university_id}":{"patch":{"tags":["console:catalog"],"summary":"Изменить вуз","operationId":"update_university_v1_console_universities__university_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"university_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"University Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UniversityUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UniversityConsoleOut"}}}},"404":{"description":"Вуз не найден"},"422":{"description":"Ошибка валидации"}}}},"/v1/console/posts":{"get":{"tags":["console:feed"],"summary":"Все посты","description":"Включая черновики, запланированные и архив; свежее правленные — сверху. `status` — действующий: запланированный с наступившим временем считается опубликованным.","operationId":"console_list_v1_console_posts_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/PostStatus"},{"type":"null"}],"title":"Status"}},{"name":"language","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Locale"},{"type":"null"}],"title":"Language"}},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/PostType"},{"type":"null"}],"title":"Type"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"description":"Поиск по заголовку","title":"Q"},"description":"Поиск по заголовку"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":20,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_ConsolePostOut_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["console:feed"],"summary":"Создать черновик","description":"Слаг без указания выводится из заголовка; занятый получает суффикс.","operationId":"console_create_v1_console_posts_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsolePostDetail"}}}},"422":{"description":"Ошибка в полях или в документе блоков"}}}},"/v1/console/posts/{post_id}":{"get":{"tags":["console:feed"],"summary":"Пост для редактирования","operationId":"console_get_v1_console_posts__post_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Post Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsolePostDetail"}}}},"404":{"description":"Пост не найден"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["console:feed"],"summary":"Изменить пост","description":"Опубликованному посту слаг менять нельзя — ссылки уже разошлись.","operationId":"console_update_v1_console_posts__post_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Post Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsolePostDetail"}}}},"404":{"description":"Пост не найден"},"422":{"description":"Ошибка в полях"}}}},"/v1/console/posts/{post_id}/publish":{"post":{"tags":["console:feed"],"summary":"Опубликовать сейчас или запланировать","description":"Без `at` — сейчас, с будущим `at` — по расписанию; прошлое время отклоняется. Перед публикацией проверяются заголовок, краткое описание, обложка, источник новости и тело (docs/spec/08-console.md); список проблем — в `details.publish`.","operationId":"console_publish_v1_console_posts__post_id__publish_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Post Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/PublishIn"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsolePostOut"}}}},"404":{"description":"Пост не найден"},"409":{"description":"Уже опубликован или в архиве"},"422":{"description":"Не готов к публикации или время в прошлом"}}}},"/v1/console/posts/{post_id}/unschedule":{"post":{"tags":["console:feed"],"summary":"Отменить запланированную публикацию","description":"Возвращает в черновики, пока время не наступило; вышедший пост — только в архив.","operationId":"console_unschedule_v1_console_posts__post_id__unschedule_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Post Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsolePostOut"}}}},"404":{"description":"Пост не найден"},"409":{"description":"Уже вышел"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/posts/{post_id}/archive":{"post":{"tags":["console:feed"],"summary":"В архив","operationId":"console_archive_v1_console_posts__post_id__archive_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Post Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsolePostOut"}}}},"404":{"description":"Пост не найден"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/posts/{post_id}/restore":{"post":{"tags":["console:feed"],"summary":"Вернуть из архива в черновики","operationId":"console_restore_v1_console_posts__post_id__restore_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Post Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsolePostOut"}}}},"404":{"description":"Пост не найден"},"409":{"description":"Пост не в архиве"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/posts/{post_id}/pin":{"post":{"tags":["console:feed"],"summary":"Закрепить","description":"Не более двух закреплённых одновременно; `pinned_until` — автоснятие.","operationId":"console_pin_v1_console_posts__post_id__pin_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Post Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/PinIn"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsolePostOut"}}}},"404":{"description":"Пост не найден"},"409":{"description":"Уже закреплено два поста"},"422":{"description":"Дата снятия в прошлом"}}},"delete":{"tags":["console:feed"],"summary":"Открепить","operationId":"console_unpin_v1_console_posts__post_id__pin_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Post Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsolePostOut"}}}},"404":{"description":"Пост не найден"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/posts/{post_id}/preview":{"get":{"tags":["console:feed"],"summary":"Предпросмотр как в приложении","description":"Тот же ответ, что отдаёт `GET /v1/posts/{slug}`, но для поста в любом статусе.","operationId":"console_preview_v1_console_posts__post_id__preview_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Post Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostOut"}}}},"404":{"description":"Пост не найден"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/homework/{lesson_id}":{"get":{"tags":["homework"],"summary":"Моё задание: срок, шкала и мои попытки","operationId":"my_homework_v1_homework__lesson_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"lesson_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Lesson Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MyHomework"}}}},"403":{"description":"Нет доступа к уроку или нет зачисления в поток"},"404":{"description":"Задание не найдено"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/homework/{lesson_id}/upload":{"post":{"tags":["homework"],"summary":"Куда класть файл работы","description":"Файл идёт прямо в хранилище по подписанной ссылке, как и всё медиа (ADR-0008). Билет выдаётся только по заданию, к которому ученика пускают.","operationId":"upload_ticket_v1_homework__lesson_id__upload_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"lesson_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Lesson Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadTicket"}}}},"403":{"description":"Нет доступа к заданию"},"422":{"description":"Принимаем фотографию или PDF"}}}},"/v1/homework/{lesson_id}/upload/{media_id}/complete":{"post":{"tags":["homework"],"summary":"Подтвердить загрузку файла","operationId":"confirm_upload_v1_homework__lesson_id__upload__media_id__complete_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"lesson_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Lesson Id"}},{"name":"media_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Media Id"}}],"responses":{"204":{"description":"Successful Response"},"403":{"description":"Нет доступа к заданию"},"409":{"description":"Файла нет"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/homework/{lesson_id}/submit":{"post":{"tags":["homework"],"summary":"Сдать работу","description":"Фотографии тетради или PDF, до десяти файлов. Пока работа ждёт проверки или принята, сдать заново нельзя — после «на доработку» можно.","operationId":"submit_v1_homework__lesson_id__submit_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"lesson_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Lesson Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmissionIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmissionOut"}}}},"403":{"description":"Нет доступа к уроку или нет зачисления в поток"},"409":{"description":"Работа уже сдана и ждёт проверки"},"422":{"description":"Файл не найден или неподходящего вида"}}}},"/v1/console/homework":{"get":{"tags":["console:homework"],"summary":"Очередь проверки","description":"Работы своих потоков, дольше ждущие — выше; курсор по (`submitted_at`, id). Администратор видит все.","operationId":"queue_v1_console_homework_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Cohort Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/SubmissionStatus"},{"type":"null"}],"title":"Status"}},{"name":"lesson_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Lesson Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":20,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_QueueRow_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/homework/{submission_id}/review":{"post":{"tags":["console:homework"],"summary":"Принять работу или вернуть на доработку","description":"Балл — по шкале задания: у «сдано или нет» его нет вовсе, у остальных он обязателен при «принято».","operationId":"review_v1_console_homework__submission_id__review_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"submission_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Submission Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmissionOut"}}}},"403":{"description":"Работа чужого потока"},"404":{"description":"Работа не найдена"},"422":{"description":"Балл вне шкалы задания"}}}},"/v1/lessons/{lesson_id}":{"get":{"tags":["courses"],"summary":"Урок","description":"Тело отдаётся только при доступе: демо-урок, бесплатный самостоятельный курс, роль сотрудника или активное зачисление в поток и урок, открытый его расписанием. Ссылки на видео и вложения подписаны и живут 15 минут.","operationId":"get_lesson_view_v1_lessons__lesson_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"lesson_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Lesson Id"}},{"name":"X-Device-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Device-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LessonView"}}}},"403":{"description":"`access_denied` или `lesson_not_open_yet` (с `details.opens_at`); `details.reason` — что показать вместо урока"},"404":{"description":"Урок не найден или архивирован"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/lessons/{lesson_id}/playback":{"get":{"tags":["courses"],"summary":"Свежая подписанная ссылка на видео","description":"Плеер продлевает ссылку по истечении TTL; проверка доступа повторяется — отзыв действует немедленно.","operationId":"get_playback_v1_lessons__lesson_id__playback_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"lesson_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Lesson Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaybackOut"}}}},"403":{"description":"`access_denied` или `lesson_not_open_yet` (с `details.opens_at`); `details.reason` — что показать вместо урока"},"404":{"description":"Урок не найден или архивирован"},"409":{"description":"Видео ещё обрабатывается"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/lessons/{lesson_id}/attachments/{attachment_id}/download":{"get":{"tags":["courses"],"summary":"Подписанная ссылка на вложение","operationId":"get_attachment_download_v1_lessons__lesson_id__attachments__attachment_id__download_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"lesson_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Lesson Id"}},{"name":"attachment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Attachment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DownloadOut"}}}},"403":{"description":"`access_denied` или `lesson_not_open_yet` (с `details.opens_at`); `details.reason` — что показать вместо урока"},"404":{"description":"Урок не найден или архивирован"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/courses":{"get":{"tags":["learning"],"summary":"Витрина курсов","description":"Опубликованные курсы с ближайшим потоком в наборе и моим зачислением. Без `language` — курсы на всех языках, и гостю, и вошедшему: язык обучения из профиля витрину не сужает (решение 2026-10-30).","operationId":"list_courses_v1_courses_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"language","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Locale"},{"type":"null"}],"description":"Язык материала. Вошедшему без параметра — из профиля","title":"Language"},"description":"Язык материала. Вошедшему без параметра — из профиля"},{"name":"subject_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Subject Id"}},{"name":"level","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/CourseLevel"},{"type":"null"}],"title":"Level"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Q"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CourseCardOut"},"title":"Response List Courses V1 Courses Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/courses/{slug}":{"get":{"tags":["learning"],"summary":"Карточка курса","description":"Слаг уникален в паре с языком: `language` выбирает версию, без него — язык обучения ученика.","operationId":"get_course_v1_courses__slug__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"language","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Locale"},{"type":"null"}],"description":"Язык материала. Вошедшему без параметра — из профиля","title":"Language"},"description":"Язык материала. Вошедшему без параметра — из профиля"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CourseCardOut"}}}},"404":{"description":"Курс не найден"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/courses/{slug}/content":{"get":{"tags":["learning"],"summary":"Оглавление курса с замками и датами открытия","description":"Показывается целиком и без зачисления. У каждого урока — `is_locked`, `access_reason`, `opens_at` из единственной проверки доступа (ADR-0013).","operationId":"get_content_v1_courses__slug__content_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"language","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Locale"},{"type":"null"}],"description":"Язык материала. Вошедшему без параметра — из профиля","title":"Language"},"description":"Язык материала. Вошедшему без параметра — из профиля"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CourseContentOut"}}}},"404":{"description":"Курс не найден"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/courses/{slug}/cohorts":{"get":{"tags":["learning"],"summary":"Потоки курса: даты, свободные места, статус набора","operationId":"get_course_cohorts_v1_courses__slug__cohorts_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"language","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Locale"},{"type":"null"}],"description":"Язык материала. Вошедшему без параметра — из профиля","title":"Language"},"description":"Язык материала. Вошедшему без параметра — из профиля"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CohortPublic"},"title":"Response Get Course Cohorts V1 Courses  Slug  Cohorts Get"}}}},"404":{"description":"Курс не найден"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/me/cohorts":{"get":{"tags":["learning"],"summary":"Мои потоки","operationId":"my_cohorts_v1_me_cohorts_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/MyCohortOut"},"type":"array","title":"Response My Cohorts V1 Me Cohorts Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/cohorts/{cohort_id}":{"get":{"tags":["learning"],"summary":"Экран потока: даты, куратор, группа, программа с датами открытия","description":"Только зачисленным и сотрудникам с правом просмотра.","operationId":"cohort_screen_v1_cohorts__cohort_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Cohort Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CohortStudentOut"}}}},"403":{"description":"Нет зачисления в поток"},"404":{"description":"Поток не найден"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/cohorts/{cohort_id}/announcements":{"get":{"tags":["learning"],"summary":"Объявления куратора: закреплённые сверху, новые первыми","operationId":"cohort_announcements_v1_cohorts__cohort_id__announcements_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Cohort Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AnnouncementPublic"},"title":"Response Cohort Announcements V1 Cohorts  Cohort Id  Announcements Get"}}}},"403":{"description":"Нет зачисления в поток"},"404":{"description":"Поток не найден"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/cohorts/{cohort_id}/live-sessions":{"get":{"tags":["learning"],"summary":"Занятия потока: прошедшие с записями, будущие с датами. Без ссылки","operationId":"cohort_live_sessions_v1_cohorts__cohort_id__live_sessions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Cohort Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LiveSessionPublic"},"title":"Response Cohort Live Sessions V1 Cohorts  Cohort Id  Live Sessions Get"}}}},"403":{"description":"Нет зачисления в поток"},"404":{"description":"Поток не найден"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/live-sessions/{session_id}":{"get":{"tags":["learning"],"summary":"Занятие: время, ведущий, статус, запись. Без ссылки","operationId":"live_session_v1_live_sessions__session_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiveSessionPublic"}}}},"403":{"description":"Нет зачисления в поток"},"404":{"description":"Занятие не найдено"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/courses":{"get":{"tags":["console:courses"],"summary":"Курсы, включая черновики","operationId":"list_courses_v1_console_courses_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ContentStatus"},{"type":"null"}],"title":"Status"}},{"name":"language","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Locale"},{"type":"null"}],"title":"Language"}},{"name":"subject_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Subject Id"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Q"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CourseOut"},"title":"Response List Courses V1 Console Courses Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["console:courses"],"summary":"Создать курс","operationId":"create_course_v1_console_courses_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CourseCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CourseDetailOut"}}}},"422":{"description":"Предмет, обложка или преподаватель не найдены"}}}},"/v1/console/courses/{course_id}":{"get":{"tags":["console:courses"],"summary":"Курс с деревом модулей и уроков","operationId":"get_course_v1_console_courses__course_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"course_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Course Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CourseDetailOut"}}}},"404":{"description":"Не найдено"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["console:courses"],"summary":"Изменить курс","operationId":"update_course_v1_console_courses__course_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"course_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Course Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CourseUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CourseDetailOut"}}}},"404":{"description":"Не найдено"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/courses/{course_id}/publish":{"post":{"tags":["console:courses"],"summary":"Опубликовать курс","description":"Блокируется без обложки, без опубликованных уроков, у платного курса без демо-урока и при уроках с необработанным видео (docs/spec/08-console.md).","operationId":"publish_course_v1_console_courses__course_id__publish_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"course_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Course Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CourseDetailOut"}}}},"404":{"description":"Не найдено"},"422":{"description":"Не готово: список причин в details.publish"}}}},"/v1/console/courses/{course_id}/unpublish":{"post":{"tags":["console:courses"],"summary":"Снять курс с витрины","operationId":"unpublish_course_v1_console_courses__course_id__unpublish_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"course_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Course Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CourseDetailOut"}}}},"404":{"description":"Не найдено"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/courses/{course_id}/archive":{"post":{"tags":["console:courses"],"summary":"Архивировать курс","description":"Активные потоки доучиваются, на витрине курс скрыт.","operationId":"archive_course_v1_console_courses__course_id__archive_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"course_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Course Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CourseDetailOut"}}}},"404":{"description":"Не найдено"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/courses/{course_id}/restore":{"post":{"tags":["console:courses"],"summary":"Вернуть курс из архива в черновики","operationId":"restore_course_v1_console_courses__course_id__restore_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"course_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Course Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CourseDetailOut"}}}},"404":{"description":"Не найдено"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/courses/{course_id}/duplicate":{"post":{"tags":["console:courses"],"summary":"Скопировать курс","description":"Основа языковой версии: структура, конспекты, вложения и темы копируются, видео и тайм-коды — нет, версии связываются `translation_group_id`. Копия на том же языке сохраняет видео. Копия и её уроки — черновики.","operationId":"duplicate_course_v1_console_courses__course_id__duplicate_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"course_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Course Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DuplicateIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CourseDetailOut"}}}},"404":{"description":"Не найдено"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/courses/{course_id}/modules/reorder":{"post":{"tags":["console:courses"],"summary":"Новый порядок модулей","operationId":"reorder_modules_v1_console_courses__course_id__modules_reorder_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"course_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Course Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReorderIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CourseDetailOut"}}}},"404":{"description":"Не найдено"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/modules":{"post":{"tags":["console:courses"],"summary":"Добавить модуль в конец курса","operationId":"create_module_v1_console_modules_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModuleCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModuleOut"}}}},"404":{"description":"Не найдено"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/console/modules/{module_id}":{"patch":{"tags":["console:courses"],"summary":"Изменить модуль","operationId":"update_module_v1_console_modules__module_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"module_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Module Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModuleUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModuleOut"}}}},"404":{"description":"Не найдено"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["console:courses"],"summary":"Удалить модуль","description":"Только без опубликованных уроков: их сначала снимают с публикации.","operationId":"delete_module_v1_console_modules__module_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"module_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Module Id"}}],"responses":{"204":{"description":"Successful Response"},"404":{"description":"Не найдено"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/modules/{module_id}/lessons/reorder":{"post":{"tags":["console:courses"],"summary":"Новый порядок уроков","operationId":"reorder_lessons_v1_console_modules__module_id__lessons_reorder_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"module_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Module Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReorderIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModuleOut"}}}},"404":{"description":"Не найдено"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/lessons":{"post":{"tags":["console:courses"],"summary":"Добавить урок в конец модуля","operationId":"create_lesson_v1_console_lessons_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LessonCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LessonOut"}}}},"404":{"description":"Не найдено"},"422":{"description":"Видео, тема не найдены или лишний демо-урок"}},"security":[{"HTTPBearer":[]}]}},"/v1/console/lessons/{lesson_id}":{"get":{"tags":["console:courses"],"summary":"Урок целиком","operationId":"get_lesson_v1_console_lessons__lesson_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"lesson_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Lesson Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LessonOut"}}}},"404":{"description":"Не найдено"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["console:courses"],"summary":"Изменить урок","operationId":"update_lesson_v1_console_lessons__lesson_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"lesson_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Lesson Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LessonUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LessonOut"}}}},"404":{"description":"Не найдено"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["console:courses"],"summary":"Удалить урок","description":"Только черновик или архив: опубликованный урок сначала снимают с публикации.","operationId":"delete_lesson_v1_console_lessons__lesson_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"lesson_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Lesson Id"}}],"responses":{"204":{"description":"Successful Response"},"404":{"description":"Не найдено"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/lessons/{lesson_id}/publish":{"post":{"tags":["console:courses"],"summary":"Опубликовать урок","description":"Видео должно быть обработано, у текстового урока — непустой конспект.","operationId":"publish_lesson_v1_console_lessons__lesson_id__publish_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"lesson_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Lesson Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LessonOut"}}}},"404":{"description":"Не найдено"},"422":{"description":"Не готово: список причин в details.publish"}}}},"/v1/console/lessons/{lesson_id}/unpublish":{"post":{"tags":["console:courses"],"summary":"Снять урок с публикации","operationId":"unpublish_lesson_v1_console_lessons__lesson_id__unpublish_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"lesson_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Lesson Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LessonOut"}}}},"404":{"description":"Не найдено"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/lessons/{lesson_id}/archive":{"post":{"tags":["console:courses"],"summary":"Архивировать урок","operationId":"archive_lesson_v1_console_lessons__lesson_id__archive_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"lesson_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Lesson Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LessonOut"}}}},"404":{"description":"Не найдено"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/lessons/{lesson_id}/chapters":{"put":{"tags":["console:courses"],"summary":"Заменить тайм-коды урока","description":"Полный список: сортируется по времени, повтор секунды и выход за длительность видео — ошибка.","operationId":"set_chapters_v1_console_lessons__lesson_id__chapters_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"lesson_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Lesson Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ChapterIn"},"title":"Items"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LessonOut"}}}},"404":{"description":"Не найдено"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/lessons/{lesson_id}/questions":{"put":{"tags":["console:courses"],"summary":"Заменить вопросы теста урока","description":"Полный список в нужном порядке. Тест урока простой и одинаковый для всех: только вопросы «один правильный» и только на языке курса.","operationId":"set_lesson_questions_v1_console_lessons__lesson_id__questions_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"lesson_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Lesson Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"type":"string","format":"uuid"},"title":"Items"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LessonOut"}}}},"404":{"description":"Не найдено"},"422":{"description":"Вопрос не подходит для теста урока"}}}},"/v1/console/lessons/{lesson_id}/attachments":{"put":{"tags":["console:courses"],"summary":"Заменить вложения урока","description":"Полный список в нужном порядке; вид вложения выводится из типа файла.","operationId":"set_attachments_v1_console_lessons__lesson_id__attachments_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"lesson_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Lesson Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AttachmentIn"},"title":"Items"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LessonOut"}}}},"404":{"description":"Не найдено"},"422":{"description":"Файл не найден"}}}},"/v1/console/cohorts":{"get":{"tags":["console:cohorts"],"summary":"Потоки: куратор — свои, админ — все","description":"Без фильтра по статусу архивные потоки не показываются.","operationId":"list_cohorts_v1_console_cohorts_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/CohortStatus"},{"type":"null"}],"title":"Status"}},{"name":"course_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Course Id"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"description":"По названию или коду","title":"Q"},"description":"По названию или коду"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CohortOut"},"title":"Response List Cohorts V1 Console Cohorts Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["console:cohorts"],"summary":"Создать поток","description":"Код собирается из курса, языка и месяца старта, если не задан. Куратор, заводящий поток, становится его ведущим куратором.","operationId":"create_cohort_v1_console_cohorts_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CohortCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CohortOut"}}}},"422":{"description":"Курс, куратор или преподаватель не найдены; даты не согласованы"}}}},"/v1/console/cohorts/{cohort_id}":{"get":{"tags":["console:cohorts"],"summary":"Поток","operationId":"get_cohort_v1_console_cohorts__cohort_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Cohort Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CohortOut"}}}},"403":{"description":"Поток закреплён за другим куратором"},"404":{"description":"Поток не найден"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["console:cohorts"],"summary":"Изменить поток","description":"Статус здесь не меняется — только переходами жизненного цикла.","operationId":"update_cohort_v1_console_cohorts__cohort_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Cohort Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CohortUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CohortOut"}}}},"403":{"description":"Поток закреплён за другим куратором"},"404":{"description":"Поток не найден"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/cohorts/{cohort_id}/publish":{"post":{"tags":["console:cohorts"],"summary":"Открыть набор","description":"draft → recruiting. Блокируется, если дата старта прошла, нет куратора, расписание пустое при режиме `by_schedule` или курс не опубликован — `details.publish` перечисляет всё сразу.","operationId":"publish_cohort_v1_console_cohorts__cohort_id__publish_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Cohort Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CohortOut"}}}},"403":{"description":"Поток закреплён за другим куратором"},"404":{"description":"Поток не найден"},"409":{"description":"Переход невозможен из текущего статуса; `details.allowed`"},"422":{"description":"Поток не готов к набору"}}}},"/v1/console/cohorts/{cohort_id}/close-recruiting":{"post":{"tags":["console:cohorts"],"summary":"Закрыть набор","description":"recruiting → scheduled. По датам это происходит само: по окну набора или в полночь старта по часовому поясу потока.","operationId":"close_recruiting_v1_console_cohorts__cohort_id__close_recruiting_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Cohort Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CohortOut"}}}},"403":{"description":"Поток закреплён за другим куратором"},"404":{"description":"Поток не найден"},"409":{"description":"Переход невозможен из текущего статуса; `details.allowed`"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/cohorts/{cohort_id}/reopen-recruiting":{"post":{"tags":["console:cohorts"],"summary":"Открыть набор заново","description":"scheduled → recruiting. Если окно набора или старт уже прошли, сначала сдвиньте их — иначе набор закрылся бы снова через минуту.","operationId":"reopen_recruiting_v1_console_cohorts__cohort_id__reopen_recruiting_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Cohort Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CohortOut"}}}},"403":{"description":"Поток закреплён за другим куратором"},"404":{"description":"Поток не найден"},"409":{"description":"Переход невозможен из текущего статуса; `details.allowed`"},"422":{"description":"Окно набора уже закрылось"}}}},"/v1/console/cohorts/{cohort_id}/start":{"post":{"tags":["console:cohorts"],"summary":"Запустить поток","description":"scheduled → active. По дате запускается сам в полночь старта; недобор до `min_size` старт не блокирует — это решение куратора.","operationId":"start_cohort_v1_console_cohorts__cohort_id__start_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Cohort Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CohortOut"}}}},"403":{"description":"Поток закреплён за другим куратором"},"404":{"description":"Поток не найден"},"409":{"description":"Переход невозможен из текущего статуса; `details.allowed`"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/cohorts/{cohort_id}/finish":{"post":{"tags":["console:cohorts"],"summary":"Завершить поток","description":"active → finished. По дате завершается сам в полночь после `ends_on`.","operationId":"finish_cohort_v1_console_cohorts__cohort_id__finish_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Cohort Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CohortOut"}}}},"403":{"description":"Поток закреплён за другим куратором"},"404":{"description":"Поток не найден"},"409":{"description":"Переход невозможен из текущего статуса; `details.allowed`"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/cohorts/{cohort_id}/archive":{"post":{"tags":["console:cohorts"],"summary":"Убрать в архив","description":"finished | cancelled → archived: поток уходит из рабочих списков.","operationId":"archive_cohort_v1_console_cohorts__cohort_id__archive_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Cohort Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CohortOut"}}}},"403":{"description":"Поток закреплён за другим куратором"},"404":{"description":"Поток не найден"},"409":{"description":"Переход невозможен из текущего статуса; `details.allowed`"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/cohorts/{cohort_id}/cancel":{"post":{"tags":["console:cohorts"],"summary":"Отменить поток","description":"Из черновика, набора, ожидания или обучения. Зачисленных куратор переводит в другой поток (E1-36); причина попадает в журнал.","operationId":"cancel_cohort_v1_console_cohorts__cohort_id__cancel_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Cohort Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/CancelIn"},{"type":"null"}],"title":"Data"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CohortOut"}}}},"403":{"description":"Поток закреплён за другим куратором"},"404":{"description":"Поток не найден"},"409":{"description":"Переход невозможен из текущего статуса; `details.allowed`"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/cohorts/{cohort_id}/schedule":{"get":{"tags":["console:cohorts"],"summary":"Расписание открытия уроков","operationId":"get_schedule_v1_console_cohorts__cohort_id__schedule_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Cohort Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ScheduleItemOut"},"title":"Response Get Schedule V1 Console Cohorts  Cohort Id  Schedule Get"}}}},"403":{"description":"Поток закреплён за другим куратором"},"404":{"description":"Поток не найден"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["console:cohorts"],"summary":"Заменить расписание целиком","description":"Уроки только этого курса. Строки уроков, которых нет в списке, удаляются; ручные флаги у оставшихся сохраняются.","operationId":"put_schedule_v1_console_cohorts__cohort_id__schedule_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Cohort Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ScheduleItemIn"},"title":"Items"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ScheduleItemOut"},"title":"Response Put Schedule V1 Console Cohorts  Cohort Id  Schedule Put"}}}},"403":{"description":"Поток закреплён за другим куратором"},"404":{"description":"Поток не найден"},"422":{"description":"Урок не из этого курса или повторяется"}}}},"/v1/console/cohorts/{cohort_id}/schedule/generate":{"post":{"tags":["console:cohorts"],"summary":"Сгенерировать расписание из даты старта и шага","description":"Шаги: `module_per_week` (все уроки модуля разом, модули неделя за неделей), `lessons_per_week` (N уроков в неделю, равномерно), `weekdays` (урок в будний день). Текущее расписание заменяется, ручные флаги строк сохраняются; дальше — ручная правка.","operationId":"generate_schedule_v1_console_cohorts__cohort_id__schedule_generate_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Cohort Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleGenerateIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ScheduleItemOut"},"title":"Response Generate Schedule V1 Console Cohorts  Cohort Id  Schedule Generate Post"}}}},"403":{"description":"Поток закреплён за другим куратором"},"404":{"description":"Поток не найден"},"422":{"description":"В курсе нет уроков"}}}},"/v1/console/cohorts/{cohort_id}/schedule/shift":{"post":{"tags":["console:cohorts"],"summary":"Сдвинуть расписание на N дней","description":"Без `module_id` сдвигается весь поток вместе с датами старта и окончания (старт — пока поток не начался). С `module_id` — уроки модуля, а при `cascade` и всё, что идёт в оглавлении после него. Дедлайны сдвигаются вместе с открытием.","operationId":"shift_schedule_v1_console_cohorts__cohort_id__schedule_shift_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Cohort Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleShiftIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ScheduleItemOut"},"title":"Response Shift Schedule V1 Console Cohorts  Cohort Id  Schedule Shift Post"}}}},"403":{"description":"Поток закреплён за другим куратором"},"404":{"description":"Поток не найден"},"422":{"description":"Расписание пустое или модуль не из курса"}}}},"/v1/console/cohorts/{cohort_id}/schedule/{lesson_id}":{"patch":{"tags":["console:cohorts"],"summary":"Правка одной строки расписания","description":"Открыть досрочно, закрыть, сдвинуть дату или дедлайн одного урока.","operationId":"patch_schedule_item_v1_console_cohorts__cohort_id__schedule__lesson_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Cohort Id"}},{"name":"lesson_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Lesson Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleItemPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ScheduleItemOut"},"title":"Response Patch Schedule Item V1 Console Cohorts  Cohort Id  Schedule  Lesson Id  Patch"}}}},"403":{"description":"Поток закреплён за другим куратором"},"404":{"description":"Поток не найден"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/cohorts/{cohort_id}/schedule/missing":{"get":{"tags":["console:cohorts"],"summary":"Уроки курса, которых нет в расписании","description":"Урок, добавленный в курс после сборки расписания, в него сам не попадает — ученики видят его закрытым. Порядок — как в оглавлении.","operationId":"schedule_missing_v1_console_cohorts__cohort_id__schedule_missing_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Cohort Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ScheduleMissingOut"},"title":"Response Schedule Missing V1 Console Cohorts  Cohort Id  Schedule Missing Get"}}}},"403":{"description":"Поток закреплён за другим куратором"},"404":{"description":"Поток не найден"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/cohorts/{cohort_id}/schedule/add":{"post":{"tags":["console:cohorts"],"summary":"Поставить в расписание один урок","description":"Остальные строки не меняются. Без дат урок встаёт вместе со своим модулем, а если модуля в расписании нет — открывается сразу.","operationId":"add_to_schedule_v1_console_cohorts__cohort_id__schedule_add_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Cohort Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleAddIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ScheduleItemOut"},"title":"Response Add To Schedule V1 Console Cohorts  Cohort Id  Schedule Add Post"}}}},"403":{"description":"Поток закреплён за другим куратором"},"404":{"description":"Поток не найден"},"422":{"description":"Урок не из этого курса, уже в расписании или дедлайн раньше"}}}},"/v1/console/cohorts/{cohort_id}/students":{"get":{"tags":["console:cohorts"],"summary":"Ученики потока с прогрессом: отстающие сверху","description":"Прогресс считается от уроков, **открытых расписанием**, а не от всего курса: куратору важно, отстал ли ученик от группы. `lag` — открыто минус пройдено, `overdue` — открытые уроки с истёкшим дедлайном, `days_inactive` — дней без активности. Сортировка: сначала отстающие, среди равных — те, кого дольше не было.","operationId":"cohort_students_v1_console_cohorts__cohort_id__students_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Cohort Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CohortStudentRow"},"title":"Response Cohort Students V1 Console Cohorts  Cohort Id  Students Get"}}}},"403":{"description":"Поток закреплён за другими кураторами"},"404":{"description":"Поток не найден"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/cohorts/{cohort_id}/audit":{"get":{"tags":["console:cohorts"],"summary":"Журнал потока: кто что делал","description":"Зачисления, переводы, изменения расписания, объявления и занятия — новые сверху. Куратор видит журнал своих потоков, администратор — любых.","operationId":"cohort_journal_v1_console_cohorts__cohort_id__audit_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Cohort Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AuditEntryOut"},"title":"Response Cohort Journal V1 Console Cohorts  Cohort Id  Audit Get"}}}},"403":{"description":"Поток закреплён за другими кураторами"},"404":{"description":"Поток не найден"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/cohorts/{cohort_id}/announcements":{"get":{"tags":["console:cohorts"],"summary":"Объявления потока, включая черновики","operationId":"list_announcements_v1_console_cohorts__cohort_id__announcements_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Cohort Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AnnouncementOut"},"title":"Response List Announcements V1 Console Cohorts  Cohort Id  Announcements Get"}}}},"403":{"description":"Поток закреплён за другими кураторами и преподавателями"},"404":{"description":"Поток или объявление не найдены"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["console:cohorts"],"summary":"Написать объявление","description":"`publish: true` публикует сразу, иначе остаётся черновик. `notify` — пуш всем учащимся потока при публикации (E1-66).","operationId":"create_announcement_v1_console_cohorts__cohort_id__announcements_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Cohort Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnouncementCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnouncementOut"}}}},"403":{"description":"Поток закреплён за другими кураторами и преподавателями"},"404":{"description":"Поток или объявление не найдены"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/cohorts/{cohort_id}/announcements/{announcement_id}":{"patch":{"tags":["console:cohorts"],"summary":"Изменить объявление, закрепить или открепить","operationId":"update_announcement_v1_console_cohorts__cohort_id__announcements__announcement_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Cohort Id"}},{"name":"announcement_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Announcement Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnouncementUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnouncementOut"}}}},"403":{"description":"Поток закреплён за другими кураторами и преподавателями"},"404":{"description":"Поток или объявление не найдены"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["console:cohorts"],"summary":"Удалить объявление","operationId":"delete_announcement_v1_console_cohorts__cohort_id__announcements__announcement_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Cohort Id"}},{"name":"announcement_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Announcement Id"}}],"responses":{"204":{"description":"Successful Response"},"403":{"description":"Поток закреплён за другими кураторами и преподавателями"},"404":{"description":"Поток или объявление не найдены"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/cohorts/{cohort_id}/announcements/{announcement_id}/publish":{"post":{"tags":["console:cohorts"],"summary":"Опубликовать черновик","operationId":"publish_announcement_v1_console_cohorts__cohort_id__announcements__announcement_id__publish_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Cohort Id"}},{"name":"announcement_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Announcement Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnouncementOut"}}}},"403":{"description":"Поток закреплён за другими кураторами и преподавателями"},"404":{"description":"Поток или объявление не найдены"},"409":{"description":"Уже опубликовано"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/attention":{"get":{"tags":["console:attention"],"summary":"Что требует внимания: ученики, потоки, курсы","description":"Куратор видит свои потоки, администратор — все, и только он видит курсы без потока в наборе. Пороги считаются на сервере и отдаются вместе с ответом: подпись в панели обязана совпадать с тем, по чему считали. Занятия без ссылки — отдельная ручка `/v1/console/live-sessions/attention`.","operationId":"attention_v1_console_attention_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttentionOut"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/console/audit":{"get":{"tags":["console:audit"],"summary":"Журнал: кто что сделал","description":"Новые сверху. `action` с точкой на конце — префикс: `cohort.` вернёт все действия с потоками. Курсор по (`created_at`, id).","operationId":"search_v1_console_audit_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entity_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Entity Type"}},{"name":"entity_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Entity Id"}},{"name":"actor_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Actor Id"}},{"name":"action","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Action"}},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Since"}},{"name":"until","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Until"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":20,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_AuditEntryOut_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/enrollments":{"get":{"tags":["console:enrollments"],"summary":"Зачисления: куратор — своих потоков, менеджер и админ — все","operationId":"list_enrollments_v1_console_enrollments_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Cohort Id"}},{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/EnrollmentStatus"},{"type":"null"}],"title":"Status"}},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/EnrollmentSource"},{"type":"null"}],"title":"Source"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EnrollmentOut"},"title":"Response List Enrollments V1 Console Enrollments Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["console:enrollments"],"summary":"Зачислить ученика в поток вручную","description":"Место занимается в той же транзакции под блокировкой потока. Зачислять можно в поток в наборе, ожидающий старта или идущий. По номеру и приглашением — E1-63 и E1-61.","operationId":"create_enrollment_v1_console_enrollments_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrollmentCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrollmentOut"}}}},"403":{"description":"Поток закреплён за другим куратором"},"404":{"description":"Поток не найден"},"409":{"description":"`already_enrolled` — уже учится в потоке этого курса; `cohort_full` — мест нет; `conflict` — набор не открыт"},"422":{"description":"Поток или ученик не найдены"}}}},"/v1/console/enrollments/by-phone":{"post":{"tags":["console:enrollments"],"summary":"Зачислить по номеру: сразу или предварительно","description":"Аккаунт с подтверждённым номером зачисляется сразу (`active`, `phone_match`). Иначе — предварительное зачисление на номер: `invited` без аккаунта, место забронировано; активируется, когда номер подтвердят (`POST /v1/console/users/{id}/confirm-phone`).","operationId":"create_enrollment_by_phone_v1_console_enrollments_by_phone_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrollmentByPhoneCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrollmentOut"}}}},"403":{"description":"Поток закреплён за другим куратором"},"404":{"description":"Поток не найден"},"409":{"description":"`already_enrolled` — уже учится или уже предварительно зачислен в поток этого курса; `cohort_full`; `conflict` — набор не открыт"},"422":{"description":"Поток не найден или номер не в международном формате"}},"security":[{"HTTPBearer":[]}]}},"/v1/console/enrollments/{enrollment_id}":{"get":{"tags":["console:enrollments"],"summary":"Зачисление","operationId":"get_enrollment_v1_console_enrollments__enrollment_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"enrollment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Enrollment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrollmentOut"}}}},"403":{"description":"Поток закреплён за другим куратором"},"404":{"description":"Поток не найден"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["console:enrollments"],"summary":"Заметка куратора и индивидуальные границы доступа","operationId":"update_enrollment_v1_console_enrollments__enrollment_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"enrollment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Enrollment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrollmentUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrollmentOut"}}}},"403":{"description":"Поток закреплён за другим куратором"},"404":{"description":"Зачисление не найдено"},"409":{"description":"Действие невозможно в текущем статусе зачисления"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/enrollments/{enrollment_id}/pause":{"post":{"tags":["console:enrollments"],"summary":"Поставить на паузу","description":"Место остаётся за учеником, доступ к урокам закрывается до возобновления.","operationId":"pause_enrollment_v1_console_enrollments__enrollment_id__pause_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"enrollment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Enrollment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrollmentOut"}}}},"403":{"description":"Поток закреплён за другим куратором"},"404":{"description":"Зачисление не найдено"},"409":{"description":"Действие невозможно в текущем статусе зачисления"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/enrollments/{enrollment_id}/resume":{"post":{"tags":["console:enrollments"],"summary":"Снять с паузы","operationId":"resume_enrollment_v1_console_enrollments__enrollment_id__resume_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"enrollment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Enrollment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrollmentOut"}}}},"403":{"description":"Поток закреплён за другим куратором"},"404":{"description":"Зачисление не найдено"},"409":{"description":"Действие невозможно в текущем статусе зачисления"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/enrollments/{enrollment_id}/drop":{"post":{"tags":["console:enrollments"],"summary":"Отчислить с причиной","description":"Место освобождается. Прогресс ученика сохраняется: он привязан к урокам, а не к потоку.","operationId":"drop_enrollment_v1_console_enrollments__enrollment_id__drop_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"enrollment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Enrollment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DropIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrollmentOut"}}}},"403":{"description":"Поток закреплён за другим куратором"},"404":{"description":"Зачисление не найдено"},"409":{"description":"Действие невозможно в текущем статусе зачисления"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/enrollments/{enrollment_id}/transfer":{"post":{"tags":["console:enrollments"],"summary":"Перевести в другой поток","description":"Старая запись получает статус `transferred` и ссылку на новую; место переезжает вместе с учеником. В ответе — новое зачисление. 409 `cohort_full` или `already_enrolled`, если в целевом потоке нет мест или ученик уже в потоке того курса.","operationId":"transfer_enrollment_v1_console_enrollments__enrollment_id__transfer_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"enrollment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Enrollment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrollmentOut"}}}},"403":{"description":"Поток закреплён за другим куратором"},"404":{"description":"Зачисление не найдено"},"409":{"description":"Действие невозможно в текущем статусе зачисления"},"422":{"description":"Целевой поток не найден"}}}},"/v1/live-sessions/{session_id}/join":{"post":{"tags":["live-sessions"],"summary":"Ссылка на внешнее занятие с отметкой входа","description":"Только `kind = external`. Ученику — при активном зачислении в поток и в окне входа: за 10 минут до начала и 30 минут после расчётного конца; ставится отметка «заходил». Ведущему и сотрудникам потока — без ограничения по времени. Для `kind = livekit` не используется — у него свой эндпоинт токена (Этап 3).","operationId":"join_session_v1_live_sessions__session_id__join_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JoinOut"}}}},"403":{"description":"Нет активного зачисления в поток"},"404":{"description":"Занятие не найдено"},"409":{"description":"`session_not_started` (`details.starts_at`, `details.opens_at`), `session_link_missing`, `session_wrong_kind`, `conflict` — отменено или завершилось"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/live-sessions":{"get":{"tags":["console:live-sessions"],"summary":"Занятия: куратор и преподаватель — своих потоков, админ — всех","operationId":"list_sessions_v1_console_live_sessions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Cohort Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/LiveSessionStatus"},{"type":"null"}],"title":"Status"}},{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Включительно","title":"Date From"},"description":"Включительно"},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Не включая","title":"Date To"},"description":"Не включая"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LiveSessionOut"},"title":"Response List Sessions V1 Console Live Sessions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["console:live-sessions"],"summary":"Создать внешнее занятие","description":"Со ссылкой — `scheduled`, без ссылки — `link_missing` (время видно, кнопки входа нет); `publish: false` — черновик. Ведущий по умолчанию — создатель. `warnings` — предупреждения, например второе занятие ведущего в то же время.","operationId":"create_session_v1_console_live_sessions_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiveSessionCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiveSessionOut"}}}},"403":{"description":"Поток закреплён за другими кураторами и преподавателями"},"404":{"description":"Занятие не найдено"},"422":{"description":"Урок не из курса потока или ведущий не сотрудник"}}}},"/v1/console/live-sessions/series":{"post":{"tags":["console:live-sessions"],"summary":"Создать серию занятий","description":"«Каждый четверг в 18:00, 8 недель»: `count` занятий с шагом `interval_days`, общий `series_id`. Дальше каждое правится отдельно.","operationId":"create_series_v1_console_live_sessions_series_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiveSessionSeriesCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/LiveSessionOut"},"type":"array","title":"Response Create Series V1 Console Live Sessions Series Post"}}}},"403":{"description":"Поток закреплён за другими кураторами и преподавателями"},"404":{"description":"Занятие не найдено"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/console/live-sessions/lessons":{"get":{"tags":["console:live-sessions"],"summary":"Уроки курса потока — к ним привязывают занятие","description":"Порядок — оглавление, без архивных; у каждого урока тип и статус, живой урок модуля — `type = live` (E1-172). Куратор и преподаватель — своих потоков, администратор — любых: курс целиком (`/v1/console/courses/{id}`) им не открыт.","operationId":"session_lessons_v1_console_live_sessions_lessons_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Cohort Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LessonRef"},"title":"Response Session Lessons V1 Console Live Sessions Lessons Get"}}}},"403":{"description":"Поток закреплён за другими кураторами и преподавателями"},"404":{"description":"Поток не найден"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/live-sessions/attention":{"get":{"tags":["console:live-sessions"],"summary":"Занятия без ссылки, которые ещё впереди","description":"Для раздела «Внимание требуется»: `urgent` — до начала меньше получаса. Куратор и преподаватель видят свои потоки, администратор — все.","operationId":"attention_v1_console_live_sessions_attention_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/LinkMissingAlert"},"type":"array","title":"Response Attention V1 Console Live Sessions Attention Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/console/live-sessions/{session_id}":{"get":{"tags":["console:live-sessions"],"summary":"Занятие","operationId":"get_session__v1_console_live_sessions__session_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiveSessionOut"}}}},"403":{"description":"Поток закреплён за другими кураторами и преподавателями"},"404":{"description":"Занятие не найдено"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["console:live-sessions"],"summary":"Изменить занятие","description":"Пустая `join_url` убирает ссылку — назначенное занятие станет `link_missing`; появившаяся ссылка возвращает `scheduled`.","operationId":"update_session_v1_console_live_sessions__session_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiveSessionUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiveSessionOut"}}}},"403":{"description":"Поток закреплён за другими кураторами и преподавателями"},"404":{"description":"Занятие не найдено"},"409":{"description":"Занятие уже прошло или отменено"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/live-sessions/{session_id}/reschedule":{"post":{"tags":["console:live-sessions"],"summary":"Перенести занятие","description":"Ученикам уйдёт уведомление «время изменилось» (E1-86).","operationId":"reschedule_session_v1_console_live_sessions__session_id__reschedule_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RescheduleIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiveSessionOut"}}}},"403":{"description":"Поток закреплён за другими кураторами и преподавателями"},"404":{"description":"Занятие не найдено"},"409":{"description":"Занятие уже прошло или отменено"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/live-sessions/{session_id}/cancel":{"post":{"tags":["console:live-sessions"],"summary":"Отменить занятие или серию с этого места","description":"`scope: following` отменяет это и все последующие занятия серии. В ответе — все отменённые.","operationId":"cancel_session_v1_console_live_sessions__session_id__cancel_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/SessionCancelIn"},{"type":"null"}],"title":"Data"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LiveSessionOut"},"title":"Response Cancel Session V1 Console Live Sessions  Session Id  Cancel Post"}}}},"403":{"description":"Поток закреплён за другими кураторами и преподавателями"},"404":{"description":"Занятие не найдено"},"409":{"description":"Занятие уже прошло или отменено"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/live-sessions/{session_id}/publish":{"post":{"tags":["console:live-sessions"],"summary":"Назначить черновик","operationId":"publish_session_v1_console_live_sessions__session_id__publish_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiveSessionOut"}}}},"403":{"description":"Поток закреплён за другими кураторами и преподавателями"},"404":{"description":"Занятие не найдено"},"409":{"description":"Занятие уже назначено"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/live-sessions/{session_id}/recording":{"put":{"tags":["console:live-sessions"],"summary":"Привязать запись занятия","description":"Видео из медиатеки (`POST /v1/console/media/upload` → `complete`). Готовый файл открывается ученикам сразу, обрабатываемый — когда воркер закончит; не заходившим уходит «запись готова». Повторный вызов заменяет запись.","operationId":"set_recording_v1_console_live_sessions__session_id__recording_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordingIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiveSessionOut"}}}},"403":{"description":"Поток закреплён за другими кураторами и преподавателями"},"404":{"description":"Занятие не найдено"},"409":{"description":"У черновика и отменённого занятия записи не бывает"},"422":{"description":"Файл не найден, не видео или не обработан"}}},"delete":{"tags":["console:live-sessions"],"summary":"Убрать запись занятия","description":"Файл остаётся в медиатеке.","operationId":"clear_recording_v1_console_live_sessions__session_id__recording_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiveSessionOut"}}}},"403":{"description":"Поток закреплён за другими кураторами и преподавателями"},"404":{"description":"Занятие не найдено"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/live-sessions/{session_id}/notes":{"put":{"tags":["console:live-sessions"],"summary":"Приложить конспект занятия","description":"PDF из медиатеки (`POST /v1/console/media/upload` → `complete`). Ученик видит его на экране занятия и живого урока сразу. Повторный вызов заменяет конспект (E1-169).","operationId":"set_notes_v1_console_live_sessions__session_id__notes_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotesIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiveSessionOut"}}}},"403":{"description":"Поток закреплён за другими кураторами и преподавателями"},"404":{"description":"Занятие не найдено"},"409":{"description":"У отменённого занятия конспекта не бывает"},"422":{"description":"Файл не найден или не PDF"}}},"delete":{"tags":["console:live-sessions"],"summary":"Убрать конспект занятия","description":"Файл остаётся в медиатеке.","operationId":"clear_notes_v1_console_live_sessions__session_id__notes_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiveSessionOut"}}}},"403":{"description":"Поток закреплён за другими кураторами и преподавателями"},"404":{"description":"Занятие не найдено"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/live-sessions/{session_id}/call":{"post":{"tags":["console:live-sessions"],"summary":"Позвать всех на занятие","description":"Пуш ученикам потока, кто ещё не зашёл: «зовём на живое занятие» со ссылкой на экран занятия (E1-170). Запасной путь, когда автоматика подвела. Занятие назначено или идёт, ссылка есть, с получаса до начала до закрытия окна входа, не чаще раза в пять минут.","operationId":"call_v1_console_live_sessions__session_id__call_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiveSessionOut"}}}},"403":{"description":"Поток закреплён за другими кураторами и преподавателями"},"404":{"description":"Занятие не найдено"},"409":{"description":"Занятие не назначено или прошло, ссылки нет, рано (`session_not_started`) или звали меньше пяти минут назад (`retry_after_sec`)"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/live-sessions/{session_id}/attendance":{"get":{"tags":["console:live-sessions"],"summary":"Кто заходил на занятие","description":"Отметки по нажатию кнопки входа — «заходил», не «присутствовал». `not_joined` — активные учащиеся потока без отметки.","operationId":"attendance_v1_console_live_sessions__session_id__attendance_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttendanceOut"}}}},"403":{"description":"Поток закреплён за другими кураторами и преподавателями"},"404":{"description":"Занятие не найдено"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/tags":{"get":{"tags":["console:feed"],"summary":"Метки","description":"Для подсказок в редакторе.","operationId":"console_tags_v1_console_tags_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Q"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TagOut"},"title":"Response Console Tags V1 Console Tags Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/tags/manage":{"get":{"tags":["console:feed"],"summary":"Метки для правки: с числом постов","description":"Метка заводится тем, что её напечатали в посте, поэтому опечатка заводит вторую. Число постов показывает, какая из двух настоящая.","operationId":"manage_tags_v1_console_tags_manage_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/TagConsoleOut"},"type":"array","title":"Response Manage Tags V1 Console Tags Manage Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/console/tags/{tag_id}":{"patch":{"tags":["console:feed"],"summary":"Переименовать метку","description":"Слаг едет следом: по нему фильтруется лента. Занятый слаг — повод объединить метки, а не переименовать.","operationId":"rename_tag_v1_console_tags__tag_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"tag_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Tag Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagRename"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagConsoleOut"}}}},"404":{"description":"Метка не найдена"},"409":{"description":"Слаг занят"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["console:feed"],"summary":"Удалить метку","description":"Посты остаются — исчезает только метка на них.","operationId":"delete_tag_v1_console_tags__tag_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"tag_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Tag Id"}}],"responses":{"204":{"description":"Successful Response"},"404":{"description":"Метка не найдена"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/tags/{tag_id}/merge":{"post":{"tags":["console:feed"],"summary":"Объединить метки","description":"Посты исходной метки переезжают на целевую, исходная исчезает. Так чинится опечатка, заведшая вторую метку.","operationId":"merge_tags_v1_console_tags__tag_id__merge_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"tag_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Tag Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagMerge"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagConsoleOut"}}}},"404":{"description":"Метка не найдена"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/post-reports":{"get":{"tags":["console:feed"],"summary":"Жалобы на посты","description":"«Ошибка в разборе» от учеников и гостей, свежие сверху. Фильтр `status` показывает только открытые или только разобранные. Каждая строка несёт ссылку на пост — `post_id`, слаг и язык — чтобы перейти и поправить.","operationId":"console_reports_v1_console_post_reports_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/PostReportStatus"},{"type":"null"}],"title":"Status"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":20,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_PostReportOut_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/post-reports/{report_id}/resolve":{"post":{"tags":["console:feed"],"summary":"Отметить жалобу разобранной","description":"Идемпотентно: повторный вызов на уже разобранной ничего не меняет.","operationId":"resolve_report_v1_console_post_reports__report_id__resolve_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Report Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostReportOut"}}}},"404":{"description":"Жалоба не найдена"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/teachers":{"get":{"tags":["console:teachers"],"summary":"Все преподаватели, включая черновики","operationId":"list_all_v1_console_teachers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/TeacherOut"},"type":"array","title":"Response List All V1 Console Teachers Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["console:teachers"],"summary":"Создать преподавателя","operationId":"create_v1_console_teachers_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeacherCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeacherOut"}}}},"422":{"description":"Указан несуществующий предмет"}},"security":[{"HTTPBearer":[]}]}},"/v1/console/teachers/{teacher_id}":{"get":{"tags":["console:teachers"],"summary":"Преподаватель, включая черновик","operationId":"get_one_v1_console_teachers__teacher_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"teacher_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Teacher Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeacherOut"}}}},"404":{"description":"Преподаватель не найден"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["console:teachers"],"summary":"Изменить преподавателя","operationId":"update_v1_console_teachers__teacher_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"teacher_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Teacher Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeacherUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeacherOut"}}}},"404":{"description":"Преподаватель не найден"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["console:teachers"],"summary":"Удалить преподавателя","description":"Мягкое удаление: на преподавателя ссылаются курсы и потоки.","operationId":"delete_v1_console_teachers__teacher_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"teacher_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Teacher Id"}}],"responses":{"204":{"description":"Successful Response"},"404":{"description":"Преподаватель не найден"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/media":{"get":{"tags":["console:media"],"summary":"Медиатека","operationId":"list_media_v1_console_media_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kind","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/MediaKind"},{"type":"null"}],"title":"Kind"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/MediaStatus"},{"type":"null"}],"title":"Status"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"description":"Поиск по имени файла","title":"Q"},"description":"Поиск по имени файла"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":20,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_MediaOut_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/media/upload":{"post":{"tags":["console:media"],"summary":"Получить билет на загрузку","description":"Файл грузится клиентом напрямую в хранилище по возвращённой ссылке — через бэкенд он не проходит. Ограничения по типу и размеру зашиты в подпись, подменить их нельзя.","operationId":"create_upload_v1_console_media_upload_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadTicket"}}}},"422":{"description":"Неподдерживаемый формат или слишком большой файл"}},"security":[{"HTTPBearer":[]}]}},"/v1/console/media/{media_id}/complete":{"post":{"tags":["console:media"],"summary":"Подтвердить загрузку","description":"Наличие файла проверяется у хранилища, а не со слов клиента.","operationId":"complete_upload_v1_console_media__media_id__complete_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"media_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Media Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaOut"}}}},"409":{"description":"Файла в хранилище нет"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/media/{media_id}":{"get":{"tags":["console:media"],"summary":"Файл","operationId":"get_media_v1_console_media__media_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"media_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Media Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaOut"}}}},"404":{"description":"Файл не найден"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["console:media"],"summary":"Удалить файл","description":"Используемый файл не удаляется: сначала уберите ссылки из уроков и постов.","operationId":"delete_media_v1_console_media__media_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"media_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Media Id"}}],"responses":{"204":{"description":"Successful Response"},"404":{"description":"Файл не найден"},"409":{"description":"Файл используется"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/media/{media_id}/retry":{"post":{"tags":["console:media"],"summary":"Повторить обработку видео","description":"После ошибки обработки или если она зависла: статус снова `processing`, задание ставится в очередь заново.","operationId":"retry_processing_v1_console_media__media_id__retry_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"media_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Media Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaOut"}}}},"404":{"description":"Файл не найден"},"409":{"description":"Файл не в состоянии ошибки или обработки"},"422":{"description":"Не видео"}}}},"/v1/console/media/{media_id}/poster":{"put":{"tags":["console:media"],"summary":"Свой постер к видео","description":"Готовое изображение из медиатеки вместо кадра, снятого воркером. Кадр остаётся и показывается снова, если постер убрать.","operationId":"set_poster_v1_console_media__media_id__poster_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"media_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Media Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PosterIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaOut"}}}},"404":{"description":"Файл не найден"},"422":{"description":"Не видео или не готовое изображение"}}},"delete":{"tags":["console:media"],"summary":"Убрать свой постер","description":"Снова показывается кадр, снятый воркером.","operationId":"clear_poster_v1_console_media__media_id__poster_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"media_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Media Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaOut"}}}},"404":{"description":"Файл не найден"},"422":{"description":"Не видео"}}}},"/v1/console/media/{media_id}/usages":{"get":{"tags":["console:media"],"summary":"Где используется файл","operationId":"media_usages_v1_console_media__media_id__usages_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"media_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Media Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MediaUsage"},"title":"Response Media Usages V1 Console Media  Media Id  Usages Get"}}}},"404":{"description":"Файл не найден"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/me/devices":{"post":{"tags":["profile"],"summary":"Зарегистрировать пуш-токен устройства","description":"Приложение зовёт после входа и при смене токена FCM. Повтор с тем же токеном обновляет запись; токен, зарегистрированный другим аккаунтом на этом же телефоне, переходит к текущему. `X-Device-Id` связывает токен с устройством.","operationId":"register_device_v1_me_devices_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-Device-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Device-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushTokenIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["profile"],"summary":"Устройства, на которые приходят пуши","operationId":"list_devices_v1_me_devices_get","security":[{"HTTPBearer":[]}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DeviceOut"},"title":"Response List Devices V1 Me Devices Get"}}}}}}},"/v1/me/devices/{token_id}":{"delete":{"tags":["profile"],"summary":"Отключить пуши на устройстве","operationId":"remove_device_v1_me_devices__token_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"token_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Token Id"}}],"responses":{"204":{"description":"Successful Response"},"404":{"description":"Нет такого активного устройства у этого пользователя"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/me/notifications-settings":{"get":{"tags":["profile"],"summary":"Настройки уведомлений","description":"Все типы Этапа 1, доступные ученику; `is_mandatory` — отключить нельзя.","operationId":"get_settings_v1_me_notifications_settings_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationSettingsOut"}}}}},"security":[{"HTTPBearer":[]}]},"put":{"tags":["profile"],"summary":"Изменить настройки уведомлений","description":"Частичное обновление: передаются только меняемые типы. 422 — попытка выключить обязательное уведомление или тип, которого нет у ученика.","operationId":"update_settings_v1_me_notifications_settings_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationSettingsUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationSettingsOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/console/notification-templates":{"get":{"tags":["console:notifications"],"summary":"Тексты уведомлений","description":"Все типы на обоих языках. Тексты правятся без релиза; у каждого видно, какие переменные события можно подставить.","operationId":"list_templates_v1_console_notification_templates_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/NotificationTemplateOut"},"type":"array","title":"Response List Templates V1 Console Notification Templates Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/console/notification-templates/{type_}/{locale}":{"put":{"tags":["console:notifications"],"summary":"Изменить текст уведомления","description":"Переменные проверяются: неизвестная подставилась бы пустотой в пуше у всех учеников.","operationId":"update_template_v1_console_notification_templates__type____locale__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"type_","in":"path","required":true,"schema":{"$ref":"#/components/schemas/NotificationType"}},{"name":"locale","in":"path","required":true,"schema":{"type":"string","title":"Locale"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationTemplateUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationTemplateOut"}}}},"404":{"description":"Такого языка у этого уведомления нет"},"422":{"description":"В тексте неизвестные переменные или сломаны скобки"}}}},"/v1/console/notification-templates/{type_}/{locale}/reset":{"post":{"tags":["console:notifications"],"summary":"Вернуть текст релиза","operationId":"reset_template_v1_console_notification_templates__type____locale__reset_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"type_","in":"path","required":true,"schema":{"$ref":"#/components/schemas/NotificationType"}},{"name":"locale","in":"path","required":true,"schema":{"type":"string","title":"Locale"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationTemplateOut"}}}},"404":{"description":"Такого языка у этого уведомления нет"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/analytics/events":{"post":{"tags":["analytics"],"summary":"Пачка событий аналитики","description":"До 100 событий с общим контекстом (платформа, версия, язык). Гость — по `X-Device-Id`, вошедший — по токену. Имена не из каталога (docs/spec/13-analytics.md) пропускаются и считаются в `ignored`; персональные данные в `props` — 422.","operationId":"ingest_events_v1_analytics_events_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-Device-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Device-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventBatchIn"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventBatchOut"}}}},"422":{"description":"Нет ни входа, ни X-Device-Id; ПДн в свойствах"}}}},"/v1/config":{"get":{"tags":["config"],"summary":"Настройки приложения: нужно ли обновиться","operationId":"get_config_v1_config_get","parameters":[{"name":"platform","in":"query","required":true,"schema":{"$ref":"#/components/schemas/AppPlatform","description":"ios, android или huawei"},"description":"ios, android или huawei"},{"name":"version","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"description":"Версия приложения, как в магазине: 1.0.2","title":"Version"},"description":"Версия приложения, как в магазине: 1.0.2"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppConfigOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/app-releases":{"get":{"tags":["console:app-releases"],"summary":"Версии приложения по платформам","operationId":"list_releases_v1_console_app_releases_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/AppReleaseOut"},"type":"array","title":"Response List Releases V1 Console App Releases Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/console/app-releases/{platform}":{"put":{"tags":["console:app-releases"],"summary":"Задать версии платформы","operationId":"update_release_v1_console_app_releases__platform__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"platform","in":"path","required":true,"schema":{"$ref":"#/components/schemas/AppPlatform"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppReleaseIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppReleaseOut"}}}},"422":{"description":"Версия не по форме или минимальная новее последней"}}}},"/v1/lessons/{lesson_id}/progress":{"post":{"tags":["progress"],"summary":"Позиция и просмотренное время — пачкой","description":"Клиент шлёт отрезки с момента прошлого отчёта (раз в полминуты и при выходе; без сети — копит). Урок засчитывается при просмотре ≥ 90 % длительности; перемотка не считается. Прогресс привязан к ученику, не к потоку.","operationId":"report_progress_v1_lessons__lesson_id__progress_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"lesson_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Lesson Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProgressIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LessonProgressOut"}}}},"403":{"description":"Урок недоступен: нет зачисления или он ещё не открыт расписанием"},"404":{"description":"Урок не найден"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/lessons/{lesson_id}/theory":{"post":{"tags":["progress"],"summary":"Теория изучена","description":"Первая ступень урока: кнопка под конспектом. Видео отмечает её само при просмотре ≥ 90 %. Урок без теста этим и закрывается, урок с тестом ждёт второй ступени — сданного теста. Повтор ничего не меняет.","operationId":"note_theory_v1_lessons__lesson_id__theory_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"lesson_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Lesson Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LessonProgressOut"}}}},"403":{"description":"Урок недоступен: нет зачисления или он ещё не открыт расписанием"},"404":{"description":"Урок не найден"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/me/progress":{"get":{"tags":["progress"],"summary":"Сводка прогресса: потоки, серия дней, время за неделю","description":"Прогресс каждого потока считается от уроков, **открытых расписанием**, а не от всего курса. `lag` — открыто минус пройдено, `overdue` — открытые уроки с истёкшим дедлайном. Серия дней не рвётся из-за того, что сегодня ученик ещё не занимался: день не кончился.","operationId":"my_progress_v1_me_progress_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProgressSummaryOut"}}}},"401":{"description":"Требуется вход"}},"security":[{"HTTPBearer":[]}]}},"/v1/me/activity":{"get":{"tags":["progress"],"summary":"Теплокарта активности по дням","description":"Дни нарезаны по часовому поясу ученика. Пустые дни в ответе есть — с нулями: иначе календарь достраивал бы клиент. По умолчанию — последние 28 дней.","operationId":"my_activity_v1_me_activity_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"From"}},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"To"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityOut"}}}},"401":{"description":"Требуется вход"},"422":{"description":"`from` позже `to` или окно больше года"}}}},"/v1/lessons/{lesson_id}/quiz":{"get":{"tags":["quiz"],"summary":"Мой тест: сколько вопросов, мои попытки, есть ли начатая","operationId":"my_quiz_v1_lessons__lesson_id__quiz_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"lesson_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Lesson Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MyQuiz"}}}},"403":{"description":"Нет доступа к уроку или нет зачисления в поток"},"404":{"description":"Тест не найден"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/lessons/{lesson_id}/quiz/attempts":{"post":{"tags":["quiz"],"summary":"Начать попытку","description":"Набор вопросов собирается по темам урока и фиксируется в попытке. Начатая попытка возвращается как есть: второй одновременно не бывает.","operationId":"start_attempt_v1_lessons__lesson_id__quiz_attempts_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"lesson_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Lesson Id"}},{"name":"X-Device-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Device-Id"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttemptOut"}}}},"403":{"description":"Нет доступа к уроку или нет зачисления в поток"},"404":{"description":"Тест не найден"},"422":{"description":"Тест не настроен или банк по темам пуст"}}}},"/v1/lessons/{lesson_id}/quiz/attempts/{attempt_id}/answers":{"post":{"tags":["quiz"],"summary":"Ответить на вопрос","description":"Проверка мгновенная: балл, правильный ответ и разбор приходят сразу, и при ошибке тоже — разбор и учит. Последний ответ завершает попытку.","operationId":"answer_question_v1_lessons__lesson_id__quiz_attempts__attempt_id__answers_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"lesson_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Lesson Id"}},{"name":"attempt_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Attempt Id"}},{"name":"X-Device-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Device-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnswerIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnswerResult"}}}},"403":{"description":"Нет доступа к уроку или нет зачисления в поток"},"404":{"description":"Тест не найден"},"409":{"description":"Попытка завершена или на вопрос уже отвечено"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/lessons/{lesson_id}/quiz/attempts/{attempt_id}/finish":{"post":{"tags":["quiz"],"summary":"Завершить попытку досрочно","description":"Неотвеченные вопросы стоят ноль. Пересдач не ограничено, засчитывается лучший результат.","operationId":"finish_attempt_v1_lessons__lesson_id__quiz_attempts__attempt_id__finish_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"lesson_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Lesson Id"}},{"name":"attempt_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Attempt Id"}},{"name":"X-Device-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Device-Id"}},{"name":"Accept-Language","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttemptResult"}}}},"403":{"description":"Нет доступа к уроку или нет зачисления в поток"},"404":{"description":"Тест не найден"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/lessons/{lesson_id}/quiz/attempts/{attempt_id}":{"get":{"tags":["quiz"],"summary":"Итог попытки с разбором","operationId":"attempt_result_v1_lessons__lesson_id__quiz_attempts__attempt_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"lesson_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Lesson Id"}},{"name":"attempt_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Attempt Id"}},{"name":"Accept-Language","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttemptResult"}}}},"403":{"description":"Нет доступа к уроку или нет зачисления в поток"},"404":{"description":"Тест не найден"},"409":{"description":"Попытка ещё идёт"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/lessons/{lesson_id}/quiz/attempts/{attempt_id}/answers/batch":{"post":{"tags":["quiz"],"summary":"Ответы пачкой — догнать после обрыва связи","description":"Начатую попытку можно пройти без сети: ответы копятся у клиента и уходят пачкой. Разбора здесь нет, уже отвеченные вопросы пропускаются молча — повторная отправка пачки не ломает попытку.","operationId":"answer_batch_v1_lessons__lesson_id__quiz_attempts__attempt_id__answers_batch_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"lesson_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Lesson Id"}},{"name":"attempt_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Attempt Id"}},{"name":"X-Device-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Device-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnswerBatchIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchResult"}}}},"403":{"description":"Нет доступа к уроку или нет зачисления в поток"},"404":{"description":"Тест не найден"},"409":{"description":"Попытка завершена или открыта на другом устройстве"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/lessons/{lesson_id}/quiz/attempts/{attempt_id}/away":{"post":{"tags":["quiz"],"summary":"Ученик свернул приложение во время попытки","description":"Ничего не запрещает: счёт уходов показывается в результате (docs/spec/06-tests-exams.md, «Античит»).","operationId":"note_away_v1_lessons__lesson_id__quiz_attempts__attempt_id__away_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"lesson_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Lesson Id"}},{"name":"attempt_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Attempt Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AwayIn"}}}},"responses":{"204":{"description":"Successful Response"},"403":{"description":"Нет доступа к уроку или нет зачисления в поток"},"404":{"description":"Тест не найден"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/questions":{"get":{"tags":["console:quiz"],"summary":"Банк вопросов","description":"Свежие сверху. Фильтры по предмету, теме, типу, сложности, состоянию и языку; `topic_ids` — сразу по нескольким темам, `ids` — поимённо; `q` ищет по тексту условия.","operationId":"list_questions_v1_console_questions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"subject_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Subject Id"}},{"name":"topic_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Topic Id"}},{"name":"topic_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Topic Ids"}},{"name":"ids","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid"}},{"type":"null"}],"title":"Ids"}},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/QuestionType"},{"type":"null"}],"title":"Type"}},{"name":"difficulty","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Difficulty"},{"type":"null"}],"title":"Difficulty"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/QuestionStatus"},{"type":"null"}],"title":"Status"}},{"name":"locale","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Locale"},{"type":"null"}],"title":"Locale"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Q"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":20,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_QuestionOut_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["console:quiz"],"summary":"Создать вопрос","description":"Форма вариантов и ответа проверяется под тип вопроса: вопрос, который нельзя оценить, в банк не попадает.","operationId":"create_question_v1_console_questions_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuestionCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuestionOut"}}}},"409":{"description":"Ключ импорта уже занят"},"422":{"description":"Ответ не сходится с вариантами или тема из другого предмета"}}}},"/v1/console/questions/import":{"post":{"tags":["console:quiz"],"summary":"Импорт вопросов из таблицы","description":"XLSX с колонками subject, topic, type, question, correct и option_a… Импортированные вопросы приходят черновиками: выкатывать непроверенные строки прямо ученикам нельзя. Повторный файл не задваивает банк — строки с известным `external_key` пропускаются. `dry_run=true` считает то же самое и ничего не пишет.","operationId":"import_questions_v1_console_questions_import_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"dry_run","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Dry Run"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_import_questions_v1_console_questions_import_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportReport"}}}},"422":{"description":"Файл не читается или в нём нет нужных колонок"}}}},"/v1/console/questions/available":{"get":{"tags":["console:quiz"],"summary":"Сколько опубликованных вопросов есть по темам","description":"Конструктору урока-теста: из пустого банка тест собрать нельзя, и это должно быть видно до публикации, а не у ученика.","operationId":"available_questions_v1_console_questions_available_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"locale","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Locale"}},{"name":"topic_id","in":"query","required":true,"schema":{"type":"array","items":{"type":"string","format":"uuid"},"title":"Topic Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuestionsAvailable"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/questions/{question_id}":{"get":{"tags":["console:quiz"],"summary":"Вопрос","operationId":"get_question_v1_console_questions__question_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"question_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Question Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuestionOut"}}}},"404":{"description":"Вопрос не найден"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["console:quiz"],"summary":"Изменить вопрос","operationId":"update_question_v1_console_questions__question_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"question_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Question Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuestionUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuestionOut"}}}},"404":{"description":"Вопрос не найден"},"422":{"description":"Ответ не сходится с вариантами"}}},"delete":{"tags":["console:quiz"],"summary":"Удалить вопрос","description":"Мягкое удаление: вопрос мог встретиться ученикам в попытках.","operationId":"delete_question_v1_console_questions__question_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"question_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Question Id"}}],"responses":{"204":{"description":"Successful Response"},"404":{"description":"Вопрос не найден"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/questions/{question_id}/publish":{"post":{"tags":["console:quiz"],"summary":"Опубликовать вопрос","description":"Опубликованный вопрос сразу попадает в тесты, поэтому без условия, разбора и сходящегося ответа публикация отказывает.","operationId":"publish_question_v1_console_questions__question_id__publish_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"question_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Question Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuestionOut"}}}},"404":{"description":"Вопрос не найден"},"422":{"description":"Вопрос не готов к публикации"}}}},"/v1/console/questions/{question_id}/retire":{"post":{"tags":["console:quiz"],"summary":"Снять вопрос с использования","description":"В начатых попытках вопрос остаётся и оценивается как обычно (docs/spec/06-tests-exams.md, «Краевые случаи»).","operationId":"retire_question_v1_console_questions__question_id__retire_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"question_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Question Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuestionOut"}}}},"404":{"description":"Вопрос не найден"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/questions/cohort-report/{cohort_id}":{"get":{"tags":["console:quiz"],"summary":"Тесты потока: кто прошёл и где спотыкается группа","description":"Типичная задача куратора — «что разобрать со всей группой на следующем занятии», поэтому здесь сводка, а не выгрузка по одному ученику.","operationId":"cohort_quiz_report_v1_console_questions_cohort_report__cohort_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Cohort Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CohortQuizReport"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/questions/external-results/{user_id}":{"get":{"tags":["console:quiz"],"summary":"Результаты ученика, сданные вне приложения","description":"Видны панели: продажи и куратор разговаривают с учеником о них.","operationId":"student_external_results_v1_console_questions_external_results__user_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ExternalResultOut"},"title":"Response Student External Results V1 Console Questions External Results  User Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/exam-blueprints":{"get":{"tags":["console:quiz"],"summary":"Форматы пробного ҰБТ","description":"Формат — данные, а не код (ADR-0010): «формат 2026» и «формат 2027» живут рядом, смена формата это правка здесь, а не релиз.","operationId":"list_blueprints_v1_console_exam_blueprints_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"locale","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Locale"},{"type":"null"}],"title":"Locale"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BlueprintOut"},"title":"Response List Blueprints V1 Console Exam Blueprints Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["console:quiz"],"summary":"Создать формат","description":"Версия растёт сама: правка формата — это новая версия, а не правка прошлой.","operationId":"create_blueprint_v1_console_exam_blueprints_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlueprintIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlueprintOut"}}}},"422":{"description":"Секции не сходятся с профильными предметами"}}}},"/v1/console/exam-blueprints/{blueprint_id}":{"get":{"tags":["console:quiz"],"summary":"Формат","operationId":"get_blueprint_v1_console_exam_blueprints__blueprint_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"blueprint_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Blueprint Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlueprintOut"}}}},"404":{"description":"Формат не найден"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["console:quiz"],"summary":"Изменить формат","operationId":"update_blueprint_v1_console_exam_blueprints__blueprint_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"blueprint_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Blueprint Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlueprintIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlueprintOut"}}}},"404":{"description":"Формат не найден"},"409":{"description":"По формату уже проходили тесты"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["console:quiz"],"summary":"Удалить формат","description":"Только неиспользованный: попытки должны остаться читаемыми.","operationId":"delete_blueprint_v1_console_exam_blueprints__blueprint_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"blueprint_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Blueprint Id"}}],"responses":{"204":{"description":"Successful Response"},"404":{"description":"Формат не найден"},"409":{"description":"По формату уже проходили тесты"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/exam-blueprints/{blueprint_id}/readiness":{"get":{"tags":["console:quiz"],"summary":"Хватает ли банка под формат","description":"Считается до публикации, а не у ученика: неполный пробник врёт про балл.","operationId":"blueprint_readiness_v1_console_exam_blueprints__blueprint_id__readiness_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"blueprint_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Blueprint Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlueprintReadiness"}}}},"404":{"description":"Формат не найден"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/exam-blueprints/{blueprint_id}/activate":{"post":{"tags":["console:quiz"],"summary":"Включить формат","description":"Включение проверяет банк: формат, под который не собрать тест, включать нельзя.","operationId":"activate_blueprint_v1_console_exam_blueprints__blueprint_id__activate_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"blueprint_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Blueprint Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlueprintOut"}}}},"404":{"description":"Формат не найден"},"422":{"description":"В банке не хватает вопросов под формат"}}}},"/v1/console/exam-blueprints/{blueprint_id}/deactivate":{"post":{"tags":["console:quiz"],"summary":"Выключить формат","operationId":"deactivate_blueprint_v1_console_exam_blueprints__blueprint_id__deactivate_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"blueprint_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Blueprint Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlueprintOut"}}}},"404":{"description":"Формат не найден"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/exams/mock":{"get":{"tags":["quiz"],"summary":"Пробный ҰБТ: что доступно","description":"Формат на языке обучения ученика, сколько вопросов и времени и есть ли уже начатая попытка.","operationId":"mock_exam_offer_v1_exams_mock_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ExamOffer"},{"type":"null"}],"title":"Response Mock Exam Offer V1 Exams Mock Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/exams/mock/attempts":{"post":{"tags":["quiz"],"summary":"Начать пробный ҰБТ","description":"Тест собирается из банка по формату в момент старта и фиксируется в попытке. Вопросы, встречавшиеся за месяц, пропускаются, пока банк позволяет.","operationId":"start_mock_exam_v1_exams_mock_attempts_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-Device-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Device-Id"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttemptOut"}}}},"404":{"description":"Действующего формата нет"},"409":{"description":"Тест открыт на другом устройстве"},"422":{"description":"Не выбраны профильные предметы или в банке не хватает вопросов"}}}},"/v1/exams/attempts/{attempt_id}/answers":{"post":{"tags":["quiz"],"summary":"Ответы пробника","description":"Разбора по ходу нет: пробный ҰБТ оценивает, а не учит. Ответы принимаются пачкой — так же догоняет клиент, отвечавший без сети.","operationId":"answer_mock_exam_v1_exams_attempts__attempt_id__answers_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"attempt_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Attempt Id"}},{"name":"X-Device-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Device-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnswerBatchIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchResult"}}}},"403":{"description":"Нет доступа к уроку или нет зачисления в поток"},"404":{"description":"Тест не найден"},"409":{"description":"Попытка завершена или открыта на другом устройстве"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/exams/attempts/{attempt_id}/finish":{"post":{"tags":["quiz"],"summary":"Завершить пробник","description":"Неотвеченные вопросы стоят ноль. По истечении времени попытка завершается сама.","operationId":"finish_mock_exam_v1_exams_attempts__attempt_id__finish_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"attempt_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Attempt Id"}},{"name":"X-Device-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Device-Id"}},{"name":"Accept-Language","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttemptResult"}}}},"403":{"description":"Нет доступа к уроку или нет зачисления в поток"},"404":{"description":"Тест не найден"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/exams/attempts/{attempt_id}":{"get":{"tags":["quiz"],"summary":"Итог пробника: балл, секции, разбор","operationId":"mock_exam_result_v1_exams_attempts__attempt_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"attempt_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Attempt Id"}},{"name":"Accept-Language","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttemptResult"}}}},"403":{"description":"Нет доступа к уроку или нет зачисления в поток"},"404":{"description":"Тест не найден"},"409":{"description":"Попытка ещё идёт"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/exams/attempts/{attempt_id}/away":{"post":{"tags":["quiz"],"summary":"Ученик свернул приложение во время пробника","operationId":"note_exam_away_v1_exams_attempts__attempt_id__away_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"attempt_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Attempt Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AwayIn"}}}},"responses":{"204":{"description":"Successful Response"},"403":{"description":"Нет доступа к уроку или нет зачисления в поток"},"404":{"description":"Тест не найден"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/me/external-results":{"get":{"tags":["quiz"],"summary":"Мои результаты ҰБТ, сданные вне приложения","operationId":"my_external_results_v1_me_external_results_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ExternalResultOut"},"type":"array","title":"Response My External Results V1 Me External Results Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["quiz"],"summary":"Внести результат ҰБТ","description":"Экран «Сырттан нәтиже қосу»: центр, дата, балл, по желанию разбивка по предметам и фото листа. Такие результаты идут в динамику, но не в рейтинги.","operationId":"add_external_result_v1_me_external_results_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalResultIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalResultOut"}}}},"422":{"description":"Балл больше максимального или дата в будущем"}},"security":[{"HTTPBearer":[]}]}},"/v1/me/external-results/upload":{"post":{"tags":["quiz"],"summary":"Куда класть фото листа результатов","operationId":"external_result_upload_v1_me_external_results_upload_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadTicket"}}}},"422":{"description":"Принимаем фотографию или PDF"}},"security":[{"HTTPBearer":[]}]}},"/v1/me/external-results/upload/{media_id}/complete":{"post":{"tags":["quiz"],"summary":"Файл долетел до хранилища","operationId":"external_result_uploaded_v1_me_external_results_upload__media_id__complete_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"media_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Media Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/me/external-results/{result_id}":{"delete":{"tags":["quiz"],"summary":"Убрать свой результат","description":"Ошибся при вводе — убрал. Своё, не чужое.","operationId":"delete_external_result_v1_me_external_results__result_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"result_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Result Id"}}],"responses":{"204":{"description":"Successful Response"},"404":{"description":"Результат не найден"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/me/quiz-stats":{"get":{"tags":["quiz"],"summary":"Мои тесты: сколько сдано и насколько верно","description":"Для трекера: завершённые попытки всех видов за всё время и точность за последние 30 дней — верных из отвеченных, только в завершённых попытках.","operationId":"my_quiz_stats_v1_me_quiz_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuizStatsOut"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/me/readiness":{"get":{"tags":["quiz"],"summary":"Моя готовность к ҰБТ («Дайындық»)","description":"Точность в пробниках и тематических тестах с затуханием (неделя весит вдвое больше месяца), по секциям действующего формата ученика; тест урока не входит. Процент по предмету — от 20 вопросов, общий — только когда известна каждая секция. Снимок на день пересчитывается, если после него был тест или сменились профиль или формат.","operationId":"my_readiness_v1_me_readiness_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadinessOut"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/topic-tests":{"get":{"tags":["quiz"],"summary":"Темы для тематического теста","description":"Темы предмета деревом: сколько вопросов соберётся на языке обучения (с подтемами), можно ли начать — от пяти вопросов — и итог последнего теста.","operationId":"topic_test_options_v1_topic_tests_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"subject_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Subject Id"}},{"name":"Accept-Language","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TopicTestOption"},"title":"Response Topic Test Options V1 Topic Tests Get"}}}},"404":{"description":"Предмет не найден"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/topic-tests/{topic_id}/attempts":{"post":{"tags":["quiz"],"summary":"Начать тест по теме","description":"До десяти вопросов из банка по теме и её подтемам, сначала невиденные за месяц. Без таймера. Начатый тест по этой теме возвращается как есть.","operationId":"start_topic_test_v1_topic_tests__topic_id__attempts_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"topic_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Topic Id"}},{"name":"X-Device-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Device-Id"}},{"name":"Accept-Language","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttemptOut"}}}},"404":{"description":"Тема не найдена или выключена"},"409":{"description":"Идёт пробник или тест открыт на другом устройстве"},"422":{"description":"По теме меньше пяти вопросов"}}}},"/v1/topic-tests/attempts/{attempt_id}/answers":{"post":{"tags":["quiz"],"summary":"Ответ в тематическом тесте","description":"Проверка сразу: балл, правильный ответ и разбор — тест и учит.","operationId":"answer_topic_test_v1_topic_tests_attempts__attempt_id__answers_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"attempt_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Attempt Id"}},{"name":"X-Device-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Device-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnswerIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnswerResult"}}}},"404":{"description":"Попытка не найдена"},"409":{"description":"Уже отвечено, попытка завершена или на другом устройстве"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/topic-tests/attempts/{attempt_id}/answers/batch":{"post":{"tags":["quiz"],"summary":"Ответы тематического теста пачкой","description":"Так догоняет клиент, отвечавший без сети. Разбор — в итоге.","operationId":"answer_topic_test_batch_v1_topic_tests_attempts__attempt_id__answers_batch_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"attempt_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Attempt Id"}},{"name":"X-Device-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Device-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnswerBatchIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchResult"}}}},"404":{"description":"Попытка не найдена"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/topic-tests/attempts/{attempt_id}/finish":{"post":{"tags":["quiz"],"summary":"Завершить тематический тест","description":"Неотвеченные вопросы стоят ноль.","operationId":"finish_topic_test_v1_topic_tests_attempts__attempt_id__finish_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"attempt_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Attempt Id"}},{"name":"X-Device-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Device-Id"}},{"name":"Accept-Language","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttemptResult"}}}},"404":{"description":"Попытка не найдена"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/topic-tests/attempts/{attempt_id}":{"get":{"tags":["quiz"],"summary":"Итог тематического теста","description":"Балл, процент, «было / стало» по прошлому тесту той же темы и разбор.","operationId":"topic_test_result_v1_topic_tests_attempts__attempt_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"attempt_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Attempt Id"}},{"name":"Accept-Language","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttemptResult"}}}},"404":{"description":"Попытка не найдена"},"409":{"description":"Попытка ещё идёт"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/topic-tests/attempts/{attempt_id}/away":{"post":{"tags":["quiz"],"summary":"Ученик свернул приложение во время теста","operationId":"note_topic_test_away_v1_topic_tests_attempts__attempt_id__away_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"attempt_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Attempt Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AwayIn"}}}},"responses":{"204":{"description":"Successful Response"},"404":{"description":"Попытка не найдена"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/cohorts/{cohort_id}/rating":{"get":{"tags":["ratings"],"summary":"Рейтинг своего потока: места, баллы, разбор по урокам","description":"Тот же расчёт, что в панели. Виден ученику потока — тому, кто учится, на паузе или закончил, — и тем, кто поток ведёт. Времени учёбы одноклассников и их идентификаторов нет; своя строка — `is_me`. Без недели — последняя начавшаяся, где уже открыты уроки; поток без расписания по датам получает рейтинг за весь курс.","operationId":"student_rating_v1_cohorts__cohort_id__rating_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Cohort Id"}},{"name":"kind","in":"query","required":false,"schema":{"$ref":"#/components/schemas/RatingPeriodKind","description":"Неделя потока, весь курс или свои даты","default":"week"},"description":"Неделя потока, весь курс или свои даты"},{"name":"week","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":520,"minimum":1},{"type":"null"}],"description":"Без недели — текущая","title":"Week"},"description":"Без недели — текущая"},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Since"}},{"name":"until","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Until"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudentRatingOut"}}}},"403":{"description":"Не ученик этого потока"},"404":{"description":"Поток не найден"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/ratings/cohorts/{cohort_id}":{"get":{"tags":["console:ratings"],"summary":"Рейтинг потока за период","description":"Считается при чтении из прогресса, тестов и проверки домашек: каждый урок периода — до 10 баллов. Неделя — неделя потока, семь дней от даты старта; без недели — последняя начавшаяся, где уже открыты уроки. Поток без расписания по датам получает рейтинг за весь курс.","operationId":"cohort_rating_v1_console_ratings_cohorts__cohort_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Cohort Id"}},{"name":"kind","in":"query","required":false,"schema":{"$ref":"#/components/schemas/RatingPeriodKind","description":"Неделя потока, весь курс или свои даты","default":"week"},"description":"Неделя потока, весь курс или свои даты"},{"name":"week","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":520,"minimum":1},{"type":"null"}],"description":"Без недели — текущая","title":"Week"},"description":"Без недели — текущая"},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Since"}},{"name":"until","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Until"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CohortRatingOut"}}}},"403":{"description":"Поток закреплён за другими кураторами"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/ratings/cohorts/{cohort_id}/file":{"get":{"tags":["console:ratings"],"summary":"Рейтинг файлом: PDF для группы, Excel или PDF родителям архивом","description":"Язык файла — язык курса, если не выбран другой (`lang`).","operationId":"cohort_file_v1_console_ratings_cohorts__cohort_id__file_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Cohort Id"}},{"name":"format","in":"query","required":false,"schema":{"$ref":"#/components/schemas/RatingFileFormat","default":"group_pdf"}},{"name":"lang","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Locale"},{"type":"null"}],"title":"Lang"}},{"name":"kind","in":"query","required":false,"schema":{"$ref":"#/components/schemas/RatingPeriodKind","description":"Неделя потока, весь курс или свои даты","default":"week"},"description":"Неделя потока, весь курс или свои даты"},{"name":"week","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":520,"minimum":1},{"type":"null"}],"description":"Без недели — текущая","title":"Week"},"description":"Без недели — текущая"},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Since"}},{"name":"until","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Until"}}],"responses":{"200":{"description":"Successful Response","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"type":"string","format":"binary"}},"application/zip":{"schema":{"type":"string","format":"binary"}}}},"403":{"description":"Поток закреплён за другими кураторами"},"404":{"description":"Нет такого потока или отчёта"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/ratings/cohorts/{cohort_id}/students/{user_id}/pdf":{"post":{"tags":["console:ratings"],"summary":"PDF для родителей одного ученика","description":"Комментарий попадает только в файл и нигде не сохраняется.","operationId":"cohort_student_pdf_v1_console_ratings_cohorts__cohort_id__students__user_id__pdf_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Cohort Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiveStudentPdfIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}}},"403":{"description":"Поток закреплён за другими кураторами"},"404":{"description":"Нет такого потока, отчёта или ученика в рейтинге"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/ratings/reports":{"get":{"tags":["console:ratings"],"summary":"Сохранённые отчёты","description":"Новые сверху; курсор по (`created_at`, id). Свои потоки, администратору — все.","operationId":"list_reports_v1_console_ratings_reports_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Cohort Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":20,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_RatingReportRow_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["console:ratings"],"summary":"Сохранить отчёт","description":"Снимок рейтинга на сейчас: позже досданное в отчёт уже не попадёт.","operationId":"create_report_v1_console_ratings_reports_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RatingReportIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RatingReportOut"}}}},"403":{"description":"Поток закреплён за другими кураторами"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/ratings/reports/{report_id}":{"get":{"tags":["console:ratings"],"summary":"Сохранённый отчёт","operationId":"get_report_v1_console_ratings_reports__report_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Report Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RatingReportOut"}}}},"404":{"description":"Отчёт не найден"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["console:ratings"],"summary":"Удалить отчёт","operationId":"delete_report_v1_console_ratings_reports__report_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Report Id"}}],"responses":{"204":{"description":"Successful Response"},"404":{"description":"Отчёт не найден"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/ratings/reports/{report_id}/file":{"get":{"tags":["console:ratings"],"summary":"Отчёт файлом","operationId":"report_file_v1_console_ratings_reports__report_id__file_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Report Id"}},{"name":"format","in":"query","required":false,"schema":{"$ref":"#/components/schemas/RatingFileFormat","default":"group_pdf"}},{"name":"lang","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/Locale"},{"type":"null"}],"title":"Lang"}}],"responses":{"200":{"description":"Successful Response","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"type":"string","format":"binary"}},"application/zip":{"schema":{"type":"string","format":"binary"}}}},"403":{"description":"Поток закреплён за другими кураторами"},"404":{"description":"Нет такого потока или отчёта"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/ratings/reports/{report_id}/students/{user_id}/pdf":{"post":{"tags":["console:ratings"],"summary":"PDF для родителей из сохранённого отчёта","description":"Комментарий попадает только в файл и нигде не сохраняется.","operationId":"report_student_pdf_v1_console_ratings_reports__report_id__students__user_id__pdf_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Report Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudentPdfIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}}},"403":{"description":"Поток закреплён за другими кураторами"},"404":{"description":"Нет такого потока, отчёта или ученика в рейтинге"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/ratings/schedules":{"get":{"tags":["console:ratings"],"summary":"Отчёты по расписанию","description":"Потоки в наборе, ожидании старта и обучении — свои, администратору все; у потока без настроек расписание выключено. С `cohort_id` — один поток в любом статусе.","operationId":"list_schedules_v1_console_ratings_schedules_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Cohort Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RatingScheduleOut"},"title":"Response List Schedules V1 Console Ratings Schedules Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/ratings/schedules/{cohort_id}":{"put":{"tags":["console:ratings"],"summary":"Настроить отчёты по расписанию","description":"Отчёт создаётся утром первого дня после недель отчёта, в `hour` по поясу потока, и покрывает последние `every_weeks` недель потока.","operationId":"put_schedule_v1_console_ratings_schedules__cohort_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Cohort Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RatingScheduleIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RatingScheduleOut"}}}},"403":{"description":"Поток закреплён за другими кураторами"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/access-requests":{"post":{"tags":["sales"],"summary":"Заявка на курс или поток, в том числе от гостя","description":"Гость — по заголовку `X-Device-Id`; вошедшему имя, телефон и почта подставятся из аккаунта. Повтор по тому же курсу возвращает открытую заявку (200). Лимит — 3 заявки в час на устройство и 5 в час на адрес.","operationId":"create_access_request_v1_access_requests_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-Device-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"X-Device-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessRequestCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessRequestOut"}}}},"200":{"description":"Открытая заявка на этот курс уже есть — она и возвращена"},"404":{"description":"Курс не найден или не опубликован"},"422":{"description":"Нет ни входа, ни X-Device-Id; нет имени или телефона; поток не из этого курса"},"429":{"description":"`rate_limited`, `details.retry_after_sec`"}}}},"/v1/invites/{token}":{"get":{"tags":["sales"],"summary":"Что это за приглашение: курс, поток, дата старта","description":"Без авторизации — экран приглашения показывается до входа. Номер привязки наружу не выходит, только `phone_bound`. Принятие — `POST /v1/invites/{token}/accept`.","operationId":"public_invite_v1_invites__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitePublic"}}}},"422":{"description":"`invite_invalid` — такой ссылки нет"}}}},"/v1/invites/{token}/accept":{"post":{"tags":["sales"],"summary":"Принять приглашение → зачисление","description":"Требует входа: зачисление привязывается к аккаунту. Повторное открытие ссылки идемпотентно — 200 и то же зачисление. Ссылка, привязанная к номеру, работает только для аккаунта с этим номером в профиле.","operationId":"accept_invite_v1_invites__token__accept_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteAcceptOut"}}}},"200":{"description":"Уже зачислены по этой ссылке — зачисление возвращено"},"401":{"description":"Требуется вход"},"409":{"description":"`already_enrolled` — учитесь в другом потоке этого курса, `cohort_full`, `conflict` — набор не открыт"},"422":{"description":"`invite_invalid` (нет, отозвана, исчерпана), `invite_expired`, `invite_phone_mismatch`"}}}},"/v1/activation-codes/redeem":{"post":{"tags":["sales"],"summary":"Активация кода → зачисление в поток","description":"Код вводится как угодно: дефисы, пробелы и регистр не важны. Код на курс без потока требует `cohort_id` потока этого курса (422 с `details.course_id`, `course_slug`, `course_title` — по ним клиент показывает выбор потока). Повторная активация тем же учеником — 200 и то же зачисление, использование не тратится.","operationId":"redeem_code_v1_activation_codes_redeem_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CodeRedeemIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CodeRedeemOut"}}}},"200":{"description":"Уже зачислены по этому коду — зачисление возвращено"},"401":{"description":"Требуется вход"},"409":{"description":"`already_enrolled` — учитесь в другом потоке этого курса, `cohort_full`, `conflict` — набор не открыт"},"422":{"description":"`code_invalid`, `code_used`, `code_expired`; `validation_failed` — нужен выбор потока или поток не из курса кода"}},"security":[{"HTTPBearer":[]}]}},"/v1/console/access-requests":{"get":{"tags":["console:sales"],"summary":"Заявки: свежие сверху","operationId":"list_access_requests_v1_console_access_requests_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/AccessRequestStatus"},{"type":"null"}],"title":"Status"}},{"name":"assigned_to_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Assigned To Id"}},{"name":"course_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Course Id"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"description":"Имя или телефон","title":"Q"},"description":"Имя или телефон"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":20,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_AccessRequestConsoleOut_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/access-requests/{request_id}":{"get":{"tags":["console:sales"],"summary":"Заявка","operationId":"get_access_request_v1_console_access_requests__request_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Request Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessRequestConsoleOut"}}}},"404":{"description":"Заявка не найдена"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["console:sales"],"summary":"Вести заявку: статус, ответственный, комментарий, напоминание","description":"Статусы: `new → in_progress → paid → enrolled | rejected | no_answer`; `no_answer` и `rejected` можно вернуть в работу. `assigned_to_id: null` снимает ответственного. Изменения — в журнал аудита.","operationId":"update_access_request_v1_console_access_requests__request_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Request Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessRequestUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessRequestConsoleOut"}}}},"404":{"description":"Заявка не найдена"},"409":{"description":"Такой переход статуса невозможен"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/invites":{"post":{"tags":["console:sales"],"summary":"Пригласить в поток: ссылка для мессенджера","description":"Срок по умолчанию — 14 дней, использований — 1; `phone` привязывает ссылку к номеру. Поток должен набирать: `recruiting`, `scheduled` или `active`.","operationId":"create_invite_v1_console_invites_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteOut"}}}},"403":{"description":"Поток закреплён за другими кураторами"},"409":{"description":"В этот поток нельзя приглашать: набор не открыт"},"422":{"description":"Поток не найден или номер не в международном формате"}}},"get":{"tags":["console:sales"],"summary":"Приглашения: свежие сверху; куратор видит свои потоки","operationId":"list_invites_v1_console_invites_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Cohort Id"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/InviteState"},{"type":"null"}],"title":"State"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"description":"Номер или токен","title":"Q"},"description":"Номер или токен"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":20,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_InviteOut_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/invites/bulk":{"post":{"tags":["console:sales"],"summary":"Пачка ссылок: N одинаковых или по одной на номер","operationId":"create_invites_bulk_v1_console_invites_bulk_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteBulkCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/InviteOut"},"type":"array","title":"Response Create Invites Bulk V1 Console Invites Bulk Post"}}}},"403":{"description":"Поток закреплён за другими кураторами"},"409":{"description":"В этот поток нельзя приглашать: набор не открыт"},"422":{"description":"Нужно либо `count`, либо `phones`"}},"security":[{"HTTPBearer":[]}]}},"/v1/console/invites/summary":{"get":{"tags":["console:sales"],"summary":"Сколько приглашений отправлено, принято, просрочено","operationId":"invites_summary_v1_console_invites_summary_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Cohort Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/invites/{invite_id}/revoke":{"post":{"tags":["console:sales"],"summary":"Отозвать приглашение","description":"Идемпотентно: повторный отзыв ничего не меняет.","operationId":"revoke_invite_v1_console_invites__invite_id__revoke_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"invite_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Invite Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteOut"}}}},"403":{"description":"Поток закреплён за другими кураторами"},"404":{"description":"Приглашение не найдено"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/activation-codes/batch":{"post":{"tags":["console:sales"],"summary":"Партия кодов: курс с потоком или с выбором потока учеником","operationId":"create_code_batch_v1_console_activation_codes_batch_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CodeBatchCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CodeOut"},"type":"array","title":"Response Create Code Batch V1 Console Activation Codes Batch Post"}}}},"409":{"description":"В этот поток нельзя зачислять: набор не открыт"},"422":{"description":"Курс или поток не найдены, поток не из курса, срок в прошлом"}},"security":[{"HTTPBearer":[]}]}},"/v1/console/activation-codes":{"get":{"tags":["console:sales"],"summary":"Коды: свежие сверху, с состоянием и кем активирован","operationId":"list_codes_v1_console_activation_codes_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"batch_label","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Batch Label"}},{"name":"course_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Course Id"}},{"name":"cohort_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Cohort Id"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/CodeState"},{"type":"null"}],"title":"State"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"description":"Фрагмент кода","title":"Q"},"description":"Фрагмент кода"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":20,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_CodeOut_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/activation-codes/batches":{"get":{"tags":["console:sales"],"summary":"Партии со счётчиками","operationId":"list_code_batches_v1_console_activation_codes_batches_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"course_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Course Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CodeBatchSummary"},"title":"Response List Code Batches V1 Console Activation Codes Batches Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/activation-codes/export":{"get":{"tags":["console:sales"],"summary":"Экспорт кодов в CSV","description":"Те же фильтры, что у списка; обычно — `batch_label`. Файл с BOM для Excel.","operationId":"export_codes_v1_console_activation_codes_export_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"batch_label","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Batch Label"}},{"name":"course_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Course Id"}},{"name":"cohort_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Cohort Id"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/CodeState"},{"type":"null"}],"title":"State"}}],"responses":{"200":{"description":"Successful Response","content":{"text/csv":{}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/console/activation-codes/revoke-batch":{"post":{"tags":["console:sales"],"summary":"Отозвать всю партию","description":"Возвращает число отозванных сейчас кодов; уже отозванные не считаются.","operationId":"revoke_code_batch_v1_console_activation_codes_revoke_batch_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CodeBatchRevoke"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"integer"},"type":"object","title":"Response Revoke Code Batch V1 Console Activation Codes Revoke Batch Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/console/activation-codes/{code_id}/revoke":{"post":{"tags":["console:sales"],"summary":"Отозвать код","description":"Идемпотентно.","operationId":"revoke_code_v1_console_activation_codes__code_id__revoke_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"code_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Code Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CodeOut"}}}},"404":{"description":"Код не найден"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AccessAfterFinish":{"type":"string","enum":["keep","days_30","days_90","close"],"title":"AccessAfterFinish","description":"Доступ после завершения потока. Значение по умолчанию — вопрос Q15;\nпока в коде `keep`: ученику ничего не закрывается без решения заказчика."},"AccessDecision":{"properties":{"granted":{"type":"boolean","title":"Granted"},"reason":{"$ref":"#/components/schemas/AccessReason"},"opens_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Opens At"},"deadline_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deadline At"},"access_until":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Access Until"},"cohort_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Cohort Id"},"enrollment_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Enrollment Id"}},"type":"object","required":["granted","reason"],"title":"AccessDecision"},"AccessReason":{"type":"string","enum":["free_preview","free_course","staff","enrolled","guest","not_enrolled","enrollment_invited","enrollment_paused","cohort_cancelled","access_not_started","access_expired","not_scheduled","closed_by_curator","not_open_yet","previous_not_completed","lesson_unavailable"],"title":"AccessReason"},"AccessRequestConsoleOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"status":{"$ref":"#/components/schemas/AccessRequestStatus"},"source":{"$ref":"#/components/schemas/AccessRequestSource"},"contact_name":{"type":"string","title":"Contact Name"},"contact_phone":{"type":"string","title":"Contact Phone"},"contact_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Email"},"course":{"$ref":"#/components/schemas/CourseRef"},"preferred_cohort":{"anyOf":[{"$ref":"#/components/schemas/CohortRef"},{"type":"null"}]},"user":{"anyOf":[{"$ref":"#/components/schemas/UserRef"},{"type":"null"}]},"assigned_to":{"anyOf":[{"$ref":"#/components/schemas/UserRef"},{"type":"null"}]},"comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comment"},"next_contact_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Contact At"},"device_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Device Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","status","source","contact_name","contact_phone","contact_email","course","preferred_cohort","user","assigned_to","comment","next_contact_at","device_id","created_at","updated_at"],"title":"AccessRequestConsoleOut"},"AccessRequestCreate":{"properties":{"course_id":{"type":"string","format":"uuid","title":"Course Id"},"preferred_cohort_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Preferred Cohort Id"},"contact_name":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Contact Name"},"contact_phone":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Contact Phone"},"contact_email":{"anyOf":[{"type":"string","maxLength":255,"pattern":"^[^@\\s]+@[^@\\s]+$"},{"type":"null"}],"title":"Contact Email"},"source":{"$ref":"#/components/schemas/AccessRequestSource","default":"app"}},"type":"object","required":["course_id"],"title":"AccessRequestCreate","description":"Заявка на курс или конкретный поток. Гость заполняет контакты сам;\nвошедшему имя, телефон и почта подставятся из аккаунта, если не прислал."},"AccessRequestOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"course_id":{"type":"string","format":"uuid","title":"Course Id"},"preferred_cohort_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Preferred Cohort Id"},"contact_name":{"type":"string","title":"Contact Name"},"contact_phone":{"type":"string","title":"Contact Phone"},"contact_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Email"},"source":{"$ref":"#/components/schemas/AccessRequestSource"},"status":{"$ref":"#/components/schemas/AccessRequestStatus"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","course_id","preferred_cohort_id","contact_name","contact_phone","contact_email","source","status","created_at"],"title":"AccessRequestOut"},"AccessRequestSource":{"type":"string","enum":["app","web","landing"],"title":"AccessRequestSource"},"AccessRequestStatus":{"type":"string","enum":["new","in_progress","paid","enrolled","rejected","no_answer"],"title":"AccessRequestStatus","description":"new → in_progress → paid → enrolled | rejected | no_answer."},"AccessRequestUpdate":{"properties":{"status":{"anyOf":[{"$ref":"#/components/schemas/AccessRequestStatus"},{"type":"null"}]},"assigned_to_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Assigned To Id"},"comment":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Comment"},"next_contact_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Contact At"}},"type":"object","title":"AccessRequestUpdate","description":"Менеджер: статус, ответственный, комментарий, напоминание о звонке.\n`assigned_to_id: null` снимает ответственного."},"AccountOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"phone_verification":{"$ref":"#/components/schemas/PhoneVerification"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"last_login_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Login At"},"providers":{"items":{"type":"string"},"type":"array","title":"Providers"}},"type":"object","required":["id","email","phone","phone_verification","created_at","last_login_at","providers"],"title":"AccountOut","description":"Учётная запись в выгрузке данных (E1-69): то, что мы знаем о человеке\nпомимо профиля. Ни пароля, ни секрета второго фактора здесь нет —\nвыгрузка отдаёт данные о человеке, а не ключи от входа."},"ActivityDayExport":{"properties":{"day":{"type":"string","format":"date","title":"Day"},"active_seconds":{"type":"integer","title":"Active Seconds"},"lessons_completed":{"type":"integer","title":"Lessons Completed"},"posts_read":{"type":"integer","title":"Posts Read"}},"type":"object","required":["day","active_seconds","lessons_completed","posts_read"],"title":"ActivityDayExport"},"ActivityDayOut":{"properties":{"day":{"type":"string","format":"date","title":"Day"},"active_seconds":{"type":"integer","title":"Active Seconds"},"lessons_completed":{"type":"integer","title":"Lessons Completed"},"posts_read":{"type":"integer","title":"Posts Read"}},"type":"object","required":["day","active_seconds","lessons_completed","posts_read"],"title":"ActivityDayOut","description":"День теплокарты. Дни без активности в ответе есть — с нулями:\nиначе клиенту пришлось бы достраивать календарь самому."},"ActivityOut":{"properties":{"days":{"items":{"$ref":"#/components/schemas/ActivityDayOut"},"type":"array","title":"Days"},"timezone":{"type":"string","title":"Timezone"}},"type":"object","required":["days","timezone"],"title":"ActivityOut"},"AnnouncementCreate":{"properties":{"title":{"type":"string","maxLength":200,"minLength":2,"title":"Title"},"body":{"$ref":"#/components/schemas/BlockDocument"},"is_pinned":{"type":"boolean","title":"Is Pinned","default":false},"notify":{"type":"boolean","title":"Notify","default":true},"publish":{"type":"boolean","title":"Publish","default":true}},"type":"object","required":["title"],"title":"AnnouncementCreate"},"AnnouncementOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"cohort_id":{"type":"string","format":"uuid","title":"Cohort Id"},"author_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author Id"},"author_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Author Name"},"title":{"type":"string","title":"Title"},"body":{"$ref":"#/components/schemas/BlockDocument"},"media_urls":{"additionalProperties":{"type":"string"},"propertyNames":{"format":"uuid"},"type":"object","title":"Media Urls"},"is_pinned":{"type":"boolean","title":"Is Pinned"},"published_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Published At"},"notify":{"type":"boolean","title":"Notify"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","cohort_id","author_id","author_name","title","body","is_pinned","published_at","notify","created_at","updated_at"],"title":"AnnouncementOut"},"AnnouncementPublic":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"title":{"type":"string","title":"Title"},"body":{"$ref":"#/components/schemas/BlockDocument"},"media_urls":{"additionalProperties":{"type":"string"},"propertyNames":{"format":"uuid"},"type":"object","title":"Media Urls"},"is_pinned":{"type":"boolean","title":"Is Pinned"},"published_at":{"type":"string","format":"date-time","title":"Published At"},"author_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Author Name"}},"type":"object","required":["id","title","body","is_pinned","published_at","author_name"],"title":"AnnouncementPublic","description":"Объявление глазами ученика: только опубликованные."},"AnnouncementUpdate":{"properties":{"title":{"anyOf":[{"type":"string","maxLength":200,"minLength":2},{"type":"null"}],"title":"Title"},"body":{"anyOf":[{"$ref":"#/components/schemas/BlockDocument"},{"type":"null"}]},"is_pinned":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Pinned"},"notify":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Notify"}},"type":"object","title":"AnnouncementUpdate"},"AnswerBatchIn":{"properties":{"answers":{"items":{"$ref":"#/components/schemas/AnswerIn"},"type":"array","maxItems":200,"minItems":1,"title":"Answers"}},"type":"object","required":["answers"],"title":"AnswerBatchIn","description":"Пачка ответов: так догоняет клиент, отвечавший без сети.\n\nУже отвеченные вопросы пропускаются молча — повторная отправка пачки\nпосле обрыва связи не должна ломать попытку."},"AnswerIn":{"properties":{"question_id":{"type":"string","format":"uuid","title":"Question Id"},"answer":{"additionalProperties":true,"type":"object","title":"Answer"},"spent_ms":{"anyOf":[{"type":"integer","maximum":86400000.0,"minimum":0.0},{"type":"null"}],"title":"Spent Ms"}},"type":"object","required":["question_id"],"title":"AnswerIn","description":"Ответ ученика на один вопрос. Форма — как у `correct` его типа."},"AnswerResult":{"properties":{"question_id":{"type":"string","format":"uuid","title":"Question Id"},"is_correct":{"type":"boolean","title":"Is Correct"},"score":{"type":"integer","title":"Score"},"max_score":{"type":"integer","title":"Max Score"},"correct":{"additionalProperties":true,"type":"object","title":"Correct"},"explanation":{"$ref":"#/components/schemas/BlockDocument"},"media_urls":{"additionalProperties":{"type":"string"},"propertyNames":{"format":"uuid"},"type":"object","title":"Media Urls"},"answered":{"type":"integer","title":"Answered"},"total":{"type":"integer","title":"Total"},"attempt_score":{"type":"integer","title":"Attempt Score"},"attempt_max_score":{"type":"integer","title":"Attempt Max Score"},"is_finished":{"type":"boolean","title":"Is Finished"},"seconds_left":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seconds Left"}},"type":"object","required":["question_id","is_correct","score","max_score","correct","explanation","answered","total","attempt_score","attempt_max_score","is_finished","seconds_left"],"title":"AnswerResult","description":"Мгновенная проверка: балл, правильный ответ и разбор.\n\nРазбор приходит и при ошибке — он и учит (docs/spec/06-tests-exams.md)."},"AnsweredQuestion":{"properties":{"question":{"$ref":"#/components/schemas/QuestionPublic"},"answer":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Answer"},"score":{"type":"integer","title":"Score"},"is_correct":{"type":"boolean","title":"Is Correct"},"correct":{"additionalProperties":true,"type":"object","title":"Correct"},"explanation":{"$ref":"#/components/schemas/BlockDocument"},"media_urls":{"additionalProperties":{"type":"string"},"propertyNames":{"format":"uuid"},"type":"object","title":"Media Urls"}},"type":"object","required":["question","answer","score","is_correct","correct","explanation"],"title":"AnsweredQuestion","description":"Строка разбора: что спрашивали, что ответил ученик, что верно."},"AppConfigOut":{"properties":{"update":{"$ref":"#/components/schemas/UpdateInfo"}},"type":"object","required":["update"],"title":"AppConfigOut","description":"Ответ `GET /v1/config`. Флаги функций и ссылки ляжут сюда же (спека 12)."},"AppPlatform":{"type":"string","enum":["ios","android","huawei"],"title":"AppPlatform","description":"Где приложение выпущено. У Huawei свой магазин и своя сборка — без\nсервисов Google; версию заводим заранее, сборка будет позже."},"AppReleaseIn":{"properties":{"latest_version":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Latest Version"},"min_version":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Min Version"},"store_url":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Store Url"}},"type":"object","title":"AppReleaseIn","description":"Правка версий платформы. Пустая строка — поле снято: без минимальной\nверсии обязательного обновления нет, без последней — необязательного."},"AppReleaseOut":{"properties":{"platform":{"$ref":"#/components/schemas/AppPlatform"},"latest_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Latest Version"},"min_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Min Version"},"store_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Store Url"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"usage":{"items":{"$ref":"#/components/schemas/VersionUsage"},"type":"array","title":"Usage"}},"type":"object","required":["platform","latest_version","min_version","store_url","updated_at","usage"],"title":"AppReleaseOut"},"AttachmentIn":{"properties":{"media_id":{"type":"string","format":"uuid","title":"Media Id"},"title":{"type":"string","maxLength":200,"minLength":1,"title":"Title"}},"type":"object","required":["media_id","title"],"title":"AttachmentIn"},"AttachmentKind":{"type":"string","enum":["pdf","image","other"],"title":"AttachmentKind"},"AttachmentOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"media_id":{"type":"string","format":"uuid","title":"Media Id"},"title":{"type":"string","title":"Title"},"kind":{"$ref":"#/components/schemas/AttachmentKind"},"size_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Size Bytes"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"sort_order":{"type":"integer","title":"Sort Order"}},"type":"object","required":["id","media_id","title","kind","sort_order"],"title":"AttachmentOut"},"AttemptBrief":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"kind":{"$ref":"#/components/schemas/AttemptKind"},"attempt":{"type":"integer","title":"Attempt"},"status":{"$ref":"#/components/schemas/AttemptStatus"},"score":{"type":"integer","title":"Score"},"max_score":{"type":"integer","title":"Max Score"},"percent":{"type":"integer","title":"Percent"},"started_at":{"type":"string","format":"date-time","title":"Started At"},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished At"}},"type":"object","required":["id","kind","attempt","status","score","max_score","percent","started_at","finished_at"],"title":"AttemptBrief"},"AttemptKind":{"type":"string","enum":["lesson_quiz","topic_quiz","mini_exam","mock_exam"],"title":"AttemptKind","description":"Виды тестов (docs/spec/06-tests-exams.md, «Виды тестов»).\n\nОт вида зависят две вещи: есть ли таймер и показывается ли разбор сразу.\nТест урока учит, поэтому отвечает и объясняет; пробный ҰБТ оценивает,\nпоэтому молчит до конца."},"AttemptOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"kind":{"$ref":"#/components/schemas/AttemptKind"},"lesson_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Lesson Id"},"attempt":{"type":"integer","title":"Attempt"},"status":{"$ref":"#/components/schemas/AttemptStatus"},"score":{"type":"integer","title":"Score"},"max_score":{"type":"integer","title":"Max Score"},"started_at":{"type":"string","format":"date-time","title":"Started At"},"deadline_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deadline At"},"seconds_left":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seconds Left"},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished At"},"sections":{"items":{"$ref":"#/components/schemas/SectionPlan"},"type":"array","title":"Sections"},"questions":{"items":{"$ref":"#/components/schemas/QuestionPublic"},"type":"array","title":"Questions"},"answered_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Answered Ids"},"topic_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Topic Id"},"topic_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Topic Title"}},"type":"object","required":["id","kind","lesson_id","attempt","status","score","max_score","started_at","deadline_at","seconds_left","finished_at","questions","answered_ids"],"title":"AttemptOut","description":"Попытка глазами ученика. Пока идёт — без правильных ответов."},"AttemptResult":{"properties":{"attempt_id":{"type":"string","format":"uuid","title":"Attempt Id"},"kind":{"$ref":"#/components/schemas/AttemptKind"},"lesson_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Lesson Id"},"attempt":{"type":"integer","title":"Attempt"},"score":{"type":"integer","title":"Score"},"max_score":{"type":"integer","title":"Max Score"},"percent":{"type":"integer","title":"Percent"},"best_score":{"type":"integer","title":"Best Score"},"is_expired":{"type":"boolean","title":"Is Expired"},"away_count":{"type":"integer","title":"Away Count"},"rushed_count":{"type":"integer","title":"Rushed Count"},"previous_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Previous Score"},"previous_max_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Previous Max Score"},"sections":{"items":{"$ref":"#/components/schemas/SectionScore"},"type":"array","title":"Sections"},"weak_topics":{"items":{"$ref":"#/components/schemas/WeakTopic"},"type":"array","title":"Weak Topics"},"review":{"items":{"$ref":"#/components/schemas/AnsweredQuestion"},"type":"array","title":"Review"},"topic_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Topic Id"},"topic_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Topic Title"},"topic_lesson_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Topic Lesson Id"}},"type":"object","required":["attempt_id","kind","lesson_id","attempt","score","max_score","percent","best_score","is_expired","away_count","rushed_count","review"],"title":"AttemptResult","description":"Итог попытки: балл, процент, лучший результат и разбор по вопросам."},"AttemptStatus":{"type":"string","enum":["in_progress","finished"],"title":"AttemptStatus"},"AttendanceOut":{"properties":{"session_id":{"type":"string","format":"uuid","title":"Session Id"},"enrolled_count":{"type":"integer","title":"Enrolled Count"},"joined_count":{"type":"integer","title":"Joined Count"},"joined":{"items":{"$ref":"#/components/schemas/AttendanceRow"},"type":"array","title":"Joined"},"not_joined":{"items":{"$ref":"#/components/schemas/UserRef"},"type":"array","title":"Not Joined"}},"type":"object","required":["session_id","enrolled_count","joined_count","joined","not_joined"],"title":"AttendanceOut","description":"Кто заходил на занятие и кто из учащихся потока — нет (E1-88)."},"AttendanceRow":{"properties":{"user":{"$ref":"#/components/schemas/UserRef"},"first_joined_at":{"type":"string","format":"date-time","title":"First Joined At"},"last_seen_at":{"type":"string","format":"date-time","title":"Last Seen At"},"source":{"$ref":"#/components/schemas/AttendanceSource"}},"type":"object","required":["user","first_joined_at","last_seen_at","source"],"title":"AttendanceRow","description":"«Заходил на занятие» — отметка по нажатию кнопки входа, не присутствие\n(docs/spec/15-live-sessions.md, «Присутствие»)."},"AttendanceSource":{"type":"string","enum":["join_click","livekit_webhook"],"title":"AttendanceSource","description":"`join_click` — «заходил на занятие»: нажал кнопку, а был ли — неизвестно.\nРеальное время появится с вебхуками LiveKit."},"AttentionOut":{"properties":{"thresholds":{"$ref":"#/components/schemas/AttentionThresholds"},"students":{"items":{"$ref":"#/components/schemas/StudentAlert"},"type":"array","title":"Students"},"cohorts":{"items":{"$ref":"#/components/schemas/CohortAlert"},"type":"array","title":"Cohorts"},"courses":{"items":{"$ref":"#/components/schemas/CourseAlert"},"type":"array","title":"Courses"},"by_cohort":{"items":{"$ref":"#/components/schemas/CohortRollup"},"type":"array","title":"By Cohort"}},"type":"object","required":["thresholds","students","cohorts","courses","by_cohort"],"title":"AttentionOut"},"AttentionThresholds":{"properties":{"inactive_days":{"type":"integer","title":"Inactive Days"},"invite_days":{"type":"integer","title":"Invite Days"},"overdue_grace_days":{"type":"integer","title":"Overdue Grace Days"},"missed_sessions":{"type":"integer","title":"Missed Sessions"},"min_size_days":{"type":"integer","title":"Min Size Days"}},"type":"object","required":["inactive_days","invite_days","overdue_grace_days","missed_sessions","min_size_days"],"title":"AttentionThresholds","description":"Пороги, по которым посчитаны сигналы. Отдаются вместе с ответом:\nподпись «молчат 7 дней» обязана совпадать с тем, что реально считали,\nа порог живёт в настройках сервера."},"AuditEntryOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"actor_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Actor Id"},"action":{"type":"string","title":"Action"},"entity_type":{"type":"string","title":"Entity Type"},"entity_id":{"type":"string","format":"uuid","title":"Entity Id"},"before":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Before"},"after":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"After"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"actor":{"anyOf":[{"$ref":"#/components/schemas/UserRef"},{"type":"null"}]},"ip":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ip"},"user_agent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Agent"}},"type":"object","required":["id","actor_id","action","entity_type","entity_id","before","after","created_at","actor","ip","user_agent"],"title":"AuditEntryOut","description":"Строка журнала для экрана: с автором и следом запроса.\n\nАдрес и клиент нужны там, где спрашивают «кто это сделал»: сотрудник\nмог работать из чужой сети или под чужой сессией (E1-95)."},"AuthProvider":{"type":"string","enum":["google","apple","password"],"title":"AuthProvider"},"AvatarIn":{"properties":{"media_id":{"type":"string","format":"uuid","title":"Media Id"}},"type":"object","required":["media_id"],"title":"AvatarIn","description":"Загруженный файл, который становится фото профиля."},"AwayIn":{"properties":{"count":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Count","default":1}},"type":"object","title":"AwayIn","description":"Ученик ушёл из приложения во время попытки (спека 06, «Античит»)."},"BatchResult":{"properties":{"saved":{"type":"integer","title":"Saved"},"skipped":{"type":"integer","title":"Skipped"},"answered":{"type":"integer","title":"Answered"},"total":{"type":"integer","title":"Total"},"is_finished":{"type":"boolean","title":"Is Finished"},"seconds_left":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seconds Left"}},"type":"object","required":["saved","skipped","answered","total","is_finished","seconds_left"],"title":"BatchResult"},"BlockDocument":{"properties":{"version":{"type":"integer","const":1,"title":"Version","default":1},"blocks":{"items":{"oneOf":[{"$ref":"#/components/schemas/ParagraphBlock"},{"$ref":"#/components/schemas/HeadingBlock"},{"$ref":"#/components/schemas/FormulaBlock"},{"$ref":"#/components/schemas/ImageBlock"},{"$ref":"#/components/schemas/CodeBlock"},{"$ref":"#/components/schemas/QuoteBlock"},{"$ref":"#/components/schemas/ListBlock"},{"$ref":"#/components/schemas/CalloutBlock"},{"$ref":"#/components/schemas/VideoBlock"},{"$ref":"#/components/schemas/ButtonBlock"},{"$ref":"#/components/schemas/QuestionBlock"}],"discriminator":{"propertyName":"type","mapping":{"button":"#/components/schemas/ButtonBlock","callout":"#/components/schemas/CalloutBlock","code":"#/components/schemas/CodeBlock","formula":"#/components/schemas/FormulaBlock","heading":"#/components/schemas/HeadingBlock","image":"#/components/schemas/ImageBlock","list":"#/components/schemas/ListBlock","paragraph":"#/components/schemas/ParagraphBlock","question":"#/components/schemas/QuestionBlock","quote":"#/components/schemas/QuoteBlock","video":"#/components/schemas/VideoBlock"}}},"type":"array","maxItems":200,"title":"Blocks"}},"additionalProperties":false,"type":"object","title":"BlockDocument","description":"Документ целиком: версия схемы и блоки.\n\nВерсия стоит на документе, а не на блоке: читатель принимает только\nизвестные версии, а смена формы — это новая версия плюс скрипт переноса,\nне угадывание по содержимому."},"BlueprintIn":{"properties":{"code":{"type":"string","maxLength":64,"minLength":2,"pattern":"^[a-z0-9_]+$","title":"Code"},"title":{"type":"string","maxLength":200,"minLength":1,"title":"Title"},"locale":{"$ref":"#/components/schemas/Locale"},"total_time_sec":{"type":"integer","maximum":28800.0,"minimum":300.0,"title":"Total Time Sec"},"profile_subject_count":{"type":"integer","maximum":4.0,"minimum":0.0,"title":"Profile Subject Count","default":2},"valid_from":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Valid From"},"valid_until":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Valid Until"},"sections":{"items":{"$ref":"#/components/schemas/SectionIn"},"type":"array","maxItems":20,"minItems":1,"title":"Sections"}},"type":"object","required":["code","title","locale","total_time_sec","sections"],"title":"BlueprintIn"},"BlueprintOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"code":{"type":"string","title":"Code"},"title":{"type":"string","title":"Title"},"version":{"type":"integer","title":"Version"},"locale":{"$ref":"#/components/schemas/Locale"},"total_time_sec":{"type":"integer","title":"Total Time Sec"},"profile_subject_count":{"type":"integer","title":"Profile Subject Count"},"valid_from":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Valid From"},"valid_until":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Valid Until"},"is_active":{"type":"boolean","title":"Is Active"},"question_count":{"type":"integer","title":"Question Count"},"max_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Score"},"sections":{"items":{"$ref":"#/components/schemas/SectionOut"},"type":"array","title":"Sections"}},"type":"object","required":["id","code","title","version","locale","total_time_sec","profile_subject_count","valid_from","valid_until","is_active","question_count","sections"],"title":"BlueprintOut"},"BlueprintReadiness":{"properties":{"is_ready":{"type":"boolean","title":"Is Ready"},"sections":{"items":{"$ref":"#/components/schemas/SectionReadiness"},"type":"array","title":"Sections"}},"type":"object","required":["is_ready","sections"],"title":"BlueprintReadiness"},"Body_apple_events_v1_webhooks_apple_post":{"properties":{"payload":{"type":"string","title":"Payload"}},"type":"object","required":["payload"],"title":"Body_apple_events_v1_webhooks_apple_post"},"Body_import_questions_v1_console_questions_import_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_import_questions_v1_console_questions_import_post"},"ButtonBlock":{"properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,40}$","title":"Id"},"type":{"type":"string","const":"button","title":"Type"},"label":{"type":"string","maxLength":300,"minLength":1,"title":"Label"},"url":{"type":"string","maxLength":500,"pattern":"^https://\\S+$","title":"Url"}},"additionalProperties":false,"type":"object","required":["type","label","url"],"title":"ButtonBlock"},"CalloutBlock":{"properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,40}$","title":"Id"},"type":{"type":"string","const":"callout","title":"Type"},"tone":{"type":"string","enum":["important","tip","warning"],"title":"Tone","default":"important"},"title":{"anyOf":[{"type":"string","maxLength":300,"minLength":1},{"type":"null"}],"title":"Title"},"text":{"type":"string","maxLength":5000,"title":"Text"}},"additionalProperties":false,"type":"object","required":["type","text"],"title":"CalloutBlock","description":"Врезка «Важно»."},"CancelIn":{"properties":{"reason":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Reason"}},"type":"object","title":"CancelIn","description":"Причина отмены попадёт в уведомление зачисленным (E1-36) и в журнал."},"ChapterIn":{"properties":{"start_sec":{"type":"integer","minimum":0.0,"title":"Start Sec"},"title":{"type":"string","maxLength":200,"minLength":1,"title":"Title"}},"type":"object","required":["start_sec","title"],"title":"ChapterIn"},"ChapterOut":{"properties":{"start_sec":{"type":"integer","minimum":0.0,"title":"Start Sec"},"title":{"type":"string","maxLength":200,"minLength":1,"title":"Title"},"id":{"type":"string","format":"uuid","title":"Id"},"sort_order":{"type":"integer","title":"Sort Order"}},"type":"object","required":["start_sec","title","id","sort_order"],"title":"ChapterOut"},"CityConsoleOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"code":{"type":"string","title":"Code"},"region_id":{"type":"string","format":"uuid","title":"Region Id"},"sort_order":{"type":"integer","title":"Sort Order"},"is_active":{"type":"boolean","title":"Is Active"},"titles":{"additionalProperties":{"type":"string"},"type":"object","title":"Titles"}},"type":"object","required":["id","code","region_id","sort_order","is_active","titles"],"title":"CityConsoleOut"},"CityCreate":{"properties":{"code":{"type":"string","maxLength":32,"minLength":2,"pattern":"^[a-z0-9_]+$","title":"Code"},"region_id":{"type":"string","format":"uuid","title":"Region Id"},"sort_order":{"type":"integer","title":"Sort Order","default":0},"titles":{"additionalProperties":{"type":"string"},"type":"object","minProperties":1,"title":"Titles"}},"type":"object","required":["code","region_id","titles"],"title":"CityCreate"},"CityOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"code":{"type":"string","title":"Code"},"title":{"type":"string","title":"Title"},"region_id":{"type":"string","format":"uuid","title":"Region Id"},"region_title":{"type":"string","title":"Region Title"},"sort_order":{"type":"integer","title":"Sort Order"}},"type":"object","required":["id","code","title","region_id","region_title","sort_order"],"title":"CityOut"},"CityUpdate":{"properties":{"region_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Region Id"},"sort_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sort Order"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"titles":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Titles"}},"type":"object","title":"CityUpdate"},"ClaimGuestIn":{"properties":{"saved_post_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":500,"title":"Saved Post Ids"}},"type":"object","title":"ClaimGuestIn","description":"Что гость накопил на устройстве и чего нет на сервере\n(docs/spec/03-onboarding-auth.md, «Гостевой режим»)."},"ClaimGuestOut":{"properties":{"saved_added":{"type":"integer","title":"Saved Added"},"views_moved":{"type":"integer","title":"Views Moved"}},"type":"object","required":["saved_added","views_moved"],"title":"ClaimGuestOut"},"CodeBatchCreate":{"properties":{"course_id":{"type":"string","format":"uuid","title":"Course Id"},"cohort_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Cohort Id"},"count":{"type":"integer","maximum":1000.0,"minimum":1.0,"title":"Count"},"batch_label":{"type":"string","maxLength":100,"minLength":1,"title":"Batch Label"},"valid_until":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Valid Until"},"max_uses":{"type":"integer","maximum":1000.0,"minimum":1.0,"title":"Max Uses","default":1}},"type":"object","required":["course_id","count","batch_label"],"title":"CodeBatchCreate","description":"Партия кодов для школы или оптовой продажи (docs/spec/08-console.md)."},"CodeBatchRevoke":{"properties":{"batch_label":{"type":"string","maxLength":100,"minLength":1,"title":"Batch Label"},"course_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Course Id"}},"type":"object","required":["batch_label"],"title":"CodeBatchRevoke"},"CodeBatchSummary":{"properties":{"batch_label":{"type":"string","title":"Batch Label"},"course":{"$ref":"#/components/schemas/CourseRef"},"cohort":{"anyOf":[{"$ref":"#/components/schemas/CohortRef"},{"type":"null"}]},"total":{"type":"integer","title":"Total"},"used":{"type":"integer","title":"Used"},"unused":{"type":"integer","title":"Unused"},"expired":{"type":"integer","title":"Expired"},"revoked":{"type":"integer","title":"Revoked"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["batch_label","course","cohort","total","used","unused","expired","revoked","created_at"],"title":"CodeBatchSummary","description":"Партия одной строкой: сколько кодов, сколько активировано."},"CodeBlock":{"properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,40}$","title":"Id"},"type":{"type":"string","const":"code","title":"Type"},"code":{"type":"string","maxLength":10000,"minLength":1,"title":"Code"},"language":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Language"},"caption":{"anyOf":[{"type":"string","maxLength":300,"minLength":1},{"type":"null"}],"title":"Caption"}},"additionalProperties":false,"type":"object","required":["type","code"],"title":"CodeBlock"},"CodeOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"code":{"type":"string","title":"Code"},"batch_label":{"type":"string","title":"Batch Label"},"course":{"$ref":"#/components/schemas/CourseRef"},"cohort":{"anyOf":[{"$ref":"#/components/schemas/CohortRef"},{"type":"null"}]},"valid_until":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Valid Until"},"max_uses":{"type":"integer","title":"Max Uses"},"used_count":{"type":"integer","title":"Used Count"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At"},"state":{"$ref":"#/components/schemas/CodeState"},"uses":{"items":{"$ref":"#/components/schemas/CodeUseOut"},"type":"array","title":"Uses"},"created_by":{"anyOf":[{"$ref":"#/components/schemas/UserRef"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","code","batch_label","course","cohort","valid_until","max_uses","used_count","revoked_at","state","uses","created_by","created_at"],"title":"CodeOut"},"CodeRedeemIn":{"properties":{"code":{"type":"string","maxLength":32,"minLength":1,"title":"Code"},"cohort_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Cohort Id"}},"type":"object","required":["code"],"title":"CodeRedeemIn"},"CodeRedeemOut":{"properties":{"enrollment_id":{"type":"string","format":"uuid","title":"Enrollment Id"},"status":{"$ref":"#/components/schemas/EnrollmentStatus"},"cohort":{"$ref":"#/components/schemas/CohortPublic"},"course":{"$ref":"#/components/schemas/CourseRef"},"already_enrolled":{"type":"boolean","title":"Already Enrolled"}},"type":"object","required":["enrollment_id","status","cohort","course","already_enrolled"],"title":"CodeRedeemOut"},"CodeState":{"type":"string","enum":["unused","used","expired","revoked"],"title":"CodeState","description":"Не использован / использован / просрочен / отозван — считается,\nкак и у ссылки, от счётчика и часов."},"CodeUseOut":{"properties":{"user":{"anyOf":[{"$ref":"#/components/schemas/UserRef"},{"type":"null"}]},"used_at":{"type":"string","format":"date-time","title":"Used At"},"enrollment_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Enrollment Id"}},"type":"object","required":["user","used_at","enrollment_id"],"title":"CodeUseOut","description":"Кем и когда код активирован."},"CohortAlert":{"properties":{"signal":{"$ref":"#/components/schemas/CohortSignal"},"cohort":{"$ref":"#/components/schemas/CohortAttentionRef"},"days_to_start":{"type":"integer","title":"Days To Start"}},"type":"object","required":["signal","cohort","days_to_start"],"title":"CohortAlert"},"CohortAttentionRef":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"code":{"type":"string","title":"Code"},"title":{"type":"string","title":"Title"},"course_id":{"type":"string","format":"uuid","title":"Course Id"},"status":{"$ref":"#/components/schemas/CohortStatus"},"starts_on":{"type":"string","format":"date","title":"Starts On"},"min_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Min Size"},"capacity":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Capacity"},"enrolled_count":{"type":"integer","title":"Enrolled Count"}},"type":"object","required":["id","code","title","course_id","status","starts_on","min_size","capacity","enrolled_count"],"title":"CohortAttentionRef","description":"Поток глазами раздела «Внимание требуется» (E1-52): по чему считать\nнедобор и чем подписать строку. Полный `CohortOut` там не нужен — он\nтянет кураторов, преподавателей и очередь."},"CohortCreate":{"properties":{"course_id":{"type":"string","format":"uuid","title":"Course Id"},"title":{"type":"string","maxLength":200,"minLength":2,"title":"Title"},"code":{"anyOf":[{"type":"string","maxLength":64,"pattern":"^[A-Z0-9]+(?:-[A-Z0-9]+)*$"},{"type":"null"}],"title":"Code"},"starts_on":{"type":"string","format":"date","title":"Starts On"},"ends_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Ends On"},"enrollment_opens_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Enrollment Opens At"},"enrollment_closes_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Enrollment Closes At"},"capacity":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Capacity"},"min_size":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Min Size"},"schedule_mode":{"$ref":"#/components/schemas/ScheduleMode","default":"by_schedule"},"access_after_finish":{"$ref":"#/components/schemas/AccessAfterFinish","default":"keep"},"timezone":{"type":"string","maxLength":64,"title":"Timezone","default":"Asia/Almaty"},"external_chat_url":{"anyOf":[{"type":"string","maxLength":500,"pattern":"^https?://\\S+$"},{"type":"null"}],"title":"External Chat Url"},"auto_open_next":{"type":"boolean","title":"Auto Open Next","default":false},"next_cohort_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next Cohort Id"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"curators":{"items":{"$ref":"#/components/schemas/CuratorIn"},"type":"array","maxItems":10,"title":"Curators"},"teacher_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":10,"title":"Teacher Ids"}},"type":"object","required":["course_id","title","starts_on"],"title":"CohortCreate"},"CohortOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"course":{"$ref":"#/components/schemas/CourseRef"},"code":{"type":"string","title":"Code"},"title":{"type":"string","title":"Title"},"starts_on":{"type":"string","format":"date","title":"Starts On"},"ends_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Ends On"},"enrollment_opens_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Enrollment Opens At"},"enrollment_closes_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Enrollment Closes At"},"capacity":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Capacity"},"min_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Min Size"},"enrolled_count":{"type":"integer","title":"Enrolled Count"},"free_seats":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Free Seats"},"status":{"$ref":"#/components/schemas/CohortStatus"},"status_changed_at":{"type":"string","format":"date-time","title":"Status Changed At"},"cancel_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cancel Reason"},"transitions":{"items":{"$ref":"#/components/schemas/CohortTransition"},"type":"array","title":"Transitions"},"schedule_mode":{"$ref":"#/components/schemas/ScheduleMode"},"access_after_finish":{"$ref":"#/components/schemas/AccessAfterFinish"},"timezone":{"type":"string","title":"Timezone"},"external_chat_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Chat Url"},"auto_open_next":{"type":"boolean","title":"Auto Open Next"},"next_cohort_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next Cohort Id"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"curators":{"items":{"$ref":"#/components/schemas/CuratorOut"},"type":"array","title":"Curators"},"teachers":{"items":{"$ref":"#/components/schemas/TeacherRef"},"type":"array","title":"Teachers"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","course","code","title","starts_on","ends_on","enrollment_opens_at","enrollment_closes_at","capacity","min_size","enrolled_count","free_seats","status","status_changed_at","cancel_reason","transitions","schedule_mode","access_after_finish","timezone","external_chat_url","auto_open_next","next_cohort_id","notes","curators","teachers","created_at","updated_at"],"title":"CohortOut"},"CohortProgressOut":{"properties":{"cohort_id":{"type":"string","format":"uuid","title":"Cohort Id"},"cohort_title":{"type":"string","title":"Cohort Title"},"course_id":{"type":"string","format":"uuid","title":"Course Id"},"course_slug":{"type":"string","title":"Course Slug"},"course_title":{"type":"string","title":"Course Title"},"lessons_opened":{"type":"integer","title":"Lessons Opened"},"lessons_completed":{"type":"integer","title":"Lessons Completed"},"lessons_total":{"type":"integer","title":"Lessons Total"},"percent":{"type":"integer","title":"Percent"},"lag":{"type":"integer","title":"Lag"},"overdue":{"type":"integer","title":"Overdue"},"next_deadline_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Deadline At"},"continue_lesson_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Continue Lesson Id"},"continue_lesson_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Continue Lesson Title"},"last_activity_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Activity At"}},"type":"object","required":["cohort_id","cohort_title","course_id","course_slug","course_title","lessons_opened","lessons_completed","lessons_total","percent","lag","overdue","next_deadline_at","continue_lesson_id","continue_lesson_title","last_activity_at"],"title":"CohortProgressOut","description":"Прогресс в потоке. Считается от **открытого расписанием**, а не от\nвсего курса: иначе ученик первой недели видит 3 % и решает, что безнадёжно\nотстал (docs/spec/07-progress-profile.md, «Что считаем»)."},"CohortPublic":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"course_id":{"type":"string","format":"uuid","title":"Course Id"},"code":{"type":"string","title":"Code"},"title":{"type":"string","title":"Title"},"status":{"$ref":"#/components/schemas/CohortStatus"},"starts_on":{"type":"string","format":"date","title":"Starts On"},"ends_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Ends On"},"timezone":{"type":"string","title":"Timezone"},"capacity":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Capacity"},"free_seats":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Free Seats"},"enrollment_opens_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Enrollment Opens At"},"enrollment_closes_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Enrollment Closes At"},"schedule_mode":{"$ref":"#/components/schemas/ScheduleMode"}},"type":"object","required":["id","course_id","code","title","status","starts_on","ends_on","timezone","capacity","free_seats","enrollment_opens_at","enrollment_closes_at","schedule_mode"],"title":"CohortPublic","description":"Поток глазами витрины и ученика: даты, места, окно набора. Без заметок,\nкураторов списком, очереди и ссылки на группу — она только зачисленным."},"CohortQuizReport":{"properties":{"cohort_id":{"type":"string","format":"uuid","title":"Cohort Id"},"lessons":{"items":{"$ref":"#/components/schemas/CohortQuizRow"},"type":"array","title":"Lessons"},"weak_topics":{"items":{"$ref":"#/components/schemas/WeakTopic"},"type":"array","title":"Weak Topics"}},"type":"object","required":["cohort_id","lessons","weak_topics"],"title":"CohortQuizReport","description":"Что разобрать со всей группой на следующем занятии (спека 06).\n\nНе выгрузка по одному ученику: куратору нужно общее место, где группа\nспотыкается, и список тех, кто ещё не дошёл."},"CohortQuizRow":{"properties":{"lesson_id":{"type":"string","format":"uuid","title":"Lesson Id"},"lesson_title":{"type":"string","title":"Lesson Title"},"students_total":{"type":"integer","title":"Students Total"},"students_done":{"type":"integer","title":"Students Done"},"average_percent":{"type":"integer","title":"Average Percent"},"pending_names":{"items":{"type":"string"},"type":"array","title":"Pending Names"}},"type":"object","required":["lesson_id","lesson_title","students_total","students_done","average_percent"],"title":"CohortQuizRow","description":"Тест потока глазами куратора: кто прошёл и как в среднем."},"CohortRatingOut":{"properties":{"cohort_id":{"type":"string","format":"uuid","title":"Cohort Id"},"cohort_code":{"type":"string","title":"Cohort Code"},"cohort_title":{"type":"string","title":"Cohort Title"},"course_title":{"type":"string","title":"Course Title"},"course_language":{"$ref":"#/components/schemas/Locale"},"timezone":{"type":"string","title":"Timezone"},"period":{"$ref":"#/components/schemas/RatingPeriodOut"},"computed_at":{"type":"string","format":"date-time","title":"Computed At"},"max_points":{"type":"integer","title":"Max Points"},"pending_reviews":{"type":"integer","title":"Pending Reviews"},"weeks":{"items":{"$ref":"#/components/schemas/RatingWeekOut"},"type":"array","title":"Weeks"},"modules":{"items":{"$ref":"#/components/schemas/RatingModuleOut"},"type":"array","title":"Modules"},"rows":{"items":{"$ref":"#/components/schemas/RatingRowOut"},"type":"array","title":"Rows"}},"type":"object","required":["cohort_id","cohort_code","cohort_title","course_title","course_language","timezone","period","computed_at","max_points","pending_reviews","weeks","modules","rows"],"title":"CohortRatingOut"},"CohortRef":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"course_id":{"type":"string","format":"uuid","title":"Course Id"},"code":{"type":"string","title":"Code"},"title":{"type":"string","title":"Title"},"status":{"$ref":"#/components/schemas/CohortStatus"},"starts_on":{"type":"string","format":"date","title":"Starts On"}},"type":"object","required":["id","course_id","code","title","status","starts_on"],"title":"CohortRef","description":"Ссылка на поток для других модулей: зачисление, занятия, карточка курса."},"CohortRollup":{"properties":{"cohort_id":{"type":"string","format":"uuid","title":"Cohort Id"},"percent":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Percent"},"students":{"type":"integer","title":"Students"}},"type":"object","required":["cohort_id","percent","students"],"title":"CohortRollup","description":"Две колонки списка потоков: средний прогресс и сколько учеников\nтребуют внимания (docs/spec/08-console.md, «Мои потоки»)."},"CohortSignal":{"type":"string","enum":["underfilled"],"title":"CohortSignal"},"CohortStatus":{"type":"string","enum":["draft","recruiting","scheduled","active","finished","archived","cancelled"],"title":"CohortStatus","description":"draft → recruiting → scheduled → active → finished → archived.\n\nОтмена — из черновика, набора, ожидания и обучения. Откуда куда можно —\nтаблица переходов в lifecycle.py; статус меняется только через неё."},"CohortStudentOut":{"properties":{"cohort":{"$ref":"#/components/schemas/CohortPublic"},"course":{"$ref":"#/components/schemas/CourseRef"},"enrollment":{"anyOf":[{"$ref":"#/components/schemas/EnrollmentSummary"},{"type":"null"}]},"external_chat_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Chat Url"},"curator":{"anyOf":[{"$ref":"#/components/schemas/CuratorContact"},{"type":"null"}]},"schedule":{"items":{"$ref":"#/components/schemas/StudentScheduleItem"},"type":"array","title":"Schedule"}},"type":"object","required":["cohort","course","enrollment","external_chat_url","curator","schedule"],"title":"CohortStudentOut","description":"Экран потока для зачисленного: даты, куратор, группа, программа с датами."},"CohortStudentRow":{"properties":{"enrollment_id":{"type":"string","format":"uuid","title":"Enrollment Id"},"status":{"$ref":"#/components/schemas/EnrollmentStatus"},"student":{"anyOf":[{"$ref":"#/components/schemas/UserRef"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"enrolled_at":{"type":"string","format":"date-time","title":"Enrolled At"},"curator_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Curator Note"},"progress":{"anyOf":[{"$ref":"#/components/schemas/StudentProgressRef"},{"type":"null"}]}},"type":"object","required":["enrollment_id","status","student","phone","enrolled_at","curator_note","progress"],"title":"CohortStudentRow","description":"Строка таблицы учеников потока (docs/spec/08-console.md, «Экран потока»).\n\nИмя не `CohortStudentOut`: так уже называется экран потока глазами самого\nученика (`learning/schemas.py`). Два класса с одинаковым именем FastAPI\nпереименовывает оба в полные пути модулей, и у всех клиентов разом\nотваливается короткое имя — контракт ломается там, где его не трогали.\n\nКуратору нужен не список фамилий, а ответ на вопрос «кому написать\nсегодня»: отставание от расписания, просроченные дедлайны и сколько дней\nчеловека не было. Поэтому по умолчанию сортировка — по отставанию."},"CohortTransition":{"type":"string","enum":["publish","close_recruiting","reopen_recruiting","start","finish","archive","cancel"],"title":"CohortTransition","description":"Кнопки куратора и переходы по датам — один словарь на обоих."},"CohortUpdate":{"properties":{"title":{"anyOf":[{"type":"string","maxLength":200,"minLength":2},{"type":"null"}],"title":"Title"},"code":{"anyOf":[{"type":"string","maxLength":64,"pattern":"^[A-Z0-9]+(?:-[A-Z0-9]+)*$"},{"type":"null"}],"title":"Code"},"starts_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Starts On"},"ends_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Ends On"},"enrollment_opens_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Enrollment Opens At"},"enrollment_closes_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Enrollment Closes At"},"capacity":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Capacity"},"min_size":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Min Size"},"schedule_mode":{"anyOf":[{"$ref":"#/components/schemas/ScheduleMode"},{"type":"null"}]},"access_after_finish":{"anyOf":[{"$ref":"#/components/schemas/AccessAfterFinish"},{"type":"null"}]},"timezone":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Timezone"},"external_chat_url":{"anyOf":[{"type":"string","maxLength":500,"pattern":"^https?://\\S+$"},{"type":"null"}],"title":"External Chat Url"},"auto_open_next":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Auto Open Next"},"next_cohort_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Next Cohort Id"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"curators":{"anyOf":[{"items":{"$ref":"#/components/schemas/CuratorIn"},"type":"array","maxItems":10},{"type":"null"}],"title":"Curators"},"teacher_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":10},{"type":"null"}],"title":"Teacher Ids"}},"type":"object","title":"CohortUpdate","description":"Частичное обновление. Статус здесь не меняется — только переходами (E1-35)."},"ConsolePostDetail":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"slug":{"type":"string","title":"Slug"},"type":{"$ref":"#/components/schemas/PostType"},"language":{"$ref":"#/components/schemas/Locale"},"title":{"type":"string","title":"Title"},"excerpt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Excerpt"},"status":{"$ref":"#/components/schemas/PostStatus"},"published_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Published At"},"is_pinned":{"type":"boolean","title":"Is Pinned"},"pinned_until":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Pinned Until"},"subject_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Subject Id"},"topic_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Topic Id"},"author":{"anyOf":[{"$ref":"#/components/schemas/TeacherRef"},{"type":"null"}]},"cover_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cover Url"},"cover_blurhash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cover Blurhash"},"tags":{"items":{"$ref":"#/components/schemas/TagOut"},"type":"array","title":"Tags"},"reading_time_sec":{"type":"integer","title":"Reading Time Sec"},"views_count":{"type":"integer","title":"Views Count"},"likes_count":{"type":"integer","title":"Likes Count"},"saves_count":{"type":"integer","title":"Saves Count"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"blocks":{"$ref":"#/components/schemas/BlockDocument"},"media_urls":{"additionalProperties":{"type":"string"},"propertyNames":{"format":"uuid"},"type":"object","title":"Media Urls"},"source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Url"},"cover_media_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Cover Media Id"},"author_teacher_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author Teacher Id"},"related_course_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Related Course Id"}},"type":"object","required":["id","slug","type","language","title","excerpt","status","published_at","is_pinned","pinned_until","subject_id","topic_id","author","cover_url","tags","reading_time_sec","views_count","likes_count","saves_count","created_at","updated_at","blocks","source_url","cover_media_id","author_teacher_id","related_course_id"],"title":"ConsolePostDetail"},"ConsolePostOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"slug":{"type":"string","title":"Slug"},"type":{"$ref":"#/components/schemas/PostType"},"language":{"$ref":"#/components/schemas/Locale"},"title":{"type":"string","title":"Title"},"excerpt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Excerpt"},"status":{"$ref":"#/components/schemas/PostStatus"},"published_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Published At"},"is_pinned":{"type":"boolean","title":"Is Pinned"},"pinned_until":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Pinned Until"},"subject_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Subject Id"},"topic_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Topic Id"},"author":{"anyOf":[{"$ref":"#/components/schemas/TeacherRef"},{"type":"null"}]},"cover_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cover Url"},"cover_blurhash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cover Blurhash"},"tags":{"items":{"$ref":"#/components/schemas/TagOut"},"type":"array","title":"Tags"},"reading_time_sec":{"type":"integer","title":"Reading Time Sec"},"views_count":{"type":"integer","title":"Views Count"},"likes_count":{"type":"integer","title":"Likes Count"},"saves_count":{"type":"integer","title":"Saves Count"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","slug","type","language","title","excerpt","status","published_at","is_pinned","pinned_until","subject_id","topic_id","author","cover_url","tags","reading_time_sec","views_count","likes_count","saves_count","created_at","updated_at"],"title":"ConsolePostOut","description":"Строка списка в панели и результат действий над постом."},"ConsoleUserRow":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"phone_verification":{"$ref":"#/components/schemas/PhoneVerification"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"},"roles":{"items":{"type":"string"},"type":"array","title":"Roles"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"last_login_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Login At"},"nickname":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nickname"},"city_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"City Id"}},"type":"object","required":["id","email","phone","phone_verification","full_name","roles","is_active","created_at","last_login_at"],"title":"ConsoleUserRow","description":"Человек в списке панели: и ученик, и сотрудник — таблица одна."},"ContentLessonOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"module_id":{"type":"string","format":"uuid","title":"Module Id"},"title":{"type":"string","title":"Title"},"type":{"$ref":"#/components/schemas/LessonType"},"duration_sec":{"type":"integer","title":"Duration Sec"},"is_free_preview":{"type":"boolean","title":"Is Free Preview"},"sort_order":{"type":"integer","title":"Sort Order"},"is_locked":{"type":"boolean","title":"Is Locked"},"access_reason":{"$ref":"#/components/schemas/AccessReason"},"opens_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Opens At"},"deadline_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deadline At"},"is_completed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Completed"}},"type":"object","required":["id","module_id","title","type","duration_sec","is_free_preview","sort_order","is_locked","access_reason","opens_at","deadline_at"],"title":"ContentLessonOut","description":"Строка оглавления с решением о доступе: замок, причина, дата открытия."},"ContentModuleOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"title":{"type":"string","title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"sort_order":{"type":"integer","title":"Sort Order"},"lessons":{"items":{"$ref":"#/components/schemas/ContentLessonOut"},"type":"array","title":"Lessons"}},"type":"object","required":["id","title","description","sort_order","lessons"],"title":"ContentModuleOut"},"ContentStatus":{"type":"string","enum":["draft","published","archived"],"title":"ContentStatus"},"CourseAlert":{"properties":{"signal":{"$ref":"#/components/schemas/CourseSignal"},"course":{"$ref":"#/components/schemas/CourseRef"}},"type":"object","required":["signal","course"],"title":"CourseAlert"},"CourseCardOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"slug":{"type":"string","title":"Slug"},"language":{"$ref":"#/components/schemas/Locale"},"subject_id":{"type":"string","format":"uuid","title":"Subject Id"},"translation_group_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Translation Group Id"},"title":{"type":"string","title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"what_you_learn":{"items":{"type":"string"},"type":"array","title":"What You Learn"},"level":{"$ref":"#/components/schemas/CourseLevel"},"enrollment_mode":{"$ref":"#/components/schemas/EnrollmentMode"},"cover_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cover Url"},"cover_blurhash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cover Blurhash"},"teachers":{"items":{"$ref":"#/components/schemas/TeacherRef"},"type":"array","title":"Teachers"},"is_free":{"type":"boolean","title":"Is Free"},"price_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Price Label"},"lessons_count":{"type":"integer","title":"Lessons Count"},"total_duration_sec":{"type":"integer","title":"Total Duration Sec"},"modules_count":{"type":"integer","title":"Modules Count"},"rating":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rating"},"students_count":{"type":"integer","title":"Students Count"},"has_free_preview":{"type":"boolean","title":"Has Free Preview"},"next_cohort":{"anyOf":[{"$ref":"#/components/schemas/CohortPublic"},{"type":"null"}]},"my_cohort":{"anyOf":[{"$ref":"#/components/schemas/MyCohort"},{"type":"null"}]}},"type":"object","required":["id","slug","language","subject_id","translation_group_id","title","description","what_you_learn","level","enrollment_mode","cover_url","cover_blurhash","teachers","is_free","price_label","lessons_count","total_duration_sec","modules_count","rating","students_count","has_free_preview","next_cohort","my_cohort"],"title":"CourseCardOut","description":"Курс на витрине и в карточке: плюс ближайший поток в наборе и моё\nзачисление — по ним клиент выбирает нижнюю кнопку (docs/spec/05-courses.md)."},"CourseContentOut":{"properties":{"course_id":{"type":"string","format":"uuid","title":"Course Id"},"modules":{"items":{"$ref":"#/components/schemas/ContentModuleOut"},"type":"array","title":"Modules"}},"type":"object","required":["course_id","modules"],"title":"CourseContentOut"},"CourseCreate":{"properties":{"subject_id":{"type":"string","format":"uuid","title":"Subject Id"},"language":{"$ref":"#/components/schemas/Locale"},"title":{"type":"string","maxLength":200,"minLength":2,"title":"Title"},"slug":{"anyOf":[{"type":"string","maxLength":160,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},{"type":"null"}],"title":"Slug"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"what_you_learn":{"items":{"type":"string"},"type":"array","maxItems":20,"title":"What You Learn"},"level":{"$ref":"#/components/schemas/CourseLevel","default":"basic"},"enrollment_mode":{"$ref":"#/components/schemas/EnrollmentMode","default":"cohort"},"cover_media_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Cover Media Id"},"teacher_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":10,"title":"Teacher Ids"},"is_free":{"type":"boolean","title":"Is Free","default":false},"price_label":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Price Label"},"translation_group_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Translation Group Id"},"rating":{"anyOf":[{"type":"number","maximum":5.0,"minimum":0.0},{"type":"null"}],"title":"Rating"},"students_count":{"type":"integer","minimum":0.0,"title":"Students Count","default":0},"sort_order":{"type":"integer","title":"Sort Order","default":0}},"type":"object","required":["subject_id","language","title"],"title":"CourseCreate"},"CourseDetailOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"slug":{"type":"string","title":"Slug"},"language":{"$ref":"#/components/schemas/Locale"},"subject_id":{"type":"string","format":"uuid","title":"Subject Id"},"translation_group_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Translation Group Id"},"title":{"type":"string","title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"what_you_learn":{"items":{"type":"string"},"type":"array","title":"What You Learn"},"level":{"$ref":"#/components/schemas/CourseLevel"},"enrollment_mode":{"$ref":"#/components/schemas/EnrollmentMode"},"cover_media_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Cover Media Id"},"cover_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cover Url"},"cover_blurhash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cover Blurhash"},"teachers":{"items":{"$ref":"#/components/schemas/TeacherRef"},"type":"array","title":"Teachers"},"is_free":{"type":"boolean","title":"Is Free"},"price_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Price Label"},"status":{"$ref":"#/components/schemas/ContentStatus"},"sort_order":{"type":"integer","title":"Sort Order"},"lessons_count":{"type":"integer","title":"Lessons Count"},"total_duration_sec":{"type":"integer","title":"Total Duration Sec"},"rating":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rating"},"students_count":{"type":"integer","title":"Students Count"},"modules_count":{"type":"integer","title":"Modules Count"},"published_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Published At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"modules":{"items":{"$ref":"#/components/schemas/ModuleOut"},"type":"array","title":"Modules"}},"type":"object","required":["id","slug","language","subject_id","translation_group_id","title","description","what_you_learn","level","enrollment_mode","cover_media_id","teachers","is_free","price_label","status","sort_order","lessons_count","total_duration_sec","rating","students_count","modules_count","published_at","created_at","updated_at","modules"],"title":"CourseDetailOut","description":"Курс с деревом: модули и уроки — то, что редактирует панель."},"CourseLevel":{"type":"string","enum":["basic","medium","advanced"],"title":"CourseLevel"},"CourseOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"slug":{"type":"string","title":"Slug"},"language":{"$ref":"#/components/schemas/Locale"},"subject_id":{"type":"string","format":"uuid","title":"Subject Id"},"translation_group_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Translation Group Id"},"title":{"type":"string","title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"what_you_learn":{"items":{"type":"string"},"type":"array","title":"What You Learn"},"level":{"$ref":"#/components/schemas/CourseLevel"},"enrollment_mode":{"$ref":"#/components/schemas/EnrollmentMode"},"cover_media_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Cover Media Id"},"cover_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cover Url"},"cover_blurhash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cover Blurhash"},"teachers":{"items":{"$ref":"#/components/schemas/TeacherRef"},"type":"array","title":"Teachers"},"is_free":{"type":"boolean","title":"Is Free"},"price_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Price Label"},"status":{"$ref":"#/components/schemas/ContentStatus"},"sort_order":{"type":"integer","title":"Sort Order"},"lessons_count":{"type":"integer","title":"Lessons Count"},"total_duration_sec":{"type":"integer","title":"Total Duration Sec"},"rating":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rating"},"students_count":{"type":"integer","title":"Students Count"},"modules_count":{"type":"integer","title":"Modules Count"},"published_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Published At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","slug","language","subject_id","translation_group_id","title","description","what_you_learn","level","enrollment_mode","cover_media_id","teachers","is_free","price_label","status","sort_order","lessons_count","total_duration_sec","rating","students_count","modules_count","published_at","created_at","updated_at"],"title":"CourseOut","description":"Строка списка курсов в панели."},"CourseProgressExport":{"properties":{"course_id":{"type":"string","format":"uuid","title":"Course Id"},"lessons_completed":{"type":"integer","title":"Lessons Completed"},"lessons_total":{"type":"integer","title":"Lessons Total"},"percent":{"type":"integer","title":"Percent"},"started_at":{"type":"string","format":"date-time","title":"Started At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"last_activity_at":{"type":"string","format":"date-time","title":"Last Activity At"}},"type":"object","required":["course_id","lessons_completed","lessons_total","percent","started_at","completed_at","last_activity_at"],"title":"CourseProgressExport","description":"Прогресс по курсу в выгрузке данных (E1-69)."},"CourseRef":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"slug":{"type":"string","title":"Slug"},"language":{"$ref":"#/components/schemas/Locale"},"title":{"type":"string","title":"Title"},"status":{"$ref":"#/components/schemas/ContentStatus"},"subject_id":{"type":"string","format":"uuid","title":"Subject Id"},"cover_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cover Url"},"cover_blurhash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cover Blurhash"}},"type":"object","required":["id","slug","language","title","status","subject_id"],"title":"CourseRef","description":"Ссылка на курс для других модулей: анонс в ленте, поток, зачисление."},"CourseSignal":{"type":"string","enum":["no_recruiting"],"title":"CourseSignal"},"CourseUpdate":{"properties":{"subject_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Subject Id"},"language":{"anyOf":[{"$ref":"#/components/schemas/Locale"},{"type":"null"}]},"title":{"anyOf":[{"type":"string","maxLength":200,"minLength":2},{"type":"null"}],"title":"Title"},"slug":{"anyOf":[{"type":"string","maxLength":160,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},{"type":"null"}],"title":"Slug"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"what_you_learn":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":20},{"type":"null"}],"title":"What You Learn"},"level":{"anyOf":[{"$ref":"#/components/schemas/CourseLevel"},{"type":"null"}]},"enrollment_mode":{"anyOf":[{"$ref":"#/components/schemas/EnrollmentMode"},{"type":"null"}]},"cover_media_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Cover Media Id"},"teacher_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":10},{"type":"null"}],"title":"Teacher Ids"},"is_free":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Free"},"price_label":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Price Label"},"translation_group_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Translation Group Id"},"rating":{"anyOf":[{"type":"number","maximum":5.0,"minimum":0.0},{"type":"null"}],"title":"Rating"},"students_count":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Students Count"},"sort_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sort Order"}},"type":"object","title":"CourseUpdate","description":"Частичное обновление: присланные поля меняются, остальные не трогаются."},"CuratorContact":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url"}},"type":"object","required":["user_id","full_name","email","phone"],"title":"CuratorContact"},"CuratorIn":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"is_lead":{"type":"boolean","title":"Is Lead","default":false}},"type":"object","required":["user_id"],"title":"CuratorIn"},"CuratorOut":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"is_lead":{"type":"boolean","title":"Is Lead","default":false},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"}},"type":"object","required":["user_id"],"title":"CuratorOut"},"DashboardAlerts":{"properties":{"requests_unanswered":{"type":"integer","title":"Requests Unanswered","default":0},"media_failed":{"type":"integer","title":"Media Failed","default":0},"courses_without_demo":{"type":"integer","title":"Courses Without Demo","default":0}},"type":"object","title":"DashboardAlerts"},"DashboardBreakdowns":{"properties":{"platforms":{"items":{"$ref":"#/components/schemas/DashboardSlice"},"type":"array","title":"Platforms"},"study_language":{"items":{"$ref":"#/components/schemas/DashboardSlice"},"type":"array","title":"Study Language"},"grade":{"items":{"$ref":"#/components/schemas/DashboardSlice"},"type":"array","title":"Grade"}},"type":"object","title":"DashboardBreakdowns","description":"Разрезы живых учеников; `none` — не выбрали язык или класс."},"DashboardDayPoint":{"properties":{"day":{"type":"string","format":"date","title":"Day"},"students_new":{"type":"integer","title":"Students New","default":0},"active_users":{"type":"integer","title":"Active Users","default":0},"active_7d":{"type":"integer","title":"Active 7D","default":0},"active_30d":{"type":"integer","title":"Active 30D","default":0},"enrollments_new":{"type":"integer","title":"Enrollments New","default":0},"first_enrollments":{"type":"integer","title":"First Enrollments","default":0},"requests_new":{"type":"integer","title":"Requests New","default":0},"lessons_started":{"type":"integer","title":"Lessons Started","default":0},"lessons_completed":{"type":"integer","title":"Lessons Completed","default":0},"quizzes_finished":{"type":"integer","title":"Quizzes Finished","default":0},"mock_exams_finished":{"type":"integer","title":"Mock Exams Finished","default":0},"homework_submitted":{"type":"integer","title":"Homework Submitted","default":0},"post_views":{"type":"integer","title":"Post Views","default":0},"live_joins":{"type":"integer","title":"Live Joins","default":0}},"type":"object","required":["day"],"title":"DashboardDayPoint","description":"Один местный день периода. Активные за 7 и 30 дней — по этот день включительно."},"DashboardGrowthPoint":{"properties":{"day":{"type":"string","format":"date","title":"Day"},"students":{"type":"integer","title":"Students"},"enrolled":{"type":"integer","title":"Enrolled"}},"type":"object","required":["day","students","enrolled"],"title":"DashboardGrowthPoint","description":"Нарастающий итог на конец дня: регистрации учеников и ученики с зачислением."},"DashboardKpi":{"properties":{"value":{"type":"integer","title":"Value"},"previous":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Previous"}},"type":"object","required":["value"],"title":"DashboardKpi"},"DashboardKpis":{"properties":{"students_new":{"$ref":"#/components/schemas/DashboardKpi"},"active_7d":{"$ref":"#/components/schemas/DashboardKpi"},"active_30d":{"$ref":"#/components/schemas/DashboardKpi"},"enrollments_new":{"$ref":"#/components/schemas/DashboardKpi"},"requests_new":{"$ref":"#/components/schemas/DashboardKpi"},"lessons_completed":{"$ref":"#/components/schemas/DashboardKpi"},"quizzes_finished":{"$ref":"#/components/schemas/DashboardKpi"},"mock_exams_finished":{"$ref":"#/components/schemas/DashboardKpi"},"homework_submitted":{"$ref":"#/components/schemas/DashboardKpi"},"post_views":{"$ref":"#/components/schemas/DashboardKpi"},"live_joins":{"$ref":"#/components/schemas/DashboardKpi"}},"type":"object","required":["students_new","active_7d","active_30d","enrollments_new","requests_new","lessons_completed","quizzes_finished","mock_exams_finished","homework_submitted","post_views","live_joins"],"title":"DashboardKpis","description":"Плитки: сумма за период, а у активных — разные ученики за 7 и за 30 дней."},"DashboardOut":{"properties":{"computed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Computed At"},"timezone":{"type":"string","title":"Timezone"},"today":{"type":"string","format":"date","title":"Today"},"days":{"type":"integer","title":"Days"},"totals":{"$ref":"#/components/schemas/DashboardTotals"},"kpis":{"$ref":"#/components/schemas/DashboardKpis"},"series":{"items":{"$ref":"#/components/schemas/DashboardDayPoint"},"type":"array","title":"Series"},"growth":{"items":{"$ref":"#/components/schemas/DashboardGrowthPoint"},"type":"array","title":"Growth"},"breakdowns":{"$ref":"#/components/schemas/DashboardBreakdowns"},"top_posts":{"items":{"$ref":"#/components/schemas/DashboardTopPost"},"type":"array","title":"Top Posts"},"top_courses":{"items":{"$ref":"#/components/schemas/DashboardTopCourse"},"type":"array","title":"Top Courses"},"alerts":{"$ref":"#/components/schemas/DashboardAlerts"}},"type":"object","required":["computed_at","timezone","today","days","totals","kpis","series","growth","breakdowns","top_posts","top_courses","alerts"],"title":"DashboardOut"},"DashboardPeriod":{"type":"integer","enum":[7,30,90,365],"title":"DashboardPeriod","description":"Период экрана, дней: столько же берётся до него — для сравнения."},"DashboardSlice":{"properties":{"key":{"type":"string","title":"Key"},"value":{"type":"integer","title":"Value"}},"type":"object","required":["key","value"],"title":"DashboardSlice"},"DashboardTopCourse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"title":{"type":"string","title":"Title"},"language":{"type":"string","title":"Language"},"students":{"type":"integer","title":"Students"}},"type":"object","required":["id","title","language","students"],"title":"DashboardTopCourse"},"DashboardTopPost":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"title":{"type":"string","title":"Title"},"language":{"type":"string","title":"Language"},"views":{"type":"integer","title":"Views"}},"type":"object","required":["id","title","language","views"],"title":"DashboardTopPost"},"DashboardTotals":{"properties":{"students":{"type":"integer","title":"Students","default":0},"teachers":{"type":"integer","title":"Teachers","default":0},"teacher_accounts":{"type":"integer","title":"Teacher Accounts","default":0},"curators":{"type":"integer","title":"Curators","default":0},"courses_published":{"type":"integer","title":"Courses Published","default":0},"cohorts_running":{"type":"integer","title":"Cohorts Running","default":0},"enrollments_active":{"type":"integer","title":"Enrollments Active","default":0},"posts_published":{"type":"integer","title":"Posts Published","default":0}},"type":"object","title":"DashboardTotals","description":"Сейчас, без удалённых."},"DataExport":{"properties":{"exported_at":{"type":"string","format":"date-time","title":"Exported At"},"account":{"$ref":"#/components/schemas/AccountOut"},"profile":{"$ref":"#/components/schemas/ProfileOut"},"cohorts":{"items":{"$ref":"#/components/schemas/MyCohort"},"type":"array","title":"Cohorts"},"progress":{"$ref":"#/components/schemas/ProgressExport"},"courses":{"items":{"$ref":"#/components/schemas/NamedRef"},"type":"array","title":"Courses"},"lessons":{"items":{"$ref":"#/components/schemas/NamedRef"},"type":"array","title":"Lessons"},"notifications":{"items":{"$ref":"#/components/schemas/NotificationSettingOut"},"type":"array","title":"Notifications"},"sessions":{"items":{"$ref":"#/components/schemas/SessionOut"},"type":"array","title":"Sessions"}},"type":"object","required":["exported_at","account","profile","cohorts","progress","courses","lessons","notifications","sessions"],"title":"DataExport","description":"Всё, что система хранит о человеке, одним файлом."},"DeviceIn":{"properties":{"device_uid":{"type":"string","format":"uuid","title":"Device Uid"},"platform":{"$ref":"#/components/schemas/Platform"},"app_version":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"App Version"},"os_version":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Os Version"},"model":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Model"},"locale":{"anyOf":[{"type":"string","maxLength":5},{"type":"null"}],"title":"Locale"}},"type":"object","required":["device_uid","platform"],"title":"DeviceIn","description":"Клиент присылает это при входе: по устройству живут сессия и гостевое состояние."},"DeviceOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"platform":{"$ref":"#/components/schemas/PushPlatform"},"locale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Locale"},"is_active":{"type":"boolean","title":"Is Active"},"last_seen_at":{"type":"string","format":"date-time","title":"Last Seen At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","platform","locale","is_active","last_seen_at","created_at"],"title":"DeviceOut","description":"Устройство с зарегистрированным пуш-токеном. Сам токен наружу не отдаётся."},"Difficulty":{"type":"string","enum":["easy","medium","hard"],"title":"Difficulty"},"DownloadOut":{"properties":{"attachment_id":{"type":"string","format":"uuid","title":"Attachment Id"},"title":{"type":"string","title":"Title"},"kind":{"$ref":"#/components/schemas/AttachmentKind"},"size_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Size Bytes"},"url":{"type":"string","title":"Url"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"ttl_sec":{"type":"integer","title":"Ttl Sec"}},"type":"object","required":["attachment_id","title","kind","size_bytes","url","expires_at","ttl_sec"],"title":"DownloadOut"},"DropIn":{"properties":{"reason":{"type":"string","maxLength":500,"minLength":3,"title":"Reason"}},"type":"object","required":["reason"],"title":"DropIn","description":"Отчисление — только с причиной (docs/spec/14-cohorts.md)."},"DuplicateIn":{"properties":{"language":{"$ref":"#/components/schemas/Locale"},"title":{"anyOf":[{"type":"string","maxLength":200,"minLength":2},{"type":"null"}],"title":"Title"},"slug":{"anyOf":[{"type":"string","maxLength":160,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},{"type":"null"}],"title":"Slug"}},"type":"object","required":["language"],"title":"DuplicateIn","description":"Копия курса — основа языковой версии (ADR-0012) или новая редакция."},"EnrollmentByPhoneCreate":{"properties":{"cohort_id":{"type":"string","format":"uuid","title":"Cohort Id"},"phone":{"type":"string","maxLength":32,"minLength":3,"title":"Phone"},"curator_note":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Curator Note"}},"type":"object","required":["cohort_id","phone"],"title":"EnrollmentByPhoneCreate","description":"Зачисление по номеру (E1-63): подтверждённый номер зачисляет сразу,\nостальные случаи — предварительное зачисление на номер, которое активируется\nпри подтверждении (docs/spec/14-cohorts.md, «Как ученик попадает в поток»)."},"EnrollmentCreate":{"properties":{"cohort_id":{"type":"string","format":"uuid","title":"Cohort Id"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"curator_note":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Curator Note"}},"type":"object","required":["cohort_id","user_id"],"title":"EnrollmentCreate","description":"Ручное зачисление найденного ученика. По номеру — `EnrollmentByPhoneCreate`\n(E1-63), приглашением — ссылка (E1-61)."},"EnrollmentMode":{"type":"string","enum":["cohort","self_paced"],"title":"EnrollmentMode","description":"`cohort` — все платные курсы; `self_paced` — бесплатные и вводные,\nгде куратор не нужен (docs/spec/05-courses.md)."},"EnrollmentOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"cohort":{"$ref":"#/components/schemas/CohortRef"},"course":{"$ref":"#/components/schemas/CourseRef"},"student":{"anyOf":[{"$ref":"#/components/schemas/UserRef"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"status":{"$ref":"#/components/schemas/EnrollmentStatus"},"source":{"$ref":"#/components/schemas/EnrollmentSource"},"enrolled_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Enrolled By Id"},"enrolled_at":{"type":"string","format":"date-time","title":"Enrolled At"},"activated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Activated At"},"access_from":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Access From"},"access_until":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Access Until"},"transferred_to_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Transferred To Id"},"dropped_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dropped Reason"},"curator_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Curator Note"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","cohort","course","student","phone","status","source","enrolled_by_id","enrolled_at","activated_at","access_from","access_until","transferred_to_id","dropped_reason","curator_note","created_at","updated_at"],"title":"EnrollmentOut"},"EnrollmentSource":{"type":"string","enum":["invite_link","code","manual","phone_match","transfer"],"title":"EnrollmentSource","description":"Как ученик попал в поток. Все пути ведут к одной записи."},"EnrollmentStatus":{"type":"string","enum":["invited","active","paused","completed","dropped","transferred"],"title":"EnrollmentStatus","description":"Место в потоке держат `invited`, `active` и `paused`; доступ к урокам\nдаёт только `active` (docs/spec/14-cohorts.md, «Зачисление»)."},"EnrollmentSummary":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"status":{"$ref":"#/components/schemas/EnrollmentStatus"},"enrolled_at":{"type":"string","format":"date-time","title":"Enrolled At"},"access_until":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Access Until"}},"type":"object","required":["id","status","enrolled_at","access_until"],"title":"EnrollmentSummary"},"EnrollmentUpdate":{"properties":{"curator_note":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Curator Note"},"access_from":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Access From"},"access_until":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Access Until"}},"type":"object","title":"EnrollmentUpdate","description":"Заметка куратора и индивидуальные границы доступа: продлить или урезать."},"EventBatchIn":{"properties":{"events":{"items":{"$ref":"#/components/schemas/EventIn"},"type":"array","maxItems":100,"minItems":1,"title":"Events"},"platform":{"type":"string","enum":["android","ios","web"],"title":"Platform"},"app_version":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"App Version"},"locale":{"anyOf":[{"type":"string","maxLength":5},{"type":"null"}],"title":"Locale"}},"type":"object","required":["events","platform"],"title":"EventBatchIn","description":"Пачка с общим контекстом: платформа, версия и язык одни на весь запуск."},"EventBatchOut":{"properties":{"accepted":{"type":"integer","title":"Accepted"},"ignored":{"type":"integer","title":"Ignored"}},"type":"object","required":["accepted","ignored"],"title":"EventBatchOut"},"EventIn":{"properties":{"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{2,63}$","title":"Name"},"occurred_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Occurred At"},"session_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Session Id"},"props":{"additionalProperties":true,"type":"object","title":"Props"}},"type":"object","required":["name"],"title":"EventIn"},"ExamOffer":{"properties":{"blueprint_id":{"type":"string","format":"uuid","title":"Blueprint Id"},"title":{"type":"string","title":"Title"},"question_count":{"type":"integer","title":"Question Count"},"max_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Score"},"total_time_sec":{"type":"integer","title":"Total Time Sec"},"profile_subject_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Profile Subject Ids"},"active_attempt_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Active Attempt Id"},"sections":{"items":{"$ref":"#/components/schemas/OfferSection"},"type":"array","title":"Sections"}},"type":"object","required":["blueprint_id","title","question_count","total_time_sec","profile_subject_ids","active_attempt_id"],"title":"ExamOffer","description":"Пробный ҰБТ глазами ученика: что за формат и сколько он длится."},"ExternalResultIn":{"properties":{"center":{"type":"string","maxLength":200,"minLength":2,"title":"Center"},"taken_on":{"type":"string","format":"date","title":"Taken On"},"total_score":{"type":"integer","maximum":140.0,"minimum":0.0,"title":"Total Score"},"max_score":{"type":"integer","maximum":200.0,"minimum":1.0,"title":"Max Score","default":140},"subject_scores":{"additionalProperties":{"type":"integer"},"propertyNames":{"format":"uuid"},"type":"object","title":"Subject Scores"},"photo_media_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Photo Media Id"}},"type":"object","required":["center","taken_on","total_score"],"title":"ExternalResultIn","description":"Экран «Сырттан нәтиже қосу»: что ученик вносит о своём ҰБТ."},"ExternalResultOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"center":{"type":"string","title":"Center"},"taken_on":{"type":"string","format":"date","title":"Taken On"},"total_score":{"type":"integer","title":"Total Score"},"max_score":{"type":"integer","title":"Max Score"},"percent":{"type":"integer","title":"Percent"},"subject_scores":{"additionalProperties":{"type":"integer"},"propertyNames":{"format":"uuid"},"type":"object","title":"Subject Scores"},"photo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Photo Url"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","center","taken_on","total_score","max_score","percent","subject_scores","created_at"],"title":"ExternalResultOut"},"FeedPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/PostCardOut"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"},"has_more":{"type":"boolean","title":"Has More","default":false},"pinned":{"items":{"$ref":"#/components/schemas/PostCardOut"},"type":"array","title":"Pinned"}},"type":"object","required":["items"],"title":"FeedPage","description":"Страница ленты. `pinned` заполнено только на первой странице основной ленты."},"FormulaBlock":{"properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,40}$","title":"Id"},"type":{"type":"string","const":"formula","title":"Type"},"latex":{"type":"string","maxLength":2000,"minLength":1,"title":"Latex"},"caption":{"anyOf":[{"type":"string","maxLength":300,"minLength":1},{"type":"null"}],"title":"Caption"}},"additionalProperties":false,"type":"object","required":["type","latex"],"title":"FormulaBlock"},"GoalsUpdate":{"properties":{"target_score":{"anyOf":[{"type":"integer","maximum":140.0,"minimum":50.0},{"type":"null"}],"title":"Target Score"},"target_university_name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Target University Name"},"target_specialty":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Target Specialty"}},"type":"object","title":"GoalsUpdate"},"Grade":{"type":"string","enum":["9","10","11","graduate"],"title":"Grade"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HeadingBlock":{"properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,40}$","title":"Id"},"type":{"type":"string","const":"heading","title":"Type"},"text":{"type":"string","maxLength":300,"minLength":1,"title":"Text"},"level":{"type":"integer","enum":[2,3],"title":"Level","default":2}},"additionalProperties":false,"type":"object","required":["type","text"],"title":"HeadingBlock"},"HomeworkGrading":{"type":"string","enum":["pass_fail","points_10","percent"],"title":"HomeworkGrading","description":"Чем меряют работу. Шкала выбирается на каждом задании (Q30).\n\nЗа конспект урока естественно ставить «сдано», за пробную работу — процент,\nпоэтому одна шкала на курс или на поток не годится."},"IdentityOut":{"properties":{"provider":{"$ref":"#/components/schemas/AuthProvider"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"email_hidden":{"type":"boolean","title":"Email Hidden"},"linked_at":{"type":"string","format":"date-time","title":"Linked At"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"}},"type":"object","required":["provider","email","email_hidden","linked_at","last_used_at"],"title":"IdentityOut","description":"Способ входа в профиле (E1-175): через что человек входит в этот аккаунт.\n\n`email` — адрес у провайдера на момент привязки. У Apple это часто\nретранслятор `…@privaterelay.appleid.com`, тогда `email_hidden`, и экран\nпишет «почта скрыта», а не сам адрес."},"ImageBlock":{"properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,40}$","title":"Id"},"type":{"type":"string","const":"image","title":"Type"},"media_id":{"type":"string","format":"uuid","title":"Media Id"},"caption":{"anyOf":[{"type":"string","maxLength":300,"minLength":1},{"type":"null"}],"title":"Caption"},"alt":{"anyOf":[{"type":"string","maxLength":300,"minLength":1},{"type":"null"}],"title":"Alt"}},"additionalProperties":false,"type":"object","required":["type","media_id"],"title":"ImageBlock"},"ImportProblem":{"properties":{"line":{"type":"integer","title":"Line"},"message":{"type":"string","title":"Message"}},"type":"object","required":["line","message"],"title":"ImportProblem","description":"Строка таблицы, которую не взяли, и почему."},"ImportReport":{"properties":{"rows":{"type":"integer","title":"Rows"},"created":{"type":"integer","title":"Created"},"skipped":{"type":"integer","title":"Skipped"},"problems":{"items":{"$ref":"#/components/schemas/ImportProblem"},"type":"array","title":"Problems"},"is_dry_run":{"type":"boolean","title":"Is Dry Run"}},"type":"object","required":["rows","created","skipped","is_dry_run"],"title":"ImportReport","description":"Что случится или случилось с файлом.\n\nПредпросмотр и импорт возвращают одно и то же: разница только в том,\nзаписали ли. Иначе «посмотреть, что будет» и «сделать» расходятся."},"InviteAcceptOut":{"properties":{"enrollment_id":{"type":"string","format":"uuid","title":"Enrollment Id"},"status":{"$ref":"#/components/schemas/EnrollmentStatus"},"cohort":{"$ref":"#/components/schemas/CohortPublic"},"course":{"$ref":"#/components/schemas/CourseRef"},"already_enrolled":{"type":"boolean","title":"Already Enrolled"}},"type":"object","required":["enrollment_id","status","cohort","course","already_enrolled"],"title":"InviteAcceptOut","description":"Принятое приглашение: зачисление и куда вести ученика."},"InviteBulkCreate":{"properties":{"cohort_id":{"type":"string","format":"uuid","title":"Cohort Id"},"expires_in_days":{"anyOf":[{"type":"integer","maximum":365.0,"minimum":1.0},{"type":"null"}],"title":"Expires In Days"},"max_uses":{"type":"integer","maximum":1000.0,"minimum":1.0,"title":"Max Uses","default":1},"count":{"anyOf":[{"type":"integer","maximum":200.0,"minimum":1.0},{"type":"null"}],"title":"Count"},"phones":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":200},{"type":"null"}],"title":"Phones"}},"type":"object","required":["cohort_id"],"title":"InviteBulkCreate","description":"Пачка ссылок: `count` одинаковых без привязки или по одной на каждый номер."},"InviteCreate":{"properties":{"cohort_id":{"type":"string","format":"uuid","title":"Cohort Id"},"expires_in_days":{"anyOf":[{"type":"integer","maximum":365.0,"minimum":1.0},{"type":"null"}],"title":"Expires In Days"},"max_uses":{"type":"integer","maximum":1000.0,"minimum":1.0,"title":"Max Uses","default":1},"phone":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Phone"}},"type":"object","required":["cohort_id"],"title":"InviteCreate","description":"«Пригласить в поток»: срок, число использований, привязка к номеру."},"InviteOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"cohort":{"$ref":"#/components/schemas/CohortRef"},"token":{"type":"string","title":"Token"},"url":{"type":"string","title":"Url"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"max_uses":{"type":"integer","title":"Max Uses"},"used_count":{"type":"integer","title":"Used Count"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At"},"state":{"$ref":"#/components/schemas/InviteState"},"created_by":{"anyOf":[{"$ref":"#/components/schemas/UserRef"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","cohort","token","url","phone","max_uses","used_count","expires_at","revoked_at","state","created_by","created_at"],"title":"InviteOut"},"InvitePublic":{"properties":{"token":{"type":"string","title":"Token"},"state":{"$ref":"#/components/schemas/InviteState"},"course":{"$ref":"#/components/schemas/CourseRef"},"cohort":{"$ref":"#/components/schemas/CohortPublic"},"curator_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Curator Name"},"phone_bound":{"type":"boolean","title":"Phone Bound"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"}},"type":"object","required":["token","state","course","cohort","curator_name","phone_bound","expires_at"],"title":"InvitePublic","description":"Что это за приглашение — экран до входа (docs/spec/14-cohorts.md).\nБез номера, к которому привязана ссылка: только факт привязки."},"InviteState":{"type":"string","enum":["active","used","expired","revoked"],"title":"InviteState","description":"Состояние ссылки считается от времени и счётчика, в базе не хранится."},"InviteSummary":{"properties":{"cohort_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Cohort Id"},"total":{"type":"integer","title":"Total"},"accepted":{"type":"integer","title":"Accepted"},"active":{"type":"integer","title":"Active"},"expired":{"type":"integer","title":"Expired"},"revoked":{"type":"integer","title":"Revoked"}},"type":"object","required":["cohort_id","total","accepted","active","expired","revoked"],"title":"InviteSummary","description":"Индикатор для менеджера: сколько отправлено, принято, просрочено."},"JoinOut":{"properties":{"join_url":{"type":"string","title":"Join Url"},"starts_at":{"type":"string","format":"date-time","title":"Starts At"},"ends_at":{"type":"string","format":"date-time","title":"Ends At"},"joined_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Joined At"}},"type":"object","required":["join_url","starts_at","ends_at","joined_at"],"title":"JoinOut","description":"Единственное место, где ссылка на внешнее занятие уходит ученику —\nпосле проверки зачисления и окна входа (E1-85)."},"LessonBrief":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"module_id":{"type":"string","format":"uuid","title":"Module Id"},"title":{"type":"string","title":"Title"},"type":{"$ref":"#/components/schemas/LessonType"},"homework_grading":{"anyOf":[{"$ref":"#/components/schemas/HomeworkGrading"},{"type":"null"}]},"quiz_question_count":{"type":"integer","title":"Quiz Question Count","default":0},"duration_sec":{"type":"integer","title":"Duration Sec"},"is_free_preview":{"type":"boolean","title":"Is Free Preview"},"sort_order":{"type":"integer","title":"Sort Order"},"status":{"$ref":"#/components/schemas/ContentStatus"},"video_ready":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Video Ready"}},"type":"object","required":["id","module_id","title","type","duration_sec","is_free_preview","sort_order","status"],"title":"LessonBrief","description":"Строка оглавления в дереве курса."},"LessonCard":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"title":{"type":"string","title":"Title"},"module_title":{"type":"string","title":"Module Title"},"course_id":{"type":"string","format":"uuid","title":"Course Id"},"course_title":{"type":"string","title":"Course Title"},"course_slug":{"type":"string","title":"Course Slug"},"subject_id":{"type":"string","format":"uuid","title":"Subject Id"}},"type":"object","required":["id","title","module_title","course_id","course_title","course_slug","subject_id"],"title":"LessonCard","description":"Урок карточкой для чужих списков: сохранённое показывает, откуда взят\nконспект, и фильтрует по предмету курса, не заглядывая в его таблицы."},"LessonCreate":{"properties":{"module_id":{"type":"string","format":"uuid","title":"Module Id"},"title":{"type":"string","maxLength":200,"minLength":1,"title":"Title"},"subtitle":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Subtitle"},"type":{"$ref":"#/components/schemas/LessonType","default":"video"},"homework_grading":{"anyOf":[{"$ref":"#/components/schemas/HomeworkGrading"},{"type":"null"}]},"video_media_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Video Media Id"},"summary_blocks":{"$ref":"#/components/schemas/BlockDocument"},"is_free_preview":{"type":"boolean","title":"Is Free Preview","default":false},"topic_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":20,"title":"Topic Ids"}},"type":"object","required":["module_id","title"],"title":"LessonCreate"},"LessonOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"module_id":{"type":"string","format":"uuid","title":"Module Id"},"title":{"type":"string","title":"Title"},"type":{"$ref":"#/components/schemas/LessonType"},"homework_grading":{"anyOf":[{"$ref":"#/components/schemas/HomeworkGrading"},{"type":"null"}]},"quiz_question_count":{"type":"integer","title":"Quiz Question Count","default":0},"duration_sec":{"type":"integer","title":"Duration Sec"},"is_free_preview":{"type":"boolean","title":"Is Free Preview"},"sort_order":{"type":"integer","title":"Sort Order"},"status":{"$ref":"#/components/schemas/ContentStatus"},"video_ready":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Video Ready"},"course_id":{"type":"string","format":"uuid","title":"Course Id"},"quiz_question_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Quiz Question Ids"},"subtitle":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subtitle"},"video_media_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Video Media Id"},"video":{"anyOf":[{"$ref":"#/components/schemas/MediaInfo"},{"type":"null"}]},"summary_blocks":{"$ref":"#/components/schemas/BlockDocument"},"media_urls":{"additionalProperties":{"type":"string"},"propertyNames":{"format":"uuid"},"type":"object","title":"Media Urls"},"published_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Published At"},"chapters":{"items":{"$ref":"#/components/schemas/ChapterOut"},"type":"array","title":"Chapters"},"attachments":{"items":{"$ref":"#/components/schemas/AttachmentOut"},"type":"array","title":"Attachments"},"topic_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Topic Ids"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","module_id","title","type","duration_sec","is_free_preview","sort_order","status","course_id","subtitle","video_media_id","summary_blocks","published_at","chapters","attachments","topic_ids","created_at","updated_at"],"title":"LessonOut"},"LessonProgressExport":{"properties":{"lesson_id":{"type":"string","format":"uuid","title":"Lesson Id"},"status":{"$ref":"#/components/schemas/LessonProgressStatus"},"position_sec":{"type":"integer","title":"Position Sec"},"watched_sec":{"type":"integer","title":"Watched Sec"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"last_activity_at":{"type":"string","format":"date-time","title":"Last Activity At"}},"type":"object","required":["lesson_id","status","position_sec","watched_sec","completed_at","last_activity_at"],"title":"LessonProgressExport"},"LessonProgressOut":{"properties":{"lesson_id":{"type":"string","format":"uuid","title":"Lesson Id"},"status":{"$ref":"#/components/schemas/LessonProgressStatus"},"position_sec":{"type":"integer","title":"Position Sec"},"watched_sec":{"type":"integer","title":"Watched Sec"},"percent":{"type":"integer","title":"Percent"},"theory_done_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Theory Done At"},"quiz_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Quiz Score"},"quiz_max_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Quiz Max Score"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"last_activity_at":{"type":"string","format":"date-time","title":"Last Activity At"}},"type":"object","required":["lesson_id","status","position_sec","watched_sec","percent","completed_at","last_activity_at"],"title":"LessonProgressOut"},"LessonProgressRef":{"properties":{"lesson_id":{"type":"string","format":"uuid","title":"Lesson Id"},"status":{"$ref":"#/components/schemas/LessonProgressStatus"},"position_sec":{"type":"integer","title":"Position Sec"},"watched_sec":{"type":"integer","title":"Watched Sec"},"theory_done_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Theory Done At"},"quiz_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Quiz Score"},"quiz_max_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Quiz Max Score"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"last_activity_at":{"type":"string","format":"date-time","title":"Last Activity At"}},"type":"object","required":["lesson_id","status","position_sec","watched_sec","completed_at","last_activity_at"],"title":"LessonProgressRef","description":"Прогресс урока для других модулей: оглавление, экран урока, кураторская."},"LessonProgressStatus":{"type":"string","enum":["in_progress","completed"],"title":"LessonProgressStatus"},"LessonRef":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"module_id":{"type":"string","format":"uuid","title":"Module Id"},"module_title":{"type":"string","title":"Module Title"},"title":{"type":"string","title":"Title"},"type":{"$ref":"#/components/schemas/LessonType"},"status":{"$ref":"#/components/schemas/ContentStatus"}},"type":"object","required":["id","module_id","module_title","title","type","status"],"title":"LessonRef","description":"Урок для расписания потока: чему открываться и как называется."},"LessonType":{"type":"string","enum":["video","text","mixed","quiz","homework","live"],"title":"LessonType","description":"Домашнее задание и тест — такие же уроки (ADR-0029), живой урок тоже\n(ADR-0033).\n\nНеделя потока из примера заказчика — четыре урока разных типов, и расписание\nвмещает её без своей сущности на каждый вид: срок, досрочное открытие,\nпрогресс и уведомления урок уже умеет. Живой урок — место занятия в модуле:\nсамо занятие (время, ссылка, запись) назначает куратор в потоке."},"LessonUpdate":{"properties":{"module_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Module Id"},"title":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Title"},"subtitle":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Subtitle"},"type":{"anyOf":[{"$ref":"#/components/schemas/LessonType"},{"type":"null"}]},"homework_grading":{"anyOf":[{"$ref":"#/components/schemas/HomeworkGrading"},{"type":"null"}]},"video_media_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Video Media Id"},"summary_blocks":{"anyOf":[{"$ref":"#/components/schemas/BlockDocument"},{"type":"null"}]},"is_free_preview":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Free Preview"},"topic_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":20},{"type":"null"}],"title":"Topic Ids"}},"type":"object","title":"LessonUpdate"},"LessonView":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"module_id":{"type":"string","format":"uuid","title":"Module Id"},"module_title":{"type":"string","title":"Module Title"},"course":{"$ref":"#/components/schemas/CourseRef"},"title":{"type":"string","title":"Title"},"subtitle":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subtitle"},"type":{"$ref":"#/components/schemas/LessonType"},"duration_sec":{"type":"integer","title":"Duration Sec"},"is_free_preview":{"type":"boolean","title":"Is Free Preview"},"video":{"anyOf":[{"$ref":"#/components/schemas/MediaInfo"},{"type":"null"}]},"summary_blocks":{"$ref":"#/components/schemas/BlockDocument"},"media_urls":{"additionalProperties":{"type":"string"},"propertyNames":{"format":"uuid"},"type":"object","title":"Media Urls"},"chapters":{"items":{"$ref":"#/components/schemas/ChapterOut"},"type":"array","title":"Chapters"},"attachments":{"items":{"$ref":"#/components/schemas/AttachmentOut"},"type":"array","title":"Attachments"},"access":{"$ref":"#/components/schemas/AccessDecision"},"quiz_question_count":{"type":"integer","title":"Quiz Question Count","default":0},"can_take_quiz":{"type":"boolean","title":"Can Take Quiz","default":false},"live_session_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Live Session Id"},"progress":{"anyOf":[{"$ref":"#/components/schemas/LessonProgressRef"},{"type":"null"}]}},"type":"object","required":["id","module_id","module_title","course","title","subtitle","type","duration_sec","is_free_preview","video","summary_blocks","chapters","attachments","access"],"title":"LessonView","description":"Урок глазами ученика. Отдаётся только при доступе: без него сервер\nотвечает 403 с причиной, а не пустым телом (docs/spec/02-roles-permissions.md)."},"LinkMissingAlert":{"properties":{"session":{"$ref":"#/components/schemas/LiveSessionOut"},"minutes_to_start":{"type":"integer","title":"Minutes To Start"},"urgent":{"type":"boolean","title":"Urgent"}},"type":"object","required":["session","minutes_to_start","urgent"],"title":"LinkMissingAlert","description":"Занятие без ссылки, которое ещё впереди: строка для панели\n«Внимание требуется» (docs/spec/08-console.md)."},"LinkSource":{"type":"string","enum":["manual","google_meet"],"title":"LinkSource","description":"Откуда у внешнего занятия ссылка: вставил куратор или создал Google\nиз его подключённого аккаунта (ADR-0017, после верификации)."},"ListBlock":{"properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,40}$","title":"Id"},"type":{"type":"string","const":"list","title":"Type"},"style":{"type":"string","enum":["bullet","number"],"title":"Style","default":"bullet"},"items":{"items":{"type":"string","maxLength":5000},"type":"array","maxItems":50,"minItems":1,"title":"Items"}},"additionalProperties":false,"type":"object","required":["type","items"],"title":"ListBlock"},"LiveSessionCreate":{"properties":{"cohort_id":{"type":"string","format":"uuid","title":"Cohort Id"},"lesson_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Lesson Id"},"title":{"type":"string","maxLength":200,"minLength":2,"title":"Title"},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Description"},"starts_at":{"type":"string","format":"date-time","title":"Starts At"},"duration_min":{"type":"integer","maximum":480.0,"minimum":5.0,"title":"Duration Min","default":60},"host_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Host User Id"},"notify_before_min":{"type":"integer","maximum":1440.0,"minimum":0.0,"title":"Notify Before Min","default":15},"join_url":{"anyOf":[{"type":"string","maxLength":1000,"pattern":"^https?://\\S+$"},{"type":"null"}],"title":"Join Url"},"publish":{"type":"boolean","title":"Publish","default":true}},"type":"object","required":["cohort_id","title","starts_at"],"title":"LiveSessionCreate","description":"Внешнее занятие с ручной ссылкой (E1-82). Без ссылки — `link_missing`:\nвремя ученики видят, кнопки входа нет. Ссылку Google Meet создаст E1-91."},"LiveSessionKind":{"type":"string","enum":["external","livekit"],"title":"LiveSessionKind"},"LiveSessionOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"cohort":{"$ref":"#/components/schemas/CohortRef"},"lesson_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Lesson Id"},"lesson_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lesson Title"},"kind":{"$ref":"#/components/schemas/LiveSessionKind"},"title":{"type":"string","title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"starts_at":{"type":"string","format":"date-time","title":"Starts At"},"ends_at":{"type":"string","format":"date-time","title":"Ends At"},"duration_min":{"type":"integer","title":"Duration Min"},"host":{"anyOf":[{"$ref":"#/components/schemas/UserRef"},{"type":"null"}]},"status":{"$ref":"#/components/schemas/LiveSessionStatus"},"link_source":{"anyOf":[{"$ref":"#/components/schemas/LinkSource"},{"type":"null"}]},"join_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Join Url"},"calendar_event_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Calendar Event Id"},"recording_media_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Recording Media Id"},"recording_ready_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Recording Ready At"},"recording":{"anyOf":[{"$ref":"#/components/schemas/RecordingOut"},{"type":"null"}]},"notes":{"anyOf":[{"$ref":"#/components/schemas/NotesOut"},{"type":"null"}]},"called_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Called At"},"notify_before_min":{"type":"integer","title":"Notify Before Min"},"series_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Series Id"},"link_warning_sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Link Warning Sent At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings"}},"type":"object","required":["id","cohort","lesson_id","lesson_title","kind","title","description","starts_at","ends_at","duration_min","host","status","link_source","join_url","calendar_event_id","recording_media_id","recording_ready_at","notify_before_min","series_id","link_warning_sent_at","created_at","updated_at"],"title":"LiveSessionOut","description":"Занятие в панели. Ссылка на встречу здесь есть: панель — для сотрудников,\nа запрет на ссылку в ответах касается ученических ручек."},"LiveSessionPublic":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"cohort_id":{"type":"string","format":"uuid","title":"Cohort Id"},"lesson_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Lesson Id"},"lesson_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lesson Title"},"kind":{"$ref":"#/components/schemas/LiveSessionKind"},"title":{"type":"string","title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"starts_at":{"type":"string","format":"date-time","title":"Starts At"},"ends_at":{"type":"string","format":"date-time","title":"Ends At"},"duration_min":{"type":"integer","title":"Duration Min"},"status":{"$ref":"#/components/schemas/LiveSessionStatus"},"host_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Host Name"},"has_recording":{"type":"boolean","title":"Has Recording"},"recording":{"anyOf":[{"$ref":"#/components/schemas/RecordingPublic"},{"type":"null"}]},"notes":{"anyOf":[{"$ref":"#/components/schemas/NotesOut"},{"type":"null"}]},"joined_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Joined At"}},"type":"object","required":["id","cohort_id","lesson_id","lesson_title","kind","title","description","starts_at","ends_at","duration_min","status","host_name","has_recording","joined_at"],"title":"LiveSessionPublic","description":"Занятие глазами ученика: время, ведущий, статус, запись. **Без ссылки** —\nона только через `/join` после проверки зачисления (E1-85)."},"LiveSessionSeriesCreate":{"properties":{"cohort_id":{"type":"string","format":"uuid","title":"Cohort Id"},"lesson_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Lesson Id"},"title":{"type":"string","maxLength":200,"minLength":2,"title":"Title"},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Description"},"starts_at":{"type":"string","format":"date-time","title":"Starts At"},"duration_min":{"type":"integer","maximum":480.0,"minimum":5.0,"title":"Duration Min","default":60},"host_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Host User Id"},"notify_before_min":{"type":"integer","maximum":1440.0,"minimum":0.0,"title":"Notify Before Min","default":15},"join_url":{"anyOf":[{"type":"string","maxLength":1000,"pattern":"^https?://\\S+$"},{"type":"null"}],"title":"Join Url"},"publish":{"type":"boolean","title":"Publish","default":true},"series":{"$ref":"#/components/schemas/SeriesIn"}},"type":"object","required":["cohort_id","title","starts_at","series"],"title":"LiveSessionSeriesCreate","description":"Те же поля, что у одного занятия, плюс серия. Тело одним объектом,\nчтобы панель не собирала два."},"LiveSessionStatus":{"type":"string","enum":["draft","scheduled","link_missing","live","finished","cancelled"],"title":"LiveSessionStatus","description":"draft → scheduled → live → finished; link_missing — внешнее без ссылки;\ncancelled — из любого незавершённого. Переходы по времени делает воркер (E1-86)."},"LiveSessionUpdate":{"properties":{"lesson_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Lesson Id"},"title":{"anyOf":[{"type":"string","maxLength":200,"minLength":2},{"type":"null"}],"title":"Title"},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Description"},"duration_min":{"anyOf":[{"type":"integer","maximum":480.0,"minimum":5.0},{"type":"null"}],"title":"Duration Min"},"host_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Host User Id"},"notify_before_min":{"anyOf":[{"type":"integer","maximum":1440.0,"minimum":0.0},{"type":"null"}],"title":"Notify Before Min"},"join_url":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Join Url"}},"type":"object","title":"LiveSessionUpdate"},"LiveStudentPdfIn":{"properties":{"lang":{"anyOf":[{"$ref":"#/components/schemas/Locale"},{"type":"null"}]},"comment":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Comment"},"period":{"$ref":"#/components/schemas/RatingPeriodIn"}},"type":"object","title":"LiveStudentPdfIn"},"Locale":{"type":"string","enum":["kk","ru"],"title":"Locale"},"MediaInfo":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"kind":{"$ref":"#/components/schemas/MediaKind"},"status":{"$ref":"#/components/schemas/MediaStatus"},"mime_type":{"type":"string","title":"Mime Type"},"original_name":{"type":"string","title":"Original Name"},"size_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Size Bytes"},"duration_sec":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Sec"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"uploaded_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Uploaded By Id"},"blurhash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Blurhash"},"preview_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preview Url"},"preview_blurhash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preview Blurhash"}},"type":"object","required":["id","kind","status","mime_type","original_name","size_bytes","duration_sec","url"],"title":"MediaInfo","description":"Сведения о файле для других модулей: готов ли, сколько длится, ссылка.\n\nУрок публикуется только с обработанным видео, а вложение получает вид по\nMIME-типу — самим моделям медиа снаружи видеть незачем (ADR-0018)."},"MediaKind":{"type":"string","enum":["image","video","document","audio"],"title":"MediaKind"},"MediaOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"kind":{"$ref":"#/components/schemas/MediaKind"},"visibility":{"$ref":"#/components/schemas/MediaVisibility"},"status":{"$ref":"#/components/schemas/MediaStatus"},"original_name":{"type":"string","title":"Original Name"},"mime_type":{"type":"string","title":"Mime Type"},"size_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Size Bytes"},"width":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Width"},"height":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Height"},"duration_sec":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Sec"},"processing_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Processing Error"},"blurhash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Blurhash"},"preview_media_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Preview Media Id"},"poster_media_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Poster Media Id"},"preview_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preview Url"},"preview_blurhash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preview Blurhash"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"}},"type":"object","required":["id","kind","visibility","status","original_name","mime_type","size_bytes","width","height","duration_sec"],"title":"MediaOut"},"MediaStatus":{"type":"string","enum":["uploading","processing","ready","failed"],"title":"MediaStatus"},"MediaUsage":{"properties":{"kind":{"type":"string","enum":["lesson_video","attachment","course_cover","post_cover","post_block","lesson_block","question_block","announcement_block","teacher_avatar","live_session_recording","video_preview"],"title":"Kind"},"id":{"type":"string","format":"uuid","title":"Id"},"title":{"type":"string","title":"Title"}},"type":"object","required":["kind","id","title"],"title":"MediaUsage","description":"Где используется файл. Панель показывает список и не даёт удалить\nфайл, на который есть ссылки (docs/spec/08-console.md)."},"MediaVisibility":{"type":"string","enum":["public","private"],"title":"MediaVisibility"},"ModuleCreate":{"properties":{"course_id":{"type":"string","format":"uuid","title":"Course Id"},"title":{"type":"string","maxLength":200,"minLength":1,"title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["course_id","title"],"title":"ModuleCreate"},"ModuleOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"course_id":{"type":"string","format":"uuid","title":"Course Id"},"title":{"type":"string","title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"sort_order":{"type":"integer","title":"Sort Order"},"status":{"$ref":"#/components/schemas/ContentStatus"},"lessons":{"items":{"$ref":"#/components/schemas/LessonBrief"},"type":"array","title":"Lessons"}},"type":"object","required":["id","course_id","title","description","sort_order","status","lessons"],"title":"ModuleOut"},"ModuleUpdate":{"properties":{"title":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"status":{"anyOf":[{"$ref":"#/components/schemas/ContentStatus"},{"type":"null"}]}},"type":"object","title":"ModuleUpdate"},"MyCohort":{"properties":{"enrollment":{"$ref":"#/components/schemas/EnrollmentSummary"},"cohort":{"$ref":"#/components/schemas/CohortPublic"}},"type":"object","required":["enrollment","cohort"],"title":"MyCohort","description":"Зачисление ученика вместе с потоком — карточка курса и «мои потоки»."},"MyCohortOut":{"properties":{"enrollment":{"$ref":"#/components/schemas/EnrollmentSummary"},"cohort":{"$ref":"#/components/schemas/CohortPublic"},"course":{"$ref":"#/components/schemas/CourseRef"}},"type":"object","required":["enrollment","cohort","course"],"title":"MyCohortOut"},"MyHomework":{"properties":{"lesson_id":{"type":"string","format":"uuid","title":"Lesson Id"},"grading":{"$ref":"#/components/schemas/HomeworkGrading"},"deadline_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deadline At"},"is_overdue":{"type":"boolean","title":"Is Overdue"},"can_submit":{"type":"boolean","title":"Can Submit"},"attempts":{"items":{"$ref":"#/components/schemas/SubmissionOut"},"type":"array","title":"Attempts"}},"type":"object","required":["lesson_id","grading","deadline_at","is_overdue","can_submit","attempts"],"title":"MyHomework","description":"Задание глазами ученика: чем меряют, когда срок и что уже сдано."},"MyQuiz":{"properties":{"lesson_id":{"type":"string","format":"uuid","title":"Lesson Id"},"question_count":{"type":"integer","title":"Question Count"},"available":{"type":"integer","title":"Available"},"best_score":{"type":"integer","title":"Best Score"},"best_percent":{"type":"integer","title":"Best Percent"},"attempts":{"items":{"$ref":"#/components/schemas/AttemptBrief"},"type":"array","title":"Attempts"},"active_attempt_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Active Attempt Id"},"theory_done":{"type":"boolean","title":"Theory Done","default":false}},"type":"object","required":["lesson_id","question_count","available","best_score","best_percent","attempts","active_attempt_id"],"title":"MyQuiz","description":"Состояние теста урока: сколько вопросов, мои попытки, есть ли начатая."},"NamedRef":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"title":{"type":"string","title":"Title"}},"type":"object","required":["id","title"],"title":"NamedRef","description":"Название рядом с идентификатором: выгрузка из одних UUID —\nформально данные человека, а по сути нечитаемый файл."},"NicknameCheckOut":{"properties":{"nickname":{"type":"string","title":"Nickname"},"available":{"type":"boolean","title":"Available"},"problem":{"anyOf":[{"$ref":"#/components/schemas/NicknameProblem"},{"type":"null"}]}},"type":"object","required":["nickname","available"],"title":"NicknameCheckOut","description":"Годится ли ник — для подсказки на лету, пока ученик печатает."},"NicknameProblem":{"type":"string","enum":["invalid","not_allowed","taken"],"title":"NicknameProblem","description":"Почему ник не подходит. Занятость — отдельная причина, её ставит сервис."},"NicknameSuggestionOut":{"properties":{"nickname":{"type":"string","title":"Nickname"}},"type":"object","required":["nickname"],"title":"NicknameSuggestionOut","description":"Свободный сгенерированный ник для кнопки «придумать за меня»."},"NotesIn":{"properties":{"media_id":{"type":"string","format":"uuid","title":"Media Id"}},"type":"object","required":["media_id"],"title":"NotesIn","description":"Конспект занятия: PDF из медиатеки (E1-169)."},"NotesOut":{"properties":{"media_id":{"type":"string","format":"uuid","title":"Media Id"},"file_name":{"type":"string","title":"File Name"},"size_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Size Bytes"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"}},"type":"object","required":["media_id","file_name","size_bytes","url"],"title":"NotesOut","description":"Конспект занятия в панели и у ученика: имя файла, размер и ссылка."},"NotificationSettingItemIn":{"properties":{"type":{"$ref":"#/components/schemas/NotificationType"},"is_enabled":{"type":"boolean","title":"Is Enabled"}},"type":"object","required":["type","is_enabled"],"title":"NotificationSettingItemIn"},"NotificationSettingOut":{"properties":{"type":{"$ref":"#/components/schemas/NotificationType"},"is_enabled":{"type":"boolean","title":"Is Enabled"},"is_mandatory":{"type":"boolean","title":"Is Mandatory"}},"type":"object","required":["type","is_enabled","is_mandatory"],"title":"NotificationSettingOut"},"NotificationSettingsOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/NotificationSettingOut"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"NotificationSettingsOut"},"NotificationSettingsUpdate":{"properties":{"items":{"items":{"$ref":"#/components/schemas/NotificationSettingItemIn"},"type":"array","maxItems":50,"minItems":1,"title":"Items"}},"type":"object","required":["items"],"title":"NotificationSettingsUpdate"},"NotificationTemplateOut":{"properties":{"type":{"$ref":"#/components/schemas/NotificationType"},"locale":{"type":"string","title":"Locale"},"title":{"type":"string","title":"Title"},"body":{"type":"string","title":"Body"},"deeplink":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deeplink"},"is_mandatory":{"type":"boolean","title":"Is Mandatory"},"placeholders":{"items":{"type":"string"},"type":"array","title":"Placeholders"},"is_default":{"type":"boolean","title":"Is Default"}},"type":"object","required":["type","locale","title","body","deeplink","is_mandatory","placeholders","is_default"],"title":"NotificationTemplateOut","description":"Шаблон уведомления для панели.\n\nТексты пушей до сих пор правились только в базе руками — редактор их\nпоказывает вместе с тем, какие плейсхолдеры у события вообще есть."},"NotificationTemplateUpdate":{"properties":{"title":{"type":"string","maxLength":200,"minLength":1,"title":"Title"},"body":{"type":"string","maxLength":1000,"minLength":1,"title":"Body"},"deeplink":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Deeplink"}},"type":"object","required":["title","body"],"title":"NotificationTemplateUpdate"},"NotificationType":{"type":"string","enum":["enrolled","cohort_starts_tomorrow","module_opened","cohort_announcement","schedule_shifted","cohort_cancelled","live_session_scheduled","live_session_soon","live_session_started","live_session_call","live_session_moved","live_session_cancelled","live_recording_ready","live_link_missing","cohort_full","homework_reviewed","weekly_report"],"title":"NotificationType"},"OfferSection":{"properties":{"kind":{"$ref":"#/components/schemas/SectionKind"},"title":{"type":"string","title":"Title"},"subject_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Subject Id"},"question_count":{"type":"integer","title":"Question Count"},"max_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Score"}},"type":"object","required":["kind","title","subject_id","question_count"],"title":"OfferSection","description":"Секция на экране старта: что спросят и сколько это стоит (M-25).\n\nВыбирать здесь нечего — пробник сдаётся целиком (решение M-26), плитки\nтолько показывают состав."},"OnboardingComplete":{"properties":{"grade":{"$ref":"#/components/schemas/Grade"},"profile_subject_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Profile Subject Ids"},"study_language":{"$ref":"#/components/schemas/Locale"},"city_id":{"type":"string","format":"uuid","title":"City Id"},"nickname":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Nickname"},"ui_locale":{"anyOf":[{"$ref":"#/components/schemas/Locale"},{"type":"null"}]},"target_score":{"anyOf":[{"type":"integer","maximum":140.0,"minimum":50.0},{"type":"null"}],"title":"Target Score"},"target_university_name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Target University Name"},"first_name":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"First Name"}},"type":"object","required":["grade","profile_subject_ids","study_language","city_id"],"title":"OnboardingComplete","description":"Итог онбординга одним запросом: экран может отвалиться на любом шаге."},"Page_AccessRequestConsoleOut_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AccessRequestConsoleOut"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"},"has_more":{"type":"boolean","title":"Has More","default":false}},"type":"object","required":["items"],"title":"Page[AccessRequestConsoleOut]"},"Page_AuditEntryOut_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AuditEntryOut"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"},"has_more":{"type":"boolean","title":"Has More","default":false}},"type":"object","required":["items"],"title":"Page[AuditEntryOut]"},"Page_CodeOut_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CodeOut"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"},"has_more":{"type":"boolean","title":"Has More","default":false}},"type":"object","required":["items"],"title":"Page[CodeOut]"},"Page_ConsolePostOut_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ConsolePostOut"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"},"has_more":{"type":"boolean","title":"Has More","default":false}},"type":"object","required":["items"],"title":"Page[ConsolePostOut]"},"Page_ConsoleUserRow_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ConsoleUserRow"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"},"has_more":{"type":"boolean","title":"Has More","default":false}},"type":"object","required":["items"],"title":"Page[ConsoleUserRow]"},"Page_InviteOut_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/InviteOut"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"},"has_more":{"type":"boolean","title":"Has More","default":false}},"type":"object","required":["items"],"title":"Page[InviteOut]"},"Page_MediaOut_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/MediaOut"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"},"has_more":{"type":"boolean","title":"Has More","default":false}},"type":"object","required":["items"],"title":"Page[MediaOut]"},"Page_PostReportOut_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/PostReportOut"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"},"has_more":{"type":"boolean","title":"Has More","default":false}},"type":"object","required":["items"],"title":"Page[PostReportOut]"},"Page_QuestionOut_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/QuestionOut"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"},"has_more":{"type":"boolean","title":"Has More","default":false}},"type":"object","required":["items"],"title":"Page[QuestionOut]"},"Page_QueueRow_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/QueueRow"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"},"has_more":{"type":"boolean","title":"Has More","default":false}},"type":"object","required":["items"],"title":"Page[QueueRow]"},"Page_RatingReportRow_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/RatingReportRow"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"},"has_more":{"type":"boolean","title":"Has More","default":false}},"type":"object","required":["items"],"title":"Page[RatingReportRow]"},"Page_SavedItemOut_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/SavedItemOut"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"},"has_more":{"type":"boolean","title":"Has More","default":false}},"type":"object","required":["items"],"title":"Page[SavedItemOut]"},"ParagraphBlock":{"properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,40}$","title":"Id"},"type":{"type":"string","const":"paragraph","title":"Type"},"text":{"type":"string","maxLength":5000,"title":"Text"}},"additionalProperties":false,"type":"object","required":["type","text"],"title":"ParagraphBlock"},"PhoneConfirmOut":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"phone":{"type":"string","title":"Phone"},"phone_verification":{"$ref":"#/components/schemas/PhoneVerification"},"activated_enrollment_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Activated Enrollment Ids"}},"type":"object","required":["user_id","phone","phone_verification","activated_enrollment_ids"],"title":"PhoneConfirmOut","description":"Номер подтверждён сотрудником; предварительные зачисления на него\nактивированы (E1-63)."},"PhoneIn":{"properties":{"phone":{"type":"string","maxLength":32,"minLength":3,"title":"Phone"}},"type":"object","required":["phone"],"title":"PhoneIn","description":"Номер в любом написании — хранится в E.164."},"PhoneOut":{"properties":{"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"phone_verification":{"$ref":"#/components/schemas/PhoneVerification"},"telegram_linked":{"type":"boolean","title":"Telegram Linked"}},"type":"object","required":["phone","phone_verification","telegram_linked"],"title":"PhoneOut"},"PhoneVerification":{"type":"string","enum":["none","unverified","staff_confirmed","telegram_verified"],"title":"PhoneVerification","description":"Уровни подтверждения номера (ADR-0011).\n\nSMS нет: менеджер и так разговаривает с покупателем по телефону, и\nподтверждение человеком в этот момент надёжнее автоматического кода."},"PinIn":{"properties":{"pinned_until":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Pinned Until"}},"type":"object","title":"PinIn"},"PlanDay":{"properties":{"day":{"type":"string","format":"date","title":"Day"},"items":{"items":{"$ref":"#/components/schemas/PlanItemOut"},"type":"array","title":"Items"}},"type":"object","required":["day","items"],"title":"PlanDay"},"PlanItemIn":{"properties":{"day":{"type":"string","format":"date","title":"Day"},"start_time":{"anyOf":[{"type":"string","format":"time"},{"type":"null"}],"title":"Start Time"},"kind":{"$ref":"#/components/schemas/PlanKind","default":"custom"},"subject_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Subject Id"},"title":{"type":"string","maxLength":200,"minLength":1,"title":"Title"},"duration_min":{"anyOf":[{"type":"integer","maximum":600.0,"minimum":5.0},{"type":"null"}],"title":"Duration Min"},"remind_before_min":{"anyOf":[{"type":"integer","maximum":1440.0,"minimum":0.0},{"type":"null"}],"title":"Remind Before Min"}},"type":"object","required":["day","title"],"title":"PlanItemIn","description":"Свой пункт расписания: «16:00 — физика, 10 задач, напомнить за 15 минут»."},"PlanItemOut":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"source":{"$ref":"#/components/schemas/PlanSource"},"day":{"type":"string","format":"date","title":"Day"},"start_time":{"anyOf":[{"type":"string","format":"time"},{"type":"null"}],"title":"Start Time"},"kind":{"$ref":"#/components/schemas/PlanKind"},"subject_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Subject Id"},"title":{"type":"string","title":"Title"},"duration_min":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Min"},"remind_before_min":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Remind Before Min"},"done":{"type":"boolean","title":"Done"},"reason":{"anyOf":[{"$ref":"#/components/schemas/PlanReason"},{"type":"null"}]},"lesson_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Lesson Id"},"topic_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Topic Id"},"cohort_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Cohort Id"},"course_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Course Title"},"deadline_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deadline At"},"live_session_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Live Session Id"},"lesson_type":{"anyOf":[{"$ref":"#/components/schemas/LessonType"},{"type":"null"}]}},"type":"object","required":["id","source","day","start_time","kind","subject_id","title","duration_min","remind_before_min","done"],"title":"PlanItemOut","description":"Пункт плана: свой (с `id`) или автопункт дня (без `id`, с причиной)."},"PlanItemPatch":{"properties":{"day":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Day"},"start_time":{"anyOf":[{"type":"string","format":"time"},{"type":"null"}],"title":"Start Time"},"kind":{"anyOf":[{"$ref":"#/components/schemas/PlanKind"},{"type":"null"}]},"subject_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Subject Id"},"title":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Title"},"duration_min":{"anyOf":[{"type":"integer","maximum":600.0,"minimum":5.0},{"type":"null"}],"title":"Duration Min"},"remind_before_min":{"anyOf":[{"type":"integer","maximum":1440.0,"minimum":0.0},{"type":"null"}],"title":"Remind Before Min"},"done":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Done"}},"type":"object","title":"PlanItemPatch","description":"Правка своего пункта. Меняется только то, что передано; `null` — очистить."},"PlanKind":{"type":"string","enum":["lesson","homework","test","review","custom"],"title":"PlanKind","description":"Что за пункт: подпись и значок на карточке."},"PlanOut":{"properties":{"today":{"type":"string","format":"date","title":"Today"},"days":{"items":{"$ref":"#/components/schemas/PlanDay"},"type":"array","title":"Days"}},"type":"object","required":["today","days"],"title":"PlanOut","description":"Расписание по дням. `today` — сегодня по часам ученика: автопункты — только в нём."},"PlanReason":{"type":"string","enum":["rework","overdue","deadline","continue","weak_topic","live"],"title":"PlanReason","description":"Почему автопункт в плане — подпись под ним на «Басты»."},"PlanSource":{"type":"string","enum":["manual","auto"],"title":"PlanSource","description":"Кто поставил пункт: ученик сам или правило плана дня."},"Platform":{"type":"string","enum":["android","ios","web"],"title":"Platform"},"PlaybackOut":{"properties":{"media_id":{"type":"string","format":"uuid","title":"Media Id"},"url":{"type":"string","title":"Url"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"ttl_sec":{"type":"integer","title":"Ttl Sec"},"duration_sec":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Sec"}},"type":"object","required":["media_id","url","expires_at","ttl_sec","duration_sec"],"title":"PlaybackOut","description":"Подписанная ссылка на видео и срок её жизни (ADR-0008)."},"PostCardOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"slug":{"type":"string","title":"Slug"},"type":{"$ref":"#/components/schemas/PostType"},"language":{"$ref":"#/components/schemas/Locale"},"title":{"type":"string","title":"Title"},"excerpt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Excerpt"},"subject_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Subject Id"},"topic_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Topic Id"},"cover_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cover Url"},"cover_blurhash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cover Blurhash"},"author":{"anyOf":[{"$ref":"#/components/schemas/TeacherRef"},{"type":"null"}]},"tags":{"items":{"$ref":"#/components/schemas/TagOut"},"type":"array","title":"Tags"},"reading_time_sec":{"type":"integer","title":"Reading Time Sec"},"published_at":{"type":"string","format":"date-time","title":"Published At"},"is_pinned":{"type":"boolean","title":"Is Pinned"},"views_count":{"type":"integer","title":"Views Count"},"likes_count":{"type":"integer","title":"Likes Count"},"saves_count":{"type":"integer","title":"Saves Count"},"preview_block":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/ParagraphBlock"},{"$ref":"#/components/schemas/HeadingBlock"},{"$ref":"#/components/schemas/FormulaBlock"},{"$ref":"#/components/schemas/ImageBlock"},{"$ref":"#/components/schemas/CodeBlock"},{"$ref":"#/components/schemas/QuoteBlock"},{"$ref":"#/components/schemas/ListBlock"},{"$ref":"#/components/schemas/CalloutBlock"},{"$ref":"#/components/schemas/VideoBlock"},{"$ref":"#/components/schemas/ButtonBlock"},{"$ref":"#/components/schemas/QuestionBlock"}],"discriminator":{"propertyName":"type","mapping":{"button":"#/components/schemas/ButtonBlock","callout":"#/components/schemas/CalloutBlock","code":"#/components/schemas/CodeBlock","formula":"#/components/schemas/FormulaBlock","heading":"#/components/schemas/HeadingBlock","image":"#/components/schemas/ImageBlock","list":"#/components/schemas/ListBlock","paragraph":"#/components/schemas/ParagraphBlock","question":"#/components/schemas/QuestionBlock","quote":"#/components/schemas/QuoteBlock","video":"#/components/schemas/VideoBlock"}}},{"type":"null"}],"title":"Preview Block"},"preview_media_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preview Media Url"},"related_course":{"anyOf":[{"$ref":"#/components/schemas/CourseRef"},{"type":"null"}]},"is_liked":{"type":"boolean","title":"Is Liked","default":false},"is_saved":{"type":"boolean","title":"Is Saved","default":false}},"type":"object","required":["id","slug","type","language","title","excerpt","subject_id","topic_id","cover_url","author","tags","reading_time_sec","published_at","is_pinned","views_count","likes_count","saves_count"],"title":"PostCardOut","description":"Карточка в ленте. Тела поста здесь нет — только то, что видно до открытия."},"PostCreate":{"properties":{"title":{"type":"string","maxLength":80,"minLength":1,"title":"Title"},"type":{"$ref":"#/components/schemas/PostType"},"language":{"$ref":"#/components/schemas/Locale"},"slug":{"anyOf":[{"type":"string","maxLength":160,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},{"type":"null"}],"title":"Slug"},"subject_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Subject Id"},"topic_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Topic Id"},"excerpt":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}],"title":"Excerpt"},"blocks":{"$ref":"#/components/schemas/BlockDocument"},"cover_media_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Cover Media Id"},"author_teacher_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author Teacher Id"},"source_url":{"anyOf":[{"type":"string","maxLength":500,"pattern":"^https?://\\S+$"},{"type":"null"}],"title":"Source Url"},"related_course_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Related Course Id"},"tags":{"items":{"type":"string"},"type":"array","maxItems":20,"title":"Tags"}},"type":"object","required":["title","type","language"],"title":"PostCreate"},"PostOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"slug":{"type":"string","title":"Slug"},"type":{"$ref":"#/components/schemas/PostType"},"language":{"$ref":"#/components/schemas/Locale"},"title":{"type":"string","title":"Title"},"excerpt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Excerpt"},"subject_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Subject Id"},"topic_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Topic Id"},"cover_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cover Url"},"cover_blurhash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cover Blurhash"},"author":{"anyOf":[{"$ref":"#/components/schemas/TeacherRef"},{"type":"null"}]},"tags":{"items":{"$ref":"#/components/schemas/TagOut"},"type":"array","title":"Tags"},"reading_time_sec":{"type":"integer","title":"Reading Time Sec"},"published_at":{"type":"string","format":"date-time","title":"Published At"},"is_pinned":{"type":"boolean","title":"Is Pinned"},"views_count":{"type":"integer","title":"Views Count"},"likes_count":{"type":"integer","title":"Likes Count"},"saves_count":{"type":"integer","title":"Saves Count"},"preview_block":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/ParagraphBlock"},{"$ref":"#/components/schemas/HeadingBlock"},{"$ref":"#/components/schemas/FormulaBlock"},{"$ref":"#/components/schemas/ImageBlock"},{"$ref":"#/components/schemas/CodeBlock"},{"$ref":"#/components/schemas/QuoteBlock"},{"$ref":"#/components/schemas/ListBlock"},{"$ref":"#/components/schemas/CalloutBlock"},{"$ref":"#/components/schemas/VideoBlock"},{"$ref":"#/components/schemas/ButtonBlock"},{"$ref":"#/components/schemas/QuestionBlock"}],"discriminator":{"propertyName":"type","mapping":{"button":"#/components/schemas/ButtonBlock","callout":"#/components/schemas/CalloutBlock","code":"#/components/schemas/CodeBlock","formula":"#/components/schemas/FormulaBlock","heading":"#/components/schemas/HeadingBlock","image":"#/components/schemas/ImageBlock","list":"#/components/schemas/ListBlock","paragraph":"#/components/schemas/ParagraphBlock","question":"#/components/schemas/QuestionBlock","quote":"#/components/schemas/QuoteBlock","video":"#/components/schemas/VideoBlock"}}},{"type":"null"}],"title":"Preview Block"},"preview_media_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preview Media Url"},"related_course":{"anyOf":[{"$ref":"#/components/schemas/CourseRef"},{"type":"null"}]},"is_liked":{"type":"boolean","title":"Is Liked","default":false},"is_saved":{"type":"boolean","title":"Is Saved","default":false},"blocks":{"$ref":"#/components/schemas/BlockDocument"},"media_urls":{"additionalProperties":{"type":"string"},"propertyNames":{"format":"uuid"},"type":"object","title":"Media Urls"},"source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Url"}},"type":"object","required":["id","slug","type","language","title","excerpt","subject_id","topic_id","cover_url","author","tags","reading_time_sec","published_at","is_pinned","views_count","likes_count","saves_count","blocks"],"title":"PostOut","description":"Пост целиком: карточка плюс тело и всё, что нужно экрану поста."},"PostReportIn":{"properties":{"comment":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Comment"}},"type":"object","title":"PostReportIn","description":"Жалоба «Ошибка в разборе». Комментарий необязателен: одно нажатие —\nуже сигнал, а гость может не захотеть печатать."},"PostReportOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"post_id":{"type":"string","format":"uuid","title":"Post Id"},"post_title":{"type":"string","title":"Post Title"},"post_slug":{"type":"string","title":"Post Slug"},"post_language":{"$ref":"#/components/schemas/Locale"},"post_status":{"$ref":"#/components/schemas/PostStatus"},"comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comment"},"from_guest":{"type":"boolean","title":"From Guest"},"status":{"$ref":"#/components/schemas/PostReportStatus"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"resolved_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Resolved At"}},"type":"object","required":["id","post_id","post_title","post_slug","post_language","post_status","comment","from_guest","status","created_at","resolved_at"],"title":"PostReportOut","description":"Строка списка жалоб в панели и результат разбора. Несёт то, что нужно\nконтент-менеджеру, чтобы перейти к посту и решить."},"PostReportStatus":{"type":"string","enum":["open","resolved"],"title":"PostReportStatus","description":"Жалоба «Ошибка в разборе» из ленты. Открыта, пока контент-менеджер\nне разберётся; отдельного «отклонена» нет — правило «оставить куратору»\nсюда не переносим, у контента решение бинарное."},"PostStatus":{"type":"string","enum":["draft","scheduled","published","archived"],"title":"PostStatus"},"PostType":{"type":"string","enum":["problem","formula","note","short","news","tip","question","promo"],"title":"PostType","description":"Все восемь типов из спеки — с первого дня.\n\nВ спринте 3 публикуются пять текстовых и `question`; `short` ждёт\nвидеопайплайна, `promo` — таблицы курсов (ADR-0023). Перечисление в базе\nи в трёх клиентах дороже менять, чем завести целиком."},"PostUpdate":{"properties":{"title":{"anyOf":[{"type":"string","maxLength":80,"minLength":1},{"type":"null"}],"title":"Title"},"type":{"anyOf":[{"$ref":"#/components/schemas/PostType"},{"type":"null"}]},"slug":{"anyOf":[{"type":"string","maxLength":160,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},{"type":"null"}],"title":"Slug"},"subject_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Subject Id"},"topic_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Topic Id"},"excerpt":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}],"title":"Excerpt"},"blocks":{"anyOf":[{"$ref":"#/components/schemas/BlockDocument"},{"type":"null"}]},"cover_media_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Cover Media Id"},"author_teacher_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author Teacher Id"},"source_url":{"anyOf":[{"type":"string","maxLength":500,"pattern":"^https?://\\S+$"},{"type":"null"}],"title":"Source Url"},"related_course_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Related Course Id"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":20},{"type":"null"}],"title":"Tags"}},"type":"object","title":"PostUpdate","description":"Частичное обновление: присланные поля меняются, остальные не трогаются."},"PosterIn":{"properties":{"media_id":{"type":"string","format":"uuid","title":"Media Id"}},"type":"object","required":["media_id"],"title":"PosterIn","description":"Свой постер к видео: готовое изображение из медиатеки."},"ProfileOut":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"},"nickname":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nickname"},"grade":{"anyOf":[{"$ref":"#/components/schemas/Grade"},{"type":"null"}]},"school_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"School Name"},"city_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"City Id"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url"},"ui_locale":{"$ref":"#/components/schemas/Locale"},"study_language":{"anyOf":[{"$ref":"#/components/schemas/Locale"},{"type":"null"}]},"show_both_languages":{"type":"boolean","title":"Show Both Languages"},"timezone":{"type":"string","title":"Timezone"},"target_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Target Score"},"target_university_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target University Name"},"target_specialty":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Specialty"},"is_onboarded":{"type":"boolean","title":"Is Onboarded"},"subjects":{"items":{"$ref":"#/components/schemas/SubjectRef"},"type":"array","title":"Subjects"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"phone_verification":{"$ref":"#/components/schemas/PhoneVerification","default":"none"}},"type":"object","required":["user_id","first_name","last_name","grade","school_name","ui_locale","study_language","show_both_languages","timezone","target_score","target_university_name","target_specialty","is_onboarded","subjects"],"title":"ProfileOut"},"ProfileUpdate":{"properties":{"first_name":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Last Name"},"nickname":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Nickname"},"grade":{"anyOf":[{"$ref":"#/components/schemas/Grade"},{"type":"null"}]},"school_name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"School Name"},"city_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"City Id"},"ui_locale":{"anyOf":[{"$ref":"#/components/schemas/Locale"},{"type":"null"}]},"study_language":{"anyOf":[{"$ref":"#/components/schemas/Locale"},{"type":"null"}]},"show_both_languages":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Show Both Languages"},"timezone":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Timezone"}},"type":"object","title":"ProfileUpdate"},"ProgressExport":{"properties":{"courses":{"items":{"$ref":"#/components/schemas/CourseProgressExport"},"type":"array","title":"Courses"},"lessons":{"items":{"$ref":"#/components/schemas/LessonProgressExport"},"type":"array","title":"Lessons"},"days":{"items":{"$ref":"#/components/schemas/ActivityDayExport"},"type":"array","title":"Days"}},"type":"object","required":["courses","lessons","days"],"title":"ProgressExport"},"ProgressIn":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ProgressItemIn"},"type":"array","maxItems":50,"minItems":1,"title":"Items"}},"type":"object","required":["items"],"title":"ProgressIn","description":"Пачка отрезков: клиент копит их без сети и шлёт разом."},"ProgressItemIn":{"properties":{"position_sec":{"type":"integer","maximum":86400.0,"minimum":0.0,"title":"Position Sec"},"watched_sec":{"type":"integer","maximum":3600.0,"minimum":0.0,"title":"Watched Sec"},"at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"At"}},"type":"object","required":["position_sec","watched_sec"],"title":"ProgressItemIn","description":"Отрезок просмотра или чтения с момента прошлого отчёта."},"ProgressSummaryOut":{"properties":{"cohorts":{"items":{"$ref":"#/components/schemas/CohortProgressOut"},"type":"array","title":"Cohorts"},"streak_days":{"type":"integer","title":"Streak Days"},"seconds_last_week":{"type":"integer","title":"Seconds Last Week"},"lessons_completed_last_week":{"type":"integer","title":"Lessons Completed Last Week"},"lessons_completed_total":{"type":"integer","title":"Lessons Completed Total"}},"type":"object","required":["cohorts","streak_days","seconds_last_week","lessons_completed_last_week","lessons_completed_total"],"title":"ProgressSummaryOut","description":"Сводка целиком: потоки плюс то, что считается по всем сразу."},"PublishIn":{"properties":{"at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"At"}},"type":"object","title":"PublishIn"},"PushPlatform":{"type":"string","enum":["android","ios","web"],"title":"PushPlatform"},"PushTokenIn":{"properties":{"platform":{"$ref":"#/components/schemas/PushPlatform"},"token":{"type":"string","maxLength":512,"minLength":16,"title":"Token"},"locale":{"anyOf":[{"type":"string","maxLength":5,"minLength":2},{"type":"null"}],"title":"Locale"}},"type":"object","required":["platform","token"],"title":"PushTokenIn"},"QuestionBlock":{"properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,40}$","title":"Id"},"type":{"type":"string","const":"question","title":"Type"},"text":{"type":"string","maxLength":5000,"title":"Text"},"options":{"items":{"type":"string","maxLength":5000},"type":"array","maxItems":6,"minItems":2,"title":"Options"},"correct":{"type":"integer","minimum":0.0,"title":"Correct"},"explanation":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}],"title":"Explanation"}},"additionalProperties":false,"type":"object","required":["type","text","options","correct"],"title":"QuestionBlock","description":"Мини-вопрос. Проверяется на клиенте: это бесплатный контент, а не тест."},"QuestionCreate":{"properties":{"subject_id":{"type":"string","format":"uuid","title":"Subject Id"},"topic_id":{"type":"string","format":"uuid","title":"Topic Id"},"locale":{"$ref":"#/components/schemas/Locale"},"type":{"$ref":"#/components/schemas/QuestionType"},"stem":{"$ref":"#/components/schemas/BlockDocument"},"options":{"additionalProperties":true,"type":"object","title":"Options"},"correct":{"additionalProperties":true,"type":"object","title":"Correct"},"explanation":{"$ref":"#/components/schemas/BlockDocument"},"max_score":{"anyOf":[{"type":"integer","maximum":10.0,"minimum":1.0},{"type":"null"}],"title":"Max Score"},"difficulty":{"$ref":"#/components/schemas/Difficulty","default":"medium"},"source":{"$ref":"#/components/schemas/QuestionSource","default":"manual"},"external_key":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"External Key"},"shuffle_options":{"type":"boolean","title":"Shuffle Options","default":true}},"type":"object","required":["subject_id","topic_id","locale","type","stem"],"title":"QuestionCreate"},"QuestionOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"subject_id":{"type":"string","format":"uuid","title":"Subject Id"},"topic_id":{"type":"string","format":"uuid","title":"Topic Id"},"locale":{"$ref":"#/components/schemas/Locale"},"type":{"$ref":"#/components/schemas/QuestionType"},"stem":{"$ref":"#/components/schemas/BlockDocument"},"options":{"additionalProperties":true,"type":"object","title":"Options"},"correct":{"additionalProperties":true,"type":"object","title":"Correct"},"explanation":{"$ref":"#/components/schemas/BlockDocument"},"shuffle_options":{"type":"boolean","title":"Shuffle Options"},"difficulty":{"$ref":"#/components/schemas/Difficulty"},"source":{"$ref":"#/components/schemas/QuestionSource"},"status":{"$ref":"#/components/schemas/QuestionStatus"},"usage_count":{"type":"integer","title":"Usage Count"},"correct_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Correct Rate"},"max_score":{"type":"integer","title":"Max Score"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"media_urls":{"additionalProperties":{"type":"string"},"propertyNames":{"format":"uuid"},"type":"object","title":"Media Urls"}},"type":"object","required":["id","subject_id","topic_id","locale","type","stem","options","correct","explanation","shuffle_options","difficulty","source","status","usage_count","correct_rate","max_score","created_at","updated_at"],"title":"QuestionOut"},"QuestionPublic":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"topic_id":{"type":"string","format":"uuid","title":"Topic Id"},"type":{"$ref":"#/components/schemas/QuestionType"},"stem":{"$ref":"#/components/schemas/BlockDocument"},"options":{"additionalProperties":true,"type":"object","title":"Options"},"max_score":{"type":"integer","title":"Max Score"},"media_urls":{"additionalProperties":{"type":"string"},"propertyNames":{"format":"uuid"},"type":"object","title":"Media Urls"}},"type":"object","required":["id","topic_id","type","stem","options","max_score"],"title":"QuestionPublic","description":"Вопрос глазами ученика: без правильного ответа и без разбора.\n\nРазбор приходит отдельно, после ответа, — иначе он лежал бы в памяти\nприложения всё время прохождения теста."},"QuestionSource":{"type":"string","enum":["manual","import","ai"],"title":"QuestionSource"},"QuestionStatus":{"type":"string","enum":["draft","review","published","retired"],"title":"QuestionStatus"},"QuestionType":{"type":"string","enum":["single","multiple","matching","numeric","ordering"],"title":"QuestionType"},"QuestionUpdate":{"properties":{"topic_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Topic Id"},"type":{"anyOf":[{"$ref":"#/components/schemas/QuestionType"},{"type":"null"}]},"stem":{"anyOf":[{"$ref":"#/components/schemas/BlockDocument"},{"type":"null"}]},"options":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Options"},"correct":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Correct"},"explanation":{"anyOf":[{"$ref":"#/components/schemas/BlockDocument"},{"type":"null"}]},"max_score":{"anyOf":[{"type":"integer","maximum":10.0,"minimum":1.0},{"type":"null"}],"title":"Max Score"},"difficulty":{"anyOf":[{"$ref":"#/components/schemas/Difficulty"},{"type":"null"}]},"status":{"anyOf":[{"$ref":"#/components/schemas/QuestionStatus"},{"type":"null"}]},"shuffle_options":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Shuffle Options"}},"type":"object","title":"QuestionUpdate"},"QuestionsAvailable":{"properties":{"count":{"type":"integer","title":"Count"}},"type":"object","required":["count"],"title":"QuestionsAvailable","description":"Сколько опубликованных вопросов есть по темам — на языке курса.\n\nКонструктору урока это нужно до сохранения: тест из пустого банка\nопубликуется в ошибку у ученика."},"QueueRow":{"properties":{"submission":{"$ref":"#/components/schemas/SubmissionOut"},"student_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Student Name"},"lesson_title":{"type":"string","title":"Lesson Title"},"cohort_title":{"type":"string","title":"Cohort Title"},"grading":{"$ref":"#/components/schemas/HomeworkGrading"}},"type":"object","required":["submission","student_name","lesson_title","cohort_title","grading"],"title":"QueueRow","description":"Строка очереди проверки: кто, что и когда сдал."},"QuizStatsOut":{"properties":{"tests_finished":{"type":"integer","title":"Tests Finished"},"window_days":{"type":"integer","title":"Window Days"},"answered":{"type":"integer","title":"Answered"},"correct":{"type":"integer","title":"Correct"},"accuracy_percent":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Accuracy Percent"}},"type":"object","required":["tests_finished","window_days","answered","correct","accuracy_percent"],"title":"QuizStatsOut","description":"Тесты ученика для трекера (E1-138): сколько сдано и насколько верно.\n\nСчитаются только завершённые попытки: пока пробник идёт, трекер не должен\nподсказывать, верно ли ученик отвечает."},"QuoteBlock":{"properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,40}$","title":"Id"},"type":{"type":"string","const":"quote","title":"Type"},"text":{"type":"string","maxLength":5000,"title":"Text"},"author":{"anyOf":[{"type":"string","maxLength":300,"minLength":1},{"type":"null"}],"title":"Author"}},"additionalProperties":false,"type":"object","required":["type","text"],"title":"QuoteBlock"},"RatingBadge":{"type":"string","enum":["flawless","no_skips","test_master","climber","top3"],"title":"RatingBadge"},"RatingFileFormat":{"type":"string","enum":["group_pdf","xlsx","parents_zip"],"title":"RatingFileFormat"},"RatingItemOut":{"properties":{"lesson_id":{"type":"string","format":"uuid","title":"Lesson Id"},"points":{"type":"integer","title":"Points"},"state":{"$ref":"#/components/schemas/RatingItemState"},"score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Score"},"max_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Score"}},"type":"object","required":["lesson_id","points","state"],"title":"RatingItemOut","description":"Урок у одного ученика: балл из десяти и откуда он взялся."},"RatingItemState":{"type":"string","enum":["done","recording","pending","rework","missed","upcoming","todo"],"title":"RatingItemState","description":"Что с уроком у ученика — подпись рядом с баллом."},"RatingLessonOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"title":{"type":"string","title":"Title"},"type":{"$ref":"#/components/schemas/LessonType"},"grading":{"anyOf":[{"$ref":"#/components/schemas/HomeworkGrading"},{"type":"null"}]},"opens_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Opens At"},"deadline_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deadline At"}},"type":"object","required":["id","title","type","grading","opens_at","deadline_at"],"title":"RatingLessonOut"},"RatingLevel":{"type":"string","enum":["star","explorer","traveler","beginner","asleep"],"title":"RatingLevel","description":"Ступень по доле набранного — как в макете заказчика: от 90 %, от 70 %,\nот 40 %, хоть что-то и ноль."},"RatingModuleOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"title":{"type":"string","title":"Title"},"lessons":{"items":{"$ref":"#/components/schemas/RatingLessonOut"},"type":"array","title":"Lessons"}},"type":"object","required":["id","title","lessons"],"title":"RatingModuleOut"},"RatingPeriodIn":{"properties":{"kind":{"$ref":"#/components/schemas/RatingPeriodKind","default":"week"},"week":{"anyOf":[{"type":"integer","maximum":520.0,"minimum":1.0},{"type":"null"}],"title":"Week"},"since":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Since"},"until":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Until"}},"type":"object","title":"RatingPeriodIn","description":"Какой рейтинг нужен. Без недели — текущая неделя потока."},"RatingPeriodKind":{"type":"string","enum":["week","course","range"],"title":"RatingPeriodKind","description":"За что рейтинг: неделя потока, весь пройденный путь или свои даты."},"RatingPeriodOut":{"properties":{"kind":{"$ref":"#/components/schemas/RatingPeriodKind"},"first_week":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"First Week"},"week":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Week"},"starts_on":{"type":"string","format":"date","title":"Starts On"},"ends_on":{"type":"string","format":"date","title":"Ends On"}},"type":"object","required":["kind","first_week","week","starts_on","ends_on"],"title":"RatingPeriodOut"},"RatingReportIn":{"properties":{"cohort_id":{"type":"string","format":"uuid","title":"Cohort Id"},"period":{"$ref":"#/components/schemas/RatingPeriodIn"}},"type":"object","required":["cohort_id"],"title":"RatingReportIn"},"RatingReportOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"source":{"$ref":"#/components/schemas/RatingReportSource"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"created_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Name"},"rating":{"$ref":"#/components/schemas/CohortRatingOut"}},"type":"object","required":["id","source","created_at","created_by_name","rating"],"title":"RatingReportOut"},"RatingReportRow":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"cohort_id":{"type":"string","format":"uuid","title":"Cohort Id"},"cohort_code":{"type":"string","title":"Cohort Code"},"cohort_title":{"type":"string","title":"Cohort Title"},"period":{"$ref":"#/components/schemas/RatingPeriodOut"},"computed_at":{"type":"string","format":"date-time","title":"Computed At"},"source":{"$ref":"#/components/schemas/RatingReportSource"},"created_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Name"},"students_count":{"type":"integer","title":"Students Count"},"leaders":{"items":{"type":"string"},"type":"array","title":"Leaders"}},"type":"object","required":["id","cohort_id","cohort_code","cohort_title","period","computed_at","source","created_by_name","students_count","leaders"],"title":"RatingReportRow"},"RatingReportSource":{"type":"string","enum":["manual","schedule"],"title":"RatingReportSource"},"RatingRowOut":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"},"place":{"type":"integer","title":"Place"},"place_change":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Place Change"},"points":{"type":"integer","title":"Points"},"percent":{"type":"integer","title":"Percent"},"level":{"$ref":"#/components/schemas/RatingLevel"},"badges":{"items":{"$ref":"#/components/schemas/RatingBadge"},"type":"array","title":"Badges"},"seconds":{"type":"integer","title":"Seconds"},"items":{"items":{"$ref":"#/components/schemas/RatingItemOut"},"type":"array","title":"Items"},"trend":{"items":{"$ref":"#/components/schemas/RatingTrendPoint"},"type":"array","title":"Trend"}},"type":"object","required":["user_id","full_name","place","place_change","points","percent","level","badges","seconds","items","trend"],"title":"RatingRowOut"},"RatingScheduleIn":{"properties":{"is_enabled":{"type":"boolean","title":"Is Enabled"},"every_weeks":{"type":"integer","enum":[1,2,4],"title":"Every Weeks","default":1},"hour":{"type":"integer","maximum":23.0,"minimum":0.0,"title":"Hour","default":9}},"type":"object","required":["is_enabled"],"title":"RatingScheduleIn"},"RatingScheduleOut":{"properties":{"cohort_id":{"type":"string","format":"uuid","title":"Cohort Id"},"cohort_code":{"type":"string","title":"Cohort Code"},"cohort_title":{"type":"string","title":"Cohort Title"},"cohort_status":{"$ref":"#/components/schemas/CohortStatus"},"timezone":{"type":"string","title":"Timezone"},"is_enabled":{"type":"boolean","title":"Is Enabled"},"every_weeks":{"type":"integer","title":"Every Weeks"},"hour":{"type":"integer","title":"Hour"},"next_run_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Run At"},"last_run_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Run At"}},"type":"object","required":["cohort_id","cohort_code","cohort_title","cohort_status","timezone","is_enabled","every_weeks","hour","next_run_at","last_run_at"],"title":"RatingScheduleOut"},"RatingTrendPoint":{"properties":{"week":{"type":"integer","title":"Week"},"place":{"type":"integer","title":"Place"},"percent":{"type":"integer","title":"Percent"}},"type":"object","required":["week","place","percent"],"title":"RatingTrendPoint"},"RatingWeekOut":{"properties":{"number":{"type":"integer","title":"Number"},"starts_on":{"type":"string","format":"date","title":"Starts On"},"ends_on":{"type":"string","format":"date","title":"Ends On"},"lessons":{"type":"integer","title":"Lessons"},"is_current":{"type":"boolean","title":"Is Current"},"has_started":{"type":"boolean","title":"Has Started"}},"type":"object","required":["number","starts_on","ends_on","lessons","is_current","has_started"],"title":"RatingWeekOut","description":"Неделя потока для переключателя: семь дней от даты старта."},"ReactionOut":{"properties":{"liked":{"type":"boolean","title":"Liked"},"likes_count":{"type":"integer","title":"Likes Count"}},"type":"object","required":["liked","likes_count"],"title":"ReactionOut"},"ReadinessOut":{"properties":{"total_percent":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Percent"},"sections":{"items":{"$ref":"#/components/schemas/ReadinessSection"},"type":"array","title":"Sections"},"missing":{"type":"integer","title":"Missing"},"needed":{"type":"integer","title":"Needed"},"formula_version":{"type":"integer","title":"Formula Version"},"computed_at":{"type":"string","format":"date-time","title":"Computed At"}},"type":"object","required":["total_percent","sections","missing","needed","formula_version","computed_at"],"title":"ReadinessOut","description":"«Дайындық» (E2-10, спека 07): готовность к ҰБТ по секциям формата ученика.\n\nСчитается из пробников и тематических тестов с затуханием; тест урока не\nвходит. Общий процент — только когда известна каждая секция. Формата нет —\nсекций нет: весов взять неоткуда."},"ReadinessSection":{"properties":{"subject_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Subject Id"},"title":{"type":"string","title":"Title"},"weight":{"type":"number","title":"Weight"},"percent":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Percent"},"answers":{"type":"integer","title":"Answers"}},"type":"object","required":["subject_id","title","weight","percent","answers"],"title":"ReadinessSection","description":"Секция формата ученика в «Дайындық»: предмет, вес и готовность по нему."},"RecordingIn":{"properties":{"media_id":{"type":"string","format":"uuid","title":"Media Id"}},"type":"object","required":["media_id"],"title":"RecordingIn","description":"Запись занятия — видео из медиатеки, загруженное панелью (E1-88)."},"RecordingOut":{"properties":{"media_id":{"type":"string","format":"uuid","title":"Media Id"},"status":{"$ref":"#/components/schemas/MediaStatus"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"duration_sec":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Sec"},"ready_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ready At"}},"type":"object","required":["media_id","status","url","duration_sec","ready_at"],"title":"RecordingOut","description":"Запись занятия в панели: файл и его готовность. Ученикам запись\nоткрывается, когда воркер обработал файл (`ready_at`)."},"RecordingPublic":{"properties":{"url":{"type":"string","title":"Url"},"duration_sec":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Sec"}},"type":"object","required":["url","duration_sec"],"title":"RecordingPublic","description":"Запись глазами ученика: подписанная ссылка на готовый файл."},"RefreshIn":{"properties":{"refresh_token":{"anyOf":[{"type":"string","minLength":16},{"type":"null"}],"title":"Refresh Token"}},"type":"object","title":"RefreshIn","description":"Мобильный клиент шлёт refresh в теле; веб-кабинет — в httpOnly-cookie\n(docs/spec/03-onboarding-auth.md, «Токены и сессии»), и тело тогда пустое."},"RegionConsoleOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"code":{"type":"string","title":"Code"},"sort_order":{"type":"integer","title":"Sort Order"},"is_active":{"type":"boolean","title":"Is Active"},"titles":{"additionalProperties":{"type":"string"},"type":"object","title":"Titles"},"cities_count":{"type":"integer","title":"Cities Count"}},"type":"object","required":["id","code","sort_order","is_active","titles","cities_count"],"title":"RegionConsoleOut","description":"Область для панели: все переводы сразу и выключенные тоже."},"RegionCreate":{"properties":{"code":{"type":"string","maxLength":32,"minLength":2,"pattern":"^[a-z0-9_]+$","title":"Code"},"sort_order":{"type":"integer","title":"Sort Order","default":0},"titles":{"additionalProperties":{"type":"string"},"type":"object","minProperties":1,"title":"Titles"}},"type":"object","required":["code","titles"],"title":"RegionCreate"},"RegionOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"code":{"type":"string","title":"Code"},"title":{"type":"string","title":"Title"},"sort_order":{"type":"integer","title":"Sort Order"}},"type":"object","required":["id","code","title","sort_order"],"title":"RegionOut"},"RegionUpdate":{"properties":{"sort_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sort Order"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"titles":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Titles"}},"type":"object","title":"RegionUpdate"},"ReorderIn":{"properties":{"ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":500,"minItems":1,"title":"Ids"}},"type":"object","required":["ids"],"title":"ReorderIn","description":"Полный новый порядок: все идентификаторы, без пропусков и повторов."},"RescheduleIn":{"properties":{"starts_at":{"type":"string","format":"date-time","title":"Starts At"},"duration_min":{"anyOf":[{"type":"integer","maximum":480.0,"minimum":5.0},{"type":"null"}],"title":"Duration Min"}},"type":"object","required":["starts_at"],"title":"RescheduleIn"},"ReviewIn":{"properties":{"status":{"$ref":"#/components/schemas/SubmissionStatus"},"score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Score"},"comment":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Comment"}},"type":"object","required":["status"],"title":"ReviewIn","description":"Вердикт проверяющего. Балл — по шкале задания, её выбирал преподаватель."},"Role":{"type":"string","enum":["student","curator","teacher","content","sales","moderator","admin"],"title":"Role","description":"Роли аддитивны: куратор может одновременно быть преподавателем."},"RolesIn":{"properties":{"roles":{"items":{"$ref":"#/components/schemas/Role"},"type":"array","title":"Roles"}},"type":"object","required":["roles"],"title":"RolesIn","description":"Полный набор ролей после изменения, а не разница.\n\nРоли аддитивны, и «добавить» с «убрать» по отдельности легко рассинхронить\nс тем, что видит сотрудник на экране."},"SavedItemCreate":{"properties":{"item_type":{"$ref":"#/components/schemas/SavedItemType"},"item_id":{"type":"string","format":"uuid","title":"Item Id"},"source_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Source Id"},"note":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Note"},"payload":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Payload"}},"type":"object","required":["item_type","item_id"],"title":"SavedItemCreate"},"SavedItemOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"item_type":{"$ref":"#/components/schemas/SavedItemType"},"item_id":{"type":"string","format":"uuid","title":"Item Id"},"source_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Source Id"},"subject_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Subject Id"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"payload":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Payload"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"post":{"anyOf":[{"$ref":"#/components/schemas/PostCardOut"},{"type":"null"}]},"lesson":{"anyOf":[{"$ref":"#/components/schemas/LessonCard"},{"type":"null"}]}},"type":"object","required":["id","item_type","item_id","source_id","subject_id","note","payload","created_at"],"title":"SavedItemOut"},"SavedItemType":{"type":"string","enum":["post","lesson_summary","summary_fragment","formula","question"],"title":"SavedItemType"},"ScheduleAddIn":{"properties":{"lesson_id":{"type":"string","format":"uuid","title":"Lesson Id"},"opens_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Opens At"},"deadline_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deadline At"}},"type":"object","required":["lesson_id"],"title":"ScheduleAddIn","description":"Поставить в расписание один урок, не пересобирая остальные.\n\nДаты можно не передавать: тогда урок встаёт вместе со своим модулем\n(открытие и дедлайн — как у последнего урока модуля в расписании), а если\nмодуля в расписании ещё нет — открывается сразу и без дедлайна."},"ScheduleGenerateIn":{"properties":{"step":{"$ref":"#/components/schemas/ScheduleStep","default":"module_per_week"},"lessons_per_week":{"type":"integer","maximum":7.0,"minimum":1.0,"title":"Lessons Per Week","default":2},"starts_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Starts On"},"open_time":{"type":"string","format":"time","title":"Open Time","default":"09:00:00"},"deadline_days":{"anyOf":[{"type":"integer","maximum":90.0,"minimum":1.0},{"type":"null"}],"title":"Deadline Days","default":7}},"type":"object","title":"ScheduleGenerateIn","description":"Дата старта и шаг → расписание по оглавлению. Заменяет текущее\nрасписание целиком, ручные флаги строк сохраняются."},"ScheduleItemIn":{"properties":{"lesson_id":{"type":"string","format":"uuid","title":"Lesson Id"},"opens_at":{"type":"string","format":"date-time","title":"Opens At"},"deadline_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deadline At"}},"type":"object","required":["lesson_id","opens_at"],"title":"ScheduleItemIn"},"ScheduleItemOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"lesson_id":{"type":"string","format":"uuid","title":"Lesson Id"},"lesson_title":{"type":"string","title":"Lesson Title"},"module_id":{"type":"string","format":"uuid","title":"Module Id"},"module_title":{"type":"string","title":"Module Title"},"opens_at":{"type":"string","format":"date-time","title":"Opens At"},"deadline_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deadline At"},"is_manually_opened":{"type":"boolean","title":"Is Manually Opened"},"is_closed":{"type":"boolean","title":"Is Closed"}},"type":"object","required":["id","lesson_id","lesson_title","module_id","module_title","opens_at","deadline_at","is_manually_opened","is_closed"],"title":"ScheduleItemOut"},"ScheduleItemPatch":{"properties":{"opens_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Opens At"},"deadline_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deadline At"},"is_manually_opened":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Manually Opened"},"is_closed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Closed"}},"type":"object","title":"ScheduleItemPatch"},"ScheduleMissingOut":{"properties":{"lesson_id":{"type":"string","format":"uuid","title":"Lesson Id"},"lesson_title":{"type":"string","title":"Lesson Title"},"module_id":{"type":"string","format":"uuid","title":"Module Id"},"module_title":{"type":"string","title":"Module Title"},"lesson_status":{"$ref":"#/components/schemas/ContentStatus"}},"type":"object","required":["lesson_id","lesson_title","module_id","module_title","lesson_status"],"title":"ScheduleMissingOut","description":"Урок курса, которого нет в расписании потока. Так бывает с уроком,\nдобавленным в курс после сборки расписания: ученики видят его закрытым\n(«не входит в расписание»), пока куратор его не поставит."},"ScheduleMode":{"type":"string","enum":["by_schedule","sequential","open_all"],"title":"ScheduleMode","description":"`by_schedule` — основной режим: у каждого урока своя дата открытия."},"ScheduleShiftIn":{"properties":{"days":{"type":"integer","maximum":365.0,"minimum":-365.0,"title":"Days"},"module_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Module Id"},"cascade":{"type":"boolean","title":"Cascade","default":true}},"type":"object","required":["days"],"title":"ScheduleShiftIn","description":"Сдвиг на N дней: всего потока или одного модуля, каскадом на\nпоследующие или нет — выбор куратора (docs/spec/14-cohorts.md)."},"ScheduleStep":{"type":"string","enum":["module_per_week","lessons_per_week","weekdays"],"title":"ScheduleStep"},"SectionIn":{"properties":{"kind":{"$ref":"#/components/schemas/SectionKind"},"title":{"type":"string","maxLength":200,"minLength":1,"title":"Title"},"subject_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Subject Id"},"question_count":{"type":"integer","maximum":200.0,"minimum":1.0,"title":"Question Count"},"time_sec":{"anyOf":[{"type":"integer","maximum":21600.0,"minimum":60.0},{"type":"null"}],"title":"Time Sec"},"difficulty_mix":{"additionalProperties":{"type":"integer"},"type":"object","title":"Difficulty Mix"},"type_mix":{"items":{"$ref":"#/components/schemas/TypeMixRow"},"type":"array","maxItems":20,"title":"Type Mix"},"topic_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":50,"title":"Topic Ids"},"sort_order":{"type":"integer","title":"Sort Order","default":0}},"type":"object","required":["kind","title","question_count"],"title":"SectionIn","description":"Секция формата: сколько вопросов, откуда, какого типа и сложности."},"SectionKind":{"type":"string","enum":["mandatory","profile"],"title":"SectionKind","description":"Обязательный блок сдают все; профильную секцию заполняет выбор ученика."},"SectionOut":{"properties":{"kind":{"$ref":"#/components/schemas/SectionKind"},"title":{"type":"string","maxLength":200,"minLength":1,"title":"Title"},"subject_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Subject Id"},"question_count":{"type":"integer","maximum":200.0,"minimum":1.0,"title":"Question Count"},"time_sec":{"anyOf":[{"type":"integer","maximum":21600.0,"minimum":60.0},{"type":"null"}],"title":"Time Sec"},"difficulty_mix":{"additionalProperties":{"type":"integer"},"type":"object","title":"Difficulty Mix"},"type_mix":{"items":{"$ref":"#/components/schemas/TypeMixRow"},"type":"array","maxItems":20,"title":"Type Mix"},"topic_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":50,"title":"Topic Ids"},"sort_order":{"type":"integer","title":"Sort Order","default":0},"id":{"type":"string","format":"uuid","title":"Id"},"max_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Score"}},"type":"object","required":["kind","title","question_count","id"],"title":"SectionOut"},"SectionPlan":{"properties":{"title":{"type":"string","title":"Title"},"subject_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Subject Id"},"question_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Question Ids"},"time_sec":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Time Sec"}},"type":"object","required":["title","subject_id","question_ids","time_sec"],"title":"SectionPlan","description":"Секция внутри попытки: что спрашивают и сколько вопросов."},"SectionReadiness":{"properties":{"title":{"type":"string","title":"Title"},"subject_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Subject Id"},"needed":{"type":"integer","title":"Needed"},"available":{"type":"integer","title":"Available"},"is_checked":{"type":"boolean","title":"Is Checked","default":true},"missing":{"additionalProperties":{"type":"integer"},"type":"object","title":"Missing"}},"type":"object","required":["title","subject_id","needed","available"],"title":"SectionReadiness","description":"Хватает ли банка на секцию. Считается до публикации формата."},"SectionScore":{"properties":{"title":{"type":"string","title":"Title"},"subject_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Subject Id"},"score":{"type":"integer","title":"Score"},"max_score":{"type":"integer","title":"Max Score"},"percent":{"type":"integer","title":"Percent"},"spent_sec":{"type":"integer","title":"Spent Sec"}},"type":"object","required":["title","subject_id","score","max_score","percent","spent_sec"],"title":"SectionScore"},"SeriesIn":{"properties":{"count":{"type":"integer","maximum":52.0,"minimum":2.0,"title":"Count"},"interval_days":{"type":"integer","maximum":31.0,"minimum":1.0,"title":"Interval Days","default":7}},"type":"object","required":["count"],"title":"SeriesIn","description":"«Каждый четверг в 18:00, 8 недель»: занятий всего, с каким шагом."},"SessionCancelIn":{"properties":{"reason":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Reason"},"scope":{"type":"string","enum":["this","following"],"title":"Scope","default":"this"}},"type":"object","title":"SessionCancelIn"},"SessionOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"device_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Device Id"},"platform":{"anyOf":[{"$ref":"#/components/schemas/Platform"},{"type":"null"}]},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"last_seen_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Seen At"},"is_current":{"type":"boolean","title":"Is Current","default":false}},"type":"object","required":["id","device_id","platform","model","created_at","last_seen_at"],"title":"SessionOut","description":"Активное устройство в профиле — его можно отключить."},"SocialLoginIn":{"properties":{"id_token":{"type":"string","minLength":16,"title":"Id Token"},"device":{"$ref":"#/components/schemas/DeviceIn"},"full_name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Full Name"},"authorization_code":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Authorization Code"}},"type":"object","required":["id_token","device"],"title":"SocialLoginIn","description":"Токен от Google или Apple.\n\n`full_name` — костыль под Apple: имя приходит в теле авторизации только при\nсамом первом входе и в id_token может отсутствовать. Клиент обязан передать\nего сюда, второго шанса не будет."},"StaffAuthOptions":{"properties":{"mfa_required":{"type":"boolean","title":"Mfa Required"}},"type":"object","required":["mfa_required"],"title":"StaffAuthOptions","description":"Что нужно панели до входа: спрашивать ли код второго фактора."},"StaffCreate":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"roles":{"items":{"$ref":"#/components/schemas/Role"},"type":"array","minItems":1,"title":"Roles"},"first_name":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Last Name"}},"type":"object","required":["email","roles"],"title":"StaffCreate","description":"Новая учётная запись сотрудника: почта и роли, пароль выдаёт сервер.\n\nПароль не приходит от человека и не хранится в открытом виде нигде:\nсотрудник получает его один раз в ответе и меняет при первом входе.\nВторой фактор он подключает сам (ADR-0028)."},"StaffLoginIn":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","maxLength":128,"minLength":8,"title":"Password"},"totp_code":{"anyOf":[{"type":"string","maxLength":6,"minLength":6,"pattern":"^\\d{6}$"},{"type":"null"}],"title":"Totp Code"},"device":{"$ref":"#/components/schemas/DeviceIn"}},"type":"object","required":["email","password","device"],"title":"StaffLoginIn","description":"Сотрудники входят паролем со вторым фактором: панель не зависит от Google."},"StaffOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"},"roles":{"items":{"type":"string"},"type":"array","title":"Roles"}},"type":"object","required":["id","email","full_name","roles"],"title":"StaffOut","description":"Сотрудник для выбора в панели: назначить куратором потока, показать автора."},"StaffPasswordOut":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"email":{"type":"string","title":"Email"},"password":{"type":"string","title":"Password"},"mfa_required":{"type":"boolean","title":"Mfa Required"}},"type":"object","required":["user_id","email","password","mfa_required"],"title":"StaffPasswordOut","description":"Выданный пароль. Показывается один раз — на сервере его больше нет."},"StudentAlert":{"properties":{"signal":{"$ref":"#/components/schemas/StudentSignal"},"value":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Value"},"cohort":{"$ref":"#/components/schemas/CohortAttentionRef"},"enrollment_id":{"type":"string","format":"uuid","title":"Enrollment Id"},"status":{"$ref":"#/components/schemas/EnrollmentStatus"},"student":{"anyOf":[{"$ref":"#/components/schemas/UserRef"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"}},"type":"object","required":["signal","value","cohort","enrollment_id","status","student","phone"],"title":"StudentAlert","description":"Строка списка: кому написать и почему.\n\n`value` читается по `signal`: дни без активности, уроки отставания,\nчисло просрочек, дни с момента приглашения, пропущенные занятия. Пусто\nтолько у `inactive`, когда ученик не заходил ни разу — «сколько дней»\nответа не имеет."},"StudentPdfIn":{"properties":{"lang":{"anyOf":[{"$ref":"#/components/schemas/Locale"},{"type":"null"}]},"comment":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Comment"}},"type":"object","title":"StudentPdfIn","description":"PDF для родителей: язык и слово куратора, которое в отчёт не сохраняется."},"StudentProgressRef":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"lessons_opened":{"type":"integer","title":"Lessons Opened"},"lessons_completed":{"type":"integer","title":"Lessons Completed"},"percent":{"type":"integer","title":"Percent"},"lag":{"type":"integer","title":"Lag"},"overdue":{"type":"integer","title":"Overdue"},"last_activity_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Activity At"},"days_inactive":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Days Inactive"}},"type":"object","required":["user_id","lessons_opened","lessons_completed","percent","lag","overdue","last_activity_at","days_inactive"],"title":"StudentProgressRef","description":"Ученик потока глазами куратора: где он относительно расписания.\n\nСчитается от **открытого** потоку, а не от всего курса: куратору важно,\nотстал ли ученик от группы, а не сколько курса впереди."},"StudentRatingOut":{"properties":{"cohort_id":{"type":"string","format":"uuid","title":"Cohort Id"},"cohort_code":{"type":"string","title":"Cohort Code"},"cohort_title":{"type":"string","title":"Cohort Title"},"course_title":{"type":"string","title":"Course Title"},"timezone":{"type":"string","title":"Timezone"},"period":{"$ref":"#/components/schemas/RatingPeriodOut"},"computed_at":{"type":"string","format":"date-time","title":"Computed At"},"max_points":{"type":"integer","title":"Max Points"},"weeks":{"items":{"$ref":"#/components/schemas/RatingWeekOut"},"type":"array","title":"Weeks"},"modules":{"items":{"$ref":"#/components/schemas/RatingModuleOut"},"type":"array","title":"Modules"},"rows":{"items":{"$ref":"#/components/schemas/StudentRatingRow"},"type":"array","title":"Rows"},"points_to_next":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Points To Next"}},"type":"object","required":["cohort_id","cohort_code","cohort_title","course_title","timezone","period","computed_at","max_points","weeks","modules","rows","points_to_next"],"title":"StudentRatingOut","description":"Рейтинг своего потока в кабинете и приложении (E1-191)."},"StudentRatingRow":{"properties":{"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"},"is_me":{"type":"boolean","title":"Is Me"},"place":{"type":"integer","title":"Place"},"place_change":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Place Change"},"points":{"type":"integer","title":"Points"},"percent":{"type":"integer","title":"Percent"},"level":{"$ref":"#/components/schemas/RatingLevel"},"badges":{"items":{"$ref":"#/components/schemas/RatingBadge"},"type":"array","title":"Badges"},"items":{"items":{"$ref":"#/components/schemas/RatingItemOut"},"type":"array","title":"Items"}},"type":"object","required":["full_name","is_me","place","place_change","points","percent","level","badges","items"],"title":"StudentRatingRow","description":"Одноклассник в рейтинге — то же, что группа видит в PDF: место, баллы,\nступень, значки и баллы по урокам. Времени учёбы нет: оно личное, а сравнивают\nздесь сделанное (решение владельца 2026-11-07, E1-191)."},"StudentScheduleItem":{"properties":{"lesson_id":{"type":"string","format":"uuid","title":"Lesson Id"},"lesson_title":{"type":"string","title":"Lesson Title"},"lesson_type":{"$ref":"#/components/schemas/LessonType"},"module_id":{"type":"string","format":"uuid","title":"Module Id"},"module_title":{"type":"string","title":"Module Title"},"opens_at":{"type":"string","format":"date-time","title":"Opens At"},"deadline_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deadline At"},"is_locked":{"type":"boolean","title":"Is Locked"},"access_reason":{"$ref":"#/components/schemas/AccessReason"},"live_session":{"anyOf":[{"$ref":"#/components/schemas/LiveSessionPublic"},{"type":"null"}]}},"type":"object","required":["lesson_id","lesson_title","lesson_type","module_id","module_title","opens_at","deadline_at","is_locked","access_reason"],"title":"StudentScheduleItem"},"StudentSignal":{"type":"string","enum":["inactive","behind","overdue","invite_pending","sessions_missed"],"title":"StudentSignal","description":"Что не так с учеником. Один и тот же человек может попасть в несколько\nсписков: молчит и отстаёт — это две разные причины ему написать."},"SubjectConsoleOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"code":{"type":"string","title":"Code"},"is_mandatory_section":{"type":"boolean","title":"Is Mandatory Section"},"color":{"type":"string","title":"Color"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"},"sort_order":{"type":"integer","title":"Sort Order"},"is_active":{"type":"boolean","title":"Is Active"},"titles":{"additionalProperties":{"type":"string"},"type":"object","title":"Titles"},"short_titles":{"additionalProperties":{"type":"string"},"type":"object","title":"Short Titles"}},"type":"object","required":["id","code","is_mandatory_section","color","sort_order","is_active","titles","short_titles"],"title":"SubjectConsoleOut","description":"Предмет для панели: все переводы сразу и выключенные тоже.\n\nПубличная выдача отдаёт одно название на локаль запроса — редактировать по\nней нельзя: перевод на второй язык при сохранении пропал бы."},"SubjectCreate":{"properties":{"code":{"type":"string","maxLength":64,"minLength":2,"pattern":"^[a-z0-9_]+$","title":"Code"},"is_mandatory_section":{"type":"boolean","title":"Is Mandatory Section","default":false},"color":{"type":"string","pattern":"^#[0-9A-Fa-f]{6}$","title":"Color","default":"#7C6FF0"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"},"sort_order":{"type":"integer","title":"Sort Order","default":0},"titles":{"additionalProperties":{"type":"string"},"type":"object","minProperties":1,"title":"Titles"},"short_titles":{"additionalProperties":{"type":"string"},"type":"object","title":"Short Titles"}},"type":"object","required":["code","titles"],"title":"SubjectCreate"},"SubjectOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"code":{"type":"string","title":"Code"},"title":{"type":"string","title":"Title"},"short_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Short Title"},"is_mandatory_section":{"type":"boolean","title":"Is Mandatory Section"},"color":{"type":"string","title":"Color"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"},"sort_order":{"type":"integer","title":"Sort Order"}},"type":"object","required":["id","code","title","is_mandatory_section","color","sort_order"],"title":"SubjectOut"},"SubjectRef":{"properties":{"subject_id":{"type":"string","format":"uuid","title":"Subject Id"},"is_profile":{"type":"boolean","title":"Is Profile"},"sort_order":{"type":"integer","title":"Sort Order"}},"type":"object","required":["subject_id","is_profile","sort_order"],"title":"SubjectRef"},"SubjectUpdate":{"properties":{"is_mandatory_section":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Mandatory Section"},"color":{"anyOf":[{"type":"string","pattern":"^#[0-9A-Fa-f]{6}$"},{"type":"null"}],"title":"Color"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"},"sort_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sort Order"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"titles":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Titles"},"short_titles":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Short Titles"}},"type":"object","title":"SubjectUpdate"},"SubjectsUpdate":{"properties":{"profile_subject_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Profile Subject Ids"}},"type":"object","required":["profile_subject_ids"],"title":"SubjectsUpdate","description":"Ровно два профильных предмета — правило ҰБТ.\n\nОбязательные блоки (мат. грамотность, грамотность чтения, история\nКазахстана) сюда не входят: их сдают все, выбирать нечего."},"SubmissionFile":{"properties":{"media_id":{"type":"string","format":"uuid","title":"Media Id"},"original_name":{"type":"string","title":"Original Name"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"}},"type":"object","required":["media_id","original_name"],"title":"SubmissionFile","description":"Файл работы: ссылка подписанная и живёт недолго, как и всё медиа."},"SubmissionIn":{"properties":{"file_media_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":10,"minItems":1,"title":"File Media Ids"},"comment":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Comment"}},"type":"object","required":["file_media_ids"],"title":"SubmissionIn"},"SubmissionOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"lesson_id":{"type":"string","format":"uuid","title":"Lesson Id"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"cohort_id":{"type":"string","format":"uuid","title":"Cohort Id"},"attempt":{"type":"integer","title":"Attempt"},"files":{"items":{"$ref":"#/components/schemas/SubmissionFile"},"type":"array","title":"Files"},"comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comment"},"submitted_at":{"type":"string","format":"date-time","title":"Submitted At"},"status":{"$ref":"#/components/schemas/SubmissionStatus"},"score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Score"},"reviewed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Reviewed At"},"reviewer_comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reviewer Comment"},"reviewer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reviewer Name"}},"type":"object","required":["id","lesson_id","user_id","cohort_id","attempt","files","comment","submitted_at","status","score","reviewed_at","reviewer_comment"],"title":"SubmissionOut"},"SubmissionStatus":{"type":"string","enum":["submitted","accepted","rework"],"title":"SubmissionStatus","description":"Что с работой: ждёт проверки, принята или вернулась на доработку."},"TagConsoleOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"slug":{"type":"string","title":"Slug"},"title":{"type":"string","title":"Title"},"posts_count":{"type":"integer","title":"Posts Count"}},"type":"object","required":["id","slug","title","posts_count"],"title":"TagConsoleOut","description":"Метка для панели: с идентификатором и числом постов.\n\nМетка заводится тем, что её напечатали в посте, поэтому опечатка тоже\nзаводит метку — и без числа постов не видно, какая из двух настоящая."},"TagMerge":{"properties":{"into_id":{"type":"string","format":"uuid","title":"Into Id"}},"type":"object","required":["into_id"],"title":"TagMerge","description":"Куда переносить посты. Исходная метка после переноса исчезает."},"TagOut":{"properties":{"slug":{"type":"string","title":"Slug"},"title":{"type":"string","title":"Title"}},"type":"object","required":["slug","title"],"title":"TagOut"},"TagRename":{"properties":{"title":{"type":"string","maxLength":64,"minLength":1,"title":"Title"}},"type":"object","required":["title"],"title":"TagRename"},"TeacherCreate":{"properties":{"full_name":{"type":"string","maxLength":200,"minLength":2,"title":"Full Name"},"position":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Position"},"bio":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bio"},"avatar_media_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Avatar Media Id"},"experience_years":{"anyOf":[{"type":"integer","maximum":70.0,"minimum":0.0},{"type":"null"}],"title":"Experience Years"},"rating":{"anyOf":[{"type":"number","maximum":5.0,"minimum":0.0},{"type":"null"}],"title":"Rating"},"languages":{"items":{"type":"string"},"type":"array","title":"Languages"},"subject_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Subject Ids"},"sort_order":{"type":"integer","title":"Sort Order","default":0},"user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"}},"type":"object","required":["full_name"],"title":"TeacherCreate"},"TeacherOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"full_name":{"type":"string","title":"Full Name"},"position":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Position"},"bio":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bio"},"avatar_media_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Avatar Media Id"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url"},"experience_years":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Experience Years"},"rating":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rating"},"languages":{"items":{"type":"string"},"type":"array","title":"Languages"},"subject_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Subject Ids"},"courses_count":{"type":"integer","title":"Courses Count"},"is_published":{"type":"boolean","title":"Is Published"},"sort_order":{"type":"integer","title":"Sort Order"},"user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"}},"type":"object","required":["id","full_name","position","bio","avatar_media_id","experience_years","rating","languages","subject_ids","courses_count","is_published","sort_order"],"title":"TeacherOut"},"TeacherRef":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"full_name":{"type":"string","title":"Full Name"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url"}},"type":"object","required":["id","full_name"],"title":"TeacherRef","description":"Короткая ссылка на преподавателя — для карточек поста и курса."},"TeacherUpdate":{"properties":{"full_name":{"anyOf":[{"type":"string","maxLength":200,"minLength":2},{"type":"null"}],"title":"Full Name"},"position":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Position"},"bio":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bio"},"avatar_media_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Avatar Media Id"},"experience_years":{"anyOf":[{"type":"integer","maximum":70.0,"minimum":0.0},{"type":"null"}],"title":"Experience Years"},"rating":{"anyOf":[{"type":"number","maximum":5.0,"minimum":0.0},{"type":"null"}],"title":"Rating"},"languages":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Languages"},"subject_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Subject Ids"},"is_published":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Published"},"sort_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sort Order"},"user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"}},"type":"object","title":"TeacherUpdate"},"TelegramLinkOut":{"properties":{"url":{"type":"string","title":"Url"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"}},"type":"object","required":["url","expires_at"],"title":"TelegramLinkOut","description":"Ссылка на бота с одноразовым параметром старта; живёт полчаса."},"TokenPairOut":{"properties":{"access_token":{"type":"string","title":"Access Token"},"refresh_token":{"type":"string","title":"Refresh Token"},"token_type":{"type":"string","title":"Token Type","default":"Bearer"},"expires_in":{"type":"integer","title":"Expires In"},"user":{"$ref":"#/components/schemas/UserOut"},"is_new_user":{"type":"boolean","title":"Is New User"},"onboarding_required":{"type":"boolean","title":"Onboarding Required"}},"type":"object","required":["access_token","refresh_token","expires_in","user","is_new_user","onboarding_required"],"title":"TokenPairOut"},"TopicConsoleOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"subject_id":{"type":"string","format":"uuid","title":"Subject Id"},"parent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Id"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"sort_order":{"type":"integer","title":"Sort Order"},"is_active":{"type":"boolean","title":"Is Active"},"titles":{"additionalProperties":{"type":"string"},"type":"object","title":"Titles"},"questions_count":{"type":"integer","title":"Questions Count","default":0},"lessons_count":{"type":"integer","title":"Lessons Count","default":0},"children":{"items":{"$ref":"#/components/schemas/TopicConsoleOut"},"type":"array","title":"Children"}},"type":"object","required":["id","subject_id","parent_id","code","sort_order","is_active","titles"],"title":"TopicConsoleOut","description":"Тема для панели: все переводы сразу, выключенные тоже и — главное —\nна чём она держится.\n\nТему, по которой уже есть вопросы и уроки, нельзя молча удалить: связи\nв базе запрещающие, и «удалил тему» означало бы потерянный банк."},"TopicCreate":{"properties":{"parent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Id"},"code":{"anyOf":[{"type":"string","maxLength":64,"minLength":2,"pattern":"^[a-z0-9_]+$"},{"type":"null"}],"title":"Code"},"sort_order":{"type":"integer","title":"Sort Order","default":0},"titles":{"additionalProperties":{"type":"string"},"type":"object","minProperties":1,"title":"Titles"}},"type":"object","required":["titles"],"title":"TopicCreate"},"TopicOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"subject_id":{"type":"string","format":"uuid","title":"Subject Id"},"parent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Id"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"title":{"type":"string","title":"Title"},"sort_order":{"type":"integer","title":"Sort Order"},"children":{"items":{"$ref":"#/components/schemas/TopicOut"},"type":"array","title":"Children"}},"type":"object","required":["id","subject_id","parent_id","code","title","sort_order"],"title":"TopicOut"},"TopicTestOption":{"properties":{"topic_id":{"type":"string","format":"uuid","title":"Topic Id"},"parent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Id"},"title":{"type":"string","title":"Title"},"depth":{"type":"integer","title":"Depth"},"available":{"type":"integer","title":"Available"},"question_count":{"type":"integer","title":"Question Count"},"is_available":{"type":"boolean","title":"Is Available"},"attempts":{"type":"integer","title":"Attempts","default":0},"last_percent":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Last Percent"},"last_finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Finished At"},"active_attempt_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Active Attempt Id"}},"type":"object","required":["topic_id","parent_id","title","depth","available","question_count","is_available"],"title":"TopicTestOption","description":"Тема в списке тематических тестов (E2-03): что по ней соберётся и как\nученик решал её раньше. Темы идут деревом — подтема сразу за родителем."},"TopicUpdate":{"properties":{"parent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Id"},"code":{"anyOf":[{"type":"string","maxLength":64,"minLength":2,"pattern":"^[a-z0-9_]+$"},{"type":"null"}],"title":"Code"},"sort_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sort Order"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"titles":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Titles"}},"type":"object","title":"TopicUpdate"},"TotpEnrollConfirmIn":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","maxLength":128,"minLength":8,"title":"Password"},"totp_code":{"type":"string","maxLength":6,"minLength":6,"pattern":"^\\d{6}$","title":"Totp Code"},"device":{"$ref":"#/components/schemas/DeviceIn"}},"type":"object","required":["email","password","totp_code","device"],"title":"TotpEnrollConfirmIn","description":"Подтверждение кодом из приложения. Пароль спрашивается повторно:\nиначе выданный секрет подтвердил бы кто угодно с чужой вкладки."},"TotpEnrollStartIn":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","maxLength":128,"minLength":8,"title":"Password"}},"type":"object","required":["email","password"],"title":"TotpEnrollStartIn","description":"Начало подключения второго фактора: те же почта и пароль, что при входе."},"TotpEnrollStartOut":{"properties":{"secret":{"type":"string","title":"Secret"},"otpauth_uri":{"type":"string","title":"Otpauth Uri"},"expires_in":{"type":"integer","title":"Expires In"}},"type":"object","required":["secret","otpauth_uri","expires_in"],"title":"TotpEnrollStartOut","description":"Секрет для аутентификатора. Наружу уходит один раз и только тому, кто\nзнает пароль; QR панель рисует сама из `otpauth_uri` — картинка не ходит\nпо сети (ADR-0028)."},"TransferIn":{"properties":{"target_cohort_id":{"type":"string","format":"uuid","title":"Target Cohort Id"},"reason":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Reason"}},"type":"object","required":["target_cohort_id"],"title":"TransferIn"},"TypeMixRow":{"properties":{"type":{"$ref":"#/components/schemas/QuestionType"},"count":{"type":"integer","maximum":200.0,"minimum":1.0,"title":"Count"},"score":{"type":"integer","maximum":10.0,"minimum":1.0,"title":"Score"}},"type":"object","required":["type","count","score"],"title":"TypeMixRow","description":"Строка состава секции: сколько вопросов какого типа и по какой цене.\n\nЦена стоит рядом с типом не для красоты: цена лежит на вопросе, а не\nвыводится из типа, и подбор «по типу» без цены сумму баллов не удержал бы."},"UniversityConsoleOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"code":{"type":"string","title":"Code"},"city_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"City Id"},"website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website"},"sort_order":{"type":"integer","title":"Sort Order"},"is_active":{"type":"boolean","title":"Is Active"},"titles":{"additionalProperties":{"type":"string"},"type":"object","title":"Titles"},"short_titles":{"additionalProperties":{"type":"string"},"type":"object","title":"Short Titles"}},"type":"object","required":["id","code","city_id","website","sort_order","is_active","titles","short_titles"],"title":"UniversityConsoleOut"},"UniversityCreate":{"properties":{"code":{"type":"string","maxLength":32,"minLength":2,"pattern":"^[a-z0-9_]+$","title":"Code"},"city_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"City Id"},"website":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Website"},"sort_order":{"type":"integer","title":"Sort Order","default":0},"titles":{"additionalProperties":{"type":"string"},"type":"object","minProperties":1,"title":"Titles"},"short_titles":{"additionalProperties":{"type":"string"},"type":"object","title":"Short Titles"}},"type":"object","required":["code","titles"],"title":"UniversityCreate"},"UniversityOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"code":{"type":"string","title":"Code"},"title":{"type":"string","title":"Title"},"short_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Short Title"},"city_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"City Id"},"city_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City Title"},"website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website"},"sort_order":{"type":"integer","title":"Sort Order"}},"type":"object","required":["id","code","title","short_title","city_id","city_title","website","sort_order"],"title":"UniversityOut"},"UniversityUpdate":{"properties":{"city_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"City Id"},"website":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Website"},"sort_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sort Order"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"titles":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Titles"},"short_titles":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Short Titles"}},"type":"object","title":"UniversityUpdate"},"UpdateInfo":{"properties":{"status":{"$ref":"#/components/schemas/UpdateStatus"},"latest_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Latest Version"},"min_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Min Version"},"store_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Store Url"}},"type":"object","required":["status","latest_version","min_version","store_url"],"title":"UpdateInfo","description":"Надо ли этой версии приложения обновиться и куда вести ученика."},"UpdateStatus":{"type":"string","enum":["none","optional","required"],"title":"UpdateStatus"},"UploadRequest":{"properties":{"kind":{"$ref":"#/components/schemas/MediaKind"},"original_name":{"type":"string","maxLength":255,"minLength":1,"title":"Original Name"},"mime_type":{"type":"string","maxLength":128,"minLength":3,"title":"Mime Type"},"size_bytes":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Size Bytes"}},"type":"object","required":["kind","original_name","mime_type"],"title":"UploadRequest"},"UploadTicket":{"properties":{"media_id":{"type":"string","format":"uuid","title":"Media Id"},"upload_url":{"type":"string","title":"Upload Url"},"fields":{"additionalProperties":{"type":"string"},"type":"object","title":"Fields"},"storage_key":{"type":"string","title":"Storage Key"},"max_bytes":{"type":"integer","title":"Max Bytes"}},"type":"object","required":["media_id","upload_url","fields","storage_key","max_bytes"],"title":"UploadTicket","description":"Ответ на запрос загрузки: куда и с какими полями отправлять файл."},"UserCard":{"properties":{"account":{"$ref":"#/components/schemas/AccountOut"},"profile":{"$ref":"#/components/schemas/ProfileOut"},"roles":{"items":{"type":"string"},"type":"array","title":"Roles"},"is_active":{"type":"boolean","title":"Is Active"},"cohorts":{"items":{"$ref":"#/components/schemas/MyCohort"},"type":"array","title":"Cohorts"},"sessions":{"items":{"$ref":"#/components/schemas/SessionOut"},"type":"array","title":"Sessions"},"journal":{"items":{"$ref":"#/components/schemas/AuditEntryOut"},"type":"array","title":"Journal"},"teacher":{"anyOf":[{"$ref":"#/components/schemas/TeacherOut"},{"type":"null"}]}},"type":"object","required":["account","profile","roles","is_active","cohorts","sessions","journal"],"title":"UserCard","description":"Человек целиком, как его видит панель (E1-113).\n\nСобирается из шести модулей и не принадлежит ни одному — та же причина,\nпо которой здесь живут выгрузка и удаление."},"UserOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"phone_verification":{"$ref":"#/components/schemas/PhoneVerification"},"roles":{"items":{"type":"string"},"type":"array","title":"Roles"},"providers":{"items":{"$ref":"#/components/schemas/AuthProvider"},"type":"array","title":"Providers"},"is_staff":{"type":"boolean","title":"Is Staff"}},"type":"object","required":["id","email","phone","phone_verification","roles","providers","is_staff"],"title":"UserOut"},"UserRef":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"phone_verification":{"$ref":"#/components/schemas/PhoneVerification"},"nickname":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nickname"},"city_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"City Id"}},"type":"object","required":["id","full_name","email","phone","phone_verification"],"title":"UserRef","description":"Ученик глазами сотрудника: имя и контакт. Кому показывать контакт,\nрешает вызывающий (docs/spec/02-roles-permissions.md)."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VersionUsage":{"properties":{"version":{"type":"string","title":"Version"},"people":{"type":"integer","title":"People"}},"type":"object","required":["version","people"],"title":"VersionUsage"},"VideoBlock":{"properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,40}$","title":"Id"},"type":{"type":"string","const":"video","title":"Type"},"media_id":{"type":"string","format":"uuid","title":"Media Id"},"caption":{"anyOf":[{"type":"string","maxLength":300,"minLength":1},{"type":"null"}],"title":"Caption"}},"additionalProperties":false,"type":"object","required":["type","media_id"],"title":"VideoBlock"},"ViewIn":{"properties":{"read_complete":{"type":"boolean","title":"Read Complete","default":false}},"type":"object","title":"ViewIn"},"WeakTopic":{"properties":{"topic_id":{"type":"string","format":"uuid","title":"Topic Id"},"title":{"type":"string","title":"Title"},"subject_id":{"type":"string","format":"uuid","title":"Subject Id"},"mistakes":{"type":"integer","title":"Mistakes"},"asked":{"type":"integer","title":"Asked"},"correct_percent":{"type":"integer","title":"Correct Percent"},"lesson_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Lesson Id"},"has_topic_test":{"type":"boolean","title":"Has Topic Test","default":false}},"type":"object","required":["topic_id","title","subject_id","mistakes","asked","correct_percent"],"title":"WeakTopic","description":"Тема к повторению: где ученик ошибается чаще всего (спека 06).\n\nЭто не приговор попытке, а ответ на вопрос «что делать дальше»: поэтому\nрядом с темой лежат тест по ней и урок, в котором её разбирают, если есть."},"WeeklyReportOut":{"properties":{"week_start":{"type":"string","format":"date","title":"Week Start"},"week_end":{"type":"string","format":"date","title":"Week End"},"is_current":{"type":"boolean","title":"Is Current"},"first_week":{"type":"string","format":"date","title":"First Week"},"seconds":{"type":"integer","title":"Seconds"},"previous_seconds":{"type":"integer","title":"Previous Seconds"},"tests":{"type":"integer","title":"Tests"},"subjects":{"items":{"$ref":"#/components/schemas/WeeklySubject"},"type":"array","title":"Subjects"}},"type":"object","required":["week_start","week_end","is_current","first_week","seconds","previous_seconds","tests","subjects"],"title":"WeeklyReportOut","description":"Неделя с понедельника по воскресенье по часам ученика (спека 07)."},"WeeklySubject":{"properties":{"subject_id":{"type":"string","format":"uuid","title":"Subject Id"},"seconds":{"type":"integer","title":"Seconds"},"tests":{"type":"integer","title":"Tests"},"answered":{"type":"integer","title":"Answered"},"accuracy_percent":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Accuracy Percent"},"readiness_percent":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Readiness Percent"},"readiness_delta":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Readiness Delta"}},"type":"object","required":["subject_id","seconds","tests","answered","accuracy_percent","readiness_percent","readiness_delta"],"title":"WeeklySubject","description":"Предмет за неделю: время, тесты, точность и сдвиг готовности."}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}