{"openapi":"3.1.0","info":{"title":"R2 Farm Tracker","version":"0.1.0"},"paths":{"/api/items/health":{"get":{"tags":["items"],"summary":"Health","operationId":"health_api_items_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/items/add":{"post":{"tags":["items"],"summary":"Add Item","operationId":"add_item_items_add_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_add_item_items_add_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/items/{item_id}/threshold":{"post":{"tags":["items"],"summary":"Update Threshold","operationId":"update_threshold_items__item_id__threshold_post","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"integer","title":"Item Id"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_update_threshold_items__item_id__threshold_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/items/{item_id}/stock":{"post":{"tags":["items"],"summary":"Update Stock","operationId":"update_stock_items__item_id__stock_post","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"integer","title":"Item Id"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_update_stock_items__item_id__stock_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/items/reorder":{"post":{"tags":["items"],"summary":"Reorder Items","description":"Обновляет sort_order предметов. payload: {\"order\": [id1, id2, ...]}","operationId":"reorder_items_api_items_reorder_post","requestBody":{"content":{"application/json":{"schema":{"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/sales/health":{"get":{"tags":["sales"],"summary":"Health","operationId":"health_api_sales_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/sales":{"get":{"tags":["sales"],"summary":"Sales Page","operationId":"sales_page_sales_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/sales/add":{"post":{"tags":["sales"],"summary":"Add Sale","operationId":"add_sale_sales_add_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_add_sale_sales_add_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sales/{sale_id}/delete":{"post":{"tags":["sales"],"summary":"Delete Sale","operationId":"delete_sale_sales__sale_id__delete_post","parameters":[{"name":"sale_id","in":"path","required":true,"schema":{"type":"integer","title":"Sale Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sales/import-html":{"post":{"tags":["sales"],"summary":"Sales Import Html","description":"Загружает HTML-экспорт чата Telegram и импортирует продажи.","operationId":"sales_import_html_sales_import_html_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_sales_import_html_sales_import_html_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/farm/health":{"get":{"tags":["farm"],"summary":"Health","operationId":"health_api_farm_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/farm":{"get":{"tags":["farm"],"summary":"Farm Page","operationId":"farm_page_farm_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/farm/add":{"post":{"tags":["farm"],"summary":"Add Farm","operationId":"add_farm_farm_add_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_add_farm_farm_add_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/farm/{session_id}/edit":{"post":{"tags":["farm"],"summary":"Edit Farm Session","operationId":"edit_farm_session_farm__session_id__edit_post","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_edit_farm_session_farm__session_id__edit_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/farm/{session_id}/delete":{"post":{"tags":["farm"],"summary":"Delete Farm Session","operationId":"delete_farm_session_farm__session_id__delete_post","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/telegram/health":{"get":{"tags":["telegram"],"summary":"Health","operationId":"health_api_telegram_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/telegram":{"get":{"tags":["telegram"],"summary":"Telegram Page","operationId":"telegram_page_telegram_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/telegram/save":{"post":{"tags":["telegram"],"summary":"Telegram Save","operationId":"telegram_save_telegram_save_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_telegram_save_telegram_save_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/telegram/sync":{"post":{"tags":["telegram"],"summary":"Telegram Sync","description":"Забирает последние продажи из Telegram и записывает в БД.","operationId":"telegram_sync_telegram_sync_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/telegram/save-bot":{"post":{"tags":["telegram"],"summary":"Telegram Save Bot","operationId":"telegram_save_bot_telegram_save_bot_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_telegram_save_bot_telegram_save_bot_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/telegram/sync-bot":{"post":{"tags":["telegram"],"summary":"Telegram Sync Bot","operationId":"telegram_sync_bot_telegram_sync_bot_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/settings/telegram/proxy":{"post":{"tags":["telegram"],"summary":"Telegram Save Proxy","operationId":"telegram_save_proxy_settings_telegram_proxy_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_telegram_save_proxy_settings_telegram_proxy_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/settings/telegram/login":{"post":{"tags":["telegram"],"summary":"Settings Telegram Login","operationId":"settings_telegram_login_settings_telegram_login_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/settings/telegram/sync-web":{"post":{"tags":["telegram"],"summary":"Settings Telegram Sync Web","operationId":"settings_telegram_sync_web_settings_telegram_sync_web_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/settings/shops":{"post":{"tags":["telegram"],"summary":"Settings Save Shops","operationId":"settings_save_shops_settings_shops_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/settings":{"get":{"tags":["telegram"],"summary":"Settings Page","operationId":"settings_page_settings_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/api/debts":{"get":{"tags":["debts"],"summary":"List Debts","operationId":"list_debts_api_debts_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["debts"],"summary":"Create Debt","operationId":"create_debt_api_debts_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DebtPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/debts/{debt_id}":{"post":{"tags":["debts"],"summary":"Update Debt","operationId":"update_debt_api_debts__debt_id__post","parameters":[{"name":"debt_id","in":"path","required":true,"schema":{"type":"integer","title":"Debt Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DebtPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/debts/{debt_id}/delete":{"post":{"tags":["debts"],"summary":"Delete Debt","operationId":"delete_debt_api_debts__debt_id__delete_post","parameters":[{"name":"debt_id","in":"path","required":true,"schema":{"type":"integer","title":"Debt Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/silver":{"get":{"tags":["silver"],"summary":"Get Silver","operationId":"get_silver_api_silver_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/silver/history":{"get":{"tags":["silver"],"summary":"Silver History","operationId":"silver_history_api_silver_history_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/silver/adjust":{"post":{"tags":["silver"],"summary":"Adjust Silver","operationId":"adjust_silver_api_silver_adjust_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SilverAdjustmentPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/craft/{item_id}":{"get":{"tags":["craft"],"summary":"Craft Info","operationId":"craft_info_api_craft__item_id__get","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"integer","title":"Item Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["craft"],"summary":"Craft","operationId":"craft_api_craft__item_id__post","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"integer","title":"Item Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CraftPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/crafts":{"get":{"tags":["crafts"],"summary":"Crafts Page","operationId":"crafts_page_crafts_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/crafts/admin":{"get":{"tags":["crafts"],"summary":"Crafts Admin Page","operationId":"crafts_admin_page_crafts_admin_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/crafts":{"get":{"tags":["crafts"],"summary":"Crafts List","operationId":"crafts_list_api_crafts_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/crafts/{recipe_id}/tree":{"get":{"tags":["crafts"],"summary":"Crafts Tree","operationId":"crafts_tree_api_crafts__recipe_id__tree_get","parameters":[{"name":"recipe_id","in":"path","required":true,"schema":{"type":"integer","title":"Recipe Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/crafts/search":{"get":{"tags":["crafts"],"summary":"Crafts Search","description":"Поиск предметов аукциона для редактора рецептов (только администратор).","operationId":"crafts_search_api_crafts_search_get","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","title":"Q"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/crafts/recipes":{"post":{"tags":["crafts"],"summary":"Create Recipe","operationId":"create_recipe_api_crafts_recipes_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecipeIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/crafts/recipes/{recipe_id}":{"put":{"tags":["crafts"],"summary":"Update Recipe","operationId":"update_recipe_api_crafts_recipes__recipe_id__put","parameters":[{"name":"recipe_id","in":"path","required":true,"schema":{"type":"integer","title":"Recipe Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecipeIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["crafts"],"summary":"Delete Recipe","operationId":"delete_recipe_api_crafts_recipes__recipe_id__delete","parameters":[{"name":"recipe_id","in":"path","required":true,"schema":{"type":"integer","title":"Recipe Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/location/{name}":{"get":{"tags":["locations"],"summary":"Location Page","operationId":"location_page_location__name__get","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/request-code":{"post":{"summary":"Request Code","operationId":"request_code_api_auth_request_code_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/verify":{"post":{"summary":"Verify Code","operationId":"verify_code_api_auth_verify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/me":{"get":{"summary":"Me","operationId":"me_api_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/auth/logout":{"get":{"summary":"Logout","operationId":"logout_auth_logout_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/loot":{"get":{"tags":["loot"],"summary":"Loot Page","operationId":"loot_page_loot_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/api/loot/detect":{"post":{"tags":["loot"],"summary":"Loot Detect","description":"Распознаёт предметы на одном или нескольких скриншотах инвентаря.","operationId":"loot_detect_api_loot_detect_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_loot_detect_api_loot_detect_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/loot/prices":{"post":{"tags":["loot"],"summary":"Loot Prices","description":"Цены аукциона (min активного лота или ручной цены) для списка имён.","operationId":"loot_prices_api_loot_prices_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PricesPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/loot/items":{"get":{"tags":["loot"],"summary":"Loot Items","description":"Поиск предмета по базе иконок (для ручного добавления/правки строки).","operationId":"loot_items_api_loot_items_get","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","title":"Q"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auction/push":{"post":{"tags":["auction"],"summary":"Auction Push","operationId":"auction_push_api_auction_push_post","parameters":[{"name":"x-agent-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Agent-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/support/log":{"post":{"summary":"Support Log","operationId":"support_log_api_support_log_post","parameters":[{"name":"app","in":"query","required":false,"schema":{"type":"string","default":"decktoptrecker","title":"App"}},{"name":"version","in":"query","required":false,"schema":{"type":"string","default":"","title":"Version"}},{"name":"ext","in":"query","required":false,"schema":{"type":"string","default":"log","title":"Ext"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/icons/{name}":{"get":{"summary":"Get Icon","description":"Отдаёт иконку предмета из icons/<категория>/ (ищется по имени файла).","operationId":"get_icon_icons__name__get","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/":{"get":{"summary":"Landing","operationId":"landing__get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/storage":{"get":{"summary":"Storage Page","operationId":"storage_page_storage_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/stats":{"get":{"summary":"Stats Page","operationId":"stats_page_stats_get","parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","default":"month","title":"Period"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/talismans":{"get":{"summary":"Talismans Page","operationId":"talismans_page_talismans_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/api/auction/prices_by_name":{"get":{"summary":"Auction Prices By Name","description":"Минимальная активная цена лота для списка имён предметов (через запятую).","operationId":"auction_prices_by_name_api_auction_prices_by_name_get","parameters":[{"name":"names","in":"query","required":true,"schema":{"type":"string","title":"Names"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auction":{"get":{"summary":"Auction Page","operationId":"auction_page_auction_get","parameters":[{"name":"cat","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cat"}},{"name":"item","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Item"}},{"name":"view","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"View"}},{"name":"sub","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sub"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auction/browse":{"get":{"summary":"Auction Browse","description":"JSON-обзор аукциона для оверлея DecktopTrecker.\n\nБез cat — список категорий; с cat — предметы категории (те же строки,\nчто рисует /auction?cat=N). Данные публичные — авторизация не нужна.","operationId":"auction_browse_api_auction_browse_get","parameters":[{"name":"cat","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cat"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auction/item_detail":{"get":{"summary":"Auction Item Detail","description":"JSON-карточка предмета для оверлея DecktopTrecker: варианты (заточка/\nкамень) × состояние (normal/cursed/blessed), история цен и текущая.\nТе же данные, что рисует страница /auction?item=N.","operationId":"auction_item_detail_api_auction_item_detail_get","parameters":[{"name":"item","in":"query","required":true,"schema":{"type":"integer","title":"Item"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auction/price_changes":{"get":{"summary":"Auction Price Changes","description":"Топ подорожавших/подешевевших предметов за период.\n\nСравнение ведётся по варианту предмета (заточка + состояние):\nбазовая цена — ближайшее наблюдение варианта до начала периода\n(или первое наблюдение внутри периода); текущая — цена активного лота\nэтого варианта.","operationId":"auction_price_changes_api_auction_price_changes_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":7,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auction/items/{item_id}/hidden":{"post":{"summary":"Auction Set Hidden","description":"Скрыть/показать предмет аукциона (только администратор).","operationId":"auction_set_hidden_api_auction_items__item_id__hidden_post","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"integer","title":"Item Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuctionHiddenIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auction/manual-prices":{"post":{"summary":"Auction Add Manual Price","description":"Добавление/обновление ручной цены предмета (только администратор).\nОдна цена на пару (предмет, заточка): повторное добавление обновляет цену.","operationId":"auction_add_manual_price_api_auction_manual_prices_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManualPriceIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auction/manual-prices/{mp_id}":{"delete":{"summary":"Auction Delete Manual Price","description":"Удаление ручной цены (только администратор).","operationId":"auction_delete_manual_price_api_auction_manual_prices__mp_id__delete","parameters":[{"name":"mp_id","in":"path","required":true,"schema":{"type":"integer","title":"Mp Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auction/lots/{lot_id}":{"delete":{"summary":"Auction Delete Lot","description":"Удаление записи истории (лота) аукциона (только администратор).","operationId":"auction_delete_lot_api_auction_lots__lot_id__delete","parameters":[{"name":"lot_id","in":"path","required":true,"schema":{"type":"integer","title":"Lot Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auction/categories/{cat}/order":{"post":{"summary":"Auction Save Order","description":"Сохранение ручного порядка предметов в категории (только администратор).\n\nids — порядок строк категории (у камней — id представителя группы).\nПорядок сохраняется в manual_order и виден всем пользователям.","operationId":"auction_save_order_api_auction_categories__cat__order_post","parameters":[{"name":"cat","in":"path","required":true,"schema":{"type":"integer","title":"Cat"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuctionOrderIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auction/item_summaries":{"get":{"summary":"Auction Item Summaries","description":"Краткая информация по списку id (для вкладки «Избранное»).","operationId":"auction_item_summaries_api_auction_item_summaries_get","parameters":[{"name":"ids","in":"query","required":true,"schema":{"type":"string","title":"Ids"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agent/status":{"get":{"summary":"Agent Status","description":"Статус агента на моноблоке: активен, если недавно писал в лог или слал данные.","operationId":"agent_status_api_agent_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/auction/snapshot":{"post":{"summary":"Auction Receive Snapshot","description":"Приём снимка M2 от агента на моноблоке (формат data/auction_data.json).","operationId":"auction_receive_snapshot_api_auction_snapshot_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/auction/lots":{"post":{"summary":"Auction Receive Lots","description":"Приём лотов от агента на моноблоке (JSON в формате lots.json).","operationId":"auction_receive_lots_api_auction_lots_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/locations":{"get":{"summary":"Locations Page","operationId":"locations_page_locations_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/api/screenshot/detect":{"post":{"summary":"Api Detect Slots","description":"Принимает закрашенный скрин, возвращает найденные слоты + авто-матч по иконкам.","operationId":"api_detect_slots_api_screenshot_detect_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_api_detect_slots_api_screenshot_detect_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/screenshot/confirm":{"post":{"summary":"Api Confirm Screenshot","description":"Сохраняет фарм-сессию из подтверждённых слотов + запоминает иконки.","operationId":"api_confirm_screenshot_api_screenshot_confirm_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AuctionHiddenIn":{"properties":{"hidden":{"type":"boolean","title":"Hidden"}},"type":"object","required":["hidden"],"title":"AuctionHiddenIn"},"AuctionOrderIn":{"properties":{"ids":{"items":{"type":"integer"},"type":"array","title":"Ids"}},"type":"object","required":["ids"],"title":"AuctionOrderIn"},"Body_add_farm_farm_add_post":{"properties":{"session_date":{"type":"string","title":"Session Date"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location"},"duration_hours":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration Hours"}},"type":"object","required":["session_date"],"title":"Body_add_farm_farm_add_post"},"Body_add_item_items_add_post":{"properties":{"name":{"type":"string","title":"Name"},"stock":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stock","default":"0"},"is_event":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Is Event"},"event_end_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event End Date"},"icon":{"anyOf":[{"type":"string","format":"binary"},{"type":"null"}],"title":"Icon"}},"type":"object","required":["name"],"title":"Body_add_item_items_add_post"},"Body_add_sale_sales_add_post":{"properties":{"item_id":{"type":"integer","title":"Item Id"},"quantity":{"type":"integer","title":"Quantity"},"total_price":{"type":"number","title":"Total Price"},"remaining_stock":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Remaining Stock"},"buyer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Buyer Name"},"sold_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sold At"}},"type":"object","required":["item_id","quantity","total_price"],"title":"Body_add_sale_sales_add_post"},"Body_api_detect_slots_api_screenshot_detect_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_api_detect_slots_api_screenshot_detect_post"},"Body_edit_farm_session_farm__session_id__edit_post":{"properties":{"session_date":{"type":"string","title":"Session Date"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["session_date"],"title":"Body_edit_farm_session_farm__session_id__edit_post"},"Body_loot_detect_api_loot_detect_post":{"properties":{"files":{"items":{"type":"string","format":"binary"},"type":"array","title":"Files"}},"type":"object","required":["files"],"title":"Body_loot_detect_api_loot_detect_post"},"Body_sales_import_html_sales_import_html_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_sales_import_html_sales_import_html_post"},"Body_telegram_save_bot_telegram_save_bot_post":{"properties":{"bot_token":{"type":"string","title":"Bot Token"}},"type":"object","required":["bot_token"],"title":"Body_telegram_save_bot_telegram_save_bot_post"},"Body_telegram_save_proxy_settings_telegram_proxy_post":{"properties":{"proxy_enabled":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proxy Enabled"},"proxy_server":{"type":"string","title":"Proxy Server","default":""}},"type":"object","title":"Body_telegram_save_proxy_settings_telegram_proxy_post"},"Body_telegram_save_telegram_save_post":{"properties":{"api_id":{"type":"integer","title":"Api Id"},"api_hash":{"type":"string","title":"Api Hash"},"bot_username":{"type":"string","title":"Bot Username"}},"type":"object","required":["api_id","api_hash","bot_username"],"title":"Body_telegram_save_telegram_save_post"},"Body_update_stock_items__item_id__stock_post":{"properties":{"delta":{"type":"integer","title":"Delta"},"operation":{"type":"string","title":"Operation","default":"add"},"transaction_date":{"type":"string","title":"Transaction Date","default":"2026-12-02"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["delta"],"title":"Body_update_stock_items__item_id__stock_post"},"Body_update_threshold_items__item_id__threshold_post":{"properties":{"threshold":{"type":"number","title":"Threshold"}},"type":"object","required":["threshold"],"title":"Body_update_threshold_items__item_id__threshold_post"},"ConfirmPayload":{"properties":{"session_date":{"type":"string","title":"Session Date"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"slots":{"items":{"$ref":"#/components/schemas/SlotConfirm"},"type":"array","title":"Slots"}},"type":"object","required":["session_date","slots"],"title":"ConfirmPayload"},"CraftPayload":{"properties":{"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","title":"CraftPayload"},"DebtPayload":{"properties":{"direction":{"type":"string","title":"Direction","default":"owed"},"nickname":{"type":"string","title":"Nickname","default":""},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","default":""}},"type":"object","title":"DebtPayload"},"EmailIn":{"properties":{"email":{"type":"string","title":"Email"}},"type":"object","required":["email"],"title":"EmailIn"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"IngredientIn":{"properties":{"item_id":{"type":"integer","title":"Item Id"},"quantity":{"type":"integer","title":"Quantity"},"level":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Level"}},"type":"object","required":["item_id","quantity"],"title":"IngredientIn"},"ManualPriceIn":{"properties":{"item_id":{"type":"integer","title":"Item Id"},"level":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Level"},"price":{"type":"integer","title":"Price"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["item_id","price"],"title":"ManualPriceIn"},"PricesPayload":{"properties":{"names":{"items":{"type":"string"},"type":"array","title":"Names"}},"type":"object","required":["names"],"title":"PricesPayload"},"RecipeIn":{"properties":{"result_item_id":{"type":"integer","title":"Result Item Id"},"result_quantity":{"type":"integer","title":"Result Quantity","default":1},"result_level":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Result Level"},"silver_cost":{"type":"number","title":"Silver Cost","default":0},"sort_order":{"type":"integer","title":"Sort Order","default":0},"ingredients":{"items":{"$ref":"#/components/schemas/IngredientIn"},"type":"array","title":"Ingredients"}},"type":"object","required":["result_item_id","ingredients"],"title":"RecipeIn"},"SilverAdjustmentPayload":{"properties":{"delta":{"type":"number","title":"Delta"},"transaction_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transaction Date"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["delta"],"title":"SilverAdjustmentPayload"},"SlotConfirm":{"properties":{"phash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phash"},"item_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Item Id"},"new_item_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"New Item Name"},"quantity":{"type":"integer","title":"Quantity"}},"type":"object","required":["quantity"],"title":"SlotConfirm"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VerifyIn":{"properties":{"email":{"type":"string","title":"Email"},"code":{"type":"string","title":"Code"}},"type":"object","required":["email","code"],"title":"VerifyIn"}}}}