{"openapi":"3.1.0","info":{"title":"Meetpoint","version":"0.1.0"},"paths":{"/login":{"get":{"summary":"Login Page","operationId":"login_page_login_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"summary":"Login","operationId":"login_login_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_login_login_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/healthz":{"get":{"summary":"Healthz","description":"Проверка для Docker и мониторинга: база отвечает, таблица подключена.","operationId":"healthz_healthz_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/tg":{"get":{"summary":"Tg Entry","description":"Точка входа Telegram Mini App.","operationId":"tg_entry_tg_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/tg/auth":{"post":{"summary":"Tg Auth","description":"Вход из Mini App по подписи Telegram — без пароля и капчи.","operationId":"tg_auth_tg_auth_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/captcha.png":{"get":{"summary":"Captcha Image","operationId":"captcha_image_captcha_png_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/logout":{"get":{"summary":"Logout","operationId":"logout_logout_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/lang":{"post":{"summary":"Set Language","operationId":"set_language_lang_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_set_language_lang_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/account":{"get":{"summary":"Account Page","operationId":"account_page_account_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"summary":"Account Save","operationId":"account_save_account_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_account_save_account_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accent":{"post":{"summary":"Set Accent","operationId":"set_accent_accent_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_set_accent_accent_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/theme":{"post":{"summary":"Set Theme","operationId":"set_theme_theme_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_set_theme_theme_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/":{"get":{"summary":"Dashboard","operationId":"dashboard__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/expenses":{"get":{"summary":"Expenses Page","operationId":"expenses_page_expenses_get","parameters":[{"name":"month","in":"query","required":false,"schema":{"type":"string","default":"","title":"Month"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Expense Add","description":"Одна или несколько строк расходов → первая пустая строка «ПРОЧИЕ РАСХОДЫ» на листе нужного месяца.","operationId":"expense_add_expenses_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/expenses/{row}/edit":{"post":{"summary":"Expense Edit","operationId":"expense_edit_expenses__row__edit_post","parameters":[{"name":"row","in":"path","required":true,"schema":{"type":"integer","title":"Row"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_expense_edit_expenses__row__edit_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/expenses/{row}/delete":{"post":{"summary":"Expense Delete","operationId":"expense_delete_expenses__row__delete_post","parameters":[{"name":"row","in":"path","required":true,"schema":{"type":"integer","title":"Row"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_expense_delete_expenses__row__delete_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/expenses/recognize":{"post":{"summary":"Expense Recognize","description":"Фото чека или текст → строки расходов (Gemini, как в боте). Ничего не записывает — только заполняет форму.","operationId":"expense_recognize_expenses_recognize_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_expense_recognize_expenses_recognize_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/month":{"get":{"summary":"Month Page","operationId":"month_page_month_get","parameters":[{"name":"m","in":"query","required":false,"schema":{"type":"string","default":"","title":"M"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/month/close":{"post":{"summary":"Month Close","operationId":"month_close_month_close_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_month_close_month_close_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/month/reopen":{"post":{"summary":"Month Reopen","operationId":"month_reopen_month_reopen_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_month_reopen_month_reopen_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/month/turnover":{"post":{"summary":"Month Turnover","description":"Оборот по чекам Ocha → строка «Оборот» в таблице (выбранные половины месяца).","operationId":"month_turnover_month_turnover_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_month_turnover_month_turnover_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":{"get":{"summary":"Sales Page","operationId":"sales_page_sales_get","parameters":[{"name":"month","in":"query","required":false,"schema":{"type":"string","default":"","title":"Month"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Sale Add","operationId":"sale_add_sales_post","requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_sale_add_sales_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sales/{sid}/edit":{"post":{"summary":"Sale Edit","operationId":"sale_edit_sales__sid__edit_post","parameters":[{"name":"sid","in":"path","required":true,"schema":{"type":"integer","title":"Sid"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_sale_edit_sales__sid__edit_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sales/{sid}/delete":{"post":{"summary":"Sale Delete","operationId":"sale_delete_sales__sid__delete_post","parameters":[{"name":"sid","in":"path","required":true,"schema":{"type":"integer","title":"Sid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sales/import":{"post":{"summary":"Sale Import","description":"Отчёт Ocha (можно сразу все CSV из письма) или любая таблица продаж.","operationId":"sale_import_sales_import_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_sale_import_sales_import_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/check-mail":{"post":{"summary":"Sale Check Mail","operationId":"sale_check_mail_sales_check_mail_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/sales/export":{"get":{"summary":"Sales Export","operationId":"sales_export_sales_export_get","parameters":[{"name":"month","in":"query","required":false,"schema":{"type":"string","default":"","title":"Month"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/stats":{"get":{"summary":"Stats Page","operationId":"stats_page_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/staff":{"get":{"summary":"Staff Page","operationId":"staff_page_staff_get","parameters":[{"name":"p","in":"query","required":false,"schema":{"type":"string","default":"pay","title":"P"}},{"name":"a","in":"query","required":false,"schema":{"type":"string","default":"","title":"A"}},{"name":"b","in":"query","required":false,"schema":{"type":"string","default":"","title":"B"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/staff/{name}":{"get":{"summary":"Staff Person","description":"Отдельная статистика сотрудника за выбранные даты: смены, часы, продажи, когда и что продаёт, выплаты.","operationId":"staff_person_staff__name__get","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}},{"name":"p","in":"query","required":false,"schema":{"type":"string","default":"pay","title":"P"}},{"name":"a","in":"query","required":false,"schema":{"type":"string","default":"","title":"A"}},{"name":"b","in":"query","required":false,"schema":{"type":"string","default":"","title":"B"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/categories":{"get":{"summary":"Categories Page","operationId":"categories_page_categories_get","parameters":[{"name":"p","in":"query","required":false,"schema":{"type":"string","default":"month","title":"P"}},{"name":"a","in":"query","required":false,"schema":{"type":"string","default":"","title":"A"}},{"name":"b","in":"query","required":false,"schema":{"type":"string","default":"","title":"B"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/payroll":{"get":{"summary":"Payroll Page","operationId":"payroll_page_payroll_get","parameters":[{"name":"d","in":"query","required":false,"schema":{"type":"string","default":"","title":"D"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/payroll/send":{"post":{"summary":"Payroll Send","operationId":"payroll_send_payroll_send_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_payroll_send_payroll_send_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/payroll/sheet":{"post":{"summary":"Payroll Sheet","description":"Итог выплаты → строка «Зарплаты» в таблице: выплата 15-го — в B, выплата 1-го — в C прошлого месяца.","operationId":"payroll_sheet_payroll_sheet_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_payroll_sheet_payroll_sheet_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/payroll/adjust":{"post":{"summary":"Payroll Adjust","description":"Ручная премия или штраф в выбранную выплату — с причиной, она попадает в объяснение суммы.","operationId":"payroll_adjust_payroll_adjust_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_payroll_adjust_payroll_adjust_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/payroll/adjust/{aid}/delete":{"post":{"summary":"Payroll Adjust Delete","operationId":"payroll_adjust_delete_payroll_adjust__aid__delete_post","parameters":[{"name":"aid","in":"path","required":true,"schema":{"type":"integer","title":"Aid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/payroll/paid":{"post":{"summary":"Payroll Paid","description":"Отметить «выплачено»: одного сотрудника или всех, кому ещё не отдали, — по текущему расчёту.","operationId":"payroll_paid_payroll_paid_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_payroll_paid_payroll_paid_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/payroll/unpaid":{"post":{"summary":"Payroll Unpaid","operationId":"payroll_unpaid_payroll_unpaid_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_payroll_unpaid_payroll_unpaid_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/payroll/rules":{"post":{"summary":"Payroll Rules","operationId":"payroll_rules_payroll_rules_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_payroll_rules_payroll_rules_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/payroll/workers":{"post":{"summary":"Payroll Workers","operationId":"payroll_workers_payroll_workers_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/fixed":{"get":{"summary":"Fixed Page","operationId":"fixed_page_fixed_get","parameters":[{"name":"m","in":"query","required":false,"schema":{"type":"string","default":"","title":"M"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Fixed Add","description":"Новый постоянный расход — повторяется каждый месяц, начиная с текущего.","operationId":"fixed_add_fixed_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_fixed_add_fixed_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/fixed/{cid}/edit":{"post":{"summary":"Fixed Edit","operationId":"fixed_edit_fixed__cid__edit_post","parameters":[{"name":"cid","in":"path","required":true,"schema":{"type":"integer","title":"Cid"}}],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_fixed_edit_fixed__cid__edit_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/fixed/{cid}/delete":{"post":{"summary":"Fixed Delete","description":"Удалить постоянный расход совсем — вместе с суммами и отметками об оплате за все месяцы.","operationId":"fixed_delete_fixed__cid__delete_post","parameters":[{"name":"cid","in":"path","required":true,"schema":{"type":"integer","title":"Cid"}}],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_fixed_delete_fixed__cid__delete_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/fixed/{cid}/paid":{"post":{"summary":"Fixed Paid","description":"Отметить «оплачено» за месяц — с суммой этого месяца (если счёт другой).","operationId":"fixed_paid_fixed__cid__paid_post","parameters":[{"name":"cid","in":"path","required":true,"schema":{"type":"integer","title":"Cid"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_fixed_paid_fixed__cid__paid_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/fixed/{cid}/amount":{"post":{"summary":"Fixed Amount","operationId":"fixed_amount_fixed__cid__amount_post","parameters":[{"name":"cid","in":"path","required":true,"schema":{"type":"integer","title":"Cid"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_fixed_amount_fixed__cid__amount_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/fixed/{cid}/unpaid":{"post":{"summary":"Fixed Unpaid","operationId":"fixed_unpaid_fixed__cid__unpaid_post","parameters":[{"name":"cid","in":"path","required":true,"schema":{"type":"integer","title":"Cid"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_fixed_unpaid_fixed__cid__unpaid_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/fixed/remind":{"post":{"summary":"Fixed Remind Settings","description":"Напоминания в Telegram: включить или выключить и во сколько.","operationId":"fixed_remind_settings_fixed_remind_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_fixed_remind_settings_fixed_remind_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/fixed/remind-now":{"post":{"summary":"Fixed Remind Now","description":"Отправить напоминание сейчас (например, проверить, что Telegram настроен).","operationId":"fixed_remind_now_fixed_remind_now_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_fixed_remind_now_fixed_remind_now_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/fixed/sheet":{"post":{"summary":"Fixed Sheet","description":"Итог месяца → строка «Постоянные расходы» в таблице: платежи до 15-го — в B, остальные — в C.","operationId":"fixed_sheet_fixed_sheet_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_fixed_sheet_fixed_sheet_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/journal":{"get":{"summary":"Journal Page","operationId":"journal_page_journal_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}},{"name":"who","in":"query","required":false,"schema":{"type":"string","default":"","title":"Who"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/users":{"get":{"summary":"Users Page","operationId":"users_page_users_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"summary":"User Add","operationId":"user_add_users_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_user_add_users_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/users/{uid}/edit":{"post":{"summary":"User Edit","operationId":"user_edit_users__uid__edit_post","parameters":[{"name":"uid","in":"path","required":true,"schema":{"type":"integer","title":"Uid"}}],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_user_edit_users__uid__edit_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/users/{uid}/delete":{"post":{"summary":"User Delete","operationId":"user_delete_users__uid__delete_post","parameters":[{"name":"uid","in":"path","required":true,"schema":{"type":"integer","title":"Uid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/settings":{"get":{"summary":"Settings Page","operationId":"settings_page_settings_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/settings/sheet/refresh":{"post":{"summary":"Settings Sheet Refresh","description":"Сбросить кэш и переподключиться к таблице (после смены категорий, листов или доступа).","operationId":"settings_sheet_refresh_settings_sheet_refresh_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/settings/mail":{"post":{"summary":"Settings Mail","description":"Gmail, куда Ocha присылает письма: адрес + пароль приложения Google (IMAP).","operationId":"settings_mail_settings_mail_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_settings_mail_settings_mail_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/settings/public-url":{"post":{"summary":"Settings Public Url","operationId":"settings_public_url_settings_public_url_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_settings_public_url_settings_public_url_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/settings/bot-name":{"post":{"summary":"Settings Bot Name","description":"Имя бота для ссылки t.me/…, если панель не узнала его по токену сама (нет BOT_TOKEN или Telegram недоступен).","operationId":"settings_bot_name_settings_bot_name_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_settings_bot_name_settings_bot_name_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/settings/lang":{"post":{"summary":"Settings Lang","operationId":"settings_lang_settings_lang_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_settings_lang_settings_lang_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/settings/download":{"get":{"summary":"Download Database","description":"Копия базы панели (пользователи, журнал, продажи Ocha). ZIP.","operationId":"download_database_settings_download_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/assistant":{"post":{"summary":"Assistant Api","description":"Вопрос помощнику: {\"messages\": [{\"role\": \"user\"|\"model\", \"text\": \"…\"}, …]} → {\"ok\", \"reply\"}.","operationId":"assistant_api_api_assistant_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/settings/gemini":{"post":{"summary":"Settings Gemini","description":"Ключ Gemini для помощника и распознавания чеков — проверяется у Google перед сохранением.","operationId":"settings_gemini_settings_gemini_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_settings_gemini_settings_gemini_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/search":{"get":{"summary":"Api Search","operationId":"api_search_api_search_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/manifest.webmanifest":{"get":{"summary":"Manifest","operationId":"manifest_manifest_webmanifest_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/sw.js":{"get":{"summary":"Service Worker","operationId":"service_worker_sw_js_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"Body_account_save_account_post":{"properties":{"old":{"type":"string","title":"Old","default":""},"new":{"type":"string","title":"New"}},"type":"object","required":["new"],"title":"Body_account_save_account_post"},"Body_expense_delete_expenses__row__delete_post":{"properties":{"month":{"type":"string","title":"Month"},"expect":{"type":"string","title":"Expect"}},"type":"object","required":["month","expect"],"title":"Body_expense_delete_expenses__row__delete_post"},"Body_expense_edit_expenses__row__edit_post":{"properties":{"month":{"type":"string","title":"Month"},"expect":{"type":"string","title":"Expect"},"day":{"type":"string","title":"Day"},"description":{"type":"string","title":"Description"},"category":{"type":"string","title":"Category","default":""},"amount":{"type":"string","title":"Amount"}},"type":"object","required":["month","expect","day","description","amount"],"title":"Body_expense_edit_expenses__row__edit_post"},"Body_expense_recognize_expenses_recognize_post":{"properties":{"text":{"type":"string","title":"Text","default":""},"file":{"anyOf":[{"type":"string","format":"binary"},{"type":"null"}],"title":"File"}},"type":"object","title":"Body_expense_recognize_expenses_recognize_post"},"Body_fixed_add_fixed_post":{"properties":{"m":{"type":"string","title":"M","default":""},"name":{"type":"string","title":"Name","default":""},"amount":{"type":"string","title":"Amount","default":""},"day":{"type":"string","title":"Day","default":"1"}},"type":"object","title":"Body_fixed_add_fixed_post"},"Body_fixed_amount_fixed__cid__amount_post":{"properties":{"m":{"type":"string","title":"M"},"amount":{"type":"string","title":"Amount","default":""}},"type":"object","required":["m"],"title":"Body_fixed_amount_fixed__cid__amount_post"},"Body_fixed_delete_fixed__cid__delete_post":{"properties":{"m":{"type":"string","title":"M","default":""}},"type":"object","title":"Body_fixed_delete_fixed__cid__delete_post"},"Body_fixed_edit_fixed__cid__edit_post":{"properties":{"m":{"type":"string","title":"M","default":""},"name":{"type":"string","title":"Name","default":""},"amount":{"type":"string","title":"Amount","default":""},"day":{"type":"string","title":"Day","default":"1"},"active":{"type":"string","title":"Active","default":""}},"type":"object","title":"Body_fixed_edit_fixed__cid__edit_post"},"Body_fixed_paid_fixed__cid__paid_post":{"properties":{"m":{"type":"string","title":"M"},"amount":{"type":"string","title":"Amount","default":""}},"type":"object","required":["m"],"title":"Body_fixed_paid_fixed__cid__paid_post"},"Body_fixed_remind_now_fixed_remind_now_post":{"properties":{"m":{"type":"string","title":"M","default":""}},"type":"object","title":"Body_fixed_remind_now_fixed_remind_now_post"},"Body_fixed_remind_settings_fixed_remind_post":{"properties":{"m":{"type":"string","title":"M","default":""},"on":{"type":"string","title":"On","default":""},"at":{"type":"string","title":"At","default":"10:00"}},"type":"object","title":"Body_fixed_remind_settings_fixed_remind_post"},"Body_fixed_sheet_fixed_sheet_post":{"properties":{"m":{"type":"string","title":"M"}},"type":"object","required":["m"],"title":"Body_fixed_sheet_fixed_sheet_post"},"Body_fixed_unpaid_fixed__cid__unpaid_post":{"properties":{"m":{"type":"string","title":"M"}},"type":"object","required":["m"],"title":"Body_fixed_unpaid_fixed__cid__unpaid_post"},"Body_login_login_post":{"properties":{"username":{"type":"string","title":"Username","default":"admin"},"password":{"type":"string","title":"Password"},"code":{"type":"string","title":"Code","default":""}},"type":"object","required":["password"],"title":"Body_login_login_post"},"Body_month_close_month_close_post":{"properties":{"m":{"type":"string","title":"M"}},"type":"object","required":["m"],"title":"Body_month_close_month_close_post"},"Body_month_reopen_month_reopen_post":{"properties":{"m":{"type":"string","title":"M"}},"type":"object","required":["m"],"title":"Body_month_reopen_month_reopen_post"},"Body_month_turnover_month_turnover_post":{"properties":{"m":{"type":"string","title":"M"},"first":{"type":"boolean","title":"First","default":false},"second":{"type":"boolean","title":"Second","default":false}},"type":"object","required":["m"],"title":"Body_month_turnover_month_turnover_post"},"Body_payroll_adjust_payroll_adjust_post":{"properties":{"d":{"type":"string","title":"D"},"staff":{"type":"string","title":"Staff","default":""},"kind":{"type":"string","title":"Kind","default":"bonus"},"amount":{"type":"string","title":"Amount","default":""},"reason":{"type":"string","title":"Reason","default":""}},"type":"object","required":["d"],"title":"Body_payroll_adjust_payroll_adjust_post"},"Body_payroll_paid_payroll_paid_post":{"properties":{"d":{"type":"string","title":"D"},"staff":{"type":"string","title":"Staff","default":""}},"type":"object","required":["d"],"title":"Body_payroll_paid_payroll_paid_post"},"Body_payroll_rules_payroll_rules_post":{"properties":{"d":{"type":"string","title":"D","default":""},"threshold":{"type":"string","title":"Threshold"},"low":{"type":"string","title":"Low"},"high":{"type":"string","title":"High"},"at":{"type":"string","title":"At","default":"17:00"}},"type":"object","required":["threshold","low","high"],"title":"Body_payroll_rules_payroll_rules_post"},"Body_payroll_send_payroll_send_post":{"properties":{"d":{"type":"string","title":"D"}},"type":"object","required":["d"],"title":"Body_payroll_send_payroll_send_post"},"Body_payroll_sheet_payroll_sheet_post":{"properties":{"d":{"type":"string","title":"D"}},"type":"object","required":["d"],"title":"Body_payroll_sheet_payroll_sheet_post"},"Body_payroll_unpaid_payroll_unpaid_post":{"properties":{"d":{"type":"string","title":"D"},"staff":{"type":"string","title":"Staff"}},"type":"object","required":["d","staff"],"title":"Body_payroll_unpaid_payroll_unpaid_post"},"Body_sale_add_sales_post":{"properties":{"day":{"type":"string","format":"date","title":"Day"},"amount":{"type":"number","title":"Amount"},"title":{"type":"string","title":"Title","default":""},"receipt":{"type":"string","title":"Receipt","default":""}},"type":"object","required":["day","amount"],"title":"Body_sale_add_sales_post"},"Body_sale_edit_sales__sid__edit_post":{"properties":{"day":{"type":"string","format":"date","title":"Day"},"amount":{"type":"number","title":"Amount","default":0},"title":{"type":"string","title":"Title","default":""}},"type":"object","required":["day"],"title":"Body_sale_edit_sales__sid__edit_post"},"Body_sale_import_sales_import_post":{"properties":{"files":{"items":{"type":"string","format":"binary"},"type":"array","title":"Files"}},"type":"object","required":["files"],"title":"Body_sale_import_sales_import_post"},"Body_set_accent_accent_post":{"properties":{"accent":{"type":"string","title":"Accent","default":"theme"},"next":{"type":"string","title":"Next","default":"/account"}},"type":"object","title":"Body_set_accent_accent_post"},"Body_set_language_lang_post":{"properties":{"lang":{"type":"string","title":"Lang","default":"ru"},"next":{"type":"string","title":"Next","default":"/"}},"type":"object","title":"Body_set_language_lang_post"},"Body_set_theme_theme_post":{"properties":{"theme":{"type":"string","title":"Theme","default":"auto"},"next":{"type":"string","title":"Next","default":"/account"}},"type":"object","title":"Body_set_theme_theme_post"},"Body_settings_bot_name_settings_bot_name_post":{"properties":{"name":{"type":"string","title":"Name","default":""}},"type":"object","title":"Body_settings_bot_name_settings_bot_name_post"},"Body_settings_gemini_settings_gemini_post":{"properties":{"key":{"type":"string","title":"Key","default":""},"remove":{"type":"string","title":"Remove","default":""}},"type":"object","title":"Body_settings_gemini_settings_gemini_post"},"Body_settings_lang_settings_lang_post":{"properties":{"lang":{"type":"string","title":"Lang","default":"ru"}},"type":"object","title":"Body_settings_lang_settings_lang_post"},"Body_settings_mail_settings_mail_post":{"properties":{"user":{"type":"string","title":"User","default":""},"password":{"type":"string","title":"Password","default":""},"sender":{"type":"string","title":"Sender","default":""},"remove":{"type":"boolean","title":"Remove","default":false}},"type":"object","title":"Body_settings_mail_settings_mail_post"},"Body_settings_public_url_settings_public_url_post":{"properties":{"url":{"type":"string","title":"Url","default":""}},"type":"object","title":"Body_settings_public_url_settings_public_url_post"},"Body_user_add_users_post":{"properties":{"username":{"type":"string","title":"Username"},"name":{"type":"string","title":"Name","default":""},"password":{"type":"string","title":"Password"},"role":{"type":"string","title":"Role","default":"staff"},"tg_id":{"type":"string","title":"Tg Id","default":""},"lang":{"type":"string","title":"Lang","default":""}},"type":"object","required":["username","password"],"title":"Body_user_add_users_post"},"Body_user_edit_users__uid__edit_post":{"properties":{"name":{"type":"string","title":"Name","default":""},"role":{"type":"string","title":"Role","default":"staff"},"tg_id":{"type":"string","title":"Tg Id","default":""},"lang":{"type":"string","title":"Lang","default":""},"active":{"type":"boolean","title":"Active","default":false},"password":{"type":"string","title":"Password","default":""}},"type":"object","title":"Body_user_edit_users__uid__edit_post"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"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"}}}}