{"openapi":"3.1.0","info":{"title":"Gigma Education Backend","version":"0.1.0"},"paths":{"/api/v2/health":{"get":{"tags":["health"],"summary":"Health","description":"Проверяет, что HTTP-приложение отвечает. Не обращается к БД, Redis или провайдеру ИИ;\nstatus=ok не означает готовность этих зависимостей.","operationId":"health_api_v2_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponseSchema"}}}}},"security":[]}},"/api/v2/health/db":{"get":{"tags":["health"],"summary":"Health Db","description":"Проверяет подключение к PostgreSQL запросом SELECT 1. Возвращает 503 database_unavailable\nпри ошибке подключения или выполнения запроса; не проверяет Redis и ИИ.","operationId":"health_db_api_v2_health_db_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthDatabaseResponseSchema"}}}},"503":{"description":"A required service is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"headers":{"Retry-After":{"description":"Suggested delay in seconds before a safe retry is considered.","schema":{"type":"integer","minimum":0}}}}},"security":[]}},"/api/v2/agent/broadcast-auth":{"post":{"tags":["realtime"],"summary":"Agent Broadcast Auth","description":"Выдаёт параметры подключения агента к каналу событий после проверки Agent Bearer. Это\nслужебная операция агента, а не вход ученика.","operationId":"agent_broadcast_auth_api_v2_agent_broadcast_auth_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BroadcastAuthResponseSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"A required service is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"headers":{"Retry-After":{"description":"Suggested delay in seconds before a safe retry is considered.","schema":{"type":"integer","minimum":0}}}}},"security":[{"AgentBearer":[]}]}},"/api/v2/auth/gigma/exchange":{"post":{"tags":["Авторизация и тарифы"],"summary":"Вход через Gigma","description":"Обменивает внешний Gigma Bearer на внутреннюю сессию Education и устанавливает сессионную\ncookie. При переданном Origin проверяет его разрешённость. Для дальнейших ученических\nзапросов используется внутренняя сессия, а не внешний Bearer.","operationId":"exchange_gigma_bearer_api_v2_auth_gigma_exchange_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrincipalAuthResponseSchema"}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"The authenticated principal is not allowed to perform this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"A required service is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"headers":{"Retry-After":{"description":"Suggested delay in seconds before a safe retry is considered.","schema":{"type":"integer","minimum":0}}}}},"security":[{"GigmaBearer":[]}]}},"/api/v2/auth/gigma/subscription-selection":{"post":{"tags":["Авторизация и тарифы"],"summary":"Выбрать тариф или создать оплату","description":"Выбор через внутреннюю сессию Education. ERP вызывается только сервером\nпо principal_handle с серверными credentials. Checkout не выдаёт доступ\nдо подтверждения оплаченной подписки отдельным серверным чтением.\nПовтор UUID возвращает сохранённый результат без повторного POST в ERP.","operationId":"select_gigma_subscription_api_v2_auth_gigma_subscription_selection_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrincipalSubscriptionSelectionRequestSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrincipalSubscriptionSelectionResponseSchema"}}}},"422":{"description":"The request is structurally or semantically invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"The authenticated principal is not allowed to perform this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"The operation conflicts with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"A required service is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"headers":{"Retry-After":{"description":"Suggested delay in seconds before a safe retry is considered.","schema":{"type":"integer","minimum":0}}}}},"security":[{"PrincipalSessionHeader":[]},{"PrincipalSessionCookie":[]}]}},"/api/v2/auth/gigma/subscription-change":{"post":{"tags":["Авторизация и тарифы"],"summary":"Сменить действующий платный тариф","description":"Принимает внутреннюю сессию и согласие на автоплатёж. Повтор UUID не\nотправляет смену заново. При неизвестном исходе новая смена блокируется\nдо сверки оператором. Срок сессии и окно учебных квот сохраняются.","operationId":"change_gigma_subscription_api_v2_auth_gigma_subscription_change_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrincipalSubscriptionChangeRequestSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrincipalSubscriptionChangeResponseSchema"}}}},"422":{"description":"The request is structurally or semantically invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"The authenticated principal is not allowed to perform this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"The operation conflicts with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"A required service is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"headers":{"Retry-After":{"description":"Suggested delay in seconds before a safe retry is considered.","schema":{"type":"integer","minimum":0}}}}},"security":[{"PrincipalSessionHeader":[]},{"PrincipalSessionCookie":[]}]}},"/api/v2/auth/session":{"get":{"tags":["Авторизация и тарифы"],"summary":"Получить текущую сессию","description":"Возвращает снимок внутренней сессии и доступных ей чатов. Принимает cookie или\n`Authorization: Session <token>`; ответ не кешируется.","operationId":"get_auth_session_api_v2_auth_session_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrincipalAuthResponseSchema"}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"The authenticated principal is not allowed to perform this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"A required service is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"headers":{"Retry-After":{"description":"Suggested delay in seconds before a safe retry is considered.","schema":{"type":"integer","minimum":0}}}}},"security":[{"PrincipalSessionHeader":[]},{"PrincipalSessionCookie":[]}]}},"/api/v2/auth/logout":{"post":{"tags":["Авторизация и тарифы"],"summary":"Выйти из сессии","description":"Завершает внутреннюю сессию и удаляет cookie. Не раскрывает валидность переданного токена.\nЕсли cookie присутствует, требуется разрешённый Origin; успешный ответ 204 не содержит тела.","operationId":"logout_principal_session_api_v2_auth_logout_post","responses":{"204":{"description":"Successful Response"},"403":{"description":"The authenticated principal is not allowed to perform this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"A required service is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"headers":{"Retry-After":{"description":"Suggested delay in seconds before a safe retry is considered.","schema":{"type":"integer","minimum":0}}}}},"security":[{},{"PrincipalSessionHeader":[]},{"PrincipalSessionCookie":[]}]}},"/api/v2/chat/sessions":{"get":{"tags":["Чат"],"summary":"List Principal Chat Sessions","description":"Возвращает доступные текущему владельцу чат-сессии с пагинацией. include_archived включает\nархивные сессии. Права ограничиваются серверным контекстом пользователя и проекта.","operationId":"list_principal_chat_sessions_api_v2_chat_sessions_get","parameters":[{"name":"include_archived","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Archived"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatSessionListResponseSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"The authenticated principal is not allowed to perform this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"The resource is unavailable or hidden by an ownership boundary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"A required service is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"headers":{"Retry-After":{"description":"Suggested delay in seconds before a safe retry is considered.","schema":{"type":"integer","minimum":0}}}}},"security":[{"PrincipalSessionHeader":[]},{"PrincipalSessionCookie":[]}]}},"/api/v2/chat/session":{"post":{"tags":["Чат"],"summary":"Open Principal Chat Session","description":"Открывает чат в контексте внутренней сессии пользователя. Для учебного занятия используйте\nзапуск LessonRun и его chat_session_id, чтобы сохранить учебные связи.","operationId":"open_principal_chat_session_api_v2_chat_session_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/PrincipalEmptyRequestSchema"},{"type":"null"}],"title":" Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatSessionResponseSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"The authenticated principal is not allowed to perform this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"A required service is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"headers":{"Retry-After":{"description":"Suggested delay in seconds before a safe retry is considered.","schema":{"type":"integer","minimum":0}}}}},"security":[{"PrincipalSessionHeader":[]},{"PrincipalSessionCookie":[]}]}},"/api/v2/chat/messages":{"post":{"tags":["Чат"],"summary":"Send Principal Chat Message","description":"Принимает текстовое сообщение в доступную пользователю чат-сессию и возвращает 202.\nclient_message_id идентифицирует отправку в рамках чат-сессии. Повтор с тем же текстом\nвозвращает сохранённый результат; другой текст с прежним идентификатором даёт\n409 idempotency_conflict. Текст сравнивается точно, включая пробелы и переносы строк.\nДля учебного диалога используйте POST\n/api/v2/lesson-runs/{run_id}/messages; сообщение в чат не фиксирует официальный учебный\nответ.","operationId":"send_principal_chat_message_api_v2_chat_messages_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrincipalMessageRequestSchema"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatMessageResponseSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"The authenticated principal is not allowed to perform this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"The resource is unavailable or hidden by an ownership boundary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"The operation conflicts with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"A required service is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"headers":{"Retry-After":{"description":"Suggested delay in seconds before a safe retry is considered.","schema":{"type":"integer","minimum":0}}}}},"security":[{"PrincipalSessionHeader":[]},{"PrincipalSessionCookie":[]}]}},"/api/v2/chat/sessions/{session_id}/events":{"get":{"tags":["Чат"],"summary":"List Principal Chat Events","description":"Возвращает страницу событий доступного чата после after_id, а не страницу учебных сообщений.\nДля восстановления учебного экрана используйте GET /api/v2/lesson-runs/{run_id}/messages.\nСобытия позволяют обновлять сообщения по их идентификаторам.","operationId":"list_principal_chat_events_api_v2_chat_sessions__session_id__events_get","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}},{"name":"after_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"After 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":{"$ref":"#/components/schemas/ChatEventsResponseSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"The authenticated principal is not allowed to perform this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"The resource is unavailable or hidden by an ownership boundary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"A required service is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"headers":{"Retry-After":{"description":"Suggested delay in seconds before a safe retry is considered.","schema":{"type":"integer","minimum":0}}}}},"security":[{"PrincipalSessionHeader":[]},{"PrincipalSessionCookie":[]}]}},"/api/v2/chat/sessions/{session_id}/events/ws-ticket":{"post":{"tags":["Чат"],"summary":"Issue Principal Chat Ws Ticket","description":"Выдаёт билет для WebSocket /api/v2/chat/sessions/{session_id}/events/ws после проверки\nдоступа к чату. Этот маршрут возвращает JSON с билетом, а не открывает WebSocket.","operationId":"issue_principal_chat_ws_ticket_api_v2_chat_sessions__session_id__events_ws_ticket_post","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatEventsWebSocketTicketResponseSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"The authenticated principal is not allowed to perform this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"The resource is unavailable or hidden by an ownership boundary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"A required service is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"headers":{"Retry-After":{"description":"Suggested delay in seconds before a safe retry is considered.","schema":{"type":"integer","minimum":0}}}}},"security":[{"PrincipalSessionHeader":[]},{"PrincipalSessionCookie":[]}]}},"/api/v2/chat/stop":{"post":{"tags":["Чат"],"summary":"Stop Principal Chat Session","description":"Запрашивает остановку текущей работы доступной пользователю чат-сессии. Возвращённое\nсостояние команды не является учебным результатом и не завершает LessonRun.","operationId":"stop_principal_chat_session_api_v2_chat_stop_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrincipalSessionActionRequestSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatSessionActionResponseSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"The authenticated principal is not allowed to perform this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"The resource is unavailable or hidden by an ownership boundary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"The operation conflicts with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"A required service is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"headers":{"Retry-After":{"description":"Suggested delay in seconds before a safe retry is considered.","schema":{"type":"integer","minimum":0}}}}},"security":[{"PrincipalSessionHeader":[]},{"PrincipalSessionCookie":[]}]}},"/api/v2/chat/reset":{"post":{"tags":["Чат"],"summary":"Reset Principal Chat Session","description":"Выполняет команду сброса доступной чат-сессии. Для продолжения учебного занятия используйте\nего LessonRun; этот маршрут не создаёт экзаменационный результат.","operationId":"reset_principal_chat_session_api_v2_chat_reset_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrincipalSessionActionRequestSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatSessionActionResponseSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"The authenticated principal is not allowed to perform this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"The resource is unavailable or hidden by an ownership boundary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"The operation conflicts with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"A required service is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"headers":{"Retry-After":{"description":"Suggested delay in seconds before a safe retry is considered.","schema":{"type":"integer","minimum":0}}}}},"security":[{"PrincipalSessionHeader":[]},{"PrincipalSessionCookie":[]}]}},"/api/v2/activity/logs":{"post":{"tags":["activity"],"summary":"Create Activity Log","description":"Записывает событие активности от авторизованного агента. Передавайте структурированные\naction, status и ссылки ресурса; не включайте секреты или персональные тела запросов в\nmessage/context.","operationId":"create_activity_log_api_v2_activity_logs_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateActivityLogRequestSchema"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityLogResponseSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"A required service is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"headers":{"Retry-After":{"description":"Suggested delay in seconds before a safe retry is considered.","schema":{"type":"integer","minimum":0}}}}},"security":[{"AgentBearer":[]}]},"get":{"tags":["activity"],"summary":"List Activity Logs","description":"Читает доступные агенту события активности с фильтрами ресурса, действия, статуса,\ncorrelation_id и времени. Возвращает ограниченный список; это журнал действий, а не история\nсодержимого чата.","operationId":"list_activity_logs_api_v2_activity_logs_get","parameters":[{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9][A-Za-z0-9_.:-]{0,63}$"},{"type":"null"}],"title":"Type"}},{"name":"actor_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9][A-Za-z0-9_.:-]{0,63}$"},{"type":"null"}],"title":"Actor Type"}},{"name":"actor_ref","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}],"title":"Actor Ref"}},{"name":"action","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":100,"pattern":"^[A-Za-z0-9][A-Za-z0-9_.:-]{0,99}$"},{"type":"null"}],"title":"Action"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":32,"pattern":"^[A-Za-z0-9][A-Za-z0-9_.:-]{0,31}$"},{"type":"null"}],"title":"Status"}},{"name":"http_status_code","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":599,"minimum":100},{"type":"null"}],"title":"Http Status Code"}},{"name":"correlation_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}],"title":"Correlation Id"}},{"name":"resource_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9][A-Za-z0-9_.:-]{0,63}$"},{"type":"null"}],"title":"Resource Type"}},{"name":"resource_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":128},{"type":"null"}],"title":"Resource Id"}},{"name":"created_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created From"}},{"name":"created_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created To"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ActivityLogResponseSchema"},"title":"Response List Activity Logs Api V2 Activity Logs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"A required service is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"headers":{"Retry-After":{"description":"Suggested delay in seconds before a safe retry is considered.","schema":{"type":"integer","minimum":0}}}}},"security":[{"AgentBearer":[]}]}},"/api/v2/profile":{"get":{"tags":["learning"],"summary":"Get Profile","description":"Возвращает существующий профиль текущего пользователя. Отсутствующий профиль даёт 404;\nчтение не создаёт профиль.","operationId":"get_profile_api_v2_profile_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileResponse"}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"The authenticated principal is not allowed to perform this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"The resource is unavailable or hidden by an ownership boundary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"A required service is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"headers":{"Retry-After":{"description":"Suggested delay in seconds before a safe retry is considered.","schema":{"type":"integer","minimum":0}}}}},"security":[{"PrincipalSessionHeader":[]},{"PrincipalSessionCookie":[]}]},"put":{"tags":["learning"],"summary":"Put Profile","description":"Создаёт или обновляет профиль текущего пользователя: 201 при создании, 200 при обновлении.\nНепереданные поля сохраняются согласно контракту профиля; принадлежность определяется\nвнутренней сессией.","operationId":"put_profile_api_v2_profile_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfilePayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileResponse"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileResponse"}}}},"422":{"description":"The request is structurally or semantically invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"The authenticated principal is not allowed to perform this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"A required service is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"headers":{"Retry-After":{"description":"Suggested delay in seconds before a safe retry is considered.","schema":{"type":"integer","minimum":0}}}}},"security":[{"PrincipalSessionHeader":[]},{"PrincipalSessionCookie":[]}]},"patch":{"tags":["learning"],"summary":"Patch Profile","description":"Частично изменяет существующий профиль текущего пользователя. Обрабатывает только явно\nпереданные поля; допустимость null определяется схемой каждого поля.","operationId":"patch_profile_api_v2_profile_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfilePatchPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileResponse"}}}},"422":{"description":"The request is structurally or semantically invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"The authenticated principal is not allowed to perform this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"The resource is unavailable or hidden by an ownership boundary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"A required service is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"headers":{"Retry-After":{"description":"Suggested delay in seconds before a safe retry is considered.","schema":{"type":"integer","minimum":0}}}}},"security":[{"PrincipalSessionHeader":[]},{"PrincipalSessionCookie":[]}]}},"/api/v2/ai-personas":{"get":{"tags":["learning"],"summary":"List Ai Personas","description":"Возвращает активный публичный каталог AI-персонажей для ученика.","operationId":"list_ai_personas_api_v2_ai_personas_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/AiPersonaResponse"},"type":"array","title":"Response List Ai Personas Api V2 Ai Personas Get"}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"The authenticated principal is not allowed to perform this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"A required service is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"headers":{"Retry-After":{"description":"Suggested delay in seconds before a safe retry is considered.","schema":{"type":"integer","minimum":0}}}}},"security":[{"PrincipalSessionHeader":[]},{"PrincipalSessionCookie":[]}]}},"/api/v2/subjects":{"get":{"tags":["learning"],"summary":"List Subjects","description":"Возвращает предметы с фильтром exam_type и пагинацией. Используйте page_size/page_token либо\nпрежние limit/cursor; одноимённые пары нельзя передавать одновременно. page_size=0 означает\n50, значения выше 100 ограничиваются 100.","operationId":"list_subjects_api_v2_subjects_get","parameters":[{"name":"exam_type","in":"query","required":false,"schema":{"anyOf":[{"enum":["oge","ege"],"type":"string"},{"type":"null"}],"title":"Exam Type"}},{"name":"page_size","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"title":"Page Size"}},{"name":"page_token","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Page Token"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":100,"minimum":1},{"type":"null"}],"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubjectPage"}}}},"422":{"description":"The request is structurally or semantically invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"The authenticated principal is not allowed to perform this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"A required service is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"headers":{"Retry-After":{"description":"Suggested delay in seconds before a safe retry is considered.","schema":{"type":"integer","minimum":0}}}}},"security":[{"PrincipalSessionHeader":[]},{"PrincipalSessionCookie":[]}]}},"/api/v2/student-dashboard":{"get":{"tags":["learning"],"summary":"Get Student Dashboard","description":"Возвращает учебную сводку текущего пользователя. Освоение экзаменационного задания\nучитывается после завершения занятия по окончательному ответу с полным баллом; принятие\nответа само по себе не означает освоение.","operationId":"get_student_dashboard_api_v2_student_dashboard_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudentDashboardResponse"}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"The authenticated principal is not allowed to perform this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"The resource is unavailable or hidden by an ownership boundary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"A required service is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"headers":{"Retry-After":{"description":"Suggested delay in seconds before a safe retry is considered.","schema":{"type":"integer","minimum":0}}}}},"security":[{"PrincipalSessionHeader":[]},{"PrincipalSessionCookie":[]}]}},"/api/v2/programs":{"get":{"tags":["learning"],"summary":"List Programs","description":"Возвращает доступные программы с необязательным фильтром subject_id и страницами\nlimit/cursor. Не создаёт зачисление или право на оплаченный доступ.","operationId":"list_programs_api_v2_programs_get","parameters":[{"name":"subject_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Subject Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProgramPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"The authenticated principal is not allowed to perform this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"A required service is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"headers":{"Retry-After":{"description":"Suggested delay in seconds before a safe retry is considered.","schema":{"type":"integer","minimum":0}}}}},"security":[{"PrincipalSessionHeader":[]},{"PrincipalSessionCookie":[]}]}},"/api/v2/programs/{program_id}:enroll":{"post":{"tags":["learning"],"summary":"Enroll In Program","description":"Создаёт или продолжает зачисление текущего пользователя в программу. Требует Idempotency-\nKey; возвращает 201 при создании или 200 при повторе/продолжении. Операция не подтверждает\nоплату.","operationId":"enroll_in_program_api_v2_programs__program_id__enroll_post","parameters":[{"name":"program_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Program Id"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":255,"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrollPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrollmentResponse"}}}},"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrollmentResponse"}}},"description":"Created"},"422":{"description":"The request is structurally or semantically invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"The authenticated principal is not allowed to perform this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"The resource is unavailable or hidden by an ownership boundary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"The operation conflicts with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"A required service is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"headers":{"Retry-After":{"description":"Suggested delay in seconds before a safe retry is considered.","schema":{"type":"integer","minimum":0}}}}},"security":[{"PrincipalSessionHeader":[]},{"PrincipalSessionCookie":[]}]}},"/api/v2/enrollments/{enrollment_id}":{"get":{"tags":["learning"],"summary":"Get Enrollment","description":"Возвращает состояние собственного зачисления и следующего шага. Чужое или недоступное\nзачисление не раскрывается; чтение не подтверждает оплату и не меняет учебный этап.","operationId":"get_enrollment_api_v2_enrollments__enrollment_id__get","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/EnrollmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"The authenticated principal is not allowed to perform this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"The resource is unavailable or hidden by an ownership boundary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"A required service is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"headers":{"Retry-After":{"description":"Suggested delay in seconds before a safe retry is considered.","schema":{"type":"integer","minimum":0}}}}},"security":[{"PrincipalSessionHeader":[]},{"PrincipalSessionCookie":[]}]}},"/api/v2/subjects/{subject_id}/lessons":{"get":{"tags":["learning"],"summary":"List Lessons","description":"Возвращает страницу занятий предмета. active_run_id указывает на продолжающееся занятие;\ncompleted_run_id принадлежит тому же результату, что result_id. При отсутствии доступного\nрезультата оба последних поля равны null.","operationId":"list_lessons_api_v2_subjects__subject_id__lessons_get","parameters":[{"name":"subject_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Subject Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LessonPage"}}}},"422":{"description":"The request is structurally or semantically invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"The authenticated principal is not allowed to perform this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"The resource is unavailable or hidden by an ownership boundary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"A required service is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"headers":{"Retry-After":{"description":"Suggested delay in seconds before a safe retry is considered.","schema":{"type":"integer","minimum":0}}}}},"security":[{"PrincipalSessionHeader":[]},{"PrincipalSessionCookie":[]}]}},"/api/v2/lessons/{lesson_id}":{"get":{"tags":["learning"],"summary":"Get Lesson","description":"Возвращает доступную версию занятия по lesson_id. Для сохранённого состава уже начатого\nпрохождения используйте LessonRun: новые публикации не заменяют его закреплённые задания.","operationId":"get_lesson_api_v2_lessons__lesson_id__get","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/LessonResponse"}}}},"422":{"description":"The request is structurally or semantically invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"The authenticated principal is not allowed to perform this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"The operation conflicts with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"A required service is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"headers":{"Retry-After":{"description":"Suggested delay in seconds before a safe retry is considered.","schema":{"type":"integer","minimum":0}}}}},"security":[{"PrincipalSessionHeader":[]},{"PrincipalSessionCookie":[]}]}},"/api/v2/subjects/{subject_id}/exam-variants":{"get":{"tags":["learning"],"summary":"List Exam Variants","description":"Возвращает страницу опубликованных экзаменационных вариантов предмета. Идентификатор версии\nиспользуется как источник запуска; сам источник exam_variant не переопределяет выбранный\nrun_mode.","operationId":"list_exam_variants_api_v2_subjects__subject_id__exam_variants_get","parameters":[{"name":"subject_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Subject Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExamVariantPage"}}}},"422":{"description":"The request is structurally or semantically invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"The authenticated principal is not allowed to perform this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"The resource is unavailable or hidden by an ownership boundary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"A required service is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"headers":{"Retry-After":{"description":"Suggested delay in seconds before a safe retry is considered.","schema":{"type":"integer","minimum":0}}}}},"security":[{"PrincipalSessionHeader":[]},{"PrincipalSessionCookie":[]}]}},"/api/v2/lesson-tasks/{lesson_task_id}/assets/{asset_key}/content":{"get":{"tags":["learning"],"summary":"Get Lesson Task Asset","description":"Возвращает разрешённое изображение задания после проверки владельца и доступа. Свои уже\nоткрытые материалы доступны после закрытия доступа; ограничения экзамена и раскрытия решения\nсохраняются. Авторизация выполняется до 304 по If-None-Match.","operationId":"get_lesson_task_asset_api_v2_lesson_tasks__lesson_task_id__assets__asset_key__content_get","parameters":[{"name":"lesson_task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Lesson Task Id"}},{"name":"asset_key","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,63}$","title":"Asset Key"}},{"name":"If-None-Match","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"If-None-Match"}}],"responses":{"200":{"description":"Verified private task asset bytes.","content":{"image/png":{},"image/jpeg":{},"image/webp":{},"image/gif":{},"image/svg+xml":{}}},"304":{"description":"The authorized exact asset matches If-None-Match."},"422":{"description":"The request is structurally or semantically invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"The authenticated principal is not allowed to perform this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"The resource is unavailable or hidden by an ownership boundary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"A required service is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"headers":{"Retry-After":{"description":"Suggested delay in seconds before a safe retry is considered.","schema":{"type":"integer","minimum":0}}}}},"security":[{"PrincipalSessionHeader":[]},{"PrincipalSessionCookie":[]}]}},"/api/v2/lesson-run-tasks/{lesson_run_task_id}/assets/{asset_key}/content":{"get":{"tags":["learning"],"summary":"Get Lesson Run Task Asset","description":"Возвращает разрешённое изображение закреплённого задания LessonRun. Исторический доступ\nтребует подтверждённого открытия попыткой или сохранённой связью сообщения. GET не открывает\nматериал; проверка доступа предшествует 304.","operationId":"get_lesson_run_task_asset_api_v2_lesson_run_tasks__lesson_run_task_id__assets__asset_key__content_get","parameters":[{"name":"lesson_run_task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Lesson Run Task Id"}},{"name":"asset_key","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,63}$","title":"Asset Key"}},{"name":"If-None-Match","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"If-None-Match"}}],"responses":{"200":{"description":"Verified private selected-task asset bytes.","content":{"image/png":{},"image/jpeg":{},"image/webp":{},"image/gif":{},"image/svg+xml":{}}},"304":{"description":"The authorized exact asset matches If-None-Match."},"422":{"description":"The request is structurally or semantically invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"The authenticated principal is not allowed to perform this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"The resource is unavailable or hidden by an ownership boundary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"A required service is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"headers":{"Retry-After":{"description":"Suggested delay in seconds before a safe retry is considered.","schema":{"type":"integer","minimum":0}}}}},"security":[{"PrincipalSessionHeader":[]},{"PrincipalSessionCookie":[]}]}},"/api/v2/lesson-runs":{"post":{"tags":["learning"],"summary":"Start Run","description":"Создаёт прохождение и открывает первое задание (201) либо продолжает прежнее (200).\nrun_mode: training — обучение, exam — экзамен независимо от источника. Возвращает полное\nсодержимое снимка: variant.tasks, lesson.tasks либо tasks. Требуется Idempotency-Key.\nЗапуск не вызывает ИИ. Экзамен без обязательных заданий role=exam даёт 409 lesson_tasks_missing.\nНовые open_response оценивает агент по закреплённым solution_content и rubric_content;\nостальные типы и старые проверки сохраняют сравнение с эталонами. Отсутствие канона не\nблокирует запуск, но новая проверка open_response завершится ошибкой без баллов.","operationId":"start_run_api_v2_lesson_runs_post","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":255,"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartRunPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunResponse"}}}},"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunResponse"}}},"description":"Created"},"422":{"description":"The request is structurally or semantically invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"The authenticated principal is not allowed to perform this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"The resource is unavailable or hidden by an ownership boundary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"The operation conflicts with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"A required service is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"headers":{"Retry-After":{"description":"Suggested delay in seconds before a safe retry is considered.","schema":{"type":"integer","minimum":0}}}}},"security":[{"PrincipalSessionHeader":[]},{"PrincipalSessionCookie":[]}]}},"/api/v2/lesson-runs/results":{"get":{"tags":["learning"],"summary":"List Results","description":"Возвращает историю доступных официальных результатов текущего пользователя с limit/cursor.\nУчебные training-прохождения не создают официальный экзаменационный результат.","operationId":"list_results_api_v2_lesson_runs_results_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"The authenticated principal is not allowed to perform this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"A required service is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"headers":{"Retry-After":{"description":"Suggested delay in seconds before a safe retry is considered.","schema":{"type":"integer","minimum":0}}}}},"security":[{"PrincipalSessionHeader":[]},{"PrincipalSessionCookie":[]}]}},"/api/v2/lesson-runs/{run_id}":{"get":{"tags":["learning"],"summary":"Get Run","description":"Читает собственный LessonRun, его попытки и прогресс без создания новых сущностей. submitted\nозначает закрытый ввод при незавершённой проверке; completed — завершение. Неизвестные и\nскрытые экзаменационные оценки возвращаются как null.","operationId":"get_run_api_v2_lesson_runs__run_id__get","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"The authenticated principal is not allowed to perform this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"The resource is unavailable or hidden by an ownership boundary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"The operation conflicts with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"A required service is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"headers":{"Retry-After":{"description":"Suggested delay in seconds before a safe retry is considered.","schema":{"type":"integer","minimum":0}}}}},"security":[{"PrincipalSessionHeader":[]},{"PrincipalSessionCookie":[]}]}},"/api/v2/lesson-runs/{run_id}/task-attempts":{"post":{"tags":["learning"],"summary":"Open Attempt","description":"Открывает или продолжает попытку внутри собственного LessonRun. Необязательный\nlesson_run_task_id выбирает задание из закреплённого состава; без него применяется общий\nвыбор: выбранное допустимое задание, активная попытка, первое задание без попытки. К\nпропуску можно вернуться до сдачи; принятый экзаменационный ответ изменить нельзя. Требуется\nIdempotency-Key.","operationId":"open_attempt_api_v2_lesson_runs__run_id__task_attempts_post","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":255,"title":"Idempotency-Key"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/OpenAttemptPayload"},{"type":"null"}],"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttemptResponse"}}}},"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttemptResponse"}}},"description":"Created"},"422":{"description":"The request is structurally or semantically invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"The authenticated principal is not allowed to perform this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"The resource is unavailable or hidden by an ownership boundary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"The operation conflicts with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"A required service is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"headers":{"Retry-After":{"description":"Suggested delay in seconds before a safe retry is considered.","schema":{"type":"integer","minimum":0}}}}},"security":[{"PrincipalSessionHeader":[]},{"PrincipalSessionCookie":[]}]}},"/api/v2/lesson-runs/{run_id}/messages":{"get":{"tags":["learning"],"summary":"List Messages","description":"Восстанавливает учебный экран: run с вложенным содержимым, chat_session, items, current_task, interaction,\nresult. GET ничего не создаёт. view=latest возвращает последние сообщения в порядке чтения,\nnext_cursor загружает более ранние страницы; сохраняйте view при продолжении. Без view\nдействует прежняя пагинация. limit: 1–200, по умолчанию 100; несовместимый курсор даёт 422.\nСостояние занятия актуально и для старой страницы. has_pending_response учитывает весь чат.\nЭталоны доступны через revealed_solution только после раскрытия в обучении; экзамен их не\nвыдаёт. Ответ private, no-store.","operationId":"list_messages_api_v2_lesson_runs__run_id__messages_get","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":100,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Cursor"}},{"name":"view","in":"query","required":false,"schema":{"anyOf":[{"const":"latest","type":"string"},{"type":"null"}],"title":"View"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LearningScreenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"The authenticated principal is not allowed to perform this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"The resource is unavailable or hidden by an ownership boundary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"A required service is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"headers":{"Retry-After":{"description":"Suggested delay in seconds before a safe retry is considered.","schema":{"type":"integer","minimum":0}}}}},"security":[{"PrincipalSessionHeader":[]},{"PrincipalSessionCookie":[]}]},"post":{"tags":["learning"],"summary":"Send Message","description":"Отправляет текстовый вопрос ИИ в прежний чат активного учебного занятия и возвращает 202 с\nидентификатором сообщения. Не является официальным ответом на задание. В экзамене учебный\nчат отключён. Использует настроенный model_runtime и требует Idempotency-Key; события\nчитаются по chat_session.id.","operationId":"send_message_api_v2_lesson_runs__run_id__messages_post","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":255,"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessagePayload"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueuedMessageResponse"}}}},"422":{"description":"The request is structurally or semantically invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"The authenticated principal is not allowed to perform this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"The resource is unavailable or hidden by an ownership boundary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"The operation conflicts with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"A required service is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"headers":{"Retry-After":{"description":"Suggested delay in seconds before a safe retry is considered.","schema":{"type":"integer","minimum":0}}}}},"security":[{"PrincipalSessionHeader":[]},{"PrincipalSessionCookie":[]}]}},"/api/v2/lesson-runs/{run_id}/task-attempts/{attempt_id}/answers":{"post":{"tags":["learning"],"summary":"Submit Answer","description":"Принимает официальный ответ внутри попытки и LessonRun. Новые open_response оценивает\nагент по solution_content и rubric_content закреплённой версии, с частичными целыми\nбаллами 0..max_points. Ответ сохраняется до проверки; POST ждёт до 30 секунд после commit.\nPending/queued возвращаются с 202; completed/failed/unknown — с 200. При ошибке баллы\nостаются null. Оценка, feedback и criteria новых проверок доступны сразу в обоих режимах.\nВ экзамене первый принятый ответ окончательный. Idempotency-Key возвращает текущее\nсостояние именно сохранённого ответа. Остальные типы и старые проверки сохраняют\nканоническое сравнение и прежние правила видимости.","operationId":"submit_answer_api_v2_lesson_runs__run_id__task_attempts__attempt_id__answers_post","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}},{"name":"attempt_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Attempt Id"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":255,"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnswerPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnswerResponse"}}}},"202":{"description":"Accepted answer with a persisted pending or queued grading state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnswerResponse"}}}},"422":{"description":"The request is structurally or semantically invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"The authenticated principal is not allowed to perform this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"The resource is unavailable or hidden by an ownership boundary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"The operation conflicts with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"A required service is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"headers":{"Retry-After":{"description":"Suggested delay in seconds before a safe retry is considered.","schema":{"type":"integer","minimum":0}}}}},"security":[{"PrincipalSessionHeader":[]},{"PrincipalSessionCookie":[]}]}},"/api/v2/lesson-runs/{run_id}/task-attempts/{attempt_id}/hint":{"post":{"tags":["learning"],"summary":"Take Hint","description":"Выдаёт подсказку только в обучении. Сохранённый hint возвращается сразу; при его отсутствии\nсуществующий runtime генерирует подсказку (202). Помощь фиксируется при успешном получении,\nошибка генерации не считается помощью. Требуется Idempotency-Key.","operationId":"take_hint_api_v2_lesson_runs__run_id__task_attempts__attempt_id__hint_post","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}},{"name":"attempt_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Attempt Id"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":255,"title":"Idempotency-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HintResponse"}}}},"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HintResponse"}}},"description":"Accepted"},"422":{"description":"The request is structurally or semantically invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"The authenticated principal is not allowed to perform this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"The resource is unavailable or hidden by an ownership boundary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"The operation conflicts with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"A required service is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"headers":{"Retry-After":{"description":"Suggested delay in seconds before a safe retry is considered.","schema":{"type":"integer","minimum":0}}}}},"security":[{"PrincipalSessionHeader":[]},{"PrincipalSessionCookie":[]}]}},"/api/v2/lesson-runs/{run_id}/finalize":{"post":{"tags":["learning"],"summary":"Finalize Run","description":"Закрывает ввод занятия. В обучении допускает помощь и пропуски, result=null. В экзамене\nучитывает только обязательные role=exam из снимка; неотвеченные задания дают 0. Если\nпроверки завершены, создаёт единственный результат (201); при ожидании возвращает submitted\nи 202. Повторная сдача не создаёт второй результат. Требуется Idempotency-Key; актуальное\nсостояние читайте отдельным GET.","operationId":"finalize_run_api_v2_lesson_runs__run_id__finalize_post","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":255,"title":"Idempotency-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinalizeRunResponse"}}}},"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinalizeRunResponse"}}},"description":"Created"},"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinalizeRunResponse"}}},"description":"Accepted"},"422":{"description":"The request is structurally or semantically invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"The authenticated principal is not allowed to perform this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"The resource is unavailable or hidden by an ownership boundary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"The operation conflicts with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"A required service is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"headers":{"Retry-After":{"description":"Suggested delay in seconds before a safe retry is considered.","schema":{"type":"integer","minimum":0}}}}},"security":[{"PrincipalSessionHeader":[]},{"PrincipalSessionCookie":[]}]}},"/api/v2/lesson-runs/{run_id}/result":{"get":{"tags":["learning"],"summary":"Get Result","description":"Возвращает готовый официальный результат собственного LessonRun. Пока доступного результата\nнет — 404; на учебном экране result остаётся null. passed означает полный балл платформы, а\nне официальную сдачу ЕГЭ. Экзаменационные эталоны и разбор не возвращаются.","operationId":"get_result_api_v2_lesson_runs__run_id__result_get","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"The authenticated principal is not allowed to perform this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"The resource is unavailable or hidden by an ownership boundary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"A required service is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"headers":{"Retry-After":{"description":"Suggested delay in seconds before a safe retry is considered.","schema":{"type":"integer","minimum":0}}}}},"security":[{"PrincipalSessionHeader":[]},{"PrincipalSessionCookie":[]}]}},"/api/v2/lesson-runs/{run_id}/reinforcement-runs":{"post":{"tags":["learning"],"summary":"Start Reinforcement","description":"Создаёт отдельный учебный LessonRun по готовому официальному результату исходного\nзанятия: earned_points меньше max_points, включая пропуски. Без результата возвращает\n409 lesson_result_not_ready; training не создаёт официальный результат. Сохраняет закреплённый контент\nи не меняет исходный результат. Поддерживает разные источники занятий; требуется\nIdempotency-Key.","operationId":"start_reinforcement_api_v2_lesson_runs__run_id__reinforcement_runs_post","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":255,"title":"Idempotency-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunResponse"}}}},"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunResponse"}}},"description":"Created"},"422":{"description":"The request is structurally or semantically invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"The authenticated principal is not allowed to perform this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"The resource is unavailable or hidden by an ownership boundary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"The operation conflicts with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"A required service is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"headers":{"Retry-After":{"description":"Suggested delay in seconds before a safe retry is considered.","schema":{"type":"integer","minimum":0}}}}},"security":[{"PrincipalSessionHeader":[]},{"PrincipalSessionCookie":[]}]}},"/api/v2/lesson-runs/{run_id}/task-attempts/{attempt_id}/messages/{message_id}/feedback":{"put":{"tags":["learning"],"summary":"Put Feedback","description":"Сохраняет оценку сообщения: 1 или -1. Это мнение о сообщении, а не баллы за задание.\nПроверяет принадлежность сообщения, попытки и LessonRun владельцу и проекту; возвращает 201\nпри создании оценки или 200 при обновлении.","operationId":"put_feedback_api_v2_lesson_runs__run_id__task_attempts__attempt_id__messages__message_id__feedback_put","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}},{"name":"attempt_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Attempt Id"}},{"name":"message_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Message Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackResponse"}}}},"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackResponse"}}},"description":"Created"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"The authenticated principal is not allowed to perform this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"The resource is unavailable or hidden by an ownership boundary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"A required service is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"headers":{"Retry-After":{"description":"Suggested delay in seconds before a safe retry is considered.","schema":{"type":"integer","minimum":0}}}}},"security":[{"PrincipalSessionHeader":[]},{"PrincipalSessionCookie":[]}]}},"/api/v2/lesson-runs/{run_id}/task-attempts/{attempt_id}/solution":{"post":{"tags":["learning"],"summary":"Reveal Solution","description":"Раскрывает сохранённый эталон и решение только в обучении. Сразу завершает попытку с\nпомощью, без переписывания эталона в answer, и позволяет идти дальше. Учебный экран затем\nвозвращает revealed_solution. В экзамене операция запрещена. Требуется Idempotency-Key.","operationId":"reveal_solution_api_v2_lesson_runs__run_id__task_attempts__attempt_id__solution_post","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}},{"name":"attempt_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Attempt Id"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":255,"title":"Idempotency-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SolutionResponse"}}}},"422":{"description":"The request is structurally or semantically invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"The authenticated principal is not allowed to perform this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"The resource is unavailable or hidden by an ownership boundary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"The operation conflicts with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"A required service is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"headers":{"Retry-After":{"description":"Suggested delay in seconds before a safe retry is considered.","schema":{"type":"integer","minimum":0}}}}},"security":[{"PrincipalSessionHeader":[]},{"PrincipalSessionCookie":[]}]}},"/api/v2/lesson-runs/{run_id}/task-attempts/{attempt_id}/skip":{"post":{"tags":["learning"],"summary":"Skip Attempt","description":"Пропускает задание внутри активного занятия. Его можно выбрать и открыть снова до сдачи;\nотправленный экзаменационный ответ не становится редактируемым. Требуется Idempotency-Key.","operationId":"skip_attempt_api_v2_lesson_runs__run_id__task_attempts__attempt_id__skip_post","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}},{"name":"attempt_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Attempt Id"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":255,"title":"Idempotency-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttemptResponse"}}}},"422":{"description":"The request is structurally or semantically invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"The authenticated principal is not allowed to perform this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"The resource is unavailable or hidden by an ownership boundary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"The operation conflicts with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"A required service is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"headers":{"Retry-After":{"description":"Suggested delay in seconds before a safe retry is considered.","schema":{"type":"integer","minimum":0}}}}},"security":[{"PrincipalSessionHeader":[]},{"PrincipalSessionCookie":[]}]}},"/api/v2/lesson-runs/{run_id}/task-attempts/{attempt_id}/grading-retries":{"post":{"tags":["learning"],"summary":"Retry Grading","description":"Повторяет failed-проверку того же ответа без новой попытки ученика. Новый open_response\nпроверяется агентом по сохранённому снимку эталона и шкалы; старые проверки сохраняют\nпрежний алгоритм. Idempotency-Key возвращает текущее состояние именно сохранённого ответа\nбез нового вызова. Pending/queued — 202; completed/failed/unknown — 200.","operationId":"retry_grading_api_v2_lesson_runs__run_id__task_attempts__attempt_id__grading_retries_post","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}},{"name":"attempt_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Attempt Id"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":255,"title":"Idempotency-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnswerResponse"}}}},"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnswerResponse"}}},"description":"Accepted"},"422":{"description":"The request is structurally or semantically invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"The authenticated principal is not allowed to perform this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"The resource is unavailable or hidden by an ownership boundary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"The operation conflicts with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"A required service is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"headers":{"Retry-After":{"description":"Suggested delay in seconds before a safe retry is considered.","schema":{"type":"integer","minimum":0}}}}},"security":[{"PrincipalSessionHeader":[]},{"PrincipalSessionCookie":[]}]}},"/api/v2/subjects/{subject_id}/tasks":{"post":{"tags":["curriculum-management"],"summary":"Create Task","description":"Создаёт задание предмета с его содержимым от авторизованного агента. Передавайте\nканонические ответы и содержимое по схеме запроса. Idempotency-Key защищает повтор команды;\nученик получает контент через учебные маршруты с ограничением эталонов.","operationId":"create_task_api_v2_subjects__subject_id__tasks_post","parameters":[{"name":"subject_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Subject Id"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":255,"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTaskRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__modules__curriculum__presentation__schemas__TaskResponse"}}}},"422":{"description":"The request is structurally or semantically invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"The authenticated principal is not allowed to perform this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"The resource is unavailable or hidden by an ownership boundary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"The operation conflicts with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"415":{"description":"The request media type is not supported by this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"A required service is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"headers":{"Retry-After":{"description":"Suggested delay in seconds before a safe retry is considered.","schema":{"type":"integer","minimum":0}}}}},"security":[{"AgentBearer":[]}]},"get":{"tags":["curriculum-management"],"summary":"List Tasks","description":"Возвращает страницу каталога заданий предмета для агента. Ученическому клиенту следует\nполучать закреплённый контент через LessonRun, где действуют ограничения выдачи эталонов.","operationId":"list_tasks_api_v2_subjects__subject_id__tasks_get","parameters":[{"name":"subject_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Subject Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Cursor"}},{"name":"topic_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Topic Id"}},{"name":"subtopic_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Subtopic Id"}},{"name":"skill_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Skill Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskPage"}}}},"422":{"description":"The request is structurally or semantically invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"The authenticated principal is not allowed to perform this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"The resource is unavailable or hidden by an ownership boundary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"A required service is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"headers":{"Retry-After":{"description":"Suggested delay in seconds before a safe retry is considered.","schema":{"type":"integer","minimum":0}}}}},"security":[{"AgentBearer":[]}]}},"/api/v2/subjects/{subject_id}/tasks:batchCreate":{"post":{"tags":["curriculum-management"],"summary":"Batch Create Tasks","description":"Создаёт набор заданий в одном предмете от авторизованного агента. Передавайте requests по\nсхеме и Idempotency-Key; результат содержит созданные задания. Это импорт контента, а не\nзапуск LessonRun.","operationId":"batch_create_tasks_api_v2_subjects__subject_id__tasks_batchCreate_post","parameters":[{"name":"subject_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Subject Id"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":255,"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchCreateTaskRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchTaskResponse"}}}},"422":{"description":"The request is structurally or semantically invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"The authenticated principal is not allowed to perform this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"The resource is unavailable or hidden by an ownership boundary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"The operation conflicts with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"415":{"description":"The request media type is not supported by this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"A required service is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"headers":{"Retry-After":{"description":"Suggested delay in seconds before a safe retry is considered.","schema":{"type":"integer","minimum":0}}}}},"security":[{"AgentBearer":[]}]}},"/api/v2/subjects/{subject_id}/tasks/{task_id}":{"get":{"tags":["curriculum-management"],"summary":"Get Task","description":"Возвращает авторизованному агенту задание общего каталога. Проверяется принадлежность\nуказанному предмету; этот служебный контракт не предназначен для показа ученику без фильтрации.","operationId":"get_task_api_v2_subjects__subject_id__tasks__task_id__get","parameters":[{"name":"subject_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Subject Id"}},{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__modules__curriculum__presentation__schemas__TaskResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"The authenticated principal is not allowed to perform this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"The resource is unavailable or hidden by an ownership boundary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"A required service is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"headers":{"Retry-After":{"description":"Suggested delay in seconds before a safe retry is considered.","schema":{"type":"integer","minimum":0}}}}},"security":[{"AgentBearer":[]}]}},"/api/v2/subjects/{subject_id}/fipi-topics":{"get":{"tags":["curriculum-management"],"summary":"List Fipi Topics","description":"Lists agent-authorized official FIPI topics with signed keyset pagination.","operationId":"list_fipi_topics_api_v2_subjects__subject_id__fipi_topics_get","parameters":[{"name":"subject_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Subject Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxonomyPage_FipiTopicResponse_"}}}},"422":{"description":"The request is structurally or semantically invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"The authenticated principal is not allowed to perform this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"The resource is unavailable or hidden by an ownership boundary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"A required service is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"headers":{"Retry-After":{"description":"Suggested delay in seconds before a safe retry is considered.","schema":{"type":"integer","minimum":0}}}}},"security":[{"AgentBearer":[]}]}},"/api/v2/subjects/{subject_id}/fipi-subtopics":{"get":{"tags":["curriculum-management"],"summary":"List Fipi Subtopics","description":"Lists agent-authorized editorial subtopics, optionally for one topic, by signed keyset page.","operationId":"list_fipi_subtopics_api_v2_subjects__subject_id__fipi_subtopics_get","parameters":[{"name":"subject_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Subject Id"}},{"name":"topic_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Topic Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxonomyPage_FipiSubtopicResponse_"}}}},"422":{"description":"The request is structurally or semantically invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"The authenticated principal is not allowed to perform this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"The resource is unavailable or hidden by an ownership boundary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"A required service is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"headers":{"Retry-After":{"description":"Suggested delay in seconds before a safe retry is considered.","schema":{"type":"integer","minimum":0}}}}},"security":[{"AgentBearer":[]}]}},"/api/v2/subjects/{subject_id}/skills":{"get":{"tags":["curriculum-management"],"summary":"List Skills","description":"Lists agent-authorized editorial skills by signed keyset page and stable UUID identity.","operationId":"list_skills_api_v2_subjects__subject_id__skills_get","parameters":[{"name":"subject_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Subject Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxonomyPage_SkillResponse_"}}}},"422":{"description":"The request is structurally or semantically invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"The authenticated principal is not allowed to perform this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"The resource is unavailable or hidden by an ownership boundary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"A required service is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"headers":{"Retry-After":{"description":"Suggested delay in seconds before a safe retry is considered.","schema":{"type":"integer","minimum":0}}}}},"security":[{"AgentBearer":[]}]}},"/api/v2/subjects/{subject_id}/fipi-subtopics/{subtopic_id}/skills":{"get":{"tags":["curriculum-management"],"summary":"List Subtopic Skills","description":"Lists an agent-authorized subtopic's editorial skill IDs by signed placement-order page.","operationId":"list_subtopic_skills_api_v2_subjects__subject_id__fipi_subtopics__subtopic_id__skills_get","parameters":[{"name":"subject_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Subject Id"}},{"name":"subtopic_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Subtopic Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxonomyPage_SkillResponse_"}}}},"422":{"description":"The request is structurally or semantically invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"The authenticated principal is not allowed to perform this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"The resource is unavailable or hidden by an ownership boundary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"A required service is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"headers":{"Retry-After":{"description":"Suggested delay in seconds before a safe retry is considered.","schema":{"type":"integer","minimum":0}}}}},"security":[{"AgentBearer":[]}]}},"/api/v2/content-assets":{"post":{"tags":["curriculum-management"],"summary":"Register Content Asset","description":"Регистрирует изображение контента по структурированным метаданным от агента.\nНовый ресурс возвращает 201, найденный дубликат — 200; replay сохраняет исходный статус. Требует\nIdempotency-Key; для отправки самого файла используйте content-assets:upload.","operationId":"register_content_asset_api_v2_content_assets_post","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":255,"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterContentAssetRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentAssetResponse"}}}},"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentAssetResponse"}}},"description":"OK"},"422":{"description":"The request is structurally or semantically invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"The authenticated principal is not allowed to perform this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"The operation conflicts with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"415":{"description":"The request media type is not supported by this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"A required service is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"headers":{"Retry-After":{"description":"Suggested delay in seconds before a safe retry is considered.","schema":{"type":"integer","minimum":0}}}}},"security":[{"AgentBearer":[]}]},"get":{"tags":["curriculum-management"],"summary":"List Content Assets","description":"Возвращает авторизованному агенту страницу ресурсов общего каталога контента,\nбез фильтрации по проекту. Это каталог метаданных;\nученические байты изображений выдаются отдельными маршрутами после проверки исторического\nдоступа.","operationId":"list_content_assets_api_v2_content_assets_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentAssetPage"}}}},"422":{"description":"The request is structurally or semantically invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"The authenticated principal is not allowed to perform this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"A required service is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"headers":{"Retry-After":{"description":"Suggested delay in seconds before a safe retry is considered.","schema":{"type":"integer","minimum":0}}}}},"security":[{"AgentBearer":[]}]}},"/api/v2/content-assets:upload":{"post":{"tags":["curriculum-management"],"summary":"Upload Content Asset","description":"Принимает файл изображения multipart/form-data от агента и сохраняет ресурс контента.\nНовый ресурс возвращает 201, найденный дубликат — 200; replay сохраняет исходный статус.\nПустой файл и неподдерживаемый MIME отклоняются. Требует\nIdempotency-Key.","operationId":"upload_content_asset_api_v2_content_assets_upload_post","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":255,"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_content_asset_api_v2_content_assets_upload_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentAssetResponse"}}}},"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentAssetResponse"}}},"description":"OK"},"422":{"description":"The request is structurally or semantically invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"The authenticated principal is not allowed to perform this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"The operation conflicts with the current resource state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"415":{"description":"The request media type is not supported by this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"A required service is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"headers":{"Retry-After":{"description":"Suggested delay in seconds before a safe retry is considered.","schema":{"type":"integer","minimum":0}}}}},"security":[{"AgentBearer":[]}]}},"/api/v2/content-assets/{asset_id}":{"get":{"tags":["curriculum-management"],"summary":"Get Content Asset","description":"Возвращает авторизованному агенту метаданные ресурса общего каталога по asset_id,\nбез фильтрации по проекту. Не заменяет\nавторизованную выдачу изображения ученику.","operationId":"get_content_asset_api_v2_content_assets__asset_id__get","parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Asset Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentAssetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"The authenticated principal is not allowed to perform this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"The resource is unavailable or hidden by an ownership boundary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"A required service is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"headers":{"Retry-After":{"description":"Suggested delay in seconds before a safe retry is considered.","schema":{"type":"integer","minimum":0}}}}},"security":[{"AgentBearer":[]}]}},"/api/v2/curriculum-imports/preflight":{"post":{"tags":["curriculum-imports"],"summary":"Preflight Curriculum Import","description":"Validates a DB-ready curriculum archive and compares it with the local database without storing the archive, writing curriculum rows, or creating an import job.","operationId":"preflight_curriculum_import_api_v2_curriculum_imports_preflight_post","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CurriculumImportPreflightResponse"}}}},"422":{"description":"The request is structurally or semantically invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"The authenticated principal is not allowed to perform this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"415":{"description":"The request media type is not supported by this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"A required service is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"headers":{"Retry-After":{"description":"Suggested delay in seconds before a safe retry is considered.","schema":{"type":"integer","minimum":0}}}}},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"file":{"type":"string","format":"binary","description":"DB-ready .tar.gz export archive."}}}}}},"security":[{"AgentBearer":[]}]}},"/api/v2/curriculum-imports":{"post":{"tags":["curriculum-imports"],"summary":"Create Curriculum Import","description":"Accepts a DB-ready curriculum export archive, stores the archive in object storage, and queues a background import job. The caller needs the curriculum import permission; the response contains the job id and a Location header for polling its status.","operationId":"create_curriculum_import_api_v2_curriculum_imports_post","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CurriculumImportJobResponse"}}}},"422":{"description":"The request is structurally or semantically invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"The authenticated principal is not allowed to perform this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"415":{"description":"The request media type is not supported by this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"A required service is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"headers":{"Retry-After":{"description":"Suggested delay in seconds before a safe retry is considered.","schema":{"type":"integer","minimum":0}}}}},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"file":{"type":"string","format":"binary","description":"DB-ready .tar.gz export archive."}}}}}},"security":[{"AgentBearer":[]}]}},"/api/v2/curriculum-imports/{curriculum_import_id}":{"get":{"tags":["curriculum-imports"],"summary":"Get Curriculum Import","description":"Returns the current state of a curriculum import job created by the runtime import endpoint, including the completed result or safe error code when the job has finished.","operationId":"get_curriculum_import_api_v2_curriculum_imports__curriculum_import_id__get","parameters":[{"name":"curriculum_import_id","in":"path","required":true,"schema":{"type":"string","title":"Curriculum Import Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CurriculumImportJobResponse"}}}},"422":{"description":"The request is structurally or semantically invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"The authenticated principal is not allowed to perform this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"The resource is unavailable or hidden by an ownership boundary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"A required service is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"headers":{"Retry-After":{"description":"Suggested delay in seconds before a safe retry is considered.","schema":{"type":"integer","minimum":0}}}}},"security":[{"AgentBearer":[]}]}},"/api/v2/curriculum-imports/{curriculum_import_id}/events":{"get":{"tags":["curriculum-imports"],"summary":"Get Curriculum Import Events","description":"Returns the owner-scoped ordered event journal for one curriculum import. The cursor is signed and bound to the path job ID, project, claimed agent scope and endpoint mode. Successful and error responses use `Cache-Control: no-store`.","operationId":"get_curriculum_import_events_api_v2_curriculum_imports__curriculum_import_id__events_get","parameters":[{"name":"curriculum_import_id","in":"path","required":true,"schema":{"type":"string","title":"Curriculum Import Id"},"description":"UUID of the owner-scoped curriculum import job."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"},"description":"Number of events to return (1-200; default 50)."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Cursor"},"description":"Signed keyset cursor bound to this job ID and agent scope."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CurriculumImportJournalPage"}}},"headers":{"Cache-Control":{"description":"Responses are never cacheable because journal data is agent-scoped.","schema":{"type":"string","enum":["no-store"]}}}},"422":{"description":"Invalid parameters or signed cursor (`cursor_invalid`, `filter_invalid`, or `curriculum_import_id_invalid`) with safe error detail.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"headers":{"Cache-Control":{"description":"Responses are never cacheable because journal data is agent-scoped.","schema":{"type":"string","enum":["no-store"]}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"headers":{"Cache-Control":{"description":"Responses are never cacheable because journal data is agent-scoped.","schema":{"type":"string","enum":["no-store"]}}}},"403":{"description":"The authenticated principal is not allowed to perform this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"headers":{"Cache-Control":{"description":"Responses are never cacheable because journal data is agent-scoped.","schema":{"type":"string","enum":["no-store"]}}}},"404":{"description":"The resource is unavailable or hidden by an ownership boundary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"headers":{"Cache-Control":{"description":"Responses are never cacheable because journal data is agent-scoped.","schema":{"type":"string","enum":["no-store"]}}}},"503":{"description":"A required service is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"headers":{"Retry-After":{"description":"Suggested delay in seconds before a safe retry is considered.","schema":{"type":"integer","minimum":0}},"Cache-Control":{"description":"Responses are never cacheable because journal data is agent-scoped.","schema":{"type":"string","enum":["no-store"]}}}}},"security":[{"AgentBearer":[]}]}},"/api/v2/curriculum-import-events":{"get":{"tags":["curriculum-imports"],"summary":"List Curriculum Import Events","description":"Returns owner-scoped curriculum import events and compact job summaries. Repeatable `job_id` parameters and all supplied field/time filters are applied as one request (field/time filters combine with AND semantics). An explicit job ID list is all-or-nothing; the signed cursor embeds the project/agent scope and complete filter fingerprint. Successful and error responses use `Cache-Control: no-store`.","operationId":"list_curriculum_import_events_api_v2_curriculum_import_events_get","parameters":[{"name":"job_id","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"title":"Job Id"},"description":"Repeatable import job UUID filter; duplicate values are deduplicated and the explicit set is all-or-nothing.","style":"form","explode":true},{"name":"correlation_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}],"title":"Correlation Id"},"description":"Exact stable job correlation identifier filter."},{"name":"action","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":100},{"type":"null"}],"title":"Action"},"description":"Exact normalized event action filter."},{"name":"stage","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":100},{"type":"null"}],"title":"Stage"},"description":"Exact normalized event stage filter."},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":32},{"type":"null"}],"title":"Status"},"description":"Exact normalized event status filter."},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":16},{"type":"null"}],"title":"State"},"description":"Import job state filter (`pending`, `running`, `succeeded`, or `failed`)."},{"name":"attempt","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"title":"Attempt"},"description":"Worker attempt number filter (minimum 1)."},{"name":"created_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created From"},"description":"Inclusive event creation timestamp lower bound."},{"name":"created_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created To"},"description":"Exclusive event creation timestamp upper bound."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Cursor"},"description":"Signed keyset cursor bound to scope, ordering and every active filter."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"},"description":"Number of events to return (1-200; default 50)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CurriculumImportEventsPage"}}},"headers":{"Cache-Control":{"description":"Responses are never cacheable because journal data is agent-scoped.","schema":{"type":"string","enum":["no-store"]}}}},"422":{"description":"Invalid parameters or signed cursor (`cursor_invalid`, `filter_invalid`, or `curriculum_import_id_invalid`) with safe error detail.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"headers":{"Cache-Control":{"description":"Responses are never cacheable because journal data is agent-scoped.","schema":{"type":"string","enum":["no-store"]}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"headers":{"Cache-Control":{"description":"Responses are never cacheable because journal data is agent-scoped.","schema":{"type":"string","enum":["no-store"]}}}},"403":{"description":"The authenticated principal is not allowed to perform this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"headers":{"Cache-Control":{"description":"Responses are never cacheable because journal data is agent-scoped.","schema":{"type":"string","enum":["no-store"]}}}},"404":{"description":"The resource is unavailable or hidden by an ownership boundary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"headers":{"Cache-Control":{"description":"Responses are never cacheable because journal data is agent-scoped.","schema":{"type":"string","enum":["no-store"]}}}},"503":{"description":"A required service is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"headers":{"Retry-After":{"description":"Suggested delay in seconds before a safe retry is considered.","schema":{"type":"integer","minimum":0}},"Cache-Control":{"description":"Responses are never cacheable because journal data is agent-scoped.","schema":{"type":"string","enum":["no-store"]}}}}},"security":[{"AgentBearer":[]}]}},"/api/v2/model-runtime/provider-endpoints":{"post":{"tags":["model-runtime"],"summary":"Create Provider Endpoint","description":"Создаёт неизменяемую версию endpoint провайдера через служебную авторизацию Agent Bearer.\nРегистрация endpoint сама по себе не активирует policy/binding и не меняет провайдера\nсуществующего чата. Секреты провайдера не возвращаются.","operationId":"create_provider_endpoint_api_v2_model_runtime_provider_endpoints_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProviderEndpointRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderEndpointResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"A required service is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"headers":{"Retry-After":{"description":"Suggested delay in seconds before a safe retry is considered.","schema":{"type":"integer","minimum":0}}}}},"security":[{"AgentBearer":[]}]}},"/api/v2/model-runtime/provider-endpoints/{endpoint_id}":{"get":{"tags":["model-runtime"],"summary":"Get Provider Endpoint","description":"Читает сохранённую конфигурацию endpoint провайдера по служебному Agent Bearer. Не проверяет\nработоспособность внешнего провайдера и не возвращает его секреты.","operationId":"get_provider_endpoint_api_v2_model_runtime_provider_endpoints__endpoint_id__get","parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Endpoint Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderEndpointResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"The resource is unavailable or hidden by an ownership boundary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"503":{"description":"A required service is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}},"headers":{"Retry-After":{"description":"Suggested delay in seconds before a safe retry is considered.","schema":{"type":"integer","minimum":0}}}}},"security":[{"AgentBearer":[]}]}}},"components":{"schemas":{"ActivityLogResponseSchema":{"properties":{"id":{"type":"string","title":"Id"},"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id"},"actor_type":{"type":"string","title":"Actor Type"},"actor_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actor Ref"},"type":{"type":"string","title":"Type"},"action":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action"},"status":{"type":"string","title":"Status"},"message":{"type":"string","title":"Message"},"resource_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resource Type"},"resource_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resource Id"},"http_status_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Http Status Code"},"correlation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Correlation Id"},"file":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File"},"line":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Line"},"context":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Context"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","project_id","actor_type","actor_ref","type","action","status","message","resource_type","resource_id","file","line","context","created_at","updated_at"],"title":"ActivityLogResponseSchema"},"AiPersonaResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"key":{"type":"string","maxLength":64,"minLength":1,"title":"Key"},"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"avatar_key":{"type":"string","maxLength":128,"minLength":1,"title":"Avatar Key"},"sort_order":{"type":"integer","minimum":0.0,"title":"Sort Order"},"is_default":{"type":"boolean","title":"Is Default"}},"type":"object","required":["id","key","name","avatar_key","sort_order","is_default"],"title":"AiPersonaResponse"},"AnswerPayload":{"properties":{"answer":{"items":{"type":"string","minLength":1},"type":"array","minItems":1,"title":"Answer"}},"additionalProperties":false,"type":"object","required":["answer"],"title":"AnswerPayload"},"AnswerResponse":{"properties":{"grading_method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Grading Method"},"grading_status":{"type":"string","enum":["pending","queued","completed","failed","unknown"],"title":"Grading Status"},"is_correct":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Correct"},"earned_points":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Earned Points"},"max_points":{"type":"integer","title":"Max Points"},"feedback":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Feedback"},"criteria":{"anyOf":[{"items":{"$ref":"#/components/schemas/GradingCriterionResponse"},"type":"array"},{"type":"null"}],"title":"Criteria"},"grading_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Grading Error"},"answer_id":{"type":"string","format":"uuid","title":"Answer Id"},"status":{"type":"string","const":"accepted","title":"Status","default":"accepted"},"mastered":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Mastered"},"wrong_answer_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Wrong Answer Count"},"hint_used":{"type":"boolean","title":"Hint Used"},"solution_revealed":{"type":"boolean","title":"Solution Revealed","default":false}},"type":"object","required":["grading_status","is_correct","earned_points","max_points","feedback","answer_id","mastered","wrong_answer_count","hint_used"],"title":"AnswerResponse"},"AttemptResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"lesson_task_id":{"type":"string","format":"uuid","title":"Lesson Task Id"},"lesson_run_task_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Lesson Run Task Id"},"chat_session_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Chat Session Id"},"status":{"type":"string","enum":["active","mastered","assisted","submitted","skipped"],"title":"Status"},"wrong_answer_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Wrong Answer Count"},"hint_used":{"type":"boolean","title":"Hint Used"},"earned_points":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Earned Points"},"solution_revealed":{"type":"boolean","title":"Solution Revealed","default":false},"hint_status":{"type":"string","title":"Hint Status","default":"none"}},"type":"object","required":["id","lesson_task_id","status","wrong_answer_count","hint_used","earned_points"],"title":"AttemptResponse"},"BatchCreateTaskRequest":{"properties":{"requests":{"items":{"$ref":"#/components/schemas/CreateTaskRequest"},"type":"array","minItems":1,"title":"Requests"}},"additionalProperties":false,"type":"object","required":["requests"],"title":"BatchCreateTaskRequest"},"BatchTaskResponse":{"properties":{"tasks":{"items":{"$ref":"#/components/schemas/app__modules__curriculum__presentation__schemas__TaskResponse"},"type":"array","title":"Tasks"}},"type":"object","required":["tasks"],"title":"BatchTaskResponse"},"Body_upload_content_asset_api_v2_content_assets_upload_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_content_asset_api_v2_content_assets_upload_post"},"BroadcastAuthResponseSchema":{"properties":{"project_id":{"type":"string","title":"Project Id"},"agent_key":{"type":"string","title":"Agent Key"},"channel":{"type":"string","title":"Channel"},"ws_path":{"type":"string","title":"Ws Path"},"events":{"items":{"type":"string"},"type":"array","title":"Events"}},"type":"object","required":["project_id","agent_key","channel","ws_path","events"],"title":"BroadcastAuthResponseSchema"},"CategoryResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"title":{"type":"string","title":"Title"},"position":{"type":"integer","title":"Position"}},"type":"object","required":["id","title","position"],"title":"CategoryResponse"},"ChatEventSchema":{"properties":{"id":{"type":"string","title":"Id"},"job_id":{"type":"string","title":"Job Id"},"type":{"type":"string","title":"Type"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"text":{"type":"string","title":"Text"},"data":{"additionalProperties":true,"type":"object","title":"Data"},"format":{"type":"string","title":"Format"},"artifact":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Artifact"}},"type":"object","required":["id","job_id","type","created_at","text","data","format"],"title":"ChatEventSchema"},"ChatEventsResponseSchema":{"properties":{"events":{"items":{"$ref":"#/components/schemas/ChatEventSchema"},"type":"array","title":"Events"},"next_after_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next After Id"}},"type":"object","required":["events"],"title":"ChatEventsResponseSchema"},"ChatEventsWebSocketTicketResponseSchema":{"properties":{"ticket":{"type":"string","title":"Ticket"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"expires_in_seconds":{"type":"integer","title":"Expires In Seconds"}},"type":"object","required":["ticket","expires_at","expires_in_seconds"],"title":"ChatEventsWebSocketTicketResponseSchema"},"ChatMessageResponseSchema":{"properties":{"job_id":{"type":"string","title":"Job Id"},"session_id":{"type":"string","title":"Session Id"},"status":{"type":"string","title":"Status"},"created":{"type":"boolean","title":"Created"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"events":{"items":{"$ref":"#/components/schemas/ChatEventSchema"},"type":"array","title":"Events"},"next_after_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next After Id"},"message_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message Id"},"assistant_message_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assistant Message Id"},"active_job_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Active Job Id"},"is_generating":{"type":"boolean","title":"Is Generating","default":false},"last_event_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Event Id"}},"type":"object","required":["job_id","session_id","status","created","events"],"title":"ChatMessageResponseSchema"},"ChatSessionActionResponseSchema":{"properties":{"status":{"type":"string","title":"Status"},"session":{"$ref":"#/components/schemas/ChatSessionSchema"},"events":{"items":{"$ref":"#/components/schemas/ChatEventSchema"},"type":"array","title":"Events"},"next_after_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next After Id"}},"type":"object","required":["status","session","events"],"title":"ChatSessionActionResponseSchema"},"ChatSessionListResponseSchema":{"properties":{"sessions":{"items":{"$ref":"#/components/schemas/ChatSessionSchema"},"type":"array","title":"Sessions"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["sessions"],"title":"ChatSessionListResponseSchema"},"ChatSessionResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"has_pending_response":{"type":"boolean","title":"Has Pending Response"}},"type":"object","required":["id","title","has_pending_response"],"title":"ChatSessionResponse"},"ChatSessionResponseSchema":{"properties":{"session":{"$ref":"#/components/schemas/ChatSessionSchema"},"events":{"items":{"$ref":"#/components/schemas/ChatEventSchema"},"type":"array","title":"Events"},"next_after_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next After Id"}},"type":"object","required":["session","events"],"title":"ChatSessionResponseSchema"},"ChatSessionSchema":{"properties":{"session_id":{"type":"string","title":"Session Id"},"status":{"type":"string","title":"Status"},"last_activity_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Activity At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Archived At"},"last_message_preview":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Message Preview"},"active_job_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Active Job Id"},"is_generating":{"type":"boolean","title":"Is Generating","default":false},"last_event_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Event Id"},"message_count":{"type":"integer","title":"Message Count","default":0}},"type":"object","required":["session_id","status","created_at","updated_at"],"title":"ChatSessionSchema"},"ContentAssetPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ContentAssetResponse"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items","next_cursor"],"title":"ContentAssetPage"},"ContentAssetResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"mime_type":{"type":"string","title":"Mime Type"},"byte_size":{"type":"integer","title":"Byte Size"},"sha256":{"type":"string","title":"Sha256"},"provider_etag":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Etag"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","mime_type","byte_size","sha256","provider_etag","created_at"],"title":"ContentAssetResponse"},"CounterpartyTypeSchema":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"slug":{"type":"string","maxLength":64,"minLength":1,"title":"Slug"}},"type":"object","required":["name","slug"],"title":"CounterpartyTypeSchema"},"CreateActivityLogRequestSchema":{"properties":{"type":{"type":"string","maxLength":64,"minLength":1,"pattern":"^[A-Za-z0-9][A-Za-z0-9_.:-]{0,63}$","title":"Type","default":"operation"},"action":{"anyOf":[{"type":"string","maxLength":100,"minLength":1,"pattern":"^[A-Za-z0-9][A-Za-z0-9_.:-]{0,99}$"},{"type":"null"}],"title":"Action"},"status":{"type":"string","maxLength":32,"minLength":1,"pattern":"^[A-Za-z0-9][A-Za-z0-9_.:-]{0,31}$","title":"Status","default":"success"},"message":{"type":"string","maxLength":4000,"minLength":1,"title":"Message"},"resource_type":{"anyOf":[{"type":"string","maxLength":64,"minLength":1,"pattern":"^[A-Za-z0-9][A-Za-z0-9_.:-]{0,63}$"},{"type":"null"}],"title":"Resource Type"},"resource_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Resource Id"},"file":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"File"},"line":{"anyOf":[{"type":"integer","maximum":2147483647.0,"minimum":1.0},{"type":"null"}],"title":"Line"},"context":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Context"}},"additionalProperties":false,"type":"object","required":["message"],"title":"CreateActivityLogRequestSchema"},"CreateProviderEndpointRequest":{"properties":{"endpoint_key":{"type":"string","maxLength":63,"minLength":4,"pattern":"^[a-z][a-z0-9_]+$","title":"Endpoint Key"},"adapter_kind":{"type":"string","enum":["openai_responses","async_jobs"],"title":"Adapter Kind","default":"openai_responses"},"base_url":{"type":"string","maxLength":2048,"minLength":9,"title":"Base Url"},"api_route":{"type":"string","maxLength":512,"minLength":1,"title":"Api Route","default":"/responses"},"secret_ref":{"type":"string","maxLength":128,"minLength":3,"pattern":"^[A-Z][A-Z0-9_]+$","title":"Secret Ref"},"adapter_options":{"additionalProperties":true,"type":"object","title":"Adapter Options"}},"additionalProperties":false,"type":"object","required":["endpoint_key","base_url","secret_ref"],"title":"CreateProviderEndpointRequest"},"CreateTaskRequest":{"properties":{"exam_line":{"anyOf":[{"type":"integer","maximum":2147483647.0,"minimum":1.0},{"type":"null"}],"title":"Exam Line"},"prompt_content":{"additionalProperties":true,"type":"object","title":"Prompt Content"},"solution_content":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Solution Content"},"rubric_content":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Rubric Content"},"title":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Title"},"topic_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Topic Ids"},"subtopic_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Subtopic Ids"},"skill_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Skill Ids"},"answer_type":{"type":"string","enum":["text","single","multi","graphic","sequence","matching","open_response"],"title":"Answer Type"},"answer_options":{"anyOf":[{},{"type":"null"}],"title":"Answer Options"},"answer_input":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Answer Input"},"grading_policy":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Grading Policy"},"max_points":{"type":"integer","maximum":2147483647.0,"minimum":1.0,"title":"Max Points","default":1},"correct_answers":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Correct Answers"},"visual":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Visual"},"hint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hint"},"success_feedback":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success Feedback"},"wrong_feedback":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Wrong Feedback"},"codifiers":{"items":{"type":"string"},"type":"array","title":"Codifiers"},"source_url":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Source Url"},"source_snapshot":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Snapshot"},"source_media_type":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Source Media Type"},"source_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Source Metadata"},"assets":{"items":{"$ref":"#/components/schemas/TaskAssetLinkRequest"},"type":"array","title":"Assets"},"code":{"type":"string","maxLength":100,"minLength":1,"title":"Code"},"source_code":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Source Code"},"source_external_id":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Source External Id"}},"additionalProperties":false,"type":"object","required":["prompt_content","topic_ids","subtopic_ids","skill_ids","answer_type","code"],"title":"CreateTaskRequest"},"CurrentTaskResponse":{"properties":{"lesson_run_task_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Lesson Run Task Id"},"lesson_task_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Lesson Task Id"},"attempt_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Attempt Id"}},"type":"object","required":["lesson_run_task_id","lesson_task_id","attempt_id"],"title":"CurrentTaskResponse"},"CurriculumImportEventResponse":{"properties":{"id":{"type":"string","title":"Id"},"job_id":{"type":"string","format":"uuid","title":"Job Id"},"resource_id":{"type":"string","title":"Resource Id"},"correlation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Correlation Id"},"event_seq":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Event Seq","description":"Monotonic sequence within one import job; single-job cursors use this position."},"attempt":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Attempt"},"action":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action"},"stage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stage"},"status":{"type":"string","title":"Status"},"terminal":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Terminal"},"retryable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Retryable"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code","description":"Safe normalized application error code, when the event failed."},"error_class":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Class","description":"Safe normalized error class, without traceback or provider details."},"message":{"type":"string","title":"Message","description":"Safe normalized event message or action code; never raw exception text."},"context":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Context","description":"Optional sanitized event context with credentials, PII and storage details removed."},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","job_id","resource_id","correlation_id","event_seq","attempt","action","stage","status","terminal","retryable","error_code","error_class","message","context","created_at","updated_at"],"title":"CurriculumImportEventResponse","description":"A safe projection of one curriculum import lifecycle event. Error fields contain normalized codes/classes and sanitized context; raw exception text, secrets, storage coordinates and child traces are not exposed."},"CurriculumImportEventsPage":{"properties":{"jobs":{"items":{"$ref":"#/components/schemas/CurriculumImportJobResponse"},"type":"array","title":"Jobs","description":"Compact summaries for jobs represented by the returned event rows."},"journal_status":{"type":"string","enum":["legacy","open","complete","degraded"],"title":"Journal Status","description":"Journal integrity state: `legacy` means the job predates event journaling; `open` is an in-progress journal; `complete` has a contiguous sequence and terminal event; `degraded` indicates a sequence or terminal-state mismatch."},"items":{"items":{"$ref":"#/components/schemas/CurriculumImportEventResponse"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Signed keyset cursor bound to project/agent scope, ordering mode and every active filter."}},"type":"object","required":["journal_status"],"title":"CurriculumImportEventsPage","description":"Multi-job event journal page with compact summaries for jobs represented on the page. Repeated job_id values and field filters are combined with AND semantics; its signed cursor includes the complete filter fingerprint."},"CurriculumImportJobResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"state":{"type":"string","enum":["pending","running","succeeded","failed"],"title":"State"},"result":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Result"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"correlation_id":{"type":"string","title":"Correlation Id","default":"","description":"Stable server-generated identifier shared by this import job and its events."},"attempts":{"type":"integer","title":"Attempts","default":0,"description":"Number of worker attempts observed for this import job."},"last_event_seq":{"type":"integer","title":"Last Event Seq","default":0},"event_log_version":{"type":"integer","title":"Event Log Version","default":0},"journal_status":{"type":"string","enum":["legacy","open","complete","degraded"],"title":"Journal Status","default":"legacy","description":"Journal integrity state: `legacy` means the job predates event journaling; `open` is an in-progress journal; `complete` has a contiguous sequence and terminal event; `degraded` indicates a sequence or terminal-state mismatch."}},"type":"object","required":["id","state","result","error_code","created_at","started_at","completed_at"],"title":"CurriculumImportJobResponse","description":"Curriculum import job summary returned with journal pages."},"CurriculumImportJournalPage":{"properties":{"job":{"$ref":"#/components/schemas/CurriculumImportJobResponse"},"journal_status":{"type":"string","enum":["legacy","open","complete","degraded"],"title":"Journal Status","description":"Journal integrity state: `legacy` means the job predates event journaling; `open` is an in-progress journal; `complete` has a contiguous sequence and terminal event; `degraded` indicates a sequence or terminal-state mismatch."},"items":{"items":{"$ref":"#/components/schemas/CurriculumImportEventResponse"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Signed keyset cursor for the next event_seq/id position in this job scope."}},"type":"object","required":["job","journal_status"],"title":"CurriculumImportJournalPage","description":"Single-job event journal page ordered by event_seq. Its signed cursor is bound to the job ID, project, claimed agent scope and single-journal mode."},"CurriculumImportPreflightFinding":{"properties":{"code":{"type":"string","title":"Code"},"entity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity"},"field":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Field"}},"type":"object","required":["code"],"title":"CurriculumImportPreflightFinding"},"CurriculumImportPreflightResponse":{"properties":{"status":{"type":"string","enum":["ready","blocked"],"title":"Status"},"archive_sha256":{"type":"string","title":"Archive Sha256"},"manifest_sha256":{"type":"string","title":"Manifest Sha256"},"counts":{"additionalProperties":{"type":"integer"},"type":"object","title":"Counts"},"database":{"additionalProperties":{"type":"integer"},"type":"object","title":"Database"},"blocking_findings":{"items":{"$ref":"#/components/schemas/CurriculumImportPreflightFinding"},"type":"array","title":"Blocking Findings"}},"type":"object","required":["status","archive_sha256","manifest_sha256","counts","database"],"title":"CurriculumImportPreflightResponse"},"DashboardAiAccessResponse":{"properties":{"limit_tokens":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Limit Tokens"},"used_tokens":{"type":"integer","minimum":0.0,"title":"Used Tokens"},"reserved_tokens":{"type":"integer","minimum":0.0,"title":"Reserved Tokens"},"remaining_tokens":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Remaining Tokens"},"resets_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Resets At"}},"type":"object","required":["used_tokens","reserved_tokens"],"title":"DashboardAiAccessResponse"},"DashboardCurrentLessonResponse":{"properties":{"lesson_id":{"type":"string","format":"uuid","title":"Lesson Id"},"title":{"type":"string","title":"Title"},"position":{"type":"integer","exclusiveMinimum":0.0,"title":"Position"},"active_run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Active Run Id"},"result_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Result Id"},"status":{"type":"string","enum":["new","active","passed","needs_reinforcement"],"title":"Status"},"can_start":{"type":"boolean","title":"Can Start"}},"type":"object","required":["lesson_id","title","position","active_run_id","result_id","status","can_start"],"title":"DashboardCurrentLessonResponse"},"DashboardEntitlementResponse":{"properties":{"tier":{"type":"string","enum":["none","free","full"],"title":"Tier"},"plan_slug":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Plan Slug"},"status":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Status"},"current_period_end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Current Period End"},"checked_at":{"type":"string","format":"date-time","title":"Checked At"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"source_revision":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Source Revision"},"tariff":{"anyOf":[{"type":"string","enum":["free","preparation","success"]},{"type":"null"}],"title":"Tariff"},"learning":{"$ref":"#/components/schemas/DashboardLearningAccessResponse"},"ai":{"$ref":"#/components/schemas/DashboardAiAccessResponse"}},"type":"object","required":["tier","checked_at","learning","ai"],"title":"DashboardEntitlementResponse"},"DashboardLearningAccessResponse":{"properties":{"mode":{"anyOf":[{"type":"string","enum":["tasks","exam_variants"]},{"type":"null"}],"title":"Mode"},"limit":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Limit"},"task_limit":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Task Limit"},"exam_variant_limit":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Exam Variant Limit"},"used":{"type":"integer","minimum":0.0,"title":"Used"},"remaining":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Remaining"}},"type":"object","required":["used"],"title":"DashboardLearningAccessResponse"},"DashboardPracticeExamVariantItemResponse":{"properties":{"exam_variant_id":{"type":"string","format":"uuid","title":"Exam Variant Id"},"code":{"type":"string","title":"Code"},"title":{"type":"string","title":"Title"},"duration_minutes":{"type":"integer","exclusiveMinimum":0.0,"title":"Duration Minutes"},"task_count":{"type":"integer","minimum":0.0,"title":"Task Count"},"max_points":{"type":"integer","minimum":0.0,"title":"Max Points"},"progress":{"$ref":"#/components/schemas/DashboardPracticeExamVariantProgressResponse"}},"type":"object","required":["exam_variant_id","code","title","duration_minutes","task_count","max_points","progress"],"title":"DashboardPracticeExamVariantItemResponse"},"DashboardPracticeExamVariantProgressResponse":{"properties":{"status":{"type":"string","enum":["not_started","in_progress","completed"],"title":"Status"},"completed_task_count":{"type":"integer","minimum":0.0,"title":"Completed Task Count"},"total_task_count":{"type":"integer","minimum":0.0,"title":"Total Task Count"},"percent":{"type":"integer","maximum":100.0,"minimum":0.0,"title":"Percent"},"run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Run Id"}},"type":"object","required":["status","completed_task_count","total_task_count","percent","run_id"],"title":"DashboardPracticeExamVariantProgressResponse"},"DashboardPracticeExamVariantsBadgeResponse":{"properties":{"type":{"type":"string","const":"exam_variants","title":"Type"},"position":{"type":"integer","exclusiveMinimum":0.0,"title":"Position"},"title":{"type":"string","title":"Title"},"total_count":{"type":"integer","minimum":0.0,"title":"Total Count"},"has_more":{"type":"boolean","title":"Has More"},"items":{"items":{"$ref":"#/components/schemas/DashboardPracticeExamVariantItemResponse"},"type":"array","title":"Items"}},"type":"object","required":["type","position","title","total_count","has_more","items"],"title":"DashboardPracticeExamVariantsBadgeResponse"},"DashboardPracticeMixedBadgeResponse":{"properties":{"type":{"type":"string","const":"mixed","title":"Type"},"position":{"type":"integer","exclusiveMinimum":0.0,"title":"Position"},"title":{"type":"string","title":"Title"},"total_count":{"type":"integer","minimum":0.0,"title":"Total Count"},"has_more":{"type":"boolean","title":"Has More"},"items":{"items":{},"type":"array","title":"Items"}},"type":"object","required":["type","position","title","total_count","has_more"],"title":"DashboardPracticeMixedBadgeResponse"},"DashboardPracticeOptionsResponse":{"properties":{"selected_subject_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Selected Subject Id"},"exam_type":{"anyOf":[{"type":"string","enum":["oge","ege"]},{"type":"null"}],"title":"Exam Type"},"default_badge":{"type":"string","enum":["tasks","exam_variants","mixed"],"title":"Default Badge"},"page_size":{"type":"integer","exclusiveMinimum":0.0,"title":"Page Size"},"badges":{"items":{"anyOf":[{"$ref":"#/components/schemas/DashboardPracticeTasksBadgeResponse"},{"$ref":"#/components/schemas/DashboardPracticeExamVariantsBadgeResponse"},{"$ref":"#/components/schemas/DashboardPracticeMixedBadgeResponse"}]},"type":"array","title":"Badges"}},"type":"object","required":["default_badge","page_size","badges"],"title":"DashboardPracticeOptionsResponse"},"DashboardPracticeTaskItemResponse":{"properties":{"task_id":{"type":"string","format":"uuid","title":"Task Id"},"code":{"type":"string","title":"Code"},"title":{"type":"string","title":"Title"},"exam_line":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Exam Line"},"answer_type":{"type":"string","enum":["text","single","multi","graphic","sequence","matching","open_response"],"title":"Answer Type"},"status":{"type":"string","enum":["not_started","covered","mastered"],"title":"Status"},"taxonomy":{"additionalProperties":true,"type":"object","title":"Taxonomy"}},"type":"object","required":["task_id","code","title","exam_line","answer_type","status","taxonomy"],"title":"DashboardPracticeTaskItemResponse"},"DashboardPracticeTasksBadgeResponse":{"properties":{"type":{"type":"string","const":"tasks","title":"Type"},"position":{"type":"integer","exclusiveMinimum":0.0,"title":"Position"},"title":{"type":"string","title":"Title"},"total_count":{"type":"integer","minimum":0.0,"title":"Total Count"},"has_more":{"type":"boolean","title":"Has More"},"items":{"items":{"$ref":"#/components/schemas/DashboardPracticeTaskItemResponse"},"type":"array","title":"Items"}},"type":"object","required":["type","position","title","total_count","has_more","items"],"title":"DashboardPracticeTasksBadgeResponse"},"DashboardProgramSummaryResponse":{"properties":{"program":{"$ref":"#/components/schemas/ProgramResponse"},"enrollment":{"$ref":"#/components/schemas/EnrollmentResponse"},"lesson_count":{"type":"integer","minimum":0.0,"title":"Lesson Count"},"completed_lessons":{"type":"integer","minimum":0.0,"title":"Completed Lessons"},"progress_percent":{"type":"integer","maximum":100.0,"minimum":0.0,"title":"Progress Percent"}},"type":"object","required":["program","enrollment","lesson_count","completed_lessons","progress_percent"],"title":"DashboardProgramSummaryResponse"},"DashboardProgressResponse":{"properties":{"selected_subject_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Selected Subject Id"},"exam_type":{"anyOf":[{"type":"string","enum":["oge","ege"]},{"type":"null"}],"title":"Exam Type"},"available_tasks":{"type":"integer","minimum":0.0,"title":"Available Tasks"},"covered_tasks":{"type":"integer","minimum":0.0,"title":"Covered Tasks"},"mastered_tasks":{"type":"integer","minimum":0.0,"title":"Mastered Tasks"},"completed_lessons":{"type":"integer","minimum":0.0,"title":"Completed Lessons"},"total_lessons":{"type":"integer","minimum":0.0,"title":"Total Lessons"},"progress_percent":{"type":"integer","maximum":100.0,"minimum":0.0,"title":"Progress Percent"}},"type":"object","required":["available_tasks","covered_tasks","mastered_tasks","completed_lessons","total_lessons","progress_percent"],"title":"DashboardProgressResponse"},"DashboardSubjectResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"code":{"type":"string","title":"Code"},"exam_type":{"anyOf":[{"type":"string","enum":["oge","ege"]},{"type":"null"}],"title":"Exam Type"},"position":{"type":"integer","title":"Position"},"title":{"type":"string","title":"Title"},"short_code":{"type":"string","title":"Short Code"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["id","code","exam_type","position","title","short_code","description"],"title":"DashboardSubjectResponse"},"EnrollPayload":{"properties":{},"additionalProperties":false,"type":"object","title":"EnrollPayload"},"EnrollmentResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"student_principal_handle":{"type":"string","format":"uuid","title":"Student Principal Handle"},"program_id":{"type":"string","format":"uuid","title":"Program Id"},"subject_id":{"type":"string","format":"uuid","title":"Subject Id"},"state":{"type":"string","enum":["trial","awaiting_continuation","awaiting_parent_confirmation","awaiting_entitlement","active","declined"],"title":"State"},"continuation_decision":{"anyOf":[{"type":"string","enum":["continue","decline"]},{"type":"null"}],"title":"Continuation Decision"},"parent_confirmation_required":{"type":"boolean","title":"Parent Confirmation Required"},"parent_confirmed":{"type":"boolean","title":"Parent Confirmed"},"entitlement_confirmed":{"type":"boolean","title":"Entitlement Confirmed"},"revision":{"type":"integer","minimum":1.0,"title":"Revision"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","student_principal_handle","program_id","subject_id","state","continuation_decision","parent_confirmation_required","parent_confirmed","entitlement_confirmed","revision","created_at","updated_at"],"title":"EnrollmentResponse"},"ExamVariantPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ExamVariantSummaryResponse"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items","next_cursor"],"title":"ExamVariantPage"},"ExamVariantSummaryResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"title":{"type":"string","title":"Title"},"duration_minutes":{"type":"integer","title":"Duration Minutes"},"task_count":{"type":"integer","minimum":0.0,"title":"Task Count"},"max_points":{"type":"integer","minimum":0.0,"title":"Max Points"}},"type":"object","required":["id","title","duration_minutes","task_count","max_points"],"title":"ExamVariantSummaryResponse"},"FeedbackPayload":{"properties":{"rating":{"type":"integer","enum":[-1,1],"title":"Rating"}},"additionalProperties":false,"type":"object","required":["rating"],"title":"FeedbackPayload"},"FeedbackResponse":{"properties":{"message_id":{"type":"string","format":"uuid","title":"Message Id"},"rating":{"type":"integer","enum":[-1,1],"title":"Rating"}},"type":"object","required":["message_id","rating"],"title":"FeedbackResponse"},"FinalizeRunResponse":{"properties":{"run":{"$ref":"#/components/schemas/RunResponse"},"result":{"anyOf":[{"$ref":"#/components/schemas/ResultResponse"},{"type":"null"}]}},"type":"object","required":["run"],"title":"FinalizeRunResponse"},"FipiSubtopicResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"topic_id":{"type":"string","format":"uuid","title":"Topic Id"},"source_catalog":{"type":"string","title":"Source Catalog"},"reference_year":{"type":"integer","title":"Reference Year"},"source_id":{"type":"string","title":"Source Id"},"editorial_code":{"type":"string","title":"Editorial Code"},"title":{"type":"string","title":"Title"},"source_attributes":{"additionalProperties":true,"type":"object","title":"Source Attributes"}},"type":"object","required":["id","topic_id","source_catalog","reference_year","source_id","editorial_code","title","source_attributes"],"title":"FipiSubtopicResponse"},"FipiTopicResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"source_catalog":{"type":"string","title":"Source Catalog"},"reference_year":{"type":"integer","title":"Reference Year"},"source_id":{"type":"string","title":"Source Id"},"fipi_code":{"type":"string","title":"Fipi Code"},"title":{"type":"string","title":"Title"},"source_attributes":{"additionalProperties":true,"type":"object","title":"Source Attributes"}},"type":"object","required":["id","source_catalog","reference_year","source_id","fipi_code","title","source_attributes"],"title":"FipiTopicResponse"},"GradingCriterionResponse":{"properties":{"criterion":{"type":"string","title":"Criterion"},"assessment":{"type":"string","title":"Assessment"}},"type":"object","required":["criterion","assessment"],"title":"GradingCriterionResponse"},"GradingResultResponse":{"properties":{"grading_method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Grading Method"},"grading_status":{"type":"string","enum":["pending","queued","completed","failed","unknown"],"title":"Grading Status"},"is_correct":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Correct"},"earned_points":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Earned Points"},"max_points":{"type":"integer","title":"Max Points"},"feedback":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Feedback"},"criteria":{"anyOf":[{"items":{"$ref":"#/components/schemas/GradingCriterionResponse"},"type":"array"},{"type":"null"}],"title":"Criteria"},"grading_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Grading Error"}},"type":"object","required":["grading_status","is_correct","earned_points","max_points","feedback"],"title":"GradingResultResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HealthDatabaseResponseSchema":{"properties":{"status":{"type":"string","title":"Status"},"database":{"type":"string","title":"Database"}},"type":"object","required":["status","database"],"title":"HealthDatabaseResponseSchema"},"HealthResponseSchema":{"properties":{"status":{"type":"string","title":"Status"}},"type":"object","required":["status"],"title":"HealthResponseSchema"},"HintResponse":{"properties":{"hint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hint"},"hint_used":{"type":"boolean","title":"Hint Used"},"earned_points":{"type":"integer","title":"Earned Points"},"status":{"type":"string","enum":["pending","queued","completed","failed","unknown"],"title":"Status","default":"completed"}},"type":"object","required":["hint","hint_used","earned_points"],"title":"HintResponse"},"HistoricalAnswerResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"values":{"items":{"type":"string"},"type":"array","title":"Values"},"is_correct":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Correct"},"user_message_id":{"type":"string","format":"uuid","title":"User Message Id"},"feedback_message_id":{"type":"string","format":"uuid","title":"Feedback Message Id"},"grading_method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Grading Method"},"grading_status":{"anyOf":[{"type":"string","enum":["pending","queued","completed","failed","unknown"]},{"type":"null"}],"title":"Grading Status"},"earned_points":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Earned Points"},"max_points":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Points"},"feedback":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Feedback"},"criteria":{"anyOf":[{"items":{"$ref":"#/components/schemas/GradingCriterionResponse"},"type":"array"},{"type":"null"}],"title":"Criteria"},"grading_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Grading Error"}},"type":"object","required":["id","values","is_correct","user_message_id","feedback_message_id"],"title":"HistoricalAnswerResponse"},"InteractionResponse":{"properties":{"can_continue":{"type":"boolean","title":"Can Continue"},"disabled_reason":{"anyOf":[{"type":"string","enum":["completed","submitted","access_closed","chat_missing","transition_required"]},{"type":"null"}],"title":"Disabled Reason"}},"type":"object","required":["can_continue","disabled_reason"],"title":"InteractionResponse"},"LearningCounterpartyTypeResponse":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"slug":{"type":"string","maxLength":64,"minLength":1,"title":"Slug"}},"type":"object","required":["name","slug"],"title":"LearningCounterpartyTypeResponse"},"LearningMessageResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"role":{"type":"string","title":"Role"},"status":{"type":"string","title":"Status"},"content":{"type":"string","title":"Content"},"kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"attempt_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Attempt Id"},"lesson_run_task_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Lesson Run Task Id"},"lesson_task_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Lesson Task Id"},"parent_message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Message Id"},"dialog_sequence":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Dialog Sequence"},"answer":{"anyOf":[{"$ref":"#/components/schemas/HistoricalAnswerResponse"},{"type":"null"}]},"feedback_rating":{"anyOf":[{"type":"integer","enum":[-1,1]},{"type":"null"}],"title":"Feedback Rating"}},"type":"object","required":["id","role","status","content","kind","created_at"],"title":"LearningMessageResponse"},"LearningScreenResponse":{"properties":{"run":{"$ref":"#/components/schemas/RunResponse"},"chat_session":{"anyOf":[{"$ref":"#/components/schemas/ChatSessionResponse"},{"type":"null"}]},"items":{"items":{"$ref":"#/components/schemas/LearningMessageResponse"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"},"current_task":{"anyOf":[{"$ref":"#/components/schemas/CurrentTaskResponse"},{"type":"null"}]},"interaction":{"$ref":"#/components/schemas/InteractionResponse"},"result":{"anyOf":[{"$ref":"#/components/schemas/ResultResponse"},{"type":"null"}]}},"type":"object","required":["run","chat_session","items","next_cursor","current_task","interaction","result"],"title":"LearningScreenResponse"},"LessonPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/LessonSummaryResponse"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items","next_cursor"],"title":"LessonPage"},"LessonResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"title":{"type":"string","title":"Title"},"goal":{"type":"string","title":"Goal"},"duration_minutes":{"type":"integer","title":"Duration Minutes"},"topic_content":{"additionalProperties":true,"type":"object","title":"Topic Content"},"tasks":{"items":{"$ref":"#/components/schemas/app__modules__learning__presentation__schemas__TaskResponse"},"type":"array","title":"Tasks"}},"type":"object","required":["id","title","goal","duration_minutes","topic_content","tasks"],"title":"LessonResponse"},"LessonSummaryResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"title":{"type":"string","title":"Title"},"category":{"$ref":"#/components/schemas/CategoryResponse"},"status":{"type":"string","enum":["new","active","passed","needs_reinforcement"],"title":"Status"},"active_run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Active Run Id"},"result_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Result Id"},"completed_run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Completed Run Id"}},"type":"object","required":["id","title","category","status","active_run_id","result_id","completed_run_id"],"title":"LessonSummaryResponse"},"MessagePayload":{"properties":{"message":{"type":"string","maxLength":4000,"minLength":1,"title":"Message"}},"additionalProperties":false,"type":"object","required":["message"],"title":"MessagePayload"},"OpenAttemptPayload":{"properties":{"lesson_run_task_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Lesson Run Task Id"}},"additionalProperties":false,"type":"object","title":"OpenAttemptPayload"},"PrincipalAuthResponseSchema":{"properties":{"ok":{"type":"boolean","const":true,"title":"Ok","default":true},"session":{"$ref":"#/components/schemas/PrincipalSessionSnapshotSchema"}},"type":"object","required":["session"],"title":"PrincipalAuthResponseSchema"},"PrincipalEmptyRequestSchema":{"properties":{},"additionalProperties":false,"type":"object","title":"PrincipalEmptyRequestSchema"},"PrincipalEntitlementSchema":{"properties":{"tier":{"type":"string","enum":["none","free","full"],"title":"Tier"}},"type":"object","required":["tier"],"title":"PrincipalEntitlementSchema"},"PrincipalMessageRequestSchema":{"properties":{"session_id":{"type":"string","format":"uuid","title":"Session Id"},"client_message_id":{"type":"string","format":"uuid","title":"Client Message Id","description":"Идентификатор отправки в рамках чат-сессии. Повтор допустим только с тем же текстом; другой текст возвращает 409 idempotency_conflict."},"message":{"type":"string","maxLength":4000,"minLength":1,"title":"Message"}},"additionalProperties":false,"type":"object","required":["session_id","client_message_id","message"],"title":"PrincipalMessageRequestSchema"},"PrincipalSessionActionRequestSchema":{"properties":{"session_id":{"type":"string","format":"uuid","title":"Session Id"}},"additionalProperties":false,"type":"object","required":["session_id"],"title":"PrincipalSessionActionRequestSchema"},"PrincipalSessionSnapshotSchema":{"properties":{"user":{"$ref":"#/components/schemas/PrincipalUserSchema"},"entitlement":{"$ref":"#/components/schemas/PrincipalEntitlementSchema"},"chats":{"items":{"$ref":"#/components/schemas/ChatSessionSchema"},"type":"array","title":"Chats"},"onboarding_completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Onboarding Completed At"},"subscription_tariffs":{"items":{"$ref":"#/components/schemas/PrincipalSubscriptionTariffSchema"},"type":"array","title":"Subscription Tariffs"}},"type":"object","required":["user","entitlement","chats"],"title":"PrincipalSessionSnapshotSchema"},"PrincipalSubscriptionChangeRequestSchema":{"properties":{"expected_principal_handle":{"type":"string","format":"uuid","title":"Expected Principal Handle","description":"Expected account identity from the internal Education session; mismatched current session returns 409 before ERP access."},"tariff_slug":{"type":"string","maxLength":63,"minLength":4,"pattern":"^[a-z][a-z0-9-]{2,61}[a-z0-9]$","title":"Tariff Slug"},"client_request_id":{"type":"string","format":"uuid","title":"Client Request Id"},"autopay_consent":{"type":"boolean","title":"Autopay Consent"}},"additionalProperties":false,"type":"object","required":["expected_principal_handle","tariff_slug","client_request_id","autopay_consent"],"title":"PrincipalSubscriptionChangeRequestSchema"},"PrincipalSubscriptionChangeResponseSchema":{"properties":{"ok":{"type":"boolean","const":true,"title":"Ok","default":true},"session":{"$ref":"#/components/schemas/PrincipalSessionSnapshotSchema"},"client_request_id":{"type":"string","format":"uuid","title":"Client Request Id"},"tariff_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tariff Slug","description":"Текущий подтверждённый тариф сессии после команды; при повторе может отражать более позднюю смену."}},"type":"object","required":["session","client_request_id","tariff_slug"],"title":"PrincipalSubscriptionChangeResponseSchema"},"PrincipalSubscriptionCheckoutSchema":{"properties":{"checkout_id":{"type":"string","maxLength":63,"minLength":4,"title":"Checkout Id"},"name":{"type":"string","maxLength":512,"minLength":1,"title":"Name"},"confirmation_url":{"type":"string","maxLength":2048,"minLength":1,"pattern":"^https://","title":"Confirmation Url"},"amount_minor":{"type":"integer","exclusiveMinimum":0.0,"title":"Amount Minor"},"currency":{"type":"string","maxLength":3,"minLength":3,"title":"Currency"},"state":{"type":"string","maxLength":64,"minLength":1,"title":"State"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"}},"type":"object","required":["checkout_id","name","confirmation_url","amount_minor","currency","state","expires_at"],"title":"PrincipalSubscriptionCheckoutSchema"},"PrincipalSubscriptionSelectionRequestSchema":{"properties":{"expected_principal_handle":{"type":"string","format":"uuid","title":"Expected Principal Handle","description":"Expected account identity from the internal Education session; mismatched current session returns 409 before ERP access."},"tariff_slug":{"type":"string","maxLength":63,"minLength":4,"pattern":"^[a-z][a-z0-9-]{2,61}[a-z0-9]$","title":"Tariff Slug","description":"Slug выбранного тарифа из каталога Gigma.","examples":["preparation-month"]},"client_request_id":{"type":"string","format":"uuid","title":"Client Request Id","description":"UUID операции на стороне фронта для безопасного повтора команды."},"payment_method_type":{"type":"string","enum":["bank_card","sbp"],"title":"Payment Method Type","description":"Способ оплаты для платного тарифа.","default":"bank_card"},"autopay_consent":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Autopay Consent","description":"Согласие пользователя на автоплатёж; обязательно для платного тарифа."},"autopay_policy_version":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Autopay Policy Version","description":"Optional legacy client metadata, not forwarded or used for ERP consent. ERP records its server-configured consent version."}},"additionalProperties":false,"type":"object","required":["expected_principal_handle","tariff_slug","client_request_id"],"title":"PrincipalSubscriptionSelectionRequestSchema"},"PrincipalSubscriptionSelectionResponseSchema":{"properties":{"ok":{"type":"boolean","const":true,"title":"Ok","default":true},"tariff":{"type":"string","enum":["free","preparation","success"],"title":"Tariff","description":"Нормализованный тип тарифа, распознанный через Gigma."},"tariff_slug":{"type":"string","maxLength":63,"minLength":4,"title":"Tariff Slug","description":"Slug выбранного тарифа из запроса."},"action":{"type":"string","enum":["free_activated","checkout_created","paid_activated"],"title":"Action","description":"`free_activated` означает, что Education уже создал сессию. `checkout_created` означает, что фронт должен открыть checkout.confirmation_url."},"session":{"$ref":"#/components/schemas/PrincipalSessionSnapshotSchema","description":"Current internal Education session; checkout alone does not confirm paid access."},"checkout":{"anyOf":[{"$ref":"#/components/schemas/PrincipalSubscriptionCheckoutSchema"},{"type":"null"}],"description":"Данные оплаты для платного тарифа; для бесплатного тарифа равны null."}},"type":"object","required":["tariff","tariff_slug","action","session","checkout"],"title":"PrincipalSubscriptionSelectionResponseSchema"},"PrincipalSubscriptionTariffSchema":{"properties":{"tariff":{"type":"string","enum":["free","preparation","success"],"title":"Tariff"},"tariff_slug":{"type":"string","title":"Tariff Slug"}},"type":"object","required":["tariff","tariff_slug"],"title":"PrincipalSubscriptionTariffSchema"},"PrincipalUserSchema":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"principal_handle":{"type":"string","format":"uuid","title":"Principal Handle"},"counterparty_type":{"$ref":"#/components/schemas/CounterpartyTypeSchema"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"},"middle_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Middle Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"phone_1":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone 1"}},"type":"object","required":["id","principal_handle","counterparty_type"],"title":"PrincipalUserSchema"},"ProfilePatchPayload":{"properties":{"email":{"anyOf":[{"type":"string","maxLength":320},{"type":"null"}],"title":"Email"},"age_group":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Age Group"},"target":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Target"},"starting_level":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Starting Level"},"lesson_minutes":{"anyOf":[{"type":"integer","maximum":1440.0,"minimum":0.0},{"type":"null"}],"title":"Lesson Minutes"},"lesson_frequency":{"anyOf":[{"type":"integer","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Lesson Frequency"},"exam_type":{"anyOf":[{"type":"string","enum":["oge","ege"]},{"type":"null"}],"title":"Exam Type"},"selected_subject_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Selected Subject Id"},"selected_ai_persona_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Selected Ai Persona Id"}},"additionalProperties":false,"type":"object","title":"ProfilePatchPayload"},"ProfilePayload":{"properties":{"email":{"anyOf":[{"type":"string","maxLength":320},{"type":"null"}],"title":"Email"},"age_group":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Age Group"},"target":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Target"},"starting_level":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Starting Level"},"lesson_minutes":{"anyOf":[{"type":"integer","maximum":1440.0,"minimum":0.0},{"type":"null"}],"title":"Lesson Minutes"},"lesson_frequency":{"anyOf":[{"type":"integer","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Lesson Frequency"}},"additionalProperties":false,"type":"object","title":"ProfilePayload"},"ProfileResponse":{"properties":{"principal_handle":{"type":"string","format":"uuid","title":"Principal Handle"},"email":{"type":"string","maxLength":320,"minLength":3,"title":"Email"},"age_group":{"type":"string","maxLength":50,"title":"Age Group"},"target":{"type":"string","maxLength":255,"title":"Target"},"starting_level":{"type":"string","maxLength":50,"title":"Starting Level"},"lesson_minutes":{"type":"integer","maximum":1440.0,"minimum":0.0,"title":"Lesson Minutes"},"lesson_frequency":{"type":"integer","maximum":100.0,"minimum":0.0,"title":"Lesson Frequency"},"counterparty_type":{"$ref":"#/components/schemas/LearningCounterpartyTypeResponse"},"exam_type":{"anyOf":[{"type":"string","enum":["oge","ege"]},{"type":"null"}],"title":"Exam Type"},"selected_subject_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Selected Subject Id"},"selected_ai_persona_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Selected Ai Persona Id"},"onboarding_completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Onboarding Completed At"}},"type":"object","required":["principal_handle","email","age_group","target","starting_level","lesson_minutes","lesson_frequency","counterparty_type","exam_type","onboarding_completed_at"],"title":"ProfileResponse"},"ProgramPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ProgramResponse"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items","next_cursor"],"title":"ProgramPage"},"ProgramResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"subject_id":{"type":"string","format":"uuid","title":"Subject Id"},"code":{"type":"string","title":"Code"},"exam_type":{"anyOf":[{"type":"string","enum":["oge","ege"]},{"type":"null"}],"title":"Exam Type"},"title":{"type":"string","title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"lesson_count":{"type":"integer","minimum":1.0,"title":"Lesson Count"},"trial_lesson_count":{"type":"integer","minimum":1.0,"title":"Trial Lesson Count"}},"type":"object","required":["id","subject_id","code","exam_type","title","description","lesson_count","trial_lesson_count"],"title":"ProgramResponse"},"ProviderEndpointResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"endpoint_key":{"type":"string","title":"Endpoint Key"},"version":{"type":"integer","title":"Version"},"adapter_kind":{"type":"string","title":"Adapter Kind"},"base_url":{"type":"string","title":"Base Url"},"api_route":{"type":"string","title":"Api Route"},"secret_ref":{"type":"string","title":"Secret Ref"},"adapter_options":{"additionalProperties":true,"type":"object","title":"Adapter Options"},"probe_status":{"type":"string","title":"Probe Status"}},"additionalProperties":false,"type":"object","required":["id","endpoint_key","version","adapter_kind","base_url","api_route","secret_ref","adapter_options","probe_status"],"title":"ProviderEndpointResponse"},"QueuedMessageResponse":{"properties":{"user_message_id":{"type":"string","format":"uuid","title":"User Message Id"},"assistant_message_id":{"type":"string","format":"uuid","title":"Assistant Message Id"},"status":{"type":"string","const":"queued","title":"Status"}},"type":"object","required":["user_message_id","assistant_message_id","status"],"title":"QueuedMessageResponse"},"RegisterContentAssetRequest":{"properties":{"object_key":{"type":"string","maxLength":1024,"minLength":1,"title":"Object Key"},"version_id":{"type":"string","maxLength":1024,"minLength":1,"title":"Version Id"},"mime_type":{"type":"string","enum":["image/png","image/jpeg","image/webp","image/gif","image/svg+xml"],"title":"Mime Type"},"byte_size":{"type":"integer","minimum":1.0,"title":"Byte Size"},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$","title":"Sha256"}},"additionalProperties":false,"type":"object","required":["object_key","version_id","mime_type","byte_size","sha256"],"title":"RegisterContentAssetRequest"},"ResultItemResponse":{"properties":{"lesson_task_id":{"type":"string","format":"uuid","title":"Lesson Task Id"},"lesson_run_task_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Lesson Run Task Id"},"points":{"type":"integer","title":"Points"},"max_points":{"type":"integer","title":"Max Points","default":1},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["lesson_task_id","points"],"title":"ResultItemResponse"},"ResultPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ResultResponse"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items","next_cursor"],"title":"ResultPage"},"ResultResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"lesson_run_id":{"type":"string","format":"uuid","title":"Lesson Run Id"},"earned_points":{"type":"integer","title":"Earned Points"},"max_points":{"type":"integer","title":"Max Points"},"decision":{"type":"string","enum":["passed","needs_reinforcement"],"title":"Decision"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"items":{"items":{"$ref":"#/components/schemas/ResultItemResponse"},"type":"array","title":"Items"}},"type":"object","required":["id","lesson_run_id","earned_points","max_points","decision","created_at"],"title":"ResultResponse"},"RunLessonResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"title":{"type":"string","title":"Title"},"goal":{"type":"string","title":"Goal"},"duration_minutes":{"type":"integer","title":"Duration Minutes"},"topic_content":{"additionalProperties":true,"type":"object","title":"Topic Content"},"tasks":{"items":{"$ref":"#/components/schemas/ScreenTaskResponse"},"type":"array","title":"Tasks"}},"type":"object","required":["id","title","goal","duration_minutes","topic_content","tasks"],"title":"RunLessonResponse"},"RunResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"lesson_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Lesson Id"},"lesson":{"anyOf":[{"$ref":"#/components/schemas/RunLessonResponse"},{"type":"null"}]},"variant":{"anyOf":[{"$ref":"#/components/schemas/RunVariantResponse"},{"type":"null"}]},"tasks":{"items":{"$ref":"#/components/schemas/ScreenTaskResponse"},"type":"array","title":"Tasks"},"run_mode":{"type":"string","enum":["training","exam"],"title":"Run Mode"},"source_type":{"type":"string","enum":["program_lesson","topic","tasks","exam_variant","legacy_lesson"],"title":"Source Type"},"source_ref_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Source Ref Id"},"chat_session_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Chat Session Id"},"status":{"type":"string","enum":["active","submitted","completed"],"title":"Status"},"current_attempt_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Current Attempt Id"},"result_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Result Id"},"completed_count":{"type":"integer","title":"Completed Count"},"submitted_count":{"type":"integer","title":"Submitted Count","default":0},"mastered_count":{"type":"integer","title":"Mastered Count","default":0},"assisted_count":{"type":"integer","title":"Assisted Count","default":0},"skipped_count":{"type":"integer","title":"Skipped Count","default":0},"total_count":{"type":"integer","title":"Total Count"}},"type":"object","required":["id","lesson_id","lesson","variant","tasks","run_mode","source_type","source_ref_id","chat_session_id","status","current_attempt_id","result_id","completed_count","total_count"],"title":"RunResponse"},"RunVariantResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"code":{"type":"string","title":"Code"},"title":{"type":"string","title":"Title"},"instructions_content":{"additionalProperties":true,"type":"object","title":"Instructions Content"},"duration_minutes":{"type":"integer","title":"Duration Minutes"},"tasks":{"items":{"$ref":"#/components/schemas/ScreenTaskResponse"},"type":"array","title":"Tasks"}},"type":"object","required":["id","code","title","instructions_content","duration_minutes","tasks"],"title":"RunVariantResponse"},"ScreenTaskResponse":{"properties":{"lesson_run_task_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Lesson Run Task Id"},"lesson_task_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Lesson Task Id"},"task_id":{"type":"string","format":"uuid","title":"Task Id"},"title":{"type":"string","title":"Title"},"taxonomy":{"additionalProperties":true,"type":"object","title":"Taxonomy"},"position":{"type":"integer","title":"Position"},"role":{"type":"string","enum":["practice","exam"],"title":"Role"},"is_required":{"type":"boolean","title":"Is Required"},"prompt":{"type":"string","title":"Prompt"},"prompt_content":{"additionalProperties":true,"type":"object","title":"Prompt Content"},"answer_type":{"type":"string","enum":["text","single","multi","graphic","sequence","matching","open_response"],"title":"Answer Type"},"answer_options":{"anyOf":[{},{"type":"null"}],"title":"Answer Options"},"answer_input":{"anyOf":[{},{"type":"null"}],"title":"Answer Input"},"grading_policy":{"anyOf":[{},{"type":"null"}],"title":"Grading Policy"},"visual":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Visual"},"assets":{"items":{"$ref":"#/components/schemas/StudentTaskAssetResponse"},"type":"array","title":"Assets"},"attempt":{"anyOf":[{"$ref":"#/components/schemas/AttemptResponse"},{"type":"null"}]},"max_points":{"type":"integer","title":"Max Points","default":1},"grading_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Grading Status"},"grading":{"anyOf":[{"$ref":"#/components/schemas/GradingResultResponse"},{"type":"null"}]},"revealed_solution":{"anyOf":[{"$ref":"#/components/schemas/SolutionResponse"},{"type":"null"}]},"actions":{"additionalProperties":{"type":"boolean"},"type":"object","title":"Actions"}},"type":"object","required":["lesson_run_task_id","lesson_task_id","task_id","title","taxonomy","position","role","is_required","prompt","prompt_content","answer_type","answer_options","visual","assets","attempt"],"title":"ScreenTaskResponse"},"SkillResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"source_catalog":{"type":"string","title":"Source Catalog"},"source_id":{"type":"string","title":"Source Id"},"title":{"type":"string","title":"Title"},"operation":{"type":"string","title":"Operation"},"object":{"type":"string","title":"Object"},"result":{"type":"string","title":"Result"},"source_attributes":{"additionalProperties":true,"type":"object","title":"Source Attributes"}},"type":"object","required":["id","source_catalog","source_id","title","operation","object","result","source_attributes"],"title":"SkillResponse"},"SolutionAssetResponse":{"properties":{"asset_key":{"type":"string","title":"Asset Key"},"role":{"type":"string","const":"solution","title":"Role"},"alt_text":{"type":"string","title":"Alt Text"},"content_url":{"type":"string","title":"Content Url"}},"type":"object","required":["asset_key","role","alt_text","content_url"],"title":"SolutionAssetResponse"},"SolutionResponse":{"properties":{"assets":{"items":{"$ref":"#/components/schemas/SolutionAssetResponse"},"type":"array","title":"Assets"},"correct_answers":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Correct Answers"},"solution_content":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Solution Content"},"solution_revealed":{"type":"boolean","const":true,"title":"Solution Revealed"},"status":{"type":"string","enum":["assisted","mastered"],"title":"Status"}},"type":"object","required":["correct_answers","solution_content","solution_revealed","status"],"title":"SolutionResponse"},"StartRunPayload":{"properties":{"run_mode":{"type":"string","enum":["training","exam"],"title":"Run Mode"},"source":{"$ref":"#/components/schemas/StartRunSourcePayload"}},"additionalProperties":false,"type":"object","required":["run_mode","source"],"title":"StartRunPayload"},"StartRunSourcePayload":{"properties":{"type":{"type":"string","enum":["program_lesson","topic","tasks","exam_variant"],"title":"Type"},"program_lesson_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Program Lesson Id"},"lesson_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Lesson Id"},"task_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array","minItems":1},{"type":"null"}],"title":"Task Ids"},"exam_variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Exam Variant Id"}},"additionalProperties":false,"type":"object","required":["type"],"title":"StartRunSourcePayload"},"StudentDashboardResponse":{"properties":{"profile":{"$ref":"#/components/schemas/ProfileResponse"},"selected_subject":{"anyOf":[{"$ref":"#/components/schemas/DashboardSubjectResponse"},{"type":"null"}]},"entitlement":{"$ref":"#/components/schemas/DashboardEntitlementResponse"},"program_summary":{"anyOf":[{"$ref":"#/components/schemas/DashboardProgramSummaryResponse"},{"type":"null"}]},"available_programs":{"items":{"$ref":"#/components/schemas/ProgramResponse"},"type":"array","title":"Available Programs"},"progress":{"$ref":"#/components/schemas/DashboardProgressResponse"},"practice_options":{"$ref":"#/components/schemas/DashboardPracticeOptionsResponse"},"current_lesson":{"anyOf":[{"$ref":"#/components/schemas/DashboardCurrentLessonResponse"},{"type":"null"}]},"next_action":{"type":"string","enum":["complete_onboarding","choose_program","continue_lesson","decide_continuation","start_lesson"],"title":"Next Action"}},"type":"object","required":["profile","selected_subject","entitlement","program_summary","progress","practice_options","current_lesson","next_action"],"title":"StudentDashboardResponse"},"StudentTaskAssetResponse":{"properties":{"asset_key":{"type":"string","title":"Asset Key"},"role":{"type":"string","enum":["prompt","answer_option"],"title":"Role"},"option_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Option Key"},"position":{"type":"integer","title":"Position"},"alt_text":{"type":"string","title":"Alt Text"},"content_url":{"type":"string","title":"Content Url"}},"type":"object","required":["asset_key","role","option_key","position","alt_text","content_url"],"title":"StudentTaskAssetResponse"},"SubjectPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/SubjectResponse"},"type":"array","title":"Items"},"next_page_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Page Token"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items"],"title":"SubjectPage"},"SubjectResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"code":{"type":"string","title":"Code"},"exam_type":{"anyOf":[{"type":"string","enum":["oge","ege"]},{"type":"null"}],"title":"Exam Type"},"position":{"type":"integer","title":"Position"},"title":{"type":"string","title":"Title"},"short_code":{"type":"string","title":"Short Code"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"completed_lessons":{"type":"integer","minimum":0.0,"title":"Completed Lessons"},"total_lessons":{"type":"integer","minimum":0.0,"title":"Total Lessons"},"progress_percent":{"type":"integer","maximum":100.0,"minimum":0.0,"title":"Progress Percent"}},"type":"object","required":["id","code","exam_type","position","title","short_code","description","completed_lessons","total_lessons","progress_percent"],"title":"SubjectResponse"},"TaskAssetLinkRequest":{"properties":{"asset_id":{"type":"string","format":"uuid","title":"Asset Id"},"asset_key":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,63}$","title":"Asset Key"},"role":{"type":"string","enum":["prompt","answer_option","solution","rubric"],"title":"Role"},"option_key":{"anyOf":[{"type":"string","maxLength":64,"minLength":1},{"type":"null"}],"title":"Option Key"},"position":{"type":"integer","maximum":2147483647.0,"minimum":1.0,"title":"Position"},"alt_text":{"type":"string","maxLength":1000,"minLength":1,"title":"Alt Text"},"source_url":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Source Url"},"source_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Source Name"}},"additionalProperties":false,"type":"object","required":["asset_id","asset_key","role","position","alt_text"],"title":"TaskAssetLinkRequest"},"TaskAssetLinkResponse":{"properties":{"asset_id":{"type":"string","format":"uuid","title":"Asset Id"},"asset_key":{"type":"string","title":"Asset Key"},"role":{"type":"string","enum":["prompt","answer_option","solution","rubric"],"title":"Role"},"option_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Option Key"},"position":{"type":"integer","title":"Position"},"alt_text":{"type":"string","title":"Alt Text"},"source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Url"},"source_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Name"}},"type":"object","required":["asset_id","asset_key","role","option_key","position","alt_text","source_url","source_name"],"title":"TaskAssetLinkResponse"},"TaskPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/TaskSummary"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items","next_cursor"],"title":"TaskPage"},"TaskSummary":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"code":{"type":"string","title":"Code"},"source_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Code"},"source_external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source External Id"},"published_at":{"type":"string","format":"date-time","title":"Published At"},"content_sha256":{"type":"string","title":"Content Sha256"}},"type":"object","required":["id","code","source_code","source_external_id","published_at","content_sha256"],"title":"TaskSummary"},"TaxonomyPage_FipiSubtopicResponse_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/FipiSubtopicResponse"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items"],"title":"TaxonomyPage[FipiSubtopicResponse]"},"TaxonomyPage_FipiTopicResponse_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/FipiTopicResponse"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items"],"title":"TaxonomyPage[FipiTopicResponse]"},"TaxonomyPage_SkillResponse_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/SkillResponse"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items"],"title":"TaxonomyPage[SkillResponse]"},"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"},"app__modules__curriculum__presentation__schemas__TaskResponse":{"properties":{"published_at":{"type":"string","format":"date-time","title":"Published At"},"exam_line":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Exam Line"},"prompt":{"type":"string","title":"Prompt"},"prompt_content":{"additionalProperties":true,"type":"object","title":"Prompt Content"},"solution_content":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Solution Content"},"rubric_content":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Rubric Content"},"title":{"type":"string","title":"Title"},"topic_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Topic Ids"},"subtopic_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Subtopic Ids"},"skill_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Skill Ids"},"ancestor_topic_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Ancestor Topic Ids"},"topics":{"items":{"$ref":"#/components/schemas/FipiTopicResponse"},"type":"array","title":"Topics"},"ancestor_topics":{"items":{"$ref":"#/components/schemas/FipiTopicResponse"},"type":"array","title":"Ancestor Topics"},"subtopics":{"items":{"$ref":"#/components/schemas/FipiSubtopicResponse"},"type":"array","title":"Subtopics"},"skills":{"items":{"$ref":"#/components/schemas/SkillResponse"},"type":"array","title":"Skills"},"answer_type":{"type":"string","enum":["text","single","multi","graphic","sequence","matching","open_response"],"title":"Answer Type"},"answer_options":{"anyOf":[{},{"type":"null"}],"title":"Answer Options"},"correct_answers":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Correct Answers"},"max_points":{"type":"integer","title":"Max Points","default":1},"visual":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Visual"},"hint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hint"},"success_feedback":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Success Feedback"},"wrong_feedback":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Wrong Feedback"},"codifiers":{"items":{"type":"string"},"type":"array","title":"Codifiers"},"source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Url"},"source_snapshot":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Snapshot"},"source_media_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Media Type"},"source_sha256":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Sha256"},"source_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Source Metadata"},"content_hash_version":{"type":"integer","title":"Content Hash Version"},"content_sha256":{"type":"string","title":"Content Sha256"},"assets":{"items":{"$ref":"#/components/schemas/TaskAssetLinkResponse"},"type":"array","title":"Assets"},"id":{"type":"string","format":"uuid","title":"Id"},"subject_id":{"type":"string","format":"uuid","title":"Subject Id"},"code":{"type":"string","title":"Code"},"source_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Code"},"source_external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source External Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["published_at","exam_line","prompt","prompt_content","solution_content","rubric_content","title","topic_ids","subtopic_ids","skill_ids","ancestor_topic_ids","topics","ancestor_topics","subtopics","skills","answer_type","answer_options","correct_answers","visual","hint","success_feedback","wrong_feedback","codifiers","source_url","source_snapshot","source_media_type","source_sha256","source_metadata","content_hash_version","content_sha256","assets","id","subject_id","code","source_code","source_external_id","created_at"],"title":"TaskResponse"},"app__modules__learning__presentation__schemas__TaskResponse":{"properties":{"lesson_task_id":{"type":"string","format":"uuid","title":"Lesson Task Id"},"role":{"type":"string","enum":["practice","exam"],"title":"Role"},"position":{"type":"integer","title":"Position"},"is_required":{"type":"boolean","title":"Is Required"},"title":{"type":"string","title":"Title"},"taxonomy":{"additionalProperties":true,"type":"object","title":"Taxonomy"},"prompt":{"type":"string","title":"Prompt"},"prompt_content":{"additionalProperties":true,"type":"object","title":"Prompt Content"},"answer_type":{"type":"string","enum":["text","single","multi","graphic","sequence","matching","open_response"],"title":"Answer Type"},"answer_options":{"anyOf":[{},{"type":"null"}],"title":"Answer Options"},"answer_input":{"anyOf":[{},{"type":"null"}],"title":"Answer Input"},"grading_policy":{"anyOf":[{},{"type":"null"}],"title":"Grading Policy"},"visual":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Visual"},"assets":{"items":{"$ref":"#/components/schemas/StudentTaskAssetResponse"},"type":"array","title":"Assets"}},"type":"object","required":["lesson_task_id","role","position","is_required","title","taxonomy","prompt","prompt_content","answer_type","answer_options","visual"],"title":"TaskResponse"},"ApiErrorResponse":{"type":"object","properties":{"detail":{"type":"string"}},"required":["detail"],"additionalProperties":false}},"securitySchemes":{"AgentBearer":{"type":"http","scheme":"bearer"},"GigmaBearer":{"type":"http","scheme":"bearer"},"PrincipalSessionHeader":{"type":"apiKey","in":"header","name":"Authorization","description":"Use the value format `Session <token>`."},"PrincipalSessionCookie":{"type":"apiKey","in":"cookie","name":"gigma_education_session"}}},"servers":[{"url":"https://api.eg.gigma.ru"}]}