v1.7.0: refactor max_bot to flat structure, add VCF+UserModel+NLP history context, portal pages and proxy fixes

- Refactored max_bot from nested packages to flat module structure
- Q2: Extended BotUser model (patronymic, email, org, address, vcf_raw, contact_hash, phone_verified, email_verified, last_interaction, total_conversations, total_tickets)
- Q2: VCF parser (FN, N, TEL, EMAIL, ORG, ADR), upsert on re-contact, NLP history context (_get_user_history_context -> YandexGPT)
- Q1: Broadcast preview modal with 10s confirmation timer
- Q3: CSS var(--white)->var(--bg-card), var(--text)->var(--text-primary)
- Q4: bot_settings showNotification(), editable max_bot_id
- Q5: Webhook secret passthrough via X-Max-Bot-Api-Secret
- Masking sensitive keys, dialog_cleared handler, migrate via _add_column_if_not_exists()
- Rate limit (asyncio.sleep 0.5 per 10), dead code removed, conv.intent context in contact.py
- Portal pages: bot_consent, bot_kb (edit), bot_settings, bot_test, bot_tickets, portal_settings
- Tests: 21/21 passing, added test_yandex_gpt.py, test_email_sender.py
- Deploy: deploy_full.sh, schema.sql, seed_knowledge_base.sql
This commit is contained in:
2026-05-29 02:30:30 +03:00
parent 493e0b37a1
commit 72b6879f4b
234 changed files with 26768 additions and 6240 deletions
-34
View File
@@ -86,42 +86,12 @@ EXPECTED_ROUTES = [
("POST", "/service/cases/create"),
("POST", "/service/cases/edit"),
("POST", "/service/cases/delete"),
("GET", "/service/bot-settings"),
("GET", "/service/bot-settings/responses"),
("GET", "/service/bot-settings/features"),
("GET", "/service/bot-settings/categories"),
("GET", "/service/bot-settings/kb"),
("GET", "/service/bot-settings/conversations"),
("GET", "/service/bot-settings/users"),
("GET", "/service/bot-settings/test-runner"),
("GET", "/service/bot-settings/analytics"),
("GET", "/service/portal-settings"),
("GET", "/service/role-settings"),
("GET", "/service/api/role-permissions"),
("POST", "/service/api/role-permissions/save"),
("POST", "/service/api/role/switch"),
("POST", "/service/api/role/reset"),
("GET", "/service/api/bot/settings"),
("POST", "/service/api/bot/settings/save"),
("GET", "/service/api/bot/templates"),
("POST", "/service/api/bot/templates/save"),
("GET", "/service/api/bot/features"),
("POST", "/service/api/bot/features/toggle"),
("GET", "/service/api/bot/categories"),
("POST", "/service/api/bot/categories/create"),
("POST", "/service/api/bot/categories/edit"),
("POST", "/service/api/bot/categories/delete"),
("GET", "/service/api/bot/kb"),
("POST", "/service/api/bot/kb/create"),
("POST", "/service/api/bot/kb/edit"),
("POST", "/service/api/bot/kb/delete"),
("GET", "/service/api/bot/conversations"),
("GET", "/service/api/bot/users"),
("GET", "/service/api/bot/analytics"),
("POST", "/service/api/bot/test-run"),
("GET", "/service/api/bot/broadcast/recipients"),
("GET", "/service/api/bot/broadcast/history"),
("POST", "/service/api/bot/broadcast"),
]
@@ -159,14 +129,10 @@ class TestRoutesDefined:
"/service/incidents",
"/service/checklist",
"/service/documents/tech-access",
"/service/bot-settings/analytics",
"/service/bot-settings/users",
"/service/bot-settings/conversations",
"/service/blog",
"/service/cases",
"/service/questionnaire-config",
"/service/formulas",
"/service/bot-settings",
"/service/portal-settings",
"/service/role-settings",
"/service/ideas",