feat: add customer session refresh functionality and improve session management
- Introduced RealtimeCustomerSessionRefreshPayload and RealtimeCustomerSessionRefreshEvent types for handling session refresh events. - Updated ws_service to verify customer session and handle session refresh notifications. - Enhanced API client to manage customer session tokens and expiration. - Implemented customer session validation and storage in session storage. - Added functions to exchange and ensure customer sessions. - Updated IM real-time connection to include customer session tokens in WebSocket requests. - Modified SDK and widget configurations to support external IDs and user tokens.
This commit is contained in:
@@ -4,9 +4,9 @@ export type KefuWidgetHostConfig = {
|
||||
apiBaseUrl?: string
|
||||
/** 外部访客稳定标识;未传时使用浏览器本地访客 ID */
|
||||
externalId?: string
|
||||
/** 访客展示名,随请求以 X-External-Name / WS query externalName 传给后端 */
|
||||
/** 访客展示名,仅用于首次换取客服会话 token */
|
||||
externalName?: string
|
||||
/** 业务系统签发的前台用户 JWT */
|
||||
/** 业务系统签发的前台用户 JWT,仅用于首次换取客服会话 token */
|
||||
userToken?: string
|
||||
title?: string
|
||||
subtitle?: string
|
||||
|
||||
Reference in New Issue
Block a user