Files
chatballs/apps
Andrey 616343d986 feat(support): widget-credential and sessions messages endpoints
SPEC-HUB-0010 §7: виджет поддержки polling/send. Support-сессия не создаёт
WebSession (стартует по токену), а webchat/messages_payload ищет по contact
(support contact=null) — поэтому отдельные support-specific endpoints.

- widget_credential.py: stateless HMAC-signed credential {conversation_id,
  snapshot_id, exp}, TTL 1ч. Poll/send авторизуются им, не Product Support Token.
- messages.py: support_messages_since (по conversation, без contact-lookup) +
  post_support_message (Message(CONTACT) + AI-путь run_channel_turn/handoff,
  без Contact-creation и transports.send_reply — ответ идёт через polling).
- session.start_support_session: issue widget-credential, отдаётся в ответе
  sessions/ (widgetCredential).
- views: SupportSessionMessagesView GET/POST (Bearer widget-credential).
- urls: sessions/messages/.
- Тесты: start→credential, send→poll возвращает, invalid/no-credential→401,
  empty→400.
2026-07-09 16:47:51 +03:00
..