{"openapi":"3.1.0","info":{"title":"Sortula","description":"AI-Powered Bookmarking Service","version":"1.0.0"},"paths":{"/":{"get":{"summary":"Root","description":"Root endpoint.","operationId":"root__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/health":{"get":{"summary":"Health Check","description":"Health check endpoint.","operationId":"health_check_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/admin/stats":{"get":{"tags":["admin"],"summary":"Get System Stats","description":"Получить общую статистику системы.\n\nДоступно только администраторам (telegram_id в TELEGRAM_ADMIN_IDS).\n\nArgs:\n    current_admin: Текущий админ (проверяется через telegram_id)\n    db: Database session\n\nReturns:\n    Статистика системы: пользователи, закладки, подписки, сообщения","operationId":"get_system_stats_v1_admin_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SystemStatsResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/admin/llm-stats":{"get":{"tags":["admin"],"summary":"Get Llm Stats","description":"Получить статистику использования LLM.\n\nДоступно только администраторам (telegram_id в TELEGRAM_ADMIN_IDS).\n\nArgs:\n    period: Период статистики (today, week, month, all)\n    current_admin: Текущий админ (проверяется через telegram_id)\n    db: Database session\n\nReturns:\n    Статистика LLM usage","operationId":"get_llm_stats_v1_admin_llm_stats_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"period","in":"query","required":false,"schema":{"enum":["today","week","month","all"],"type":"string","default":"today","title":"Period"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMStatsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/ai/top-bookmarks":{"get":{"tags":["AI & Personalization"],"summary":"Получить топ-закладки с AI-скорингом","description":"Возвращает персонализированные рекомендации закладок для пользователя.\n\n    AI-скоринг основан на:\n    - **Frequency** (40%): сколько раз открывал\n    - **Recency** (30%): как давно открывал\n    - **AI Relevance** (30%): LLM оценка полезности\n\n    Результаты кэшируются в Redis на 1 час.","operationId":"get_top_bookmarks_v1_ai_top_bookmarks_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":20,"minimum":1,"description":"Количество закладок (1-20)","default":5,"title":"Limit"},"description":"Количество закладок (1-20)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopBookmarksListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/ai/smart-collections":{"get":{"tags":["AI & Personalization"],"summary":"Получить умные коллекции с AI-группировкой","description":"Возвращает умные коллекции (группировка закладок по тегам).\n\n    Метрики:\n    - **Count**: количество закладок в коллекции\n    - **Confidence**: процент закладок с этим тегом (0-100%)\n    - **Top Tags**: связанные теги (часто используются вместе)","operationId":"get_smart_collections_v1_ai_smart_collections_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"description":"Количество коллекций (1-50)","default":10,"title":"Limit"},"description":"Количество коллекций (1-50)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmartCollectionsListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/ai/usage-stats":{"get":{"tags":["AI & Personalization"],"summary":"Получить статистику использования AI","description":"Возвращает метрики использования AI для текущего пользователя.\n\n    Метрики:\n    - **Used**: количество использованных AI-запросов в текущем месяце\n    - **Limit**: лимит AI-запросов для тарифа (0 = безлимит, >0 = лимит)\n    - **Time Saved**: оценка сэкономленного времени (в часах)\n    - **Plan Tier**: текущий тариф (FREE/PRO)\n\n    Используется для:\n    - RetentionProgressBar (показать value AI)\n    - Upsell на PRO (когда приближаемся к лимиту)","operationId":"get_ai_usage_stats_v1_ai_usage_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIUsageStatsResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/ai/queue":{"get":{"tags":["AI & Personalization"],"summary":"Get Llm Queue","description":"Получить очередь LLM задач для текущего пользователя.","operationId":"get_llm_queue_v1_ai_queue_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMQueueResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/ai/cost-history":{"get":{"tags":["AI & Personalization"],"summary":"История трат на LLM","description":"Возвращает историю трат на LLM для текущего пользователя.\n\n    - **period**: week (7 дней) или month (30 дней)\n    - **daily**: статистика по дням (cost, tokens, requests)\n    - **by_provider**: разбивка по провайдерам\n    - **totals**: итоговые суммы","operationId":"get_cost_history_v1_ai_cost_history_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"period","in":"query","required":false,"schema":{"enum":["week","month"],"type":"string","description":"Период: week (7 дней) или month (30 дней)","default":"month","title":"Period"},"description":"Период: week (7 дней) или month (30 дней)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CostHistoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/ai/reanalyze-all":{"post":{"tags":["AI & Personalization"],"summary":"Запустить переанализ всех закладок","description":"Запускает переанализ всех закладок пользователя через AI.\n\n    Доступно на тарифе PRO (v5).\n\n    Ограничения:\n    - Можно запускать не чаще 1 раза в час\n    - Переанализирует только закладки с достаточным контентом","operationId":"reanalyze_all_bookmarks_v1_ai_reanalyze_all_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReanalyzeResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/ai/reanalyze-status":{"get":{"tags":["AI & Personalization"],"summary":"Получить статус переанализа","description":"Получить текущий статус переанализа закладок.","operationId":"get_reanalyze_status_v1_ai_reanalyze_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReanalyzeStatusResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/ai/status":{"get":{"tags":["AI & Personalization"],"summary":"Get Ai Status","description":"Check AI/LLM availability for the current user.\n\n`ai_available` is True when the user is on a paid plan — единственная\nоставшаяся разлочка. Поле `has_byok` убрано вместе со сносом хранилища\nBYOK: после удаления второй разлочки из access_control оно вычислялось\nкак `is_ai_available and tier == \"FREE\"` и потому было ВСЕГДА False,\nто есть врало фронту.","operationId":"get_ai_status_v1_ai_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIStatusResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/ai/chat":{"post":{"tags":["AI & Personalization","AI"],"summary":"Chat Search","description":"Чат с базой знаний — задайте вопрос по вашим закладкам.\n\nИспользуется RAG: поиск по embeddings → LLM генерирует ответ с цитатами.","operationId":"chat_search_v1_ai_chat_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatSearchRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatSearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/auth/register":{"post":{"tags":["Authentication"],"summary":"Register","description":"Регистрация нового пользователя.\n\nОтправляет magic link на email для подтверждения.\nПринимает UTM-параметры для маркетинговой атрибуции.\nRate limited:\n- Per email: max 3 registrations per hour\n- Per IP: max 5 registrations per hour (spam protection)","operationId":"register_v1_auth_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/resend-verification":{"post":{"tags":["Authentication"],"summary":"Resend Verification","description":"Повторная отправка письма для подтверждения email.\n\nДоступно не чаще 1 раза в 15 минут.","operationId":"resend_verification_v1_auth_resend_verification_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/verify-email":{"post":{"tags":["Authentication"],"summary":"Verify Email","description":"Подтверждение email через токен из письма.","operationId":"verify_email_v1_auth_verify_email_post","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/login":{"post":{"tags":["Authentication"],"summary":"Login","description":"Вход по email и паролю.\n\nВозвращает access и refresh токены.\nRate limited:\n- Per email: max 5 login attempts per 15 minutes\n- Per IP: max 20 login attempts per 15 minutes (brute force protection)","operationId":"login_v1_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserLogin"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/magic/{token}":{"get":{"tags":["Authentication"],"summary":"Magic Login","description":"Вход через magic link.\n\nВалидирует токен и возвращает JWT токены для входа.\nТокен одноразовый — после использования становится недействительным.","operationId":"magic_login_v1_auth_magic__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/set-password":{"post":{"tags":["Authentication"],"summary":"Set Password","description":"Установка пароля для пользователя.\n\nТребуется валидный токен верификации.\nВозвращает access и refresh токены для автоматического входа.","operationId":"set_password_v1_auth_set_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserSetPassword"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/forgot-password":{"post":{"tags":["Authentication"],"summary":"Forgot Password","description":"Запрос на восстановление пароля.\n\nОтправляет magic link на email для сброса пароля.\nRate limited:\n- Per email: max 3 requests per hour\n- Per IP: max 10 requests per hour (enumeration protection)","operationId":"forgot_password_v1_auth_forgot_password_post","parameters":[{"name":"email","in":"query","required":true,"schema":{"type":"string","title":"Email"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/reset-password":{"post":{"tags":["Authentication"],"summary":"Reset Password","description":"Сброс пароля через токен из письма.","operationId":"reset_password_v1_auth_reset_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResetPassword"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/change-password":{"post":{"tags":["Authentication"],"summary":"Change Password","description":"Установка/изменение пароля авторизованным пользователем.\n\nПользователь уже авторизован (через токен), поэтому старый пароль не требуется.","operationId":"change_password_v1_auth_change_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserChangePassword"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/auth/bot-token/generate":{"post":{"tags":["Authentication"],"summary":"Generate Bot Token","description":"Сгенерировать токен для привязки Telegram бота.\n\nТокен действителен 10 минут.\nПользователь должен отправить боту: /start <TOKEN>","operationId":"generate_bot_token_v1_auth_bot_token_generate_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BotTokenResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/auth/refresh":{"post":{"tags":["Authentication"],"summary":"Refresh Token","description":"Обновить access токен используя refresh токен.\n\nFE-C1: refresh_token читается ПРИОРИТЕТНО из HttpOnly cookie, fallback на\nbody для transition. После полной миграции клиентов body-параметр можно\nбудет удалить отдельной задачей.\n\nПроверяет:\n- Валидность и тип токена (refresh)\n- Срок действия токена (автоматически через jwt.decode)\n- Не отозван ли токен (blacklist check)\n- Существование пользователя\n- Статус пользователя (активен, не заблокирован)","operationId":"refresh_token_v1_auth_refresh_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_refresh_token_v1_auth_refresh_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/logout":{"post":{"tags":["Authentication"],"summary":"Logout","description":"Выход из системы с отзывом токенов.\n\nДобавляет access токен (и опционально refresh токен) в blacklist.\nПосле logout токены становятся недействительными до истечения срока.\n\nArgs:\n    credentials: Bearer access token из header\n    refresh_token: Опционально refresh token для отзыва","operationId":"logout_v1_auth_logout_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_logout_v1_auth_logout_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/auth/me":{"get":{"tags":["Authentication"],"summary":"Get Me","description":"Получить информацию о текущем пользователе с квотами AI-запросов.","operationId":"get_me_v1_auth_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWithQuotaResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/auth/telegram/confirm":{"post":{"tags":["Authentication"],"summary":"Confirm Telegram Login","description":"Подтверждение входа через Telegram.\n\nИспользуется после перехода по magic link из Telegram бота.\nТокен действителен 5 минут.","operationId":"confirm_telegram_login_v1_auth_telegram_confirm_post","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/telegram/webapp-auth":{"post":{"tags":["Authentication"],"summary":"Webapp Auth","description":"Authenticate via Telegram Mini App (WebApp) initData.\n\nValidates initData HMAC signature, finds user by telegram_id.\nReturns JWT tokens for API access.","operationId":"webapp_auth_v1_auth_telegram_webapp_auth_post","parameters":[{"name":"init_data","in":"query","required":true,"schema":{"type":"string","title":"Init Data"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/extension/generate-code":{"post":{"tags":["Authentication"],"summary":"Generate Extension Code","description":"Сгенерировать код для привязки браузерного расширения.\n\nКод действителен 10 минут и может быть использован только один раз.\nПользователь вводит код в расширении для авторизации.","operationId":"generate_extension_code_v1_auth_extension_generate_code_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtensionCodeResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/auth/extension/activate":{"post":{"tags":["Authentication"],"summary":"Activate Extension","description":"Активировать браузерное расширение по коду.\n\nКод генерируется на сайте залогиненным пользователем.\nПосле активации расширение получает access и refresh токены.\nКод может быть использован только один раз.","operationId":"activate_extension_v1_auth_extension_activate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtensionActivateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtensionActivateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/mfa/setup":{"post":{"tags":["Authentication","MFA"],"summary":"Setup Mfa","description":"Начать настройку TOTP MFA.\n\nВозвращает secret, QR URI и backup коды.\nMFA НЕ включается до подтверждения кодом через /mfa/verify-setup.","operationId":"setup_mfa_v1_auth_mfa_setup_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/auth/mfa/verify-setup":{"post":{"tags":["Authentication","MFA"],"summary":"Verify Setup","description":"Подтвердить настройку TOTP — ввести код из приложения-аутентификатора.\n\nПосле успешной проверки MFA будет включен.","operationId":"verify_setup_v1_auth_mfa_verify_setup_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MFACodeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/auth/mfa/disable":{"post":{"tags":["Authentication","MFA"],"summary":"Disable Mfa","description":"Отключить MFA (требуется текущий код).","operationId":"disable_mfa_v1_auth_mfa_disable_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MFACodeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/auth/mfa/status":{"get":{"tags":["Authentication","MFA"],"summary":"Mfa Status","description":"Получить статус MFA для текущего пользователя.","operationId":"mfa_status_v1_auth_mfa_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/auth/mfa/backup-codes/regenerate":{"post":{"tags":["Authentication","MFA"],"summary":"Regenerate Backup Codes","description":"Перегенерировать backup коды (требуется текущий TOTP код).","operationId":"regenerate_backup_codes_v1_auth_mfa_backup_codes_regenerate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MFACodeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/bookmarks":{"post":{"tags":["Bookmarks"],"summary":"Create bookmark","description":"Create a new bookmark (Pipeline V2). Creates UserBookmark + CanonicalResource.","operationId":"create_bookmark_v1_bookmarks_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookmarkCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookmarkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Bookmarks"],"summary":"Get bookmarks","description":"Get list of bookmarks with filtering and pagination.","operationId":"get_bookmarks_v1_bookmarks_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Offset for pagination","default":0,"title":"Skip"},"description":"Offset for pagination"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Number of bookmarks","default":50,"title":"Limit"},"description":"Number of bookmarks"},{"name":"content_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by content type","title":"Content Type"},"description":"Filter by content type"},{"name":"is_archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Archived bookmarks (CR-037)","title":"Is Archived"},"description":"Archived bookmarks (CR-037)"},{"name":"is_favorite","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Favorites only","title":"Is Favorite"},"description":"Favorites only"},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by source","title":"Source"},"description":"Filter by source"},{"name":"llm_tag","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":100},{"type":"null"}],"description":"Filter by analysis tag (free-form word, case-insensitive)","title":"Llm Tag"},"description":"Filter by analysis tag (free-form word, case-insensitive)"},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by category slug (thematic taxonomy)","title":"Category"},"description":"Filter by category slug (thematic taxonomy)"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"description":"Search query","title":"Search"},"description":"Search query"},{"name":"mode","in":"query","required":false,"schema":{"type":"string","pattern":"^(and|or)$","description":"Multi-word match mode: 'and' (default — every token must match) or 'or' (any token matches). Same semantics as /v1/search.","default":"and","title":"Mode"},"description":"Multi-word match mode: 'and' (default — every token must match) or 'or' (any token matches). Same semantics as /v1/search."},{"name":"created_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Created after (ISO 8601)","title":"Created After"},"description":"Created after (ISO 8601)"},{"name":"created_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Created before (ISO 8601)","title":"Created Before"},"description":"Created before (ISO 8601)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookmarkListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Bookmarks"],"summary":"Delete all bookmarks","description":"Delete all user's bookmarks.","operationId":"delete_all_bookmarks_v1_bookmarks_delete","security":[{"HTTPBearer":[]}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"}}}}}}},"/v1/bookmarks/stats":{"get":{"tags":["Bookmarks"],"summary":"Get Stats","description":"Get bookmark statistics for user.\n\nUses SQL aggregates for efficiency - single query instead of loading all bookmarks.\n\nReturns:\n    - total: Total number of bookmarks\n    - favorites: Number of favorite bookmarks\n    - opened: сколько закладок пользователь открывал (по телеметрии)\n    - observed_since: с какого момента ведётся наблюдение (None — ни разу)\n    - by_type: Breakdown by source type","operationId":"get_stats_v1_bookmarks_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookmarkStatsResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/bookmarks/export":{"get":{"tags":["Bookmarks","Export"],"summary":"Export Bookmarks","description":"Экспорт закладок пользователя в различных форматах.\n\n**Поддерживаемые форматы:**\n- `json`: Полный экспорт с метаданными (id, title, url, tags и т.д.)\n- `csv`: Табличный формат для Excel/Google Sheets\n- `html`: Netscape Bookmark формат (для импорта в браузеры)\n\nArgs:\n    format: Формат экспорта (json, csv, html)\n    current_user: Текущий пользователь\n    db: Сессия БД\n\nReturns:\n    Response: Файл для скачивания с Content-Disposition header\n\nRaises:\n    HTTPException 400: Неподдерживаемый формат","operationId":"export_bookmarks_v1_bookmarks_export_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"format","in":"query","required":false,"schema":{"type":"string","description":"Export format: json, csv, html","default":"json","title":"Format"},"description":"Export format: json, csv, html"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/bookmarks/{bookmark_id}/status":{"get":{"tags":["Bookmarks"],"summary":"Get Bookmark Status","description":"Get bookmark status for polling (AI analysis, extraction).\n\nDoes NOT track view - use this for polling during analysis.","operationId":"get_bookmark_status_v1_bookmarks__bookmark_id__status_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"bookmark_id","in":"path","required":true,"schema":{"type":"string","title":"Bookmark Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookmarkStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/bookmarks/{bookmark_id}":{"get":{"tags":["Bookmarks"],"summary":"Get Bookmark","description":"Get bookmark by ID or short_id.\n\nTracks view for analytics (times_opened, last_opened_at).","operationId":"get_bookmark_v1_bookmarks__bookmark_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"bookmark_id","in":"path","required":true,"schema":{"type":"string","title":"Bookmark Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookmarkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Bookmarks"],"summary":"Update Bookmark","description":"Update bookmark.\n\nПравятся только личные поля закладки: is_favorite, user_comment и\nличный заголовок (title → user_title). Адрес и текст лежат на общем\nресурсе и через закладку не правятся — схема BookmarkUpdate их\nотвергает (422), а не игнорирует молча.","operationId":"update_bookmark_v1_bookmarks__bookmark_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"bookmark_id","in":"path","required":true,"schema":{"type":"string","title":"Bookmark Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookmarkUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookmarkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Bookmarks"],"summary":"Delete Bookmark","description":"Delete bookmark.\n\nDeletes UserBookmark only. CanonicalResource is preserved for other users.","operationId":"delete_bookmark_v1_bookmarks__bookmark_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"bookmark_id","in":"path","required":true,"schema":{"type":"string","title":"Bookmark Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/bookmarks/{bookmark_id}/extracted-content":{"get":{"tags":["Bookmarks"],"summary":"Get Extracted Content","description":"Get extracted content that was sent to LLM for analysis.\n\nCR-036: View Extracted Content feature.\nReturns the raw text extracted from the URL.\nOnly available if extraction_status = 'success'.","operationId":"get_extracted_content_v1_bookmarks__bookmark_id__extracted_content_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"bookmark_id","in":"path","required":true,"schema":{"type":"string","title":"Bookmark Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractedContentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/bookmarks/{bookmark_id}/toggle-favorite":{"post":{"tags":["Bookmarks"],"summary":"Toggle Favorite","description":"Toggle favorite status.","operationId":"toggle_favorite_v1_bookmarks__bookmark_id__toggle_favorite_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"bookmark_id","in":"path","required":true,"schema":{"type":"string","title":"Bookmark Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookmarkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/bookmarks/{bookmark_id}/analyze":{"post":{"tags":["Bookmarks"],"summary":"Analyze Bookmark","description":"Trigger LLM analysis for bookmark.\n\nQueues Celery task for:\n- Content extraction (if URL and not extracted)\n- Summary generation\n- Tag extraction","operationId":"analyze_bookmark_v1_bookmarks__bookmark_id__analyze_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"bookmark_id","in":"path","required":true,"schema":{"type":"string","title":"Bookmark Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyzeBookmarkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/bookmarks/{bookmark_id}/media/upload":{"post":{"tags":["Bookmarks"],"summary":"Upload Media Files","description":"Upload images/videos to bookmark.\n\nValidates:\n- Ownership\n- File types (image/*, video/*)\n- Size limits (tier-based)\n- Storage quota\n\nReturns:\n    {\n        \"uploaded\": int,\n        \"skipped\": int,\n        \"warnings\": [{\"filename\": str, \"reason\": str}, ...]\n    }","operationId":"upload_media_files_v1_bookmarks__bookmark_id__media_upload_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"bookmark_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Bookmark Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_media_files_v1_bookmarks__bookmark_id__media_upload_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/bookmarks/{bookmark_id}/reanalyze":{"post":{"tags":["Bookmarks"],"summary":"Reanalyze Bookmark","description":"Re-run analysis on the bookmark's resource for the current user.\n\nResult lands in user_analysis_overrides, canonical baseline stays as-is.\nThis used to require the caller to have their own LLM key and rejected\neveryone else with a 400. The managed pool is open to every tier now\n(decision #72), so the only thing that can stop a re-analysis is the\nmonthly quota — and that is enforced where the call is actually made,\nnot by a gate at the door.","operationId":"reanalyze_bookmark_v1_bookmarks__bookmark_id__reanalyze_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"bookmark_id","in":"path","required":true,"schema":{"type":"string","title":"Bookmark Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/bookmarks/{bookmark_id}/similar":{"get":{"tags":["Bookmarks"],"summary":"Find bookmarks similar to this one (semantic)","description":"Return up to `limit` of the user's own bookmarks most semantically\nsimilar to the source one.\n\nEmpty list when:\n  - source resource has no embedding yet (analysis pending), or\n  - the user has only this one bookmark, or\n  - no neighbor reaches `min_score`.\n\n404 when bookmark doesn't exist or belongs to another user (handled\nby `get_user_bookmark_or_404`).","operationId":"get_similar_bookmarks_v1_bookmarks__bookmark_id__similar_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"bookmark_id","in":"path","required":true,"schema":{"type":"string","title":"Bookmark Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":20,"minimum":1,"description":"Max similar items to return","default":5,"title":"Limit"},"description":"Max similar items to return"},{"name":"min_score","in":"query","required":false,"schema":{"type":"number","maximum":1.0,"minimum":0.0,"description":"Cosine similarity threshold (inclusive). Items with similarity_score < min_score are filtered out. Pass 0 to disable the cutoff.","default":0.5,"title":"Min Score"},"description":"Cosine similarity threshold (inclusive). Items with similarity_score < min_score are filtered out. Pass 0 to disable the cutoff."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimilarBookmarksResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/bookmarks/{bookmark_id}/links-limit":{"get":{"tags":["Bookmarks"],"summary":"Get Links Limit","description":"Get links limit for bookmark.","operationId":"get_links_limit_v1_bookmarks__bookmark_id__links_limit_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"bookmark_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Bookmark Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinksLimitResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/bookmarks/{bookmark_id}/links":{"get":{"tags":["Bookmarks"],"summary":"Get Bookmark Links","description":"Get list of links in bookmark.","operationId":"get_bookmark_links_v1_bookmarks__bookmark_id__links_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"bookmark_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Bookmark Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__schemas__bookmark__LinksListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Bookmarks"],"summary":"Add Bookmark Link","description":"Add link to bookmark.\n\nRaises:\n    HTTPException 400: If limit exceeded or URL already exists","operationId":"add_bookmark_link_v1_bookmarks__bookmark_id__links_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"bookmark_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Bookmark Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/bookmarks/{bookmark_id}/links/{link_id}":{"patch":{"tags":["Bookmarks"],"summary":"Update Bookmark Link","description":"Update link title.","operationId":"update_bookmark_link_v1_bookmarks__bookmark_id__links__link_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"bookmark_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Bookmark Id"}},{"name":"link_id","in":"path","required":true,"schema":{"type":"string","title":"Link Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Bookmarks"],"summary":"Delete Bookmark Link","description":"Delete link from bookmark.","operationId":"delete_bookmark_link_v1_bookmarks__bookmark_id__links__link_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"bookmark_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Bookmark Id"}},{"name":"link_id","in":"path","required":true,"schema":{"type":"string","title":"Link Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/bookmarks/unprocessed-count":{"get":{"tags":["Bookmarks"],"summary":"Get Unprocessed Count","description":"Get count of bookmarks without LLM analysis.\n\nReturns breakdown by type and estimated processing cost.","operationId":"get_unprocessed_count_v1_bookmarks_unprocessed_count_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessedCountResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/bookmarks/batch-process":{"post":{"tags":["Bookmarks"],"summary":"Start Batch Process","description":"Start batch AI processing of bookmarks.\n\nCreates Celery tasks for processing selected bookmarks.\nModes:\n- all: all unprocessed\n- selected: specific IDs\n- by_type: by content type","operationId":"start_batch_process_v1_bookmarks_batch_process_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchProcessRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchProcessResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/bookmarks/batch-process/{job_id}/status":{"get":{"tags":["Bookmarks"],"summary":"Get Batch Process Status","description":"Get batch processing job status.","operationId":"get_batch_process_status_v1_bookmarks_batch_process__job_id__status_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchProcessStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/bookmarks/import":{"post":{"tags":["Bookmarks","Bookmarks"],"summary":"Import Bookmarks Endpoint","description":"Import bookmarks from an uploaded file.\n\nSupports:\n- **HTML**: Browser bookmarks export (Chrome, Firefox, Safari, Edge)\n- **CSV**: Raindrop.io export\n- **JSON**: Pocket export\n\nFormat is auto-detected from filename, or can be forced via `format` parameter.\n\nReturns import summary with created/duplicate/error counts.","operationId":"import_bookmarks_endpoint_v1_bookmarks_import_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"format","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Force format: html, raindrop_csv, pocket_json","title":"Format"},"description":"Force format: html, raindrop_csv, pocket_json"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_import_bookmarks_endpoint_v1_bookmarks_import_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/b/{short_id}":{"get":{"tags":["Short URLs"],"summary":"Redirect Short Url","description":"Redirect short URL to full bookmark page (V2).\n\nThis endpoint does NOT check ownership - it just redirects.\nThe /bookmarks/{id} page will check access control.\n\nArgs:\n    short_id: Short bookmark ID (8 chars NanoID)\n    db: Database session\n\nReturns:\n    RedirectResponse to frontend /bookmarks/{uuid}\n\nRaises:\n    HTTPException 404: If short_id not found","operationId":"redirect_short_url_b__short_id__get","parameters":[{"name":"short_id","in":"path","required":true,"schema":{"type":"string","title":"Short Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/config/public":{"get":{"tags":["config"],"summary":"Get Public Config","description":"Get public configuration for frontend.\n\nReturns ONLY configuration that is safe to expose to unauthenticated users.\nContains bot URLs for login/register buttons and basic app info.","operationId":"get_public_config_v1_config_public_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicConfigResponse"}}}}}}},"/v1/config/ui":{"get":{"tags":["config"],"summary":"Get Ui Config","description":"Get UI configuration for authenticated users.\n\nReturns internal UI settings like text thresholds, collapse settings, etc.\nRequires authentication to prevent exposure of internal logic.","operationId":"get_ui_config_v1_config_ui_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UIConfigResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/config/pricing":{"get":{"tags":["config"],"summary":"Get Pricing Config","description":"Get subscription pricing configuration from config (modular or legacy).\n\nReturns all subscription plans with periods, prices, limits, and features.\nThis is the single source of truth for pricing - frontend should use this instead of hardcoding.","operationId":"get_pricing_config_v1_config_pricing_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PricingConfigResponse"}}}}}}},"/v1/config/debug/config-status":{"get":{"tags":["config"],"summary":"Get Config Status","description":"Diagnostic endpoint to check config loading status.\nRequires authentication.","operationId":"get_config_status_v1_config_debug_config_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Config Status V1 Config Debug Config Status Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/version":{"get":{"tags":["version"],"summary":"Get Running Version","description":"Версия, ревизия и тег образа работающего экземпляра. Без авторизации.","operationId":"get_running_version_v1_version_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VersionResponse"}}}}}}},"/v1/content-categories":{"get":{"tags":["Content Categories"],"summary":"Get Content Categories","description":"Получить список всех категорий контента.\n\n**Доступно на всех тарифах (FREE, STARTER, PRO).**\n\nВозвращает метаданные категорий (без промптов для безопасности):\n- name, display_name, icon, color\n- ai_enabled, extract_entities, extract_tags, generate_summary, check_relevance\n\nArgs:\n    current_user: Текущий пользователь\n\nReturns:\n    Словарь с категориями: {content_type: {name, display_name, icon, color, ...}}","operationId":"get_content_categories_v1_content_categories_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentCategoriesResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/content-categories/stats":{"get":{"tags":["Content Categories"],"summary":"Get Category Stats","description":"Получить статистику использования категорий контента (V2: UserBookmark + CanonicalResource).\n\n**Доступно на всех тарифах (FREE, STARTER, PRO).**\n\nV2: Категории определяются динамически из canonical_url:\n- hash:// = text\n- https:// = url\n\nReturns:\n    CategoryStatsResponse со статистикой по категориям","operationId":"get_category_stats_v1_content_categories_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__content_categories__CategoryStatsResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/usage/ai":{"get":{"tags":["usage"],"summary":"Get Ai Usage Status","description":"Разборы против капа — из QuotaService.get_ai_requests_info (v3).\n\nscope говорит, за что считается used: «lifetime» у FREE (первые 20\nнавсегда), «month» у PRO (500 в месяц), «none» — капа нет; limit тогда\nnull. resets_at — начало следующего месяца для месячного капа.","operationId":"get_ai_usage_status_v1_usage_ai_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIUsageResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/categories":{"get":{"tags":["Categories"],"summary":"Get Categories","description":"Список системных категорий таксономии + per-user counts (включая count=0).\n\nДоступно на всех тарифах. Используется для навигации/фильтра по категориям.","operationId":"get_categories_v1_categories_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoriesResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/categories/stats":{"get":{"tags":["Categories"],"summary":"Get Categories Stats","description":"Распределение закладок пользователя по категориям (только непустые).\n\npercentage — доля закладок юзера в категории (закладка может попадать в\nнесколько категорий, поэтому сумма долей может превышать 100%).","operationId":"get_categories_stats_v1_categories_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__categories__CategoryStatsResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/categories/user":{"get":{"tags":["Categories"],"summary":"List My Categories","description":"Личные категории текущего юзера (изоляция по owner_user_id).","operationId":"list_my_categories_v1_categories_user_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/UserCategoryItem"},"type":"array","title":"Response List My Categories V1 Categories User Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Categories"],"summary":"Create My Category","description":"Создать личную категорию (дедуп/reuse системной — без дубля; лимит из config).","operationId":"create_my_category_v1_categories_user_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCategoryCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCategoryItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/categories/user/{category_id}":{"delete":{"tags":["Categories"],"summary":"Delete My Category","description":"Удалить СВОЮ личную категорию (CASCADE снимает назначения).","operationId":"delete_my_category_v1_categories_user__category_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"category_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Category Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/categories/bookmarks/{bookmark_id}/{category}":{"put":{"tags":["Categories"],"summary":"Assign Category To Bookmark","description":"Повесить категорию (системную или свою личную) на свою закладку.\n\n`category` — идентификатор ЛИБО slug. Параметр был объявлен как UUID, а\nклиенту доступен только slug (GET /v1/categories идентификатора не\nотдаёт), поэтому назначение с карточки отдавало 422 на каждой попытке.\nРазрешение ссылки и старшинство при совпадении slug — в\nuser_category_service.resolve_assignable_category.","operationId":"assign_category_to_bookmark_v1_categories_bookmarks__bookmark_id___category__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"bookmark_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Bookmark Id"}},{"name":"category","in":"path","required":true,"schema":{"type":"string","title":"Category"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Categories"],"summary":"Unassign Category From Bookmark","description":"Снять категорию со своей закладки (no-op, если назначения не было).\n\n`category` — идентификатор ЛИБО slug, как и у назначения. Ссылка, которую\nразрешить НЕ УДАЛОСЬ, даёт 404: «снять то, чего нет в справочнике» — это\nошибка клиента, а не пустая операция. Разрешённая, но не назначенная\nкатегория по-прежнему даёт 204 и ничего не меняет.","operationId":"unassign_category_from_bookmark_v1_categories_bookmarks__bookmark_id___category__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"bookmark_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Bookmark Id"}},{"name":"category","in":"path","required":true,"schema":{"type":"string","title":"Category"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/collections/{collection_id}/bookmarks":{"post":{"tags":["Collections"],"summary":"Add Bookmark To Collection","description":"Добавить закладку в коллекцию (для ручных коллекций).\n\nArgs:\n    collection_id: ID коллекции\n    request: Данные с ID закладки\n    current_user: Текущий пользователь\n    db: Сессия БД\n\nRaises:\n    HTTPException 404: Если коллекция не найдена\n    HTTPException 400: Если закладка не найдена или достигнут лимит","operationId":"add_bookmark_to_collection_v1_collections__collection_id__bookmarks_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"collection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Collection Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddBookmarkToCollectionRequest"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Collections"],"summary":"Get Collection Bookmarks","description":"Получить закладки коллекции.\n\nArgs:\n    collection_id: ID коллекции\n    skip: Смещение для пагинации\n    limit: Лимит результатов\n    current_user: Текущий пользователь\n    db: Сессия БД\n\nReturns:\n    Список закладок коллекции с общим количеством\n\nRaises:\n    HTTPException 404: Если коллекция не найдена","operationId":"get_collection_bookmarks_v1_collections__collection_id__bookmarks_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"collection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Collection Id"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Смещение для пагинации","default":0,"title":"Skip"},"description":"Смещение для пагинации"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Лимит результатов","default":50,"title":"Limit"},"description":"Лимит результатов"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookmarkListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/collections/{collection_id}/bookmarks/{bookmark_id}":{"delete":{"tags":["Collections"],"summary":"Remove Bookmark From Collection","description":"Удалить закладку из коллекции.\n\nArgs:\n    collection_id: ID коллекции\n    bookmark_id: ID закладки\n    current_user: Текущий пользователь\n    db: Сессия БД\n\nRaises:\n    HTTPException 404: Если коллекция не найдена","operationId":"remove_bookmark_from_collection_v1_collections__collection_id__bookmarks__bookmark_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"collection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Collection Id"}},{"name":"bookmark_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Bookmark Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/collections":{"post":{"tags":["Collections"],"summary":"Create Collection","description":"Создать новую коллекцию.\n\nArgs:\n    collection_data: Данные для создания коллекции\n    current_user: Текущий пользователь\n    db: Сессия БД\n\nReturns:\n    Созданная коллекция\n\nКоллекции НЕ ограничены тарифом. Здесь стояла проверка\n``QuotaService.check_collections_quota`` — она снята вместе с ключом\nколлекций в витрине решением #100, и решение #113 её НЕ возвращает:\nрешением #112 финансовая модель переосмысляется целиком, а до тех пор\nвозвращать платный гейт значило бы восстановить обещание, за которым\nникакого решения о цене не стоит.","operationId":"create_collection_v1_collections_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Collections"],"summary":"Get Collections","description":"Получить список коллекций пользователя.\n\nArgs:\n    skip: Смещение для пагинации\n    limit: Лимит результатов\n    collection_type: Фильтр по типу коллекции\n    search: Поиск по названию\n    current_user: Текущий пользователь\n    db: Сессия БД\n\nReturns:\n    Список коллекций с общим количеством","operationId":"get_collections_v1_collections_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Смещение для пагинации","default":0,"title":"Skip"},"description":"Смещение для пагинации"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Лимит результатов","default":50,"title":"Limit"},"description":"Лимит результатов"},{"name":"collection_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Фильтр по типу: manual или auto","title":"Collection Type"},"description":"Фильтр по типу: manual или auto"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Поиск по названию","title":"Search"},"description":"Поиск по названию"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/collections/from-theme/{slug}":{"post":{"tags":["Collections"],"summary":"Create Collection From Theme","description":"Поделиться темой: rule-коллекция с составом по действующей теме (решение #167).\n\nОдна на (пользователь, тема): повторный вызов возвращает ту же (201 сохранён\nради простоты клиента — тело одинаково). Имя, иконка и цвет — из таксономии;\nсостав не хранится, считается на лету, нечему устаревать.","operationId":"create_collection_from_theme_v1_collections_from_theme__slug__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/collections/{collection_id}":{"get":{"tags":["Collections"],"summary":"Get Collection","description":"Получить коллекцию по ID.\n\nArgs:\n    collection_id: ID коллекции\n    current_user: Текущий пользователь\n    db: Сессия БД\n\nReturns:\n    Коллекция\n\nRaises:\n    HTTPException 404: Если коллекция не найдена или не принадлежит пользователю","operationId":"get_collection_v1_collections__collection_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"collection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Collection Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Collections"],"summary":"Update Collection","description":"Обновить коллекцию.\n\nArgs:\n    collection_id: ID коллекции\n    collection_data: Данные для обновления\n    current_user: Текущий пользователь\n    db: Сессия БД\n\nReturns:\n    Обновленная коллекция\n\nRaises:\n    HTTPException 404: Если коллекция не найдена или не принадлежит пользователю","operationId":"update_collection_v1_collections__collection_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"collection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Collection Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Collections"],"summary":"Delete Collection","description":"Удалить коллекцию.\n\nArgs:\n    collection_id: ID коллекции\n    current_user: Текущий пользователь\n    db: Сессия БД\n\nRaises:\n    HTTPException 404: Если коллекция не найдена или не принадлежит пользователю","operationId":"delete_collection_v1_collections__collection_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"collection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Collection Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/users/profile":{"get":{"tags":["Users"],"summary":"Get User Profile","description":"Get current user profile.","operationId":"get_user_profile_v1_users_profile_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfile"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/users/settings":{"get":{"tags":["Users"],"summary":"Get User Settings","description":"Get user settings.","operationId":"get_user_settings_v1_users_settings_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserSettings"}}}}},"security":[{"HTTPBearer":[]}]},"patch":{"tags":["Users"],"summary":"Update User Settings","description":"Update user settings.","operationId":"update_user_settings_v1_users_settings_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserSettings"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserSettings"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/users/statistics":{"get":{"tags":["Users"],"summary":"Get User Statistics","description":"Get user statistics (V2: UserBookmark + CanonicalResource).","operationId":"get_user_statistics_v1_users_statistics_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserStatistics"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/users/me/onboarding":{"get":{"tags":["Users"],"summary":"Get Onboarding Status","description":"Get user's onboarding completion status.","operationId":"get_onboarding_status_v1_users_me_onboarding_get","security":[{"HTTPBearer":[]}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingStatusResponse"}}}}}},"patch":{"tags":["Users"],"summary":"Update Onboarding Status","description":"Update user's onboarding completion status.","operationId":"update_onboarding_status_v1_users_me_onboarding_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"completed","in":"query","required":true,"schema":{"type":"boolean","title":"Completed"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/users/me/relevance-stats":{"get":{"tags":["Users"],"summary":"Get User Relevance Stats","description":"Get user's relevance checking statistics (V2: UserBookmark + CanonicalResource).\n\nReturns:\n    Quota usage, outdated count, average score, actions taken","operationId":"get_user_relevance_stats_v1_users_me_relevance_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RelevanceStatsResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/contact":{"post":{"tags":["Contact"],"summary":"Submit Contact Form","description":"Submit a contact form message.\n\nВеб-форма и /support в боте-менеджере идут через один сервис\n(services.support_service): одна таблица, одно уведомление админу,\nответ уходит туда, откуда пришёл вопрос.\n\nRate limited to 3 messages per hour per email to prevent spam.","operationId":"submit_contact_form_v1_contact_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactMessageCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactMessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/contact/{message_id}":{"get":{"tags":["Contact"],"summary":"Get Contact Message","description":"Get a contact message by ID.\n\nRequires admin privileges.\n\nArgs:\n    message_id: Contact message UUID\n    db: Database session\n    current_admin: Admin user (auto-injected, requires admin privileges)\n\nReturns:\n    Contact message\n\nRaises:\n    HTTPException: If message not found","operationId":"get_contact_message_v1_contact__message_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"message_id","in":"path","required":true,"schema":{"type":"string","title":"Message Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactMessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/integrations/status":{"get":{"tags":["Integrations"],"summary":"Get Integrations Status","description":"Get status of all external integrations.\n\nReturns which platforms are linked to the user's account.","operationId":"get_integrations_status_v1_integrations_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationsStatusResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/integrations/vk/link":{"post":{"tags":["Integrations"],"summary":"Link Vk Account","description":"Link VK account using code from bot.\n\nSteps:\n1. User sends /start to VK bot\n2. Bot generates 6-character code\n3. User enters code here\n4. Account is linked","operationId":"link_vk_account_v1_integrations_vk_link_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkVKRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkVKResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/integrations/vk/unlink":{"delete":{"tags":["Integrations"],"summary":"Unlink Vk Account","description":"Unlink VK account from user.","operationId":"unlink_vk_account_v1_integrations_vk_unlink_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkVKResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/integrations/telegram/unlink":{"delete":{"tags":["Integrations"],"summary":"Unlink Telegram Account","description":"Unlink Telegram account from user.\n\nRequirements:\n- Telegram must be linked to the account\n- User must have a password set (to prevent account lockout)","operationId":"unlink_telegram_account_v1_integrations_telegram_unlink_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnlinkTelegramResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/invitations/registration-status":{"get":{"tags":["Invitations"],"summary":"Get Registration Status","description":"Проверить статус регистрации (доступна или требуется приглашение).\n\nИспользуется frontend для переключения между формой регистрации\nи формой запроса приглашения.","operationId":"get_registration_status_v1_invitations_registration_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegistrationStatusResponse"}}}}}}},"/v1/invitations/request":{"post":{"tags":["Invitations"],"summary":"Create Invitation Request","description":"Создать заявку на приглашение.\n\nДоступно только когда DISABLE_REGISTRATION=true.\nСоздает заявку и AdminNotification для отправки в Telegram администраторам.\nRate limited: max 3 invitation requests per 24 hours per email.","operationId":"create_invitation_request_v1_invitations_request_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationRequestCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationRequestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/bookmarks/{bookmark_id}/extracted-links":{"get":{"tags":["Links"],"summary":"List links extracted from a bookmark","operationId":"list_bookmark_links_v1_bookmarks__bookmark_id__extracted_links_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"bookmark_id","in":"path","required":true,"schema":{"type":"string","title":"Bookmark Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__schemas__link__LinksListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/canonical-resources/{resource_id}/links":{"get":{"tags":["Links"],"summary":"List links aggregated across all bookmarks of a resource","operationId":"list_resource_links_v1_canonical_resources__resource_id__links_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"resource_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Resource Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__schemas__link__LinksListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/links/{link_id}/promote":{"post":{"tags":["Links"],"summary":"Promote a link into a full bookmark + canonical resource","operationId":"promote_link_v1_links__link_id__promote_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"link_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Link Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkPromoteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/links/{link_id}/pin":{"post":{"tags":["Links"],"summary":"Pin a link to the current user's personal collection","operationId":"pin_link_v1_links__link_id__pin_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"link_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Link Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Links"],"summary":"Unpin a link from the current user's personal collection","operationId":"unpin_link_v1_links__link_id__pin_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"link_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Link Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/me/links":{"get":{"tags":["Links"],"summary":"List the current user's pinned (UserLink) standalone links","operationId":"my_pinned_links_v1_me_links_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/media/auth/media/{file_path}":{"get":{"tags":["media"],"summary":"Auth Media File","description":"Auth endpoint for Nginx auth_request.\n\nChecks if the authenticated user owns the requested media file.\nReturns 200 OK if authorized, 404 if not found/unauthorized.\n\nThis is an internal endpoint used by nginx-media service.\n\nArgs:\n    file_path: Relative path to file (e.g., \"images/123.jpg\")\n    current_user: Authenticated user\n    db: Database session\n\nReturns:\n    200 OK if user owns the file\n    404 Not Found if file doesn't belong to user","operationId":"auth_media_file_v1_media_auth_media__file_path__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"file_path","in":"path","required":true,"schema":{"type":"string","description":"Relative path to file in storage","title":"File Path"},"description":"Relative path to file in storage"},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Access token from cookie","title":"Access Token"},"description":"Access token from cookie"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/media/file/{file_path}":{"get":{"tags":["media"],"summary":"Get Media File","description":"Get media file by path.\n\nFor S3/MinIO: Returns presigned URL (redirect)\nFor local storage: Returns file directly\n\nArgs:\n    file_path: Relative path to file (e.g., \"images/123.jpg\")\n    current_user: Authenticated user\n    db: Database session\n\nReturns:\n    Streamed Response (S3) or FileResponse (local storage)\n\nSecurity:\n    Verifies that the requested file belongs to the authenticated user.\n    S3 files are streamed through backend to prevent presigned URL leakage.","operationId":"get_media_file_v1_media_file__file_path__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"file_path","in":"path","required":true,"schema":{"type":"string","description":"Relative path to file in storage","title":"File Path"},"description":"Relative path to file in storage"},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Access token from cookie","title":"Access Token"},"description":"Access token from cookie"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/media/thumbnail/{file_path}":{"get":{"tags":["media"],"summary":"Get Thumbnail","description":"Get thumbnail by path.\n\nFor S3/MinIO: Returns presigned URL (redirect)\nFor local storage: Returns file directly\n\nArgs:\n    file_path: Relative path to thumbnail (e.g., \"thumbnails/123_thumb.jpg\")\n    current_user: Authenticated user\n    db: Database session\n\nReturns:\n    RedirectResponse to presigned URL or FileResponse for local files\n\nSecurity:\n    Uses same security checks as get_media_file (verifies ownership)","operationId":"get_thumbnail_v1_media_thumbnail__file_path__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"file_path","in":"path","required":true,"schema":{"type":"string","description":"Relative path to thumbnail in storage","title":"File Path"},"description":"Relative path to thumbnail in storage"},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Access token from cookie","title":"Access Token"},"description":"Access token from cookie"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/media/download/{file_path}":{"get":{"tags":["media"],"summary":"Download Media File","description":"Download media file with Content-Disposition: attachment header.\n\nForces browser to download the file instead of displaying it.\n\nArgs:\n    file_path: Relative path to file (e.g., \"images/123.jpg\")\n    current_user: Authenticated user\n    db: Database session\n\nReturns:\n    StreamingResponse with attachment headers for download","operationId":"download_media_file_v1_media_download__file_path__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"file_path","in":"path","required":true,"schema":{"type":"string","description":"Relative path to file in storage","title":"File Path"},"description":"Relative path to file in storage"},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Access token from cookie","title":"Access Token"},"description":"Access token from cookie"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/media/presigned-url/{file_path}":{"get":{"tags":["media"],"summary":"Get Presigned Url","description":"Get presigned URL for file access.\n\nUseful for frontend to get direct URLs without redirects.\n\nArgs:\n    file_path: Relative path to file\n    expires_in: URL expiration time in seconds (default: 1 hour)\n    current_user: Authenticated user\n    db: Database session\n\nReturns:\n    JSON with presigned URL\n\nSecurity:\n    Verifies that the requested file belongs to the authenticated user","operationId":"get_presigned_url_v1_media_presigned_url__file_path__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"file_path","in":"path","required":true,"schema":{"type":"string","description":"Relative path to file in storage","title":"File Path"},"description":"Relative path to file in storage"},{"name":"expires_in","in":"query","required":false,"schema":{"type":"integer","default":3600,"title":"Expires In"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/media/{media_id}":{"delete":{"tags":["media"],"summary":"Delete Media File","description":"Delete a media file from a bookmark.\n\nAlso decrements storage quota for the user.\n\nArgs:\n    media_id: UUID of the media file to delete\n    current_user: Authenticated user\n    db: Database session\n\nRaises:\n    HTTPException: If media file not found or not owned by user","operationId":"delete_media_file_v1_media__media_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"media_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Media Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/media/bookmark/{bookmark_id}/all":{"delete":{"tags":["media"],"summary":"Delete All Media Files","description":"Delete all media files from a bookmark.\n\nAlso decrements storage quota for the user.\n\nArgs:\n    bookmark_id: UUID of the bookmark\n    current_user: Authenticated user\n    db: Database session\n\nRaises:\n    HTTPException: If bookmark not found or not owned by user","operationId":"delete_all_media_files_v1_media_bookmark__bookmark_id__all_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"bookmark_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Bookmark Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/balance":{"get":{"tags":["Payments"],"summary":"Get Balance","operationId":"get_balance_v1_balance_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BalanceResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/payments/init":{"post":{"tags":["Payments"],"summary":"Post Payment Init","description":"Start payment for subscription period or token package (T-Bank redirect).","operationId":"post_payment_init_v1_payments_init_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InitPaymentRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InitPaymentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/payments/methods":{"get":{"tags":["Payments"],"summary":"Get Payment Methods","description":"Enabled checkout methods (order = UI priority; first/default shown on top).","operationId":"get_payment_methods_v1_payments_methods_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentMethodsResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/packages":{"get":{"tags":["Payments"],"summary":"Get Packages","operationId":"get_packages_v1_packages_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackagesListResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/packages/{package_id}/purchase":{"post":{"tags":["Payments"],"summary":"Post Package Purchase","operationId":"post_package_purchase_v1_packages__package_id__purchase_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"package_id","in":"path","required":true,"schema":{"type":"string","title":"Package Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/PackagePurchaseRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InitPaymentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/payments/transactions":{"get":{"tags":["Payments"],"summary":"List Transactions","description":"Свои платежи, свежие первыми, страницами по курсору.","operationId":"list_transactions_v1_payments_transactions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Transactions V1 Payments Transactions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/payments/webhooks/tbank":{"post":{"tags":["Payments"],"summary":"T-Bank payment notification (HMAC body)","description":"T-Bank sends JSON; body must be verified with Token before use.","operationId":"post_tbank_payment_webhook_v1_payments_webhooks_tbank_post","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/v1/payments/webhooks/rollypay":{"post":{"tags":["Payments"],"summary":"RollyPay payment notification (HMAC X-Signature)","description":"RollyPay sends JSON; signature is verified over the raw body before use.","operationId":"post_rollypay_payment_webhook_v1_payments_webhooks_rollypay_post","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/v1/payments/_dev/fake-confirm":{"post":{"tags":["Payments"],"summary":"Post Fake Confirm","description":"Confirm (or fail) a fake-provider transaction — non-production only.","operationId":"post_fake_confirm_v1_payments__dev_fake_confirm_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FakeConfirmRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FakeConfirmResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/me/profile":{"get":{"tags":["Profile"],"summary":"Get current user's public profile","operationId":"get_my_profile_v1_me_profile_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileResponse"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["Profile"],"summary":"Unpublish profile (data is preserved)","description":"Flip is_public to False without touching anything else.\n\nData semantics:\n  - profile_slug, display_name, bio, profile_published_at are all\n    preserved. Re-publishing later (PATCH is_public=True) keeps\n    the original profile_published_at — it serves as the stable\n    \"joined on X\" anchor on the public page rather than a\n    currently-published-since marker.\n  - If product later wants \"currently published since\" semantics\n    instead of \"joined on X\", reset profile_published_at = None\n    here AND drop the `if ... is None` guard in patch_my_profile.","operationId":"unpublish_my_profile_v1_me_profile_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileResponse"}}}}},"security":[{"HTTPBearer":[]}]},"patch":{"tags":["Profile"],"summary":"Update current user's profile fields","operationId":"patch_my_profile_v1_me_profile_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/me/profile/slug":{"post":{"tags":["Profile"],"summary":"Set or auto-generate the profile slug","operationId":"change_my_slug_v1_me_profile_slug_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileSlugChange"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/share/bookmark/{bookmark_id}/request":{"post":{"tags":["Share"],"summary":"Publish a bookmark instantly (link_only|public)","operationId":"request_share_v1_share_bookmark__bookmark_id__request_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"bookmark_id","in":"path","required":true,"schema":{"type":"string","title":"Bookmark Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareRequestBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareStateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/share/bookmark/{bookmark_id}/cancel":{"post":{"tags":["Share"],"summary":"Unpublish a bookmark (back to private)","operationId":"cancel_share_v1_share_bookmark__bookmark_id__cancel_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"bookmark_id","in":"path","required":true,"schema":{"type":"string","title":"Bookmark Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareStateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/share/bookmark/{bookmark_id}/change-level":{"post":{"tags":["Share"],"summary":"Owner switches share level (link_only<->public, instant)","operationId":"change_share_level_v1_share_bookmark__bookmark_id__change_level_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"bookmark_id","in":"path","required":true,"schema":{"type":"string","title":"Bookmark Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareLevelChangeBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareStateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/share/my":{"get":{"tags":["Share"],"summary":"Current user's publications grouped by state","operationId":"my_shares_v1_share_my_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareGroupedListResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/share/bookmark/{bookmark_id}/stats":{"get":{"tags":["Share","Share"],"summary":"Daily share view stats for an owner's bookmark","description":"Owner-only daily aggregate of share views.\n\nrange = '7d' or '30d'. Returns ShareStatsResponse with a daily\narray sorted ascending by view_date and totals across the window.","operationId":"share_stats_v1_share_bookmark__bookmark_id__stats_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"bookmark_id","in":"path","required":true,"schema":{"type":"string","title":"Bookmark Id"}},{"name":"range","in":"query","required":false,"schema":{"type":"string","default":"7d","title":"Range"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareStatsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/share/my/stats":{"get":{"tags":["Share","Share"],"summary":"Aggregate stats for all of the user's published shares","description":"One-shot bulk endpoint that replaces N+1 calls to\n`/v1/share/bookmark/{id}/stats` from the publications dashboard.\n\nReturns one row per bookmark the current user owns that has at\nleast one share_view_stats record in the requested window.\nRows for bookmarks without any stats in-window are simply absent\n— callers default to {total_views: 0, total_unique: 0}.\n\nAdds Cache-Control: private, max-age=60 so a refreshed dashboard\ninside the same minute hits the browser cache instead of round-\ntripping again.","operationId":"my_shares_stats_v1_share_my_stats_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"range","in":"query","required":false,"schema":{"type":"string","default":"7d","title":"Range"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareMyStatsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/share/{short_id}/import-state":{"get":{"tags":["Share"],"summary":"Import State","description":"Что показывать вошедшему: автор ли он и какие элементы у него уже есть.\n\nВладелец, 14.09.2026: кнопку не показывать автору и тем, у кого закладка\nуже есть. Сохранённость считается по общему ресурсу — тот же адрес в\nбиблиотеке читателя, даже если он сохранил его сам, а не отсюда.","operationId":"import_state_v1_share__short_id__import_state_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"short_id","in":"path","required":true,"schema":{"type":"string","title":"Short Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareImportStateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/share/{short_id}/import":{"post":{"tags":["Share"],"summary":"Import Share","operationId":"import_share_v1_share__short_id__import_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"short_id","in":"path","required":true,"schema":{"type":"string","title":"Short Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ShareImportRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareImportResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/share/{target_type}/{target_id}/request":{"post":{"tags":["Share","Share"],"summary":"Publish a tag/collection/user_link instantly","operationId":"request_share_generic_v1_share__target_type___target_id__request_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"target_type","in":"path","required":true,"schema":{"type":"string","title":"Target Type"}},{"name":"target_id","in":"path","required":true,"schema":{"type":"string","title":"Target Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareRequestBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareStateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/share/{target_type}/{target_id}/cancel":{"post":{"tags":["Share","Share"],"summary":"Unpublish a tag/collection/user_link (back to private)","operationId":"cancel_share_generic_v1_share__target_type___target_id__cancel_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"target_type","in":"path","required":true,"schema":{"type":"string","title":"Target Type"}},{"name":"target_id","in":"path","required":true,"schema":{"type":"string","title":"Target Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareStateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/share/{target_type}/{target_id}/change-level":{"post":{"tags":["Share","Share"],"summary":"Owner switches share level on tag/collection/user_link","operationId":"change_level_generic_v1_share__target_type___target_id__change_level_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"target_type","in":"path","required":true,"schema":{"type":"string","title":"Target Type"}},{"name":"target_id","in":"path","required":true,"schema":{"type":"string","title":"Target Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareLevelChangeBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareStateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/share/{target_type}/{target_id}/exclusions":{"patch":{"tags":["Share","Share"],"summary":"Set share exclusions list (tag/collection only)","description":"Replace the target's share_exclusions list. Only meaningful for\ncollection target type — bookmark / user_link return 422.\nInvalid UUIDs in the input array are silently dropped so the FE\ncan be permissive about input formatting.","operationId":"set_share_exclusions_v1_share__target_type___target_id__exclusions_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"target_type","in":"path","required":true,"schema":{"type":"string","title":"Target Type"}},{"name":"target_id","in":"path","required":true,"schema":{"type":"string","title":"Target Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/_ExclusionsBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareStateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/subscriptions/info":{"get":{"tags":["Subscriptions"],"summary":"Get Subscription Info","operationId":"get_subscription_info_v1_subscriptions_info_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionInfoResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/subscriptions/upgrade":{"post":{"tags":["Subscriptions"],"summary":"Post Subscription Upgrade","operationId":"post_subscription_upgrade_v1_subscriptions_upgrade_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionUpgradeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InitPaymentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/subscriptions/cancel":{"post":{"tags":["Subscriptions"],"summary":"Post Subscription Cancel","operationId":"post_subscription_cancel_v1_subscriptions_cancel_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"boolean"},"type":"object","title":"Response Post Subscription Cancel V1 Subscriptions Cancel Post"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/subscriptions/reactivate":{"post":{"tags":["Subscriptions"],"summary":"Post Subscription Reactivate","operationId":"post_subscription_reactivate_v1_subscriptions_reactivate_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"boolean"},"type":"object","title":"Response Post Subscription Reactivate V1 Subscriptions Reactivate Post"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/subscription/status":{"get":{"tags":["Subscriptions"],"summary":"Get Subscription Status","description":"Consolidated subscription + quota snapshot for the FE statistics\nand billing pages.\n\nFrontend (`frontend/src/app/statistics/page.js`) calls\n`/v1/subscription/status` (singular) and expects a single payload\ncarrying both the user's subscription block and a flat quota_status\nblock. Previously this endpoint didn't exist, so the page silently\nNetworkError'd on load and the apiClient surfaced it as the generic\n\"Проверьте подключение к интернету\" toast.","operationId":"get_subscription_status_v1_subscription_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionStatusResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/subscription/plans":{"get":{"tags":["Subscriptions"],"summary":"Get Plans","description":"Периоды PRO с ценами — для окна оплаты (v3: 1/3/12 месяцев).\n\nЧитается из pricing.yaml через currency_service, чтобы витрина и\nкасса называли одну цену. Годовой — по умолчанию: при оплате руками\nодна оплата в год лучше двенадцати.","operationId":"get_plans_v1_subscription_plans_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlansResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/public/share/{short_id}":{"get":{"tags":["Public"],"summary":"Public read of an approved share (no auth)","operationId":"get_public_share_v1_public_share__short_id__get","parameters":[{"name":"short_id","in":"path","required":true,"schema":{"type":"string","title":"Short Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":20,"title":"Per Page"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicShareResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/public/u/{slug}":{"get":{"tags":["Public"],"summary":"Public profile page (no auth)","operationId":"get_public_profile_v1_public_u__slug__get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":20,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicProfileViewResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/public/share/{short_id}/rss":{"get":{"tags":["Public"],"summary":"RSS 2.0 of a public collection share (no auth, no view tracking)","operationId":"get_public_share_rss_v1_public_share__short_id__rss_get","parameters":[{"name":"short_id","in":"path","required":true,"schema":{"type":"string","title":"Short Id"}}],"responses":{"200":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/search/suggestions":{"get":{"tags":["Search","Search"],"summary":"Autocomplete suggestions from user's own corpus","description":"Return up to `limit` deduped suggestion strings derived from the\nuser's own bookmarks (titles, summaries, llm_tags).","operationId":"get_suggestions_v1_search_suggestions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"description":"Current input","title":"Q"},"description":"Current input"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":20,"minimum":1,"description":"Max suggestions","default":8,"title":"Limit"},"description":"Max suggestions"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuggestionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/search":{"get":{"tags":["Search"],"summary":"Search","description":"Поиск закладок с полнотекстовым и морфологическим поиском.\n\n**Доступно для всех тарифов (FREE, STARTER, PRO).**\n\nИспользует pg_trgm для морфологического поиска:\n- Поддержка русского языка (учитывает падежи, склонения)\n- Пример: \"книга\" найдет \"книги\", \"книгу\", \"книгой\"\n- Нечеткое совпадение (fuzzy search) для опечаток\n\nИщет в:\n- Title (высокий приоритет)\n- Description\n- Content (для text content_type)\n- URL\n- LLM summary и tags\n\nПоддерживает фильтры:\n- Category\n- Content type\n- Favorite status\n\nArgs:\n    q: Поисковый запрос\n    category_id: Фильтр по категории\n    content_type: Фильтр по типу контента\n    is_favorite: Фильтр избранного\n    limit: Результатов на странице (1-100)\n    offset: Смещение для пагинации\n    current_user: Текущий аутентифицированный пользователь\n    db: Сессия БД\n\nReturns:\n    Список закладок с общим количеством\n\nExamples:\n    GET /api/v1/search?q=python\n    GET /api/v1/search?q=книга  # Найдет \"книги\", \"книгу\", \"книгой\"\n    GET /api/v1/search?q=tutorial&content_type=URL&limit=20\n    GET /api/v1/search?category_id=1&is_favorite=true","operationId":"search_v1_search_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":2,"maxLength":200},{"type":"null"}],"description":"Search query (min 2 chars; prefix-matched for type-ahead)","title":"Q"},"description":"Search query (min 2 chars; prefix-matched for type-ahead)"},{"name":"category_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Filter by category ID","title":"Category Id"},"description":"Filter by category ID"},{"name":"content_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by content type (url/text)","title":"Content Type"},"description":"Filter by content type (url/text)"},{"name":"is_favorite","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by favorite status","title":"Is Favorite"},"description":"Filter by favorite status"},{"name":"mode","in":"query","required":false,"schema":{"type":"string","pattern":"^(and|or)$","description":"Match mode: 'and' (default, all tokens required) or 'or' (any token)","default":"and","title":"Mode"},"description":"Match mode: 'and' (default, all tokens required) or 'or' (any token)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Max results per page","default":50,"title":"Limit"},"description":"Max results per page"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Results offset for pagination","default":0,"title":"Offset"},"description":"Results offset for pagination"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookmarkListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/search/semantic":{"get":{"tags":["Search","AI Search"],"summary":"Semantic Search","description":"Семантический поиск по закладкам с использованием AI embeddings.\n\nПоиск по смыслу, а не по точным словам:\n- \"рецепт пасты\" → найдет \"карбонара\", \"болоньезе\"\n- \"python tutorial\" → найдет \"FastAPI guide\", \"Flask intro\"\n- \"best practices\" → найдет \"coding standards\", \"clean code\"\n\n**Доступно на всех тарифах (v5: поиск — ядро продукта).**\n\nNow supports all filters from standard search!\n\nUses:\n- Yandex Foundation Models (text-search-doc/query, 256d)\n\nArgs:\n    q: Поисковый запрос (минимум 3 символа)\n    limit: Максимум результатов (1-100)\n    similarity_threshold: Минимальный порог схожести (0.0-1.0)\n    tag_ids: Comma-separated tag UUIDs for filtering\n    content_type: Filter by content type\n    source: Filter by source (web/telegram/vk/extension)\n    is_favorite: Filter by favorite status\n    created_after: Filter by creation date (after)\n    created_before: Filter by creation date (before)\n    current_user: Текущий аутентифицированный пользователь\n    db: Database session\n\nReturns:\n    List[dict]: Закладки с search_score (похожесть 0.0-1.0)\n\nExamples:\n    GET /api/v1/search/semantic?q=рецепт пасты\n    GET /api/v1/search/semantic?q=python tutorial&limit=10&similarity_threshold=0.7\n    GET /api/v1/search/semantic?q=tutorial&tag_ids=uuid1,uuid2&content_type=url","operationId":"semantic_search_v1_search_semantic_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":200,"description":"Semantic search query (minimum 3 characters)","title":"Q"},"description":"Semantic search query (minimum 3 characters)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Max results","default":20,"title":"Limit"},"description":"Max results"},{"name":"similarity_threshold","in":"query","required":false,"schema":{"type":"number","maximum":1.0,"minimum":0.0,"description":"Minimum similarity threshold (0.0-1.0)","default":0.5,"title":"Similarity Threshold"},"description":"Minimum similarity threshold (0.0-1.0)"},{"name":"tag_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by tags (comma-separated UUIDs)","title":"Tag Ids"},"description":"Filter by tags (comma-separated UUIDs)"},{"name":"content_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by content type","title":"Content Type"},"description":"Filter by content type"},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by source (web/telegram/vk/extension)","title":"Source"},"description":"Filter by source (web/telegram/vk/extension)"},{"name":"is_favorite","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by favorite status","title":"Is Favorite"},"description":"Filter by favorite status"},{"name":"created_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Filter by creation date (after, ISO 8601)","title":"Created After"},"description":"Filter by creation date (after, ISO 8601)"},{"name":"created_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Filter by creation date (before, ISO 8601)","title":"Created Before"},"description":"Filter by creation date (before, ISO 8601)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SemanticSearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/search/hybrid":{"get":{"tags":["Search","AI Search"],"summary":"Hybrid Search","description":"Гибридный поиск (semantic + full-text).\n\nCombines:\n- Semantic search (AI embeddings) → understands meaning\n- Full-text search (PostgreSQL) → exact matches\n\n**Доступно на всех тарифах (v5: поиск — ядро продукта).**\n\nReranks results by: final_score = semantic_weight * semantic_score + (1 - semantic_weight) * text_score\n\nArgs:\n    q: Search query\n    limit: Max results\n    semantic_weight: Weight for semantic results (default: 0.7)\n\nReturns:\n    Merged and reranked results with final_score\n\nExamples:\n    GET /api/v1/search/hybrid?q=python tutorial\n    GET /api/v1/search/hybrid?q=pasta recipes&semantic_weight=0.5","operationId":"hybrid_search_v1_search_hybrid_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":200,"description":"Search query (minimum 3 characters)","title":"Q"},"description":"Search query (minimum 3 characters)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Max results","default":20,"title":"Limit"},"description":"Max results"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Results offset for pagination","default":0,"title":"Offset"},"description":"Results offset for pagination"},{"name":"semantic_weight","in":"query","required":false,"schema":{"type":"number","maximum":1.0,"minimum":0.0,"description":"Weight for semantic results (0.0-1.0)","default":0.7,"title":"Semantic Weight"},"description":"Weight for semantic results (0.0-1.0)"},{"name":"tag_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by tags (comma-separated UUIDs)","title":"Tag Ids"},"description":"Filter by tags (comma-separated UUIDs)"},{"name":"content_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by content type (url/text)","title":"Content Type"},"description":"Filter by content type (url/text)"},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by source (web/telegram/vk/extension)","title":"Source"},"description":"Filter by source (web/telegram/vk/extension)"},{"name":"is_favorite","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by favorite status","title":"Is Favorite"},"description":"Filter by favorite status"},{"name":"created_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Filter by creation date (after, ISO 8601)","title":"Created After"},"description":"Filter by creation date (after, ISO 8601)"},{"name":"created_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Filter by creation date (before, ISO 8601)","title":"Created Before"},"description":"Filter by creation date (before, ISO 8601)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HybridSearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/settings":{"get":{"tags":["Settings"],"summary":"Get Settings","description":"Get current user's settings.\n\nReturns default values for any missing settings.","operationId":"get_settings_v1_settings_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserSettingsResponse"}}}}},"security":[{"HTTPBearer":[]}]},"put":{"tags":["Settings"],"summary":"Update Settings","description":"Replace all user settings.\n\nThis endpoint replaces ALL settings. To update only specific fields,\nuse PATCH /settings instead.","operationId":"update_settings_v1_settings_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserSettingsUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserSettingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"patch":{"tags":["Settings"],"summary":"Patch Settings","description":"Partially update user settings.\n\nOnly the provided fields will be updated. Nested objects can be\npartially updated as well.\n\nExample:\n```json\n{\n    \"language\": \"en\",\n    \"notifications\": {\n        \"frequency\": \"daily\"\n    }\n}\n```\n\nThis will update only the language and notification frequency,\nleaving other settings unchanged.","operationId":"patch_settings_v1_settings_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserSettingsPatch"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserSettingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/settings/reset":{"post":{"tags":["Settings"],"summary":"Reset Settings","description":"Reset all settings to defaults.\n\nThis action cannot be undone.","operationId":"reset_settings_v1_settings_reset_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserSettingsResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/settings/defaults":{"get":{"tags":["Settings"],"summary":"Get Default Settings","description":"Get default settings values.\n\nThis endpoint doesn't require authentication and returns\nthe default settings that would be applied to a new user.","operationId":"get_default_settings_v1_settings_defaults_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserSettingsResponse"}}}}}}},"/v1/email/unsubscribe":{"get":{"tags":["Email"],"summary":"Unsubscribe From Emails","description":"Unsubscribe user from marketing emails.\n\nThis is a public endpoint - no authentication required.\nSecurity is provided by the HMAC token.\n\nReturns HTML page with confirmation.","operationId":"unsubscribe_from_emails_v1_email_unsubscribe_get","parameters":[{"name":"user_id","in":"query","required":true,"schema":{"type":"string","description":"User ID","title":"User Id"},"description":"User ID"},{"name":"token","in":"query","required":true,"schema":{"type":"string","description":"Unsubscribe token","title":"Token"},"description":"Unsubscribe token"},{"name":"type","in":"query","required":false,"schema":{"type":"string","description":"Email type: marketing or all","default":"marketing","title":"Type"},"description":"Email type: marketing or all"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/telegram/send-bookmark":{"post":{"tags":["Telegram"],"summary":"Send Bookmark To Telegram","description":"Отправляет закладку пользователю в Telegram (V2: UserBookmark).\n\nТребования:\n- Пользователь должен иметь привязанный Telegram аккаунт (telegram_id)\n- Закладка должна принадлежать текущему пользователю\n\nArgs:\n    request: bookmark_id\n    current_user: Текущий пользователь\n    db: Database session\n\nReturns:\n    SendBookmarkResponse: Результат отправки\n\nRaises:\n    HTTPException(400): Если Telegram не привязан\n    HTTPException(404): Если закладка не найдена\n    HTTPException(403): Если закладка не принадлежит пользователю","operationId":"send_bookmark_to_telegram_v1_telegram_send_bookmark_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendBookmarkRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendBookmarkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/relevance-settings":{"get":{"tags":["relevance-settings"],"summary":"Get Relevance Settings","description":"Get user's relevance check settings.\n\nReturns global settings and per-category overrides.","operationId":"get_relevance_settings_v1_relevance_settings_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RelevanceSettingsResponse"}}}}},"security":[{"HTTPBearer":[]}]},"patch":{"tags":["relevance-settings"],"summary":"Update Relevance Settings","description":"Update user's relevance check settings.\n\nOnly updates provided fields, keeps others unchanged.","operationId":"update_relevance_settings_v1_relevance_settings_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RelevanceSettingsUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RelevanceSettingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/relevance-settings/categories/{category_name}":{"put":{"tags":["relevance-settings"],"summary":"Update Category Settings","description":"Update relevance check settings for specific category.\n\nPer-category settings override global settings.","operationId":"update_category_settings_v1_relevance_settings_categories__category_name__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"category_name","in":"path","required":true,"schema":{"type":"string","title":"Category Name"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryRelevanceSettings"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RelevanceSettingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["relevance-settings"],"summary":"Delete Category Settings","description":"Remove per-category settings, fall back to global settings.","operationId":"delete_category_settings_v1_relevance_settings_categories__category_name__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"category_name","in":"path","required":true,"schema":{"type":"string","title":"Category Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RelevanceSettingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/relevance-monitoring/upcoming":{"get":{"tags":["relevance-monitoring"],"summary":"Get Upcoming Checks","description":"Get upcoming relevance checks grouped by time period (V2).\n\nReturns bookmarks with scheduled relevance checks in Timeline/Calendar view:\n- Today-Tomorrow\n- This week\n- This month\n- Later","operationId":"get_upcoming_checks_v1_relevance_monitoring_upcoming_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"Max bookmarks to return","default":50,"title":"Limit"},"description":"Max bookmarks to return"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpcomingChecksResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/relevance-monitoring/history":{"get":{"tags":["relevance-monitoring"],"summary":"Get Check History","description":"Get recent relevance check history (V2).\n\nReturns bookmarks that have been checked, ordered by check date (newest first).","operationId":"get_check_history_v1_relevance_monitoring_history_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"Max items to return","default":50,"title":"Limit"},"description":"Max items to return"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecentChecksResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/relevance-monitoring/stats":{"get":{"tags":["relevance-monitoring"],"summary":"Get Monitoring Stats","description":"Get statistics for relevance monitoring dashboard (V2).","operationId":"get_monitoring_stats_v1_relevance_monitoring_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RelevanceMonitoringStats"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/admin/relevance-stats":{"get":{"tags":["admin","analytics"],"summary":"Get Relevance Stats","description":"Get relevance checking statistics for admin dashboard (V2: CanonicalResource).\n\nArgs:\n    period: Time period (today/week/month)\n    db: Database session\n\nReturns:\n    Dict with relevance statistics","operationId":"get_relevance_stats_v1_admin_relevance_stats_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"period","in":"query","required":false,"schema":{"enum":["today","week","month"],"type":"string","default":"week","title":"Period"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/llm/canonical-stats":{"get":{"tags":["admin","llm"],"summary":"Get Canonical Llm Stats","description":"Get LLM analysis statistics for canonical resources (Phase 5).\n\nShows:\n- Total resources analyzed\n- Analysis status breakdown (completed/failed/pending/skipped)\n- Provider breakdown (claude/grok/yandex/cache/etc)\n- Cache hit rate\n- Average analysis time\n- Recent analysis activity\n\nArgs:\n    period: Time period (today/week/month/all)\n    db: Database session\n\nReturns:\n    Dict with LLM analysis statistics","operationId":"get_canonical_llm_stats_v1_admin_llm_canonical_stats_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"period","in":"query","required":false,"schema":{"enum":["today","week","month","all"],"type":"string","default":"week","title":"Period"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/llm/deduplication-impact":{"get":{"tags":["admin","llm"],"summary":"Get Deduplication Impact","description":"Get deduplication impact statistics (Phase 5).\n\nShows how much LLM cost and time was saved by sharing analysis\nacross users.\n\nArgs:\n    db: Database session\n\nReturns:\n    Dict with deduplication impact metrics","operationId":"get_deduplication_impact_v1_admin_llm_deduplication_impact_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/admin/llm/cost-report":{"get":{"tags":["admin","llm"],"summary":"Get Llm Cost Report","description":"Get global LLM cost report for admin dashboard.\n\nShows:\n- Total costs by provider and model\n- Token usage statistics\n- Cache efficiency\n- Top users by cost\n\nArgs:\n    period: Time period (today/week/month)\n    db: Database session\n\nReturns:\n    Dict with LLM cost statistics","operationId":"get_llm_cost_report_v1_admin_llm_cost_report_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"period","in":"query","required":false,"schema":{"enum":["today","week","month"],"type":"string","default":"week","title":"Period"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/llm/users-cost":{"get":{"tags":["admin","llm"],"summary":"Get Users Cost Report","description":"Full per-user LLM cost report (paginated).\n\nReturns all users sorted by cost descending with email, token usage,\nrequest counts and cost breakdown.","operationId":"get_users_cost_report_v1_admin_llm_users_cost_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"period","in":"query","required":false,"schema":{"enum":["today","week","month"],"type":"string","default":"month","title":"Period"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"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":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/llm/user/{user_id}/cost-breakdown":{"get":{"tags":["admin","llm"],"summary":"Get User Cost Breakdown","description":"Detailed cost breakdown for a specific user.\n\nShows costs by task_type, provider, and daily trend.","operationId":"get_user_cost_breakdown_v1_admin_llm_user__user_id__cost_breakdown_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"period","in":"query","required":false,"schema":{"enum":["today","week","month"],"type":"string","default":"month","title":"Period"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/llm/resources-cost":{"get":{"tags":["admin","llm"],"summary":"Get Resources Cost","description":"Расход на обработку по ресурсам, дороже → дешевле.\n\nКаждая строка: ресурс (имя от модели или заголовок страницы, адрес),\nчисло обращений к модели, из них по кешу, токены, стоимость в ₽ и $,\nзадачи (complete_analysis / relevance_check / …) и дата последнего\nобращения. Итоги — по всему периоду, а не по странице.","operationId":"get_resources_cost_v1_admin_llm_resources_cost_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"period","in":"query","required":false,"schema":{"enum":["today","week","month","all"],"type":"string","default":"month","title":"Period"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"sort","in":"query","required":false,"schema":{"enum":["cost","requests","recent"],"type":"string","default":"cost","title":"Sort"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/analytics/popular":{"get":{"tags":["admin","analytics"],"summary":"Get Popular Resources","description":"Топ популярных ресурсов по количеству уникальных пользователей.\n\n**Admin-only**. Показывает агрегированные метрики без личных данных.","operationId":"get_popular_resources_v1_admin_analytics_popular_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"min_users","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Minimum users to include","default":2,"title":"Min Users"},"description":"Minimum users to include"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/analytics/trending":{"get":{"tags":["admin","analytics"],"summary":"Get Trending Resources","description":"Растущие ресурсы за последние N дней.\n\nСортировка по количеству новых сохранений в периоде.","operationId":"get_trending_resources_v1_admin_analytics_trending_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":30,"minimum":1,"description":"Lookback period in days","default":7,"title":"Days"},"description":"Lookback period in days"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/analytics/stats":{"get":{"tags":["admin","analytics"],"summary":"Get Analytics Stats","description":"Общая статистика системы дедупликации.\n\nShows deduplication effectiveness, storage savings, cache hit rate.","operationId":"get_analytics_stats_v1_admin_analytics_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/admin/analytics/business":{"get":{"tags":["admin","analytics"],"summary":"Get Business Metrics","description":"Бизнес-метрики: MRR, конверсия, платящие, ARPU.\n\n**Admin-only**. Ключевые KPI для отслеживания роста.","operationId":"get_business_metrics_v1_admin_analytics_business_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/admin/users":{"get":{"tags":["admin","users"],"summary":"List Users","description":"Получить список всех пользователей.\n\n**Admin-only**. Поддерживает пагинацию, поиск и фильтры.","operationId":"list_users_v1_admin_users_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Номер страницы","default":1,"title":"Page"},"description":"Номер страницы"},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Размер страницы","default":20,"title":"Page Size"},"description":"Размер страницы"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Поиск по email или telegram","title":"Search"},"description":"Поиск по email или telegram"},{"name":"tier","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Фильтр по тарифу","title":"Tier"},"description":"Фильтр по тарифу"},{"name":"is_active","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Фильтр по активности","title":"Is Active"},"description":"Фильтр по активности"},{"name":"sort_by","in":"query","required":false,"schema":{"type":"string","pattern":"^(created_at|bookmarks_count|last_login_at)$","default":"created_at","title":"Sort By"}},{"name":"order","in":"query","required":false,"schema":{"type":"string","pattern":"^(asc|desc)$","default":"desc","title":"Order"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUsersResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/users/impersonate":{"post":{"tags":["admin","users"],"summary":"Impersonate User","description":"Войти под другим пользователем (имперсонализация).\n\n**Admin-only**. Создаёт токены для указанного пользователя.\nСохраняет токен админа для возврата.","operationId":"impersonate_user_v1_admin_users_impersonate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImpersonateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImpersonateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/admin/users/{user_id}/grant-pro":{"post":{"tags":["admin","users"],"summary":"Grant Pro Until","description":"PRO пользователю ДО указанной даты (не складывается — задаёт конец).\n\nДля компенсаций, партнёров и ручной активации по оплате мимо кассы.\nДата в прошлом → 400. Пишется в аудит как user_gift_subscription.","operationId":"grant_pro_until_v1_admin_users__user_id__grant_pro_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantProRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantProResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/users/stop-impersonate":{"post":{"tags":["admin","users"],"summary":"Stop Impersonate","description":"Выйти из имперсонализации и вернуться к своему аккаунту.\n\nFE-C2: opaque cookie stop_impersonation_token приоритетнее body admin_token.\nCookie атомарно консьюмится в Redis (GETDEL) — replay невозможен.\nBody-fallback на admin_token остаётся для transition compat и будет\nудалён отдельной задачей после миграции FE.","operationId":"stop_impersonate_v1_admin_users_stop_impersonate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StopImpersonateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StopImpersonateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/llm/backfill-embeddings":{"post":{"tags":["admin","llm"],"summary":"Trigger Backfill Embeddings","description":"Trigger backfill of embeddings via Yandex (256d).\n\nQueues a Celery task to re-generate embeddings for all resources\nmissing embedding_vector after the 1024d → 256d migration.\n\nArgs:\n    batch_size: Max resources per run (1-500)\n\nReturns:\n    Dict with task_id and pending count","operationId":"trigger_backfill_embeddings_v1_admin_llm_backfill_embeddings_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"batch_size","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Batch Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/media/backfill-vk-carousel":{"post":{"tags":["admin","media"],"summary":"Trigger Backfill Vk Carousel","description":"Re-queue downloads for VK carousel MediaFiles with colliding filenames.\n\nWithout bookmark_id: scans up to batch_size VK bookmarks whose MediaFiles\nshare a file_name (symptom of the pre-fix collision).\nWith bookmark_id: fixes that single bookmark unconditionally.","operationId":"trigger_backfill_vk_carousel_v1_admin_media_backfill_vk_carousel_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"bookmark_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"UUID of a specific bookmark","title":"Bookmark Id"},"description":"UUID of a specific bookmark"},{"name":"batch_size","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Batch Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/vk/receiver":{"post":{"tags":["webhooks"],"summary":"Vk Receiver Webhook","description":"Webhook endpoint for VK Receiver Bot.\n\nVK Callback API sends events here.\n\nVK requires:\n- Return confirmation string on type=\"confirmation\"\n- Return \"ok\" for all other requests (even on error)\n- Verify secret key in payload","operationId":"vk_receiver_webhook_webhooks_vk_receiver_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/webhooks/telegram/receiver":{"post":{"tags":["webhooks"],"summary":"Telegram Receiver Webhook","description":"Webhook endpoint for Receiver Bot.\n\nTelegram sends updates here with X-Telegram-Bot-Api-Secret-Token header.","operationId":"telegram_receiver_webhook_webhooks_telegram_receiver_post","parameters":[{"name":"x-telegram-bot-api-secret-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Telegram-Bot-Api-Secret-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/telegram/manager":{"post":{"tags":["webhooks"],"summary":"Telegram Manager Webhook","description":"Webhook endpoint for Manager Bot.\n\nTelegram sends updates here with X-Telegram-Bot-Api-Secret-Token header.","operationId":"telegram_manager_webhook_webhooks_telegram_manager_post","parameters":[{"name":"x-telegram-bot-api-secret-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Telegram-Bot-Api-Secret-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/telegram/receiver/set_webhook":{"get":{"tags":["webhooks"],"summary":"Set Receiver Webhook","description":"Manually set webhook for Receiver Bot.\n\nRequires admin privileges for security.\nIncludes secret_token if TELEGRAM_WEBHOOK_SECRET is configured.\n\nArgs:\n    webhook_url: Full webhook URL (https://api.sortula.ru/webhooks/telegram/receiver)\n    current_admin: Admin user (auto-injected, requires admin privileges)","operationId":"set_receiver_webhook_webhooks_telegram_receiver_set_webhook_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"webhook_url","in":"query","required":true,"schema":{"type":"string","title":"Webhook Url"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/telegram/manager/set_webhook":{"get":{"tags":["webhooks"],"summary":"Set Manager Webhook","description":"Manually set webhook for Manager Bot.\n\nRequires admin privileges for security.\nIncludes secret_token if TELEGRAM_WEBHOOK_SECRET is configured.\n\nArgs:\n    webhook_url: Full webhook URL (https://api.sortula.ru/webhooks/telegram/manager)\n    current_admin: Admin user (auto-injected, requires admin privileges)","operationId":"set_manager_webhook_webhooks_telegram_manager_set_webhook_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"webhook_url","in":"query","required":true,"schema":{"type":"string","title":"Webhook Url"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AIStatusResponse":{"properties":{"ai_available":{"type":"boolean","title":"Ai Available","description":"AI is available for the user"},"subscription_tier":{"type":"string","title":"Subscription Tier","description":"User's subscription tier"},"provider_status":{"type":"string","title":"Provider Status","description":"Provider status: healthy, unhealthy, error, unavailable"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error","description":"Short error code if status is error (no provider details)"}},"type":"object","required":["ai_available","subscription_tier","provider_status"],"title":"AIStatusResponse","description":"AI/LLM functionality status response."},"AIUsageResponse":{"properties":{"used":{"type":"integer","title":"Used"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"period_start":{"type":"string","title":"Period Start"},"scope":{"type":"string","title":"Scope","default":"none"},"resets_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resets At"}},"type":"object","required":["used","limit","period_start"],"title":"AIUsageResponse"},"AIUsageStatsResponse":{"properties":{"used":{"type":"integer","title":"Used","description":"Использовано AI-запросов в текущем месяце"},"limit":{"type":"integer","title":"Limit","description":"Лимит AI-запросов для тарифа"},"remaining":{"type":"integer","title":"Remaining","description":"Осталось AI-запросов в текущем месяце"},"time_saved_hours":{"type":"number","title":"Time Saved Hours","description":"Сэкономлено часов с AI"},"plan_tier":{"type":"string","title":"Plan Tier","description":"Текущий тариф (FREE/STARTER/PRO)"},"bookmarks_analyzed":{"type":"integer","title":"Bookmarks Analyzed","description":"Закладок проанализировано AI"},"ai_summaries_count":{"type":"integer","title":"Ai Summaries Count","description":"AI саммари создано"}},"type":"object","required":["used","limit","remaining","time_saved_hours","plan_tier","bookmarks_analyzed","ai_summaries_count"],"title":"AIUsageStatsResponse","description":"Статистика использования AI."},"AddBookmarkToCollectionRequest":{"properties":{"bookmark_id":{"type":"string","format":"uuid","title":"Bookmark Id"}},"type":"object","required":["bookmark_id"],"title":"AddBookmarkToCollectionRequest","description":"Схема для добавления закладки в коллекцию."},"AdminUserListItem":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","title":"Email"},"email_verified":{"type":"boolean","title":"Email Verified"},"telegram_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Telegram Id"},"telegram_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Telegram Username"},"subscription_tier":{"type":"string","title":"Subscription Tier"},"subscription_status":{"type":"string","title":"Subscription Status"},"is_active":{"type":"boolean","title":"Is Active"},"is_banned":{"type":"boolean","title":"Is Banned"},"bookmarks_count":{"type":"integer","title":"Bookmarks Count","default":0},"created_at":{"type":"string","format":"date-time","title":"Created At"},"last_login_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Login At"}},"type":"object","required":["id","email","email_verified","subscription_tier","subscription_status","is_active","is_banned","created_at"],"title":"AdminUserListItem","description":"Пользователь в списке для админа."},"AdminUsersResponse":{"properties":{"users":{"items":{"$ref":"#/components/schemas/AdminUserListItem"},"type":"array","title":"Users"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"},"total_pages":{"type":"integer","title":"Total Pages"}},"type":"object","required":["users","total","page","page_size","total_pages"],"title":"AdminUsersResponse","description":"Ответ со списком пользователей."},"AnalyzeBookmarkResponse":{"properties":{"status":{"type":"string","title":"Status","description":"processing or queued"},"task_id":{"type":"string","title":"Task Id","description":"Celery task ID"},"bookmark_id":{"type":"string","title":"Bookmark Id","description":"Bookmark UUID"},"resource_id":{"type":"string","title":"Resource Id","description":"Resource UUID"}},"type":"object","required":["status","task_id","bookmark_id","resource_id"],"title":"AnalyzeBookmarkResponse","description":"Response for analyze bookmark request."},"BalanceResponse":{"properties":{"amount_rub":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Amount Rub","description":"Текущий денежный баланс в RUB"},"llm_quota_remaining":{"type":"integer","minimum":0.0,"title":"Llm Quota Remaining","description":"Оставшийся лимит AI-операций на текущий период"},"llm_quota_total":{"type":"integer","minimum":0.0,"title":"Llm Quota Total","description":"Общий лимит AI-операций на текущий период"},"valid_until":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Valid Until","description":"Дата окончания активной подписки (если есть)"}},"type":"object","required":["amount_rub","llm_quota_remaining","llm_quota_total"],"title":"BalanceResponse","description":"Current billing/quota snapshot for authenticated user."},"BatchProcessRequest":{"properties":{"mode":{"type":"string","title":"Mode","description":"Режим: all | selected | by_type"},"bookmark_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Bookmark Ids","description":"ID закладок (если mode=selected)"},"types":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Types","description":"Типы (если mode=by_type): text, url, media"}},"type":"object","required":["mode"],"title":"BatchProcessRequest","description":"Запрос на batch обработку закладок."},"BatchProcessResponse":{"properties":{"job_id":{"type":"string","format":"uuid","title":"Job Id","description":"ID задачи для отслеживания"},"total_bookmarks":{"type":"integer","title":"Total Bookmarks","description":"Всего закладок для обработки"},"estimated_cost":{"type":"integer","title":"Estimated Cost","description":"Примерная стоимость в AI-запросах"},"status":{"type":"string","title":"Status","description":"Статус: queued, processing, completed, failed"}},"type":"object","required":["job_id","total_bookmarks","estimated_cost","status"],"title":"BatchProcessResponse","description":"Ответ на batch обработку."},"BatchProcessStatusResponse":{"properties":{"job_id":{"type":"string","format":"uuid","title":"Job Id"},"status":{"type":"string","title":"Status","description":"pending, processing, completed, failed"},"total":{"type":"integer","title":"Total","description":"Всего для обработки"},"processed":{"type":"integer","title":"Processed","description":"Обработано"},"failed":{"type":"integer","title":"Failed","description":"Не удалось обработать","default":0},"failed_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Failed Ids","description":"ID неудачных закладок"},"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"}},"type":"object","required":["job_id","status","total","processed"],"title":"BatchProcessStatusResponse","description":"Статус batch обработки."},"Body_import_bookmarks_endpoint_v1_bookmarks_import_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"Bookmarks file (HTML, CSV, or JSON)"}},"type":"object","required":["file"],"title":"Body_import_bookmarks_endpoint_v1_bookmarks_import_post"},"Body_logout_v1_auth_logout_post":{"properties":{"refresh_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refresh Token"}},"type":"object","title":"Body_logout_v1_auth_logout_post"},"Body_refresh_token_v1_auth_refresh_post":{"properties":{"refresh_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refresh Token"}},"type":"object","title":"Body_refresh_token_v1_auth_refresh_post"},"Body_upload_media_files_v1_bookmarks__bookmark_id__media_upload_post":{"properties":{"files":{"items":{"type":"string","contentMediaType":"application/octet-stream"},"type":"array","title":"Files"}},"type":"object","required":["files"],"title":"Body_upload_media_files_v1_bookmarks__bookmark_id__media_upload_post"},"BookmarkCreate":{"properties":{"content":{"type":"string","maxLength":10000,"title":"Content"},"content_type":{"anyOf":[{"$ref":"#/components/schemas/ContentType"},{"type":"null"}],"description":"Тип контента. Если не указан, будет определен автоматически"},"url":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Url"},"title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Title"},"thumbnail_url":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Thumbnail Url"},"url_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Url Metadata"}},"type":"object","required":["content"],"title":"BookmarkCreate","description":"Схема для создания закладки."},"BookmarkListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/BookmarkResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"},"has_next":{"type":"boolean","title":"Has Next"}},"type":"object","required":["items","total","page","page_size","has_next"],"title":"BookmarkListResponse","description":"Схема ответа со списком закладок."},"BookmarkResponse":{"properties":{"content":{"type":"string","title":"Content","default":""},"content_type":{"anyOf":[{"$ref":"#/components/schemas/ContentType"},{"type":"null"}],"description":"Тип контента. Если не указан, будет определен автоматически"},"id":{"type":"string","format":"uuid","title":"Id"},"short_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Short Id","description":"Short ID for URLs (8 chars)"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"page_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Page Title","description":"Заголовок самой страницы, если title — от модели"},"user_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Title","description":"Личный заголовок владельца закладки"},"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"},"url_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Url Metadata"},"llm_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Llm Summary"},"llm_tags":{"items":{"type":"string"},"type":"array","title":"Llm Tags","description":"Теги разбора: свободные слова содержимого (в отличие от categories[])"},"categories":{"items":{"$ref":"#/components/schemas/CategoryRef"},"type":"array","title":"Categories","description":"Тематические категории (по убыв. confidence): при завершённом личном override — из override.llm_category через таксономию, иначе — общие resource_categories ресурса; личные назначения слиты поверх"},"llm_analyzed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Llm Analyzed At"},"llm_error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Llm Error Message"},"llm_analysis_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Llm Analysis Status","description":"Status: pending / queued / in_progress / completed / failed / skipped / pending_credentials / quota_skipped / quota_exceeded"},"analysis_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Analysis Source","description":"Source of llm_* fields: 'override' (user's BYOK reanalysis), 'canonical' (shared baseline), or 'none' (not analyzed)."},"llm_category":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Llm Category"},"llm_entities":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Llm Entities"},"llm_action_items":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Llm Action Items"},"link_llm_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Link Llm Summary"},"link_llm_tags":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Link Llm Tags"},"link_llm_category":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Link Llm Category"},"link_llm_entities":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Link Llm Entities"},"link_llm_action_items":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Link Llm Action Items"},"extraction_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Extraction Status","description":"Статус извлечения контента: pending, success, failed"},"forward_source_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Forward Source Type","description":"Тип источника пересылки: channel, user, group, bot"},"forward_source_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Forward Source Name","description":"Название источника пересылки"},"forward_source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Forward Source Url","description":"URL источника пересылки"},"links":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Links","description":"Извлеченные ссылки: [{url, hostname, is_media, media_type}]"},"hashtags":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Hashtags","description":"Извлеченные хештеги"},"has_links":{"type":"boolean","title":"Has Links","description":"Есть ли ссылки","default":false},"has_media":{"type":"boolean","title":"Has Media","description":"Есть ли медиафайлы","default":false},"has_files":{"type":"boolean","title":"Has Files","description":"Есть ли прикрепленные документы","default":false},"has_code":{"type":"boolean","title":"Has Code","description":"Есть ли код","default":false},"link_count":{"type":"integer","title":"Link Count","description":"Количество ссылок","default":0},"text_length":{"type":"integer","title":"Text Length","description":"Длина текста","default":0},"user_comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Comment","description":"Комментарий пользователя к пересланному контенту"},"original_content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Original Content","description":"Оригинальный текст пересланного сообщения"},"relevance_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Relevance Score","description":"Relevance score (0-10)"},"relevance_checked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Relevance Checked At"},"relevance_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Relevance Notes"},"shelf_life_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Shelf Life Type","description":"Shelf life type: evergreen, time-sensitive-tech, time-sensitive-news, time-sensitive-seasonal"},"shelf_life_estimate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Shelf Life Estimate","description":"Estimated shelf life: '5+ years', '6-12 months', etc."},"check_frequency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Check Frequency","description":"Relevance check frequency: never, yearly, quarterly, monthly, weekly"},"needs_reindexing":{"type":"boolean","title":"Needs Reindexing","description":"Indicates if embedding needs regeneration after content change","default":false},"media_files":{"items":{"$ref":"#/components/schemas/MediaFileResponse"},"type":"array","title":"Media Files","default":[]},"media_warnings":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Media Warnings","description":"Warnings about skipped/failed media downloads"},"embedded_videos":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Embedded Videos","description":"Embedded video metadata (YouTube/RuTube/VK/TikTok)"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"is_favorite":{"type":"boolean","title":"Is Favorite"},"is_archived":{"type":"boolean","title":"Is Archived","description":"Bookmark is archived (cold storage)","default":false},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Archived At","description":"When bookmark was archived"},"share_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Share Status","description":"Share state: private / link_only / public / pending_moderation / rejected / revoked"},"share_short_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Share Short Id","description":"Public share short id (8 chars), set when share_status != private"},"public_view_count_total":{"type":"integer","title":"Public View Count Total","description":"Сколько раз открывали публичную страницу этой закладки","default":0},"share_rejection_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Share Rejection Reason","description":"Причина отказа для наследственного состояния 'rejected'"},"times_opened":{"type":"integer","title":"Times Opened","description":"Количество открытий закладки","default":0},"last_opened_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Opened At","description":"Дата и время последнего открытия"},"highlight":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Highlight","description":"Sanitised <mark>-wrapped snippet from FTS highlight"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"is_pending_credentials":{"type":"boolean","title":"Is Pending Credentials","description":"FE convenience flag — true iff status == 'pending_credentials'.","readOnly":true},"is_ai_cap_reached":{"type":"boolean","title":"Is Ai Cap Reached","description":"FE convenience flag — месячный кап AI-операций исчерпан.\n\nДва статуса, одно событие для пользователя. Гейтов два, потому что\nпроверка стоит и до очереди, и перед самим вызовом провайдера:\n  * quota_skipped  — гейт в tasks/llm/canonical.py до вызова провайдера;\n  * quota_exceeded — гейт в llm/factory.py (гонка: кап добран между\n    первой проверкой и вызовом).\n\nВ обоих случаях закладка сохранена, разбора нет, а llm_analyzed_at\nостаётся null — без этого флага карточка рисует вечный спиннер,\nто есть отказ без объяснения.","readOnly":true},"is_ai_deferred":{"type":"boolean","title":"Is Ai Deferred","description":"Разбор отложен дневным потолком расходов — до завтра, не отказ.\n\nТот же статус quota_skipped, что и у месячного капа, но другое\nсобытие для читателя: кап — «разберём после первого числа / с PRO»,\nотсрочка — «продолжим завтра сами». Различаются по тексту причины,\nкоторый пишет tasks/llm/canonical.py (прод 14.09.2026, jJ6y-taA:\nотсрочка показывалась как «Ошибка анализа»).","readOnly":true}},"type":"object","required":["id","user_id","is_favorite","created_at","updated_at","is_pending_credentials","is_ai_cap_reached","is_ai_deferred"],"title":"BookmarkResponse","description":"Схема ответа с закладкой."},"BookmarkStatsResponse":{"properties":{"total":{"type":"integer","title":"Total"},"favorites":{"type":"integer","title":"Favorites"},"opened":{"type":"integer","title":"Opened","default":0},"observed_since":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Observed Since","description":"Момент первого записанного события пользователя. None — не наблюдали ни разу, и тогда про открытия нельзя утверждать ничего."},"by_type":{"additionalProperties":{"type":"integer"},"type":"object","title":"By Type"},"added_today":{"type":"integer","title":"Added Today","default":0},"added_week":{"type":"integer","title":"Added Week","default":0},"added_month":{"type":"integer","title":"Added Month","default":0},"weekly":{"items":{"$ref":"#/components/schemas/WeekCount"},"type":"array","title":"Weekly"},"by_content_type":{"additionalProperties":{"type":"integer"},"type":"object","title":"By Content Type"},"ai_status":{"additionalProperties":{"type":"integer"},"type":"object","title":"Ai Status"},"top_tags":{"items":{"$ref":"#/components/schemas/TagCount"},"type":"array","title":"Top Tags"},"top_domains":{"items":{"$ref":"#/components/schemas/DomainCount"},"type":"array","title":"Top Domains"},"by_shelf_life":{"additionalProperties":{"type":"integer"},"type":"object","title":"By Shelf Life"}},"type":"object","required":["total","favorites","by_type"],"title":"BookmarkStatsResponse","description":"Схема ответа со статистикой закладок."},"BookmarkStatusResponse":{"properties":{"id":{"type":"string","title":"Id","description":"Bookmark UUID"},"short_id":{"type":"string","title":"Short Id","description":"Short ID for URLs"},"llm_analysis_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Llm Analysis Status","description":"LLM analysis status: pending, queued, processing, completed, failed"},"extraction_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Extraction Status","description":"Content extraction status: pending, completed, failed"}},"type":"object","required":["id","short_id"],"title":"BookmarkStatusResponse","description":"Lightweight status response for polling during AI analysis.\n\nDoes NOT increment times_opened - use for polling only."},"BookmarkUpdate":{"properties":{"title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Title"},"is_favorite":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Favorite"},"user_comment":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"User Comment","description":"User comment for bookmark"}},"additionalProperties":false,"type":"object","title":"BookmarkUpdate","description":"Схема для обновления закладки.\n\nTask 010: Validation moved to endpoint to allow empty strings for deletion.\n\nЛИШНИЕ ПОЛЯ ОТВЕРГАЮТСЯ, а не отбрасываются молча. По умолчанию pydantic\nих игнорирует, и это уже стоило нам дефекта: `is_archived` принимался\nсхемой, но не применялся эндпоинтом, поэтому клиент получал 200 и считал,\nчто заархивировал. Убрать поле из схемы было НЕДОСТАТОЧНО — при\nмолчаливом игнорировании поведение осталось бы тем же. Отказ 422 говорит\nклиенту правду: такого поля здесь нет."},"BotConfigResponse":{"properties":{"username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Username"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"description":{"type":"string","title":"Description","default":""}},"type":"object","title":"BotConfigResponse","description":"Bot configuration (for login/register buttons)."},"BotTokenResponse":{"properties":{"token":{"type":"string","title":"Token"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"}},"type":"object","required":["token","expires_at"],"title":"BotTokenResponse","description":"Схема ответа с токеном привязки бота."},"BotsConfigResponse":{"properties":{"receiver":{"$ref":"#/components/schemas/BotConfigResponse"},"manager":{"$ref":"#/components/schemas/BotConfigResponse"}},"type":"object","required":["receiver","manager"],"title":"BotsConfigResponse","description":"Both bots configuration."},"CategoriesResponse":{"properties":{"categories":{"items":{"$ref":"#/components/schemas/CategoryItem"},"type":"array","title":"Categories"},"total_bookmarks":{"type":"integer","title":"Total Bookmarks"}},"type":"object","required":["categories","total_bookmarks"],"title":"CategoriesResponse","description":"Список всех системных категорий (включая пустые) + общее число закладок."},"CategoryItem":{"properties":{"slug":{"type":"string","title":"Slug"},"name_ru":{"type":"string","title":"Name Ru"},"name_en":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name En"},"name_kk":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name Kk"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"},"color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color"},"group":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Group"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["slug","name_ru","count"],"title":"CategoryItem","description":"Категория таксономии + число закладок пользователя в ней."},"CategoryRef":{"properties":{"slug":{"type":"string","title":"Slug"},"name":{"type":"string","title":"Name"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"},"color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color"},"confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}},"type":"object","required":["slug","name"],"title":"CategoryRef","description":"Назначенная категория в ответе закладки."},"CategoryRelevanceSettings":{"properties":{"enabled":{"type":"boolean","title":"Enabled"},"frequency":{"type":"string","pattern":"^(weekly|monthly|quarterly)$","title":"Frequency"}},"type":"object","required":["enabled","frequency"],"title":"CategoryRelevanceSettings","description":"Per-category relevance check settings."},"CategoryStat":{"properties":{"slug":{"type":"string","title":"Slug"},"name":{"type":"string","title":"Name"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"},"color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color"},"count":{"type":"integer","title":"Count"},"percentage":{"type":"number","title":"Percentage"}},"type":"object","required":["slug","name","count","percentage"],"title":"CategoryStat","description":"Распределение закладок по одной категории."},"CategoryStatItem":{"properties":{"content_type":{"type":"string","title":"Content Type"},"name":{"type":"string","title":"Name"},"display_name":{"type":"string","title":"Display Name"},"icon":{"type":"string","title":"Icon"},"color":{"type":"string","title":"Color"},"count":{"type":"integer","title":"Count"},"percentage":{"type":"number","title":"Percentage"}},"type":"object","required":["content_type","name","display_name","icon","color","count","percentage"],"title":"CategoryStatItem","description":"Статистика по одной категории."},"ChatSearchRequest":{"properties":{"query":{"type":"string","maxLength":500,"minLength":2,"title":"Query"}},"type":"object","required":["query"],"title":"ChatSearchRequest"},"ChatSearchResponse":{"properties":{"answer":{"type":"string","title":"Answer"},"sources":{"items":{"$ref":"#/components/schemas/ChatSource"},"type":"array","title":"Sources","default":[]},"cached":{"type":"boolean","title":"Cached","default":false}},"type":"object","required":["answer"],"title":"ChatSearchResponse"},"ChatSource":{"properties":{"index":{"type":"integer","title":"Index"},"title":{"type":"string","title":"Title"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"short_id":{"type":"string","title":"Short Id","default":""},"relevance":{"type":"number","title":"Relevance","default":0.0}},"type":"object","required":["index","title"],"title":"ChatSource"},"CollectionCreate":{"properties":{"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name","description":"Название коллекции"},"description":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Description","description":"Описание коллекции"},"icon":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Icon","description":"Иконка (emoji или icon name)"},"color":{"anyOf":[{"type":"string","maxLength":7},{"type":"null"}],"title":"Color","description":"Цвет (hex, например #3498db)"},"collection_type":{"type":"string","title":"Collection Type","description":"Тип коллекции: заводится только manual","default":"manual"},"filter_rules":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Filter Rules","description":"Правила фильтрации автоматических коллекций. Механика снята — поле принимается только пустым и сохраняется как есть у унаследованных строк."},"digest_enabled":{"type":"boolean","title":"Digest Enabled","description":"Включен ли дайджест","default":true},"digest_frequency":{"type":"string","title":"Digest Frequency","description":"Частота дайджеста: daily, weekly, never","default":"daily"}},"type":"object","required":["name"],"title":"CollectionCreate","description":"Схема для создания коллекции."},"CollectionListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CollectionResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"skip":{"type":"integer","title":"Skip"},"limit":{"type":"integer","title":"Limit"}},"type":"object","required":["items","total","skip","limit"],"title":"CollectionListResponse","description":"Схема для ответа со списком коллекций."},"CollectionResponse":{"properties":{"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name","description":"Название коллекции"},"description":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Description","description":"Описание коллекции"},"icon":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Icon","description":"Иконка (emoji или icon name)"},"color":{"anyOf":[{"type":"string","maxLength":7},{"type":"null"}],"title":"Color","description":"Цвет (hex, например #3498db)"},"collection_type":{"type":"string","title":"Collection Type","description":"Тип коллекции: заводится только manual","default":"manual"},"filter_rules":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Filter Rules","description":"Правила фильтрации автоматических коллекций. Механика снята — поле принимается только пустым и сохраняется как есть у унаследованных строк."},"digest_enabled":{"type":"boolean","title":"Digest Enabled","description":"Включен ли дайджест","default":true},"digest_frequency":{"type":"string","title":"Digest Frequency","description":"Частота дайджеста: daily, weekly, never","default":"daily"},"id":{"type":"string","format":"uuid","title":"Id"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"bookmarks_count":{"type":"integer","title":"Bookmarks Count"},"last_updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Updated At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"share_status":{"type":"string","title":"Share Status","default":"private"},"share_short_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Share Short Id"},"share_exclusions":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Share Exclusions"},"public_view_count_total":{"type":"integer","title":"Public View Count Total","default":0}},"type":"object","required":["name","id","user_id","bookmarks_count","created_at","updated_at"],"title":"CollectionResponse","description":"Схема для ответа с коллекцией.\n\nСОСТОЯНИЕ ПУБЛИКАЦИИ ОТДАЁТСЯ ЗДЕСЬ (решение #113). Без него интерфейс не\nможет показать, опубликована коллекция или нет, — а по решению #111\nколлекция остаётся единственным способом поделиться выборочно, то есть\nровно тем, ради чего коллекции и вернулись. Поля приходят из\nShareStateMixin, общего с закладкой, и называются так же.\n\nОТВЕТ НИЧЕГО НЕ ЗАПРЕЩАЕТ. Он наследует поля от ``CollectionBase``, но не\nеё проверки входа: в базе живут коллекции с ``collection_type='auto'`` и\nнепустыми ``filter_rules``, заведённые до решения #100. Показывать их —\nобязанность, а не поблажка; отказ показывать оборачивался 500 на списке.\n\n``share_decided_by_admin_id`` и ``share_rejection_reason`` СЮДА НЕ входят:\nмодерации нет ни в замысле, ни в коде (share_service объявляет INSTANT\nSELF-SERVICE MODEL), и эти две колонки помечены наследием прямо там.\nОтдавать их значило бы показать интерфейсу поток, которого нет."},"CollectionUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Description"},"icon":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Icon"},"color":{"anyOf":[{"type":"string","maxLength":7},{"type":"null"}],"title":"Color"},"collection_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Collection Type","description":"Тип коллекции: manual или auto"},"filter_rules":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Filter Rules"},"digest_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Digest Enabled"},"digest_frequency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Digest Frequency"}},"type":"object","title":"CollectionUpdate","description":"Схема для обновления коллекции."},"ContactMessageCreate":{"properties":{"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name","description":"Sender name"},"email":{"type":"string","format":"email","title":"Email","description":"Sender email"},"subject":{"type":"string","maxLength":200,"minLength":1,"title":"Subject","description":"Message subject"},"message":{"type":"string","maxLength":5000,"minLength":10,"title":"Message","description":"Message content"}},"type":"object","required":["name","email","subject","message"],"title":"ContactMessageCreate","description":"Schema for creating a contact message.","example":{"email":"ivan@example.com","message":"Здравствуйте, у меня вопрос по оплате...","name":"Иван Петров","subject":"support"}},"ContactMessageResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"channel":{"type":"string","title":"Channel","default":"web"},"subject":{"type":"string","title":"Subject"},"message":{"type":"string","title":"Message"},"status":{"type":"string","title":"Status"},"user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"replied_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Replied At"}},"type":"object","required":["id","name","subject","message","status","created_at"],"title":"ContactMessageResponse","description":"Schema for contact message response."},"ContentCategoriesResponse":{"properties":{"categories":{"additionalProperties":true,"type":"object","title":"Categories"}},"type":"object","required":["categories"],"title":"ContentCategoriesResponse","description":"Ответ со списком категорий контента."},"ContentType":{"type":"string","enum":["text","url","image","video","file","credentials","note","quote","code","contact","article"],"title":"ContentType","description":"Content type enumeration for bookmarks and media.\n\nUsed across the application:\n- Database column type (PG_ENUM)\n- API schemas (Pydantic)\n- Content parsing and detection\n- LLM categorization"},"CostHistoryResponse":{"properties":{"period":{"type":"string","title":"Period","description":"Период: week или month"},"daily":{"items":{"$ref":"#/components/schemas/DailyCostItem"},"type":"array","title":"Daily","description":"Данные по дням"},"by_provider":{"items":{"$ref":"#/components/schemas/ProviderCostItem"},"type":"array","title":"By Provider","description":"Данные по провайдерам"},"totals":{"$ref":"#/components/schemas/CostTotals","description":"Итого"}},"type":"object","required":["period","daily","by_provider","totals"],"title":"CostHistoryResponse","description":"Ответ с историей трат на LLM."},"CostTotals":{"properties":{"cost_usd":{"type":"number","title":"Cost Usd","description":"Общая стоимость в USD"},"cost_rub":{"type":"number","title":"Cost Rub","description":"Общая стоимость в RUB"},"tokens":{"type":"integer","title":"Tokens","description":"Всего токенов"},"requests":{"type":"integer","title":"Requests","description":"Всего запросов"}},"type":"object","required":["cost_usd","cost_rub","tokens","requests"],"title":"CostTotals","description":"Итоговая статистика."},"DailyCostItem":{"properties":{"date":{"type":"string","title":"Date","description":"Дата (YYYY-MM-DD)"},"cost_usd":{"type":"number","title":"Cost Usd","description":"Стоимость в USD"},"cost_rub":{"type":"number","title":"Cost Rub","description":"Стоимость в RUB"},"tokens":{"type":"integer","title":"Tokens","description":"Всего токенов"},"requests":{"type":"integer","title":"Requests","description":"Количество запросов"}},"type":"object","required":["date","cost_usd","cost_rub","tokens","requests"],"title":"DailyCostItem","description":"Статистика трат за день."},"DeleteResponse":{"properties":{"status":{"type":"string","title":"Status"},"deleted":{"type":"integer","title":"Deleted"}},"type":"object","required":["status","deleted"],"title":"DeleteResponse","description":"Response for delete operations."},"DomainCount":{"properties":{"domain":{"type":"string","title":"Domain"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["domain","count"],"title":"DomainCount"},"ExtensionActivateRequest":{"properties":{"code":{"type":"string","maxLength":8,"minLength":8,"title":"Code","description":"8-символьный код активации"}},"type":"object","required":["code"],"title":"ExtensionActivateRequest","description":"Схема запроса на активацию расширения."},"ExtensionActivateResponse":{"properties":{"access_token":{"type":"string","title":"Access Token"},"refresh_token":{"type":"string","title":"Refresh Token"},"expires_in":{"type":"integer","title":"Expires In","description":"Время жизни access_token в секундах"},"user":{"$ref":"#/components/schemas/UserResponse"}},"type":"object","required":["access_token","refresh_token","expires_in","user"],"title":"ExtensionActivateResponse","description":"Схема ответа после активации расширения."},"ExtensionCodeResponse":{"properties":{"code":{"type":"string","title":"Code","description":"6-символьный код для активации расширения"},"expires_at":{"type":"string","format":"date-time","title":"Expires At","description":"Время истечения кода"}},"type":"object","required":["code","expires_at"],"title":"ExtensionCodeResponse","description":"Схема ответа с кодом для браузерного расширения."},"ExtensionConfigResponse":{"properties":{"download_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Download Url"}},"type":"object","title":"ExtensionConfigResponse","description":"Расширение браузера: адрес архива для кнопки «Скачать».\n\nАдрес — ДАННОЕ ОКРУЖЕНИЯ, а не константа фронта. До 07.09.2026 он стоял\nбуквальным продовым значением в frontend/src/lib/constants.js, и кнопка\n«Скачать» на стенде отдавала ПРОДОВОЕ расширение, хотя стендовый архив\nсуществует и отдаётся. Тот же класс, что решён для адресов ботов."},"ExtractedContentResponse":{"properties":{"bookmark_id":{"type":"string","title":"Bookmark Id","description":"Bookmark UUID"},"extraction_status":{"type":"string","title":"Extraction Status","description":"Extraction status: success, failed, pending"},"extracted_content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Extracted Content","description":"Extracted text content from URL"},"content_length":{"type":"integer","title":"Content Length","description":"Length of extracted content in characters","default":0},"extracted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Extracted At","description":"When content was extracted"}},"type":"object","required":["bookmark_id","extraction_status"],"title":"ExtractedContentResponse","description":"Response with extracted content that was sent to LLM for analysis.\n\nCR-036: View Extracted Content feature."},"FakeConfirmRequest":{"properties":{"order_id":{"type":"string","title":"Order Id"},"result":{"type":"string","title":"Result","default":"success"}},"type":"object","required":["order_id"],"title":"FakeConfirmRequest"},"FakeConfirmResponse":{"properties":{"order_id":{"type":"string","title":"Order Id"},"status":{"type":"string","title":"Status"}},"type":"object","required":["order_id","status"],"title":"FakeConfirmResponse"},"GrantProRequest":{"properties":{"until":{"type":"string","format":"date-time","title":"Until","description":"Конец PRO, ISO 8601 (в будущем)"},"reason":{"type":"string","maxLength":200,"title":"Reason","default":""}},"type":"object","required":["until"],"title":"GrantProRequest","description":"Выдать PRO до даты — из веб-админки (список пользователей)."},"GrantProResponse":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"subscription_tier":{"type":"string","title":"Subscription Tier"},"subscription_status":{"type":"string","title":"Subscription Status"},"subscription_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Subscription Expires At"}},"type":"object","required":["user_id","subscription_tier","subscription_status"],"title":"GrantProResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HybridSearchResponse":{"properties":{"query":{"type":"string","title":"Query"},"results":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Results"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset","default":0},"has_next":{"type":"boolean","title":"Has Next","default":false},"total_is_capped":{"type":"boolean","title":"Total Is Capped","default":false},"semantic_weight":{"type":"number","title":"Semantic Weight"},"text_weight":{"type":"number","title":"Text Weight"},"degraded":{"type":"boolean","title":"Degraded","default":false},"degraded_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Degraded Reason"}},"type":"object","required":["query","results","total","limit","semantic_weight","text_weight"],"title":"HybridSearchResponse","description":"Response schema for hybrid search."},"ImpersonateRequest":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id","description":"ID пользователя для имперсонализации"}},"type":"object","required":["user_id"],"title":"ImpersonateRequest","description":"Запрос на имперсонализацию."},"ImpersonateResponse":{"properties":{"access_token":{"type":"string","title":"Access Token"},"refresh_token":{"type":"string","title":"Refresh Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"},"impersonated_user_id":{"type":"string","format":"uuid","title":"Impersonated User Id"},"impersonated_user_email":{"type":"string","title":"Impersonated User Email"},"admin_token":{"type":"string","title":"Admin Token","description":"Токен админа для возврата (сохранить на клиенте)"}},"type":"object","required":["access_token","refresh_token","impersonated_user_id","impersonated_user_email","admin_token"],"title":"ImpersonateResponse","description":"Ответ с токенами имперсонализации."},"InitPaymentRequest":{"properties":{"item_type":{"type":"string","enum":["subscription_tier","package"],"title":"Item Type"},"item_id":{"type":"string","maxLength":120,"minLength":2,"title":"Item Id","description":"subscription: TIER:period (e.g. STARTER:1_month); package: package id"},"promo_code":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Promo Code"},"provider":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Provider","description":"Optional payment provider hint (e.g. rollypay, tbank); must be in enabled_methods, else falls back to the active provider"}},"type":"object","required":["item_type","item_id"],"title":"InitPaymentRequest","description":"Start hosted checkout for subscription renewal or LLM package."},"InitPaymentResponse":{"properties":{"payment_url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Payment Url"},"transaction_id":{"type":"string","format":"uuid","title":"Transaction Id"},"amount_kopecks":{"type":"integer","minimum":0.0,"title":"Amount Kopecks"}},"type":"object","required":["payment_url","transaction_id","amount_kopecks"],"title":"InitPaymentResponse","description":"Redirect user to payment_url to complete acquiring."},"IntegrationsStatusResponse":{"properties":{"telegram_linked":{"type":"boolean","title":"Telegram Linked"},"telegram_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Telegram Id"},"telegram_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Telegram Username"},"vk_linked":{"type":"boolean","title":"Vk Linked"},"vk_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Vk Id"}},"type":"object","required":["telegram_linked","vk_linked"],"title":"IntegrationsStatusResponse","description":"Status of all integrations."},"InvitationRequestCreate":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"name":{"type":"string","maxLength":255,"minLength":2,"title":"Name"},"message":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Message"}},"type":"object","required":["email","name"],"title":"InvitationRequestCreate","description":"Схема для создания заявки на приглашение."},"InvitationRequestResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","title":"Email"},"name":{"type":"string","title":"Name"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"status":{"$ref":"#/components/schemas/InvitationRequestStatus"},"processed_by_admin_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Processed By Admin Id"},"processed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Processed At"},"admin_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Notes"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","email","name","message","status","processed_by_admin_id","processed_at","admin_notes","created_at","updated_at"],"title":"InvitationRequestResponse","description":"Схема ответа с информацией о заявке."},"InvitationRequestStatus":{"type":"string","enum":["pending","approved","registered","rejected"],"title":"InvitationRequestStatus","description":"Статусы заявки на приглашение."},"LLMQueueItemResponse":{"properties":{"bookmark_id":{"type":"string","format":"uuid","title":"Bookmark Id"},"short_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Short Id","description":"Короткий ID закладки для URL"},"bookmark_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bookmark Title"},"bookmark_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bookmark Url"},"status":{"type":"string","title":"Status","description":"Статус: queued, processing, completed, error, quota_exceeded, skipped_short_content"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"queued_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Queued At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"extraction_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Extraction Status","description":"Статус извлечения контента: pending, success, failed"},"extraction_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Extraction Error","description":"Ошибка извлечения контента (если есть)"}},"type":"object","required":["bookmark_id","status","created_at"],"title":"LLMQueueItemResponse","description":"Схема элемента очереди LLM задач."},"LLMQueueResponse":{"properties":{"queued":{"items":{"$ref":"#/components/schemas/LLMQueueItemResponse"},"type":"array","title":"Queued","description":"Задачи в очереди"},"processing":{"items":{"$ref":"#/components/schemas/LLMQueueItemResponse"},"type":"array","title":"Processing","description":"Задачи в обработке"},"completed_today":{"items":{"$ref":"#/components/schemas/LLMQueueItemResponse"},"type":"array","title":"Completed Today","description":"Завершенные сегодня"},"errors_today":{"items":{"$ref":"#/components/schemas/LLMQueueItemResponse"},"type":"array","title":"Errors Today","description":"Ошибки сегодня"},"quota_exceeded":{"items":{"$ref":"#/components/schemas/LLMQueueItemResponse"},"type":"array","title":"Quota Exceeded","description":"Превышена квота"},"skipped":{"items":{"$ref":"#/components/schemas/LLMQueueItemResponse"},"type":"array","title":"Skipped","description":"Пропущено (недостаточно текста)"},"stats":{"additionalProperties":true,"type":"object","title":"Stats"}},"type":"object","title":"LLMQueueResponse","description":"Схема ответа с очередью LLM задач."},"LLMStatsResponse":{"properties":{"period":{"type":"string","title":"Period"},"total_requests":{"type":"integer","title":"Total Requests"},"successful_requests":{"type":"integer","title":"Successful Requests"},"failed_requests":{"type":"integer","title":"Failed Requests"},"success_rate":{"type":"number","title":"Success Rate"},"total_cost_usd":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Total Cost Usd"},"avg_execution_time_ms":{"type":"integer","title":"Avg Execution Time Ms"},"cache_hit_rate":{"type":"number","title":"Cache Hit Rate"},"breakdown_by_provider":{"additionalProperties":{"type":"integer"},"type":"object","title":"Breakdown By Provider"},"breakdown_by_task_type":{"additionalProperties":{"type":"integer"},"type":"object","title":"Breakdown By Task Type"},"breakdown_by_status":{"additionalProperties":{"type":"integer"},"type":"object","title":"Breakdown By Status"},"analysis_by_provider":{"additionalProperties":{"type":"integer"},"type":"object","title":"Analysis By Provider","default":{}},"analysis_off_primary_share":{"type":"number","title":"Analysis Off Primary Share","default":0.0}},"type":"object","required":["period","total_requests","successful_requests","failed_requests","success_rate","total_cost_usd","avg_execution_time_ms","cache_hit_rate","breakdown_by_provider","breakdown_by_task_type","breakdown_by_status"],"title":"LLMStatsResponse","description":"LLM usage statistics response."},"LinkCreate":{"properties":{"url":{"type":"string","maxLength":500,"minLength":1,"title":"Url","description":"URL ссылки"},"title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Title","description":"Заголовок ссылки (опционально)"}},"type":"object","required":["url"],"title":"LinkCreate","description":"Схема для добавления ссылки к закладке."},"LinkPromoteResponse":{"properties":{"bookmark_id":{"type":"string","format":"uuid","title":"Bookmark Id"},"resource_id":{"type":"string","format":"uuid","title":"Resource Id"},"status":{"type":"string","title":"Status","description":"Current pipeline status.","default":"queued"}},"type":"object","required":["bookmark_id","resource_id"],"title":"LinkPromoteResponse"},"LinkResponse":{"properties":{"id":{"type":"string","title":"Id","description":"Уникальный ID ссылки"},"url":{"type":"string","title":"Url","description":"URL ссылки"},"canonical_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Canonical Url","description":"Нормализованный URL"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title","description":"Заголовок ссылки"},"hostname":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hostname","description":"Домен ссылки"},"source":{"type":"string","title":"Source","description":"Источник: 'auto' или 'manual'","default":"auto"},"added_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Added At","description":"Дата добавления"},"position":{"type":"integer","title":"Position","description":"Позиция в списке","default":0}},"type":"object","required":["id","url"],"title":"LinkResponse","description":"Схема ответа с данными ссылки."},"LinkRowResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"url":{"type":"string","title":"Url"},"hostname":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hostname"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"total_references":{"type":"integer","title":"Total References","default":0},"promoted_to_resource_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Promoted To Resource Id"}},"type":"object","required":["id","url"],"title":"LinkRowResponse","description":"Single Link row as exposed to the FE."},"LinkUpdate":{"properties":{"title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Title","description":"Заголовок ссылки"}},"type":"object","title":"LinkUpdate","description":"Схема для обновления ссылки."},"LinkVKRequest":{"properties":{"code":{"type":"string","title":"Code"}},"type":"object","required":["code"],"title":"LinkVKRequest","description":"Request to link VK account using code from bot."},"LinkVKResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"vk_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Vk Id"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","required":["success"],"title":"LinkVKResponse","description":"Response after successful VK linking."},"LinksLimitResponse":{"properties":{"limit":{"type":"integer","title":"Limit","description":"Лимит ссылок по тарифу"},"used":{"type":"integer","title":"Used","description":"Использовано ссылок"},"remaining":{"type":"integer","title":"Remaining","description":"Оставшееся количество слотов"},"tier":{"type":"string","title":"Tier","description":"Текущий тариф"}},"type":"object","required":["limit","used","remaining","tier"],"title":"LinksLimitResponse","description":"Схема ответа с лимитом ссылок."},"MFACodeRequest":{"properties":{"code":{"type":"string","title":"Code"}},"type":"object","required":["code"],"title":"MFACodeRequest"},"MediaFileResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"user_bookmark_id":{"type":"string","format":"uuid","title":"User Bookmark Id"},"file_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Path"},"file_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Name"},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mime Type"},"file_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"File Size"},"storage_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Storage Type"},"width":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Width"},"height":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Height"},"duration":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration"},"download_status":{"type":"string","title":"Download Status","default":"pending"},"skip_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Skip Reason"},"thumbnail_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Path"},"thumbnail_status":{"type":"string","title":"Thumbnail Status","default":"pending"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url","description":"Presigned URL for file access (computed)"},"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url","description":"Presigned URL for thumbnail (computed)"}},"type":"object","required":["id","user_bookmark_id","created_at"],"title":"MediaFileResponse","description":"Schema for media file response."},"NotificationSettings":{"properties":{"email":{"type":"boolean","title":"Email","default":true},"telegram":{"type":"boolean","title":"Telegram","default":true},"browser":{"type":"boolean","title":"Browser","default":true},"frequency":{"type":"string","enum":["instant","daily","weekly","never"],"title":"Frequency","default":"instant"}},"type":"object","title":"NotificationSettings","description":"Notification preferences."},"OnboardingStatusResponse":{"properties":{"onboarding_completed":{"type":"boolean","title":"Onboarding Completed"}},"type":"object","required":["onboarding_completed"],"title":"OnboardingStatusResponse","description":"Onboarding status response."},"PackagePurchaseRequest":{"properties":{"promo_code":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Promo Code"}},"type":"object","title":"PackagePurchaseRequest","description":"Request payload for package purchase."},"PackageResponse":{"properties":{"id":{"type":"string","title":"Id","description":"ID пакета из pricing.yaml"},"name":{"type":"string","title":"Name","description":"Локализованное отображаемое имя"},"llm_quota_tokens":{"type":"integer","minimum":0.0,"title":"Llm Quota Tokens","description":"Токены LLM в пакете"},"price_rub":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Price Rub","description":"Цена пакета в RUB"},"valid_days":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Valid Days"}},"type":"object","required":["id","name","llm_quota_tokens","price_rub"],"title":"PackageResponse","description":"Available package from pricing config."},"PackagesListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/PackageResponse"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"PackagesListResponse","description":"List of available packages."},"PaymentMethod":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description","default":""},"recurring_supported":{"type":"boolean","title":"Recurring Supported","default":true},"is_default":{"type":"boolean","title":"Is Default","default":false}},"type":"object","required":["id","name"],"title":"PaymentMethod","description":"A selectable checkout method for the billing UI."},"PaymentMethodsResponse":{"properties":{"methods":{"items":{"$ref":"#/components/schemas/PaymentMethod"},"type":"array","title":"Methods"},"default":{"type":"string","title":"Default"}},"type":"object","required":["methods","default"],"title":"PaymentMethodsResponse","description":"Enabled payment methods (order = UI priority)."},"PlanPeriod":{"properties":{"period":{"type":"string","title":"Period"},"price":{"type":"number","title":"Price"},"currency":{"type":"string","title":"Currency"},"symbol":{"type":"string","title":"Symbol"},"months":{"type":"integer","title":"Months"},"price_per_month":{"type":"number","title":"Price Per Month"}},"type":"object","required":["period","price","currency","symbol","months","price_per_month"],"title":"PlanPeriod"},"PlansResponse":{"properties":{"tier":{"type":"string","title":"Tier"},"periods":{"items":{"$ref":"#/components/schemas/PlanPeriod"},"type":"array","title":"Periods"},"default_period":{"type":"string","title":"Default Period","default":"1_month"},"grace_period_days":{"type":"integer","title":"Grace Period Days","default":3}},"type":"object","required":["tier","periods"],"title":"PlansResponse"},"PricingConfigResponse":{"properties":{"plans":{"additionalProperties":true,"type":"object","title":"Plans"},"currencies":{"additionalProperties":true,"type":"object","title":"Currencies"},"payment_config":{"additionalProperties":true,"type":"object","title":"Payment Config"},"packages":{"additionalProperties":true,"type":"object","title":"Packages","description":"Add-on packages (numeric IDs; labels in locales)"}},"type":"object","required":["plans"],"title":"PricingConfigResponse","description":"Subscription pricing configuration."},"PrivacySettings":{"properties":{"public_profile":{"type":"boolean","title":"Public Profile","default":false},"show_statistics":{"type":"boolean","title":"Show Statistics","default":false}},"type":"object","title":"PrivacySettings","description":"Privacy preferences."},"ProfileResponse":{"properties":{"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"bio":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bio"},"is_public":{"type":"boolean","title":"Is Public","default":false},"published_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Published At"},"slug_changed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Slug Changed At"},"suggested_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suggested Slug"}},"type":"object","title":"ProfileResponse"},"ProfileSlugChange":{"properties":{"slug":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Slug"},"auto":{"type":"boolean","title":"Auto","default":false}},"type":"object","title":"ProfileSlugChange"},"ProfileUpdate":{"properties":{"display_name":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Display Name"},"bio":{"anyOf":[{"type":"string","maxLength":280},{"type":"null"}],"title":"Bio"},"is_public":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Public"}},"type":"object","title":"ProfileUpdate"},"ProviderCostItem":{"properties":{"provider":{"type":"string","title":"Provider","description":"Название провайдера"},"cost_usd":{"type":"number","title":"Cost Usd","description":"Стоимость в USD"},"cost_rub":{"type":"number","title":"Cost Rub","description":"Стоимость в RUB"},"requests":{"type":"integer","title":"Requests","description":"Количество запросов"}},"type":"object","required":["provider","cost_usd","cost_rub","requests"],"title":"ProviderCostItem","description":"Статистика по провайдеру."},"PublicConfigResponse":{"properties":{"registration_disabled":{"type":"boolean","title":"Registration Disabled"},"app_name":{"type":"string","title":"App Name"},"version":{"type":"string","title":"Version"},"bots":{"$ref":"#/components/schemas/BotsConfigResponse"},"extension":{"$ref":"#/components/schemas/ExtensionConfigResponse"}},"type":"object","required":["registration_disabled","app_name","version","bots","extension"],"title":"PublicConfigResponse","description":"Public configuration for frontend (unauthenticated)."},"PublicProfileItem":{"properties":{"bookmark_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bookmark Id"},"short_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Short Id"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"hostname":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hostname"},"llm_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Llm Summary"},"share_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Share Url"}},"type":"object","title":"PublicProfileItem"},"PublicProfileViewResponse":{"properties":{"slug":{"type":"string","title":"Slug"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"bio":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bio"},"joined_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Joined At"},"publications_count":{"type":"integer","title":"Publications Count","default":0},"items":{"items":{"$ref":"#/components/schemas/PublicProfileItem"},"type":"array","title":"Items","default":[]},"has_next":{"type":"boolean","title":"Has Next","default":false}},"type":"object","required":["slug"],"title":"PublicProfileViewResponse"},"PublicShareResponse":{"properties":{"short_id":{"type":"string","title":"Short Id"},"target_type":{"type":"string","title":"Target Type","default":"bookmark"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content"},"llm_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Llm Summary"},"categories":{"items":{"$ref":"#/components/schemas/CategoryRef"},"type":"array","title":"Categories","default":[]},"llm_category":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Llm Category"},"llm_action_items":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Llm Action Items"},"owner_display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Display Name"},"owner_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Slug"},"share_status":{"type":"string","title":"Share Status"},"public_view_count_total":{"type":"integer","title":"Public View Count Total","default":0},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"items_total":{"type":"integer","title":"Items Total","default":0},"page":{"type":"integer","title":"Page","default":1},"per_page":{"type":"integer","title":"Per Page","default":20},"items":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Items","default":[]}},"type":"object","required":["short_id","share_status"],"title":"PublicShareResponse","description":"Anonymous-safe view of an approved share.\n\nExcludes raw extracted_content (heavy), embedding vectors, and\nuser-private fields. owner_slug is populated only when the owner\nhas a public profile, so the FE can link to /u/{slug}."},"QuotaStatusBlock":{"properties":{"bookmarks_this_month":{"type":"integer","title":"Bookmarks This Month","default":0},"bookmarks_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bookmarks Limit"},"ai_requests_this_month":{"type":"integer","title":"Ai Requests This Month","default":0},"ai_requests_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Ai Requests Limit"},"ai_requests_scope":{"type":"string","title":"Ai Requests Scope","default":"none"},"ai_requests_resets_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ai Requests Resets At"},"bookmarks_waiting_analysis":{"type":"integer","title":"Bookmarks Waiting Analysis","default":0}},"type":"object","title":"QuotaStatusBlock"},"ReanalyzeResponse":{"properties":{"status":{"type":"string","title":"Status","description":"Статус: started | error"},"total_bookmarks":{"type":"integer","title":"Total Bookmarks","description":"Всего закладок для переанализа"},"message":{"type":"string","title":"Message","description":"Сообщение"}},"type":"object","required":["status","total_bookmarks","message"],"title":"ReanalyzeResponse","description":"Ответ на запуск переанализа."},"ReanalyzeStatusResponse":{"properties":{"in_progress":{"type":"boolean","title":"In Progress","description":"Идёт переанализ"},"total":{"type":"integer","title":"Total","description":"Всего закладок"},"completed":{"type":"integer","title":"Completed","description":"Завершено"},"errors":{"type":"integer","title":"Errors","description":"Ошибок"},"queued":{"type":"integer","title":"Queued","description":"В очереди"}},"type":"object","required":["in_progress","total","completed","errors","queued"],"title":"ReanalyzeStatusResponse","description":"Статус переанализа."},"RecentChecksResponse":{"properties":{"total":{"type":"integer","title":"Total"},"items":{"items":{"$ref":"#/components/schemas/RelevanceBookmarkItem"},"type":"array","title":"Items"}},"type":"object","required":["total","items"],"title":"RecentChecksResponse","description":"Response for recent relevance check history."},"RegistrationSource":{"properties":{"utm_source":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Utm Source"},"utm_medium":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Utm Medium"},"utm_campaign":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Utm Campaign"},"utm_content":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Utm Content"},"utm_term":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Utm Term"},"referrer":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Referrer"}},"type":"object","title":"RegistrationSource","description":"UTM-параметры и источник регистрации."},"RegistrationStatusResponse":{"properties":{"registration_disabled":{"type":"boolean","title":"Registration Disabled"},"message":{"type":"string","title":"Message"}},"type":"object","required":["registration_disabled","message"],"title":"RegistrationStatusResponse","description":"Схема ответа с информацией о статусе регистрации."},"RelevanceBookmarkItem":{"properties":{"id":{"type":"string","title":"Id"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"content_type":{"type":"string","title":"Content Type"},"shelf_life_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Shelf Life Type"},"check_frequency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Check Frequency"},"next_relevance_check_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Relevance Check At"},"relevance_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Relevance Score"},"relevance_checked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Relevance Checked At"},"relevance_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Relevance Notes"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","content_type","created_at"],"title":"RelevanceBookmarkItem","description":"Bookmark item for relevance monitoring."},"RelevanceMonitoringStats":{"properties":{"total_scheduled":{"type":"integer","title":"Total Scheduled"},"checked_this_week":{"type":"integer","title":"Checked This Week"},"checked_this_month":{"type":"integer","title":"Checked This Month"},"average_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Average Score"},"outdated_count":{"type":"integer","title":"Outdated Count"},"by_shelf_life_type":{"additionalProperties":{"type":"integer"},"type":"object","title":"By Shelf Life Type"}},"type":"object","required":["total_scheduled","checked_this_week","checked_this_month","outdated_count","by_shelf_life_type"],"title":"RelevanceMonitoringStats","description":"Statistics for relevance monitoring dashboard."},"RelevanceSettingsResponse":{"properties":{"enabled":{"type":"boolean","title":"Enabled"},"frequency":{"type":"string","title":"Frequency"},"notify_telegram":{"type":"boolean","title":"Notify Telegram"},"notify_email":{"type":"boolean","title":"Notify Email"},"categories":{"additionalProperties":{"additionalProperties":true,"type":"object"},"type":"object","title":"Categories"}},"type":"object","required":["enabled","frequency","notify_telegram","notify_email","categories"],"title":"RelevanceSettingsResponse","description":"Response model for relevance check settings."},"RelevanceSettingsUpdate":{"properties":{"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled","description":"Enable/disable global relevance checks"},"frequency":{"anyOf":[{"type":"string","pattern":"^(weekly|monthly|quarterly)$"},{"type":"null"}],"title":"Frequency"},"notify_telegram":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Notify Telegram"},"notify_email":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Notify Email"}},"type":"object","title":"RelevanceSettingsUpdate","description":"Request model for updating relevance check settings."},"RelevanceStatsResponse":{"properties":{"quota":{"additionalProperties":true,"type":"object","title":"Quota"},"outdated_count":{"type":"integer","title":"Outdated Count"},"average_score":{"type":"number","title":"Average Score"},"actions_taken":{"additionalProperties":true,"type":"object","title":"Actions Taken"}},"type":"object","required":["quota","outdated_count","average_score","actions_taken"],"title":"RelevanceStatsResponse","description":"User relevance checking statistics (COMPONENT-LLM-RELEVANCE Task 7)."},"SemanticSearchResponse":{"properties":{"query":{"type":"string","title":"Query"},"results":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Results"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"similarity_threshold":{"type":"number","title":"Similarity Threshold"},"suggestions":{"items":{"type":"string"},"type":"array","title":"Suggestions"},"degraded":{"type":"boolean","title":"Degraded","default":false},"degraded_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Degraded Reason"}},"type":"object","required":["query","results","total","limit","similarity_threshold"],"title":"SemanticSearchResponse","description":"Response schema for semantic search."},"SendBookmarkRequest":{"properties":{"bookmark_id":{"type":"string","format":"uuid","title":"Bookmark Id"}},"type":"object","required":["bookmark_id"],"title":"SendBookmarkRequest","description":"Request schema for sending bookmark to Telegram."},"SendBookmarkResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Message Id"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"SendBookmarkResponse","description":"Response schema for sending bookmark to Telegram."},"ShareGroupedListResponse":{"properties":{"pending":{"items":{"$ref":"#/components/schemas/ShareStateResponse"},"type":"array","title":"Pending","default":[]},"published":{"items":{"$ref":"#/components/schemas/ShareStateResponse"},"type":"array","title":"Published","default":[]},"rejected":{"items":{"$ref":"#/components/schemas/ShareStateResponse"},"type":"array","title":"Rejected","default":[]},"revoked":{"items":{"$ref":"#/components/schemas/ShareStateResponse"},"type":"array","title":"Revoked","default":[]}},"type":"object","title":"ShareGroupedListResponse"},"ShareImportRequest":{"properties":{"bookmark_ids":{"items":{"type":"string"},"type":"array","maxItems":500,"title":"Bookmark Ids"}},"type":"object","title":"ShareImportRequest","description":"Часть коллекции к себе: идентификаторы элементов (закладок автора)."},"ShareImportResponse":{"properties":{"target_type":{"type":"string","title":"Target Type"},"added":{"type":"integer","title":"Added"},"skipped":{"type":"integer","title":"Skipped"},"collection_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Collection Id"},"collection_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Collection Name"}},"type":"object","required":["target_type","added","skipped"],"title":"ShareImportResponse","description":"Итог «Добавить к себе»: сколько закладок легло в библиотеку вошедшего."},"ShareImportStateResponse":{"properties":{"target_type":{"type":"string","title":"Target Type"},"is_owner":{"type":"boolean","title":"Is Owner"},"saved_bookmark_ids":{"items":{"type":"string"},"type":"array","title":"Saved Bookmark Ids","default":[]},"all_saved":{"type":"boolean","title":"All Saved","default":false},"total":{"type":"integer","title":"Total","default":0}},"type":"object","required":["target_type","is_owner"],"title":"ShareImportStateResponse","description":"Что показывать вошедшему на публичной странице."},"ShareLevelChangeBody":{"properties":{"level":{"type":"string","pattern":"^(link_only|public)$","title":"Level"}},"type":"object","required":["level"],"title":"ShareLevelChangeBody"},"ShareMyStatsResponse":{"properties":{"range_days":{"type":"integer","title":"Range Days"},"rows":{"items":{"$ref":"#/components/schemas/ShareStatsSummaryRow"},"type":"array","title":"Rows","default":[]}},"type":"object","required":["range_days"],"title":"ShareMyStatsResponse"},"ShareRequestBody":{"properties":{"level":{"type":"string","pattern":"^(link_only|public)$","title":"Level","description":"Requested share level"}},"type":"object","required":["level"],"title":"ShareRequestBody"},"ShareStateResponse":{"properties":{"bookmark_id":{"type":"string","format":"uuid","title":"Bookmark Id"},"target_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Type"},"target_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Target Id"},"share_status":{"type":"string","title":"Share Status"},"share_short_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Share Short Id"},"share_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Share Url"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"share_requested_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Share Requested At"},"share_decided_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Share Decided At"},"share_rejection_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Share Rejection Reason"}},"type":"object","required":["bookmark_id","share_status"],"title":"ShareStateResponse"},"ShareStatsDailyPoint":{"properties":{"view_date":{"type":"string","title":"View Date"},"view_count":{"type":"integer","title":"View Count"},"unique_session_count":{"type":"integer","title":"Unique Session Count"}},"type":"object","required":["view_date","view_count","unique_session_count"],"title":"ShareStatsDailyPoint"},"ShareStatsResponse":{"properties":{"range_days":{"type":"integer","title":"Range Days"},"total_views":{"type":"integer","title":"Total Views"},"total_unique":{"type":"integer","title":"Total Unique"},"daily":{"items":{"$ref":"#/components/schemas/ShareStatsDailyPoint"},"type":"array","title":"Daily","default":[]}},"type":"object","required":["range_days","total_views","total_unique"],"title":"ShareStatsResponse"},"ShareStatsSummaryRow":{"properties":{"bookmark_id":{"type":"string","format":"uuid","title":"Bookmark Id"},"total_views":{"type":"integer","title":"Total Views"},"total_unique":{"type":"integer","title":"Total Unique"}},"type":"object","required":["bookmark_id","total_views","total_unique"],"title":"ShareStatsSummaryRow","description":"Aggregate row for one bookmark in the /share/my/stats response."},"SimilarBookmarkItem":{"properties":{"id":{"type":"string","title":"Id","description":"UserBookmark UUID"},"short_id":{"type":"string","title":"Short Id","description":"NanoID(8) for /b/{short_id} routing"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"llm_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Llm Summary"},"categories":{"items":{"$ref":"#/components/schemas/CategoryRef"},"type":"array","title":"Categories","default":[]},"similarity_score":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Similarity Score"}},"type":"object","required":["id","short_id","similarity_score"],"title":"SimilarBookmarkItem","description":"One row in the 'похожие закладки' list."},"SimilarBookmarksResponse":{"properties":{"bookmark_id":{"type":"string","title":"Bookmark Id"},"items":{"items":{"$ref":"#/components/schemas/SimilarBookmarkItem"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["bookmark_id","items","total"],"title":"SimilarBookmarksResponse","description":"Response envelope for GET /v1/bookmarks/{id}/similar."},"SmartCollectionResponse":{"properties":{"id":{"type":"string","title":"Id","description":"ID коллекции (tag ID)"},"name":{"type":"string","title":"Name","description":"Название коллекции"},"icon":{"type":"string","title":"Icon","description":"Иконка (emoji)"},"color":{"type":"string","title":"Color","description":"Цвет (hex)"},"count":{"type":"integer","title":"Count","description":"Количество закладок"},"confidence":{"type":"number","title":"Confidence","description":"Confidence score (%)"},"is_system":{"type":"boolean","title":"Is System","description":"Системная коллекция"}},"type":"object","required":["id","name","icon","color","count","confidence","is_system"],"title":"SmartCollectionResponse","description":"Ответ с умной коллекцией."},"SmartCollectionsListResponse":{"properties":{"collections":{"items":{"$ref":"#/components/schemas/SmartCollectionResponse"},"type":"array","title":"Collections","description":"Умные коллекции"},"total":{"type":"integer","title":"Total","description":"Всего коллекций"},"stats":{"additionalProperties":true,"type":"object","title":"Stats","description":"Статистика: total_collections, system_collections, custom_collections, avg_confidence"}},"type":"object","required":["collections","total","stats"],"title":"SmartCollectionsListResponse","description":"Список умных коллекций."},"StopImpersonateRequest":{"properties":{"admin_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Token","description":"(deprecated) Admin token for return — use cookie instead"}},"type":"object","title":"StopImpersonateRequest","description":"Запрос на выход из имперсонализации.\n\nFE-C2: admin_token теперь optional — основной канал это HttpOnly cookie\nstop_impersonation_token (opaque). Body field оставлен для transition\ncompat с FE до миграции."},"StopImpersonateResponse":{"properties":{"access_token":{"type":"string","title":"Access Token"},"refresh_token":{"type":"string","title":"Refresh Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"},"message":{"type":"string","title":"Message","default":"Вы вернулись к своему аккаунту"}},"type":"object","required":["access_token","refresh_token"],"title":"StopImpersonateResponse","description":"Ответ с токенами админа после выхода из имперсонализации."},"SubscriptionInfoResponse":{"properties":{"tier":{"type":"string","title":"Tier","description":"Текущий тариф"},"status":{"type":"string","title":"Status","description":"Статус подписки"},"valid_until":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Valid Until"},"auto_renew":{"type":"boolean","title":"Auto Renew","default":false},"saved_card_last4":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Saved Card Last4"},"has_saved_payment_method":{"type":"boolean","title":"Has Saved Payment Method","description":"Есть сохранённый RebillId для рекуррентных платежей (T-Bank)","default":false}},"type":"object","required":["tier","status"],"title":"SubscriptionInfoResponse","description":"Current subscription snapshot."},"SubscriptionStatusResponse":{"properties":{"subscription":{"$ref":"#/components/schemas/SubscriptionStatusSubBlock"},"quota_status":{"$ref":"#/components/schemas/QuotaStatusBlock"}},"type":"object","required":["subscription","quota_status"],"title":"SubscriptionStatusResponse"},"SubscriptionStatusSubBlock":{"properties":{"subscription_tier":{"type":"string","title":"Subscription Tier"},"subscription_status":{"type":"string","title":"Subscription Status"},"subscription_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Subscription Expires At"},"grace_period_ends_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Grace Period Ends At"},"auto_renew":{"type":"boolean","title":"Auto Renew","default":false},"saved_card_last4":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Saved Card Last4"},"has_saved_payment_method":{"type":"boolean","title":"Has Saved Payment Method","default":false}},"type":"object","required":["subscription_tier","subscription_status"],"title":"SubscriptionStatusSubBlock"},"SubscriptionUpgradeRequest":{"properties":{"target_tier":{"type":"string","title":"Target Tier","description":"Новый тариф"},"billing_period":{"type":"string","title":"Billing Period","description":"Период billing","default":"1_month"},"promo_code":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Promo Code"},"provider":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Provider","description":"Способ оплаты (rollypay/tbank); по умолчанию активный провайдер"}},"type":"object","required":["target_tier"],"title":"SubscriptionUpgradeRequest","description":"Upgrade request payload."},"SuggestionsResponse":{"properties":{"query":{"type":"string","title":"Query"},"suggestions":{"items":{"type":"string"},"type":"array","title":"Suggestions"}},"type":"object","required":["query"],"title":"SuggestionsResponse","description":"Autocomplete suggestions response.\n\nReturned by GET /v1/search/suggestions?q=<prefix>.\nThe frontend merges these with its own localStorage search history."},"SystemStatsResponse":{"properties":{"total_users":{"type":"integer","title":"Total Users"},"total_bookmarks":{"type":"integer","title":"Total Bookmarks"},"subscriptions":{"additionalProperties":{"type":"integer"},"type":"object","title":"Subscriptions"},"messages":{"additionalProperties":{"type":"integer"},"type":"object","title":"Messages"}},"type":"object","required":["total_users","total_bookmarks","subscriptions","messages"],"title":"SystemStatsResponse","description":"System statistics response."},"TagCount":{"properties":{"tag":{"type":"string","title":"Tag"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["tag","count"],"title":"TagCount"},"TimelineGroup":{"properties":{"label":{"type":"string","title":"Label"},"label_en":{"type":"string","title":"Label En"},"count":{"type":"integer","title":"Count"},"bookmarks":{"items":{"$ref":"#/components/schemas/RelevanceBookmarkItem"},"type":"array","title":"Bookmarks"}},"type":"object","required":["label","label_en","count","bookmarks"],"title":"TimelineGroup","description":"Group of bookmarks in timeline view."},"TokenResponse":{"properties":{"access_token":{"type":"string","title":"Access Token"},"refresh_token":{"type":"string","title":"Refresh Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"}},"type":"object","required":["access_token","refresh_token"],"title":"TokenResponse","description":"Схема ответа с токенами."},"TopBookmarkResponse":{"properties":{"id":{"type":"string","title":"Id","description":"ID закладки"},"title":{"type":"string","title":"Title","description":"Заголовок закладки"},"content":{"type":"string","title":"Content","description":"Контент закладки"},"content_type":{"type":"string","title":"Content Type","description":"Тип контента"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url","description":"URL (если есть)"},"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url","description":"URL превью (если есть)"},"ai_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ai Summary","description":"AI саммари"},"ai_tags":{"items":{"type":"string"},"type":"array","title":"Ai Tags","description":"AI теги"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At","description":"Дата создания"},"is_favorite":{"type":"boolean","title":"Is Favorite","description":"Избранное"},"score":{"type":"number","title":"Score","description":"AI score (0-1)"},"times_opened":{"type":"integer","title":"Times Opened","description":"Количество открытий"},"ai_reason":{"type":"string","title":"Ai Reason","description":"Почему рекомендуем"}},"type":"object","required":["id","title","content","content_type","is_favorite","score","times_opened","ai_reason"],"title":"TopBookmarkResponse","description":"Ответ с топ-закладкой и AI-скорингом.","example":{"ai_reason":"Вы открывали 5 раз • Недавно читали • В избранном","ai_summary":"3 главных совета: async I/O, кэширование, индексы БД","ai_tags":["Backend","Python","FastAPI"],"content":"Статья про оптимизацию FastAPI endpoints","content_type":"url","created_at":"2025-11-12T10:30:00Z","id":"123e4567-e89b-12d3-a456-426614174000","is_favorite":true,"score":0.95,"thumbnail_url":"https://example.com/thumb.jpg","times_opened":5,"title":"Оптимизация FastAPI","url":"https://example.com/fastapi-optimization"}},"TopBookmarksListResponse":{"properties":{"bookmarks":{"items":{"$ref":"#/components/schemas/TopBookmarkResponse"},"type":"array","title":"Bookmarks","description":"Топ-закладки с AI-скорингом"},"total":{"type":"integer","title":"Total","description":"Всего закладок в списке"}},"type":"object","required":["bookmarks","total"],"title":"TopBookmarksListResponse","description":"Список топ-закладок."},"UIConfigResponse":{"properties":{"min_llm_text_length":{"type":"integer","title":"Min Llm Text Length"},"content_collapse_threshold":{"type":"integer","title":"Content Collapse Threshold"}},"type":"object","required":["min_llm_text_length","content_collapse_threshold"],"title":"UIConfigResponse","description":"UI configuration for authenticated users."},"UIPreferences":{"properties":{"items_per_page":{"type":"integer","maximum":100.0,"minimum":5.0,"title":"Items Per Page","default":20},"default_view":{"type":"string","enum":["list","grid","compact"],"title":"Default View","default":"list"},"show_previews":{"type":"boolean","title":"Show Previews","default":true}},"type":"object","title":"UIPreferences","description":"UI/UX preferences."},"UnlinkTelegramResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","required":["success"],"title":"UnlinkTelegramResponse","description":"Response after Telegram unlinking."},"UnprocessedCountByType":{"properties":{"text":{"type":"integer","title":"Text","description":"Текстовые закладки без URL","default":0},"url":{"type":"integer","title":"Url","description":"Закладки с URL","default":0},"media":{"type":"integer","title":"Media","description":"Закладки с медиа","default":0}},"type":"object","title":"UnprocessedCountByType","description":"Количество необработанных закладок по типам."},"UnprocessedCountResponse":{"properties":{"total":{"type":"integer","title":"Total","description":"Общее количество необработанных"},"by_type":{"$ref":"#/components/schemas/UnprocessedCountByType","description":"Разбивка по типам"},"estimated_cost":{"type":"integer","title":"Estimated Cost","description":"Примерная стоимость в AI-запросах"},"available_quota":{"type":"integer","title":"Available Quota","description":"Доступная квота AI-запросов"}},"type":"object","required":["total","by_type","estimated_cost","available_quota"],"title":"UnprocessedCountResponse","description":"Схема ответа с количеством необработанных закладок."},"UpcomingChecksResponse":{"properties":{"total_scheduled":{"type":"integer","title":"Total Scheduled"},"groups":{"items":{"$ref":"#/components/schemas/TimelineGroup"},"type":"array","title":"Groups"}},"type":"object","required":["total_scheduled","groups"],"title":"UpcomingChecksResponse","description":"Response for upcoming relevance checks."},"UserCategoryCreate":{"properties":{"name_ru":{"type":"string","title":"Name Ru"},"name_en":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name En"},"name_kk":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name Kk"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"},"color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color"}},"type":"object","required":["name_ru"],"title":"UserCategoryCreate","description":"Запрос создания личной категории."},"UserCategoryItem":{"properties":{"id":{"type":"string","title":"Id"},"slug":{"type":"string","title":"Slug"},"name_ru":{"type":"string","title":"Name Ru"},"name_en":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name En"},"name_kk":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name Kk"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"},"color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color"},"is_system":{"type":"boolean","title":"Is System","default":false}},"type":"object","required":["id","slug","name_ru"],"title":"UserCategoryItem","description":"Личная (или переиспользованная системная) категория юзера."},"UserChangePassword":{"properties":{"new_password":{"type":"string","minLength":8,"title":"New Password"}},"type":"object","required":["new_password"],"title":"UserChangePassword","description":"Схема для смены пароля (для авторизованного пользователя)."},"UserCreate":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"registration_source":{"anyOf":[{"$ref":"#/components/schemas/RegistrationSource"},{"type":"null"}],"description":"UTM-параметры и источник регистрации"}},"type":"object","required":["email"],"title":"UserCreate","description":"Схема для создания пользователя (регистрация)."},"UserLogin":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","maxLength":1024,"title":"Password"},"mfa_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfa Code"}},"type":"object","required":["email","password"],"title":"UserLogin","description":"Схема для входа."},"UserProfile":{"properties":{"id":{"type":"string","title":"Id"},"email":{"type":"string","title":"Email"},"email_verified":{"type":"boolean","title":"Email Verified"},"subscription_tier":{"type":"string","title":"Subscription Tier"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"telegram_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Telegram Id"},"daily_bookmarks_limit":{"type":"integer","title":"Daily Bookmarks Limit"},"monthly_bookmarks_limit":{"type":"integer","title":"Monthly Bookmarks Limit"},"max_categories":{"type":"integer","title":"Max Categories"}},"type":"object","required":["id","email","email_verified","subscription_tier","created_at","daily_bookmarks_limit","monthly_bookmarks_limit","max_categories"],"title":"UserProfile","description":"User profile response."},"UserResetPassword":{"properties":{"token":{"type":"string","title":"Token"},"new_password":{"type":"string","minLength":8,"title":"New Password"}},"type":"object","required":["token","new_password"],"title":"UserResetPassword","description":"Схема для сброса пароля."},"UserResponse":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"id":{"type":"string","format":"uuid","title":"Id"},"email_verified":{"type":"boolean","title":"Email Verified"},"telegram_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Telegram Id"},"telegram_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Telegram Username"},"telegram_linked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Telegram Linked At"},"vk_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Vk Id"},"is_active":{"type":"boolean","title":"Is Active"},"is_banned":{"type":"boolean","title":"Is Banned"},"subscription_tier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subscription Tier","description":"Effective tier (FREE/PRO). Callers MUST pass SubscriptionService.get_effective_tier(user) — the default 'FREE' is a fail-closed fallback, NOT the real tier.","default":"FREE"},"settings":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Settings"},"onboarding_completed":{"type":"boolean","title":"Onboarding Completed","default":false},"has_password":{"type":"boolean","title":"Has Password","description":"Установлен ли пароль","default":false},"created_at":{"type":"string","format":"date-time","title":"Created At"},"is_admin":{"type":"boolean","title":"Is Admin","description":"Является ли пользователь администратором","default":false}},"type":"object","required":["email","id","email_verified","is_active","is_banned","created_at"],"title":"UserResponse","description":"Схема ответа с информацией о пользователе."},"UserSetPassword":{"properties":{"token":{"type":"string","title":"Token"},"password":{"type":"string","minLength":8,"title":"Password"}},"type":"object","required":["token","password"],"title":"UserSetPassword","description":"Схема для установки пароля."},"UserSettings":{"properties":{"notifications_enabled":{"type":"boolean","title":"Notifications Enabled","default":true},"telegram_notifications":{"type":"boolean","title":"Telegram Notifications","default":false},"email_digest_frequency":{"type":"string","title":"Email Digest Frequency","default":"weekly"},"default_bookmark_privacy":{"type":"string","title":"Default Bookmark Privacy","default":"private"},"language":{"type":"string","title":"Language","default":"ru"}},"type":"object","title":"UserSettings","description":"User settings."},"UserSettingsPatch":{"properties":{"llm_language":{"anyOf":[{"type":"string","enum":["ru","en","auto"]},{"type":"null"}],"title":"Llm Language"},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone"},"notifications":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Notifications"},"privacy":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Privacy"},"ui_preferences":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Ui Preferences"},"auto_detect_category_with_ai":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Auto Detect Category With Ai","description":"Автоопределение категории контента через LLM (только для STARTER/PRO)"}},"type":"object","title":"UserSettingsPatch","description":"Schema for partial settings update."},"UserSettingsResponse":{"properties":{"llm_language":{"type":"string","enum":["ru","en","auto"],"title":"Llm Language","default":"ru"},"timezone":{"type":"string","title":"Timezone","default":"UTC"},"notifications":{"$ref":"#/components/schemas/NotificationSettings"},"privacy":{"$ref":"#/components/schemas/PrivacySettings"},"ui_preferences":{"$ref":"#/components/schemas/UIPreferences"}},"type":"object","title":"UserSettingsResponse","description":"Response schema for settings (same as UserSettings).","example":{"llm_language":"ru","notifications":{"browser":true,"email":true,"frequency":"instant","telegram":true},"privacy":{"public_profile":false,"show_statistics":false},"timezone":"Europe/Moscow","ui_preferences":{"default_view":"list","items_per_page":20,"show_previews":true}}},"UserSettingsUpdate":{"properties":{"llm_language":{"anyOf":[{"type":"string","enum":["ru","en","auto"]},{"type":"null"}],"title":"Llm Language"},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone"},"notifications":{"anyOf":[{"$ref":"#/components/schemas/NotificationSettings"},{"type":"null"}]},"privacy":{"anyOf":[{"$ref":"#/components/schemas/PrivacySettings"},{"type":"null"}]},"ui_preferences":{"anyOf":[{"$ref":"#/components/schemas/UIPreferences"},{"type":"null"}]}},"type":"object","title":"UserSettingsUpdate","description":"Schema for updating settings (all fields optional)."},"UserStatistics":{"properties":{"total_bookmarks":{"type":"integer","title":"Total Bookmarks"},"total_categories":{"type":"integer","title":"Total Categories"},"bookmarks_this_month":{"type":"integer","title":"Bookmarks This Month"},"bookmarks_today":{"type":"integer","title":"Bookmarks Today"},"storage_used_mb":{"type":"number","title":"Storage Used Mb"},"most_used_content_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Most Used Content Type"},"shared_bookmarks":{"type":"integer","title":"Shared Bookmarks","default":0}},"type":"object","required":["total_bookmarks","total_categories","bookmarks_this_month","bookmarks_today","storage_used_mb"],"title":"UserStatistics","description":"User statistics."},"UserWithQuotaResponse":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"id":{"type":"string","format":"uuid","title":"Id"},"email_verified":{"type":"boolean","title":"Email Verified"},"telegram_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Telegram Id"},"telegram_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Telegram Username"},"telegram_linked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Telegram Linked At"},"vk_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Vk Id"},"is_active":{"type":"boolean","title":"Is Active"},"is_banned":{"type":"boolean","title":"Is Banned"},"subscription_tier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subscription Tier","description":"Effective tier (FREE/PRO). Callers MUST pass SubscriptionService.get_effective_tier(user) — the default 'FREE' is a fail-closed fallback, NOT the real tier.","default":"FREE"},"settings":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Settings"},"onboarding_completed":{"type":"boolean","title":"Onboarding Completed","default":false},"has_password":{"type":"boolean","title":"Has Password","description":"Установлен ли пароль","default":false},"created_at":{"type":"string","format":"date-time","title":"Created At"},"is_admin":{"type":"boolean","title":"Is Admin","description":"Является ли пользователь администратором","default":false},"llm_requests_used":{"type":"integer","title":"Llm Requests Used","description":"Использовано AI-запросов в текущем периоде","default":0},"llm_requests_limit":{"type":"integer","title":"Llm Requests Limit","description":"Лимит AI-запросов в текущем периоде","default":0},"llm_requests_remaining":{"type":"integer","title":"Llm Requests Remaining","description":"Осталось AI-запросов","default":0}},"type":"object","required":["email","id","email_verified","is_active","is_banned","created_at"],"title":"UserWithQuotaResponse","description":"Схема ответа с информацией о пользователе и квотах AI-запросов."},"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"},"VersionResponse":{"properties":{"version":{"type":"string","title":"Version","description":"settings.app_version — от сборки не меняется"},"revision":{"type":"string","title":"Revision","description":"Полная сха коммита (CI_COMMIT_SHA) либо 'unknown'"},"image_tag":{"type":"string","title":"Image Tag","description":"Тег образа (IMAGE_TAG, build-N-<short sha>) либо 'unknown'"}},"type":"object","required":["version","revision","image_tag"],"title":"VersionResponse","description":"Что работает: версия из настроек, ревизия и тег образа из конвейера."},"WeekCount":{"properties":{"week_start":{"type":"string","format":"date","title":"Week Start"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["week_start","count"],"title":"WeekCount"},"_ExclusionsBody":{"properties":{"exclusions":{"items":{"type":"string"},"type":"array","title":"Exclusions"}},"type":"object","required":["exclusions"],"title":"_ExclusionsBody"},"app__api__categories__CategoryStatsResponse":{"properties":{"total_bookmarks":{"type":"integer","title":"Total Bookmarks"},"categories":{"items":{"$ref":"#/components/schemas/CategoryStat"},"type":"array","title":"Categories"},"top_category":{"anyOf":[{"$ref":"#/components/schemas/CategoryStat"},{"type":"null"}]}},"type":"object","required":["total_bookmarks","categories"],"title":"CategoryStatsResponse","description":"Статистика распределения закладок пользователя по категориям."},"app__api__content_categories__CategoryStatsResponse":{"properties":{"total_bookmarks":{"type":"integer","title":"Total Bookmarks"},"categories":{"items":{"$ref":"#/components/schemas/CategoryStatItem"},"type":"array","title":"Categories"},"top_category":{"anyOf":[{"$ref":"#/components/schemas/CategoryStatItem"},{"type":"null"}]}},"type":"object","required":["total_bookmarks","categories"],"title":"CategoryStatsResponse","description":"Ответ со статистикой по категориям."},"app__schemas__bookmark__LinksListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/LinkResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit","description":"Лимит ссылок по тарифу"},"remaining":{"type":"integer","title":"Remaining","description":"Оставшееся количество слотов"}},"type":"object","required":["items","total","limit","remaining"],"title":"LinksListResponse","description":"Схема ответа со списком ссылок закладки."},"app__schemas__link__LinksListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/LinkRowResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total","description":"Number of items in this response.","default":0}},"type":"object","required":["items"],"title":"LinksListResponse"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}