@elqnt/chat 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/dist/chunk-3PXNBY7J.js +73 -0
  2. package/dist/chunk-3PXNBY7J.js.map +1 -0
  3. package/dist/chunk-AC5J5LX5.mjs +529 -0
  4. package/dist/chunk-AC5J5LX5.mjs.map +1 -0
  5. package/dist/chunk-DTFTLFSY.js +637 -0
  6. package/dist/chunk-DTFTLFSY.js.map +1 -0
  7. package/dist/chunk-E2FJX52R.js +529 -0
  8. package/dist/chunk-E2FJX52R.js.map +1 -0
  9. package/dist/chunk-F6OOS4ZM.mjs +637 -0
  10. package/dist/chunk-F6OOS4ZM.mjs.map +1 -0
  11. package/dist/chunk-XVYABY2Z.mjs +73 -0
  12. package/dist/chunk-XVYABY2Z.mjs.map +1 -0
  13. package/dist/hooks/use-websocket-chat-admin.d.mts +16 -0
  14. package/dist/hooks/use-websocket-chat-admin.d.ts +16 -0
  15. package/dist/hooks/use-websocket-chat-admin.js +9 -0
  16. package/dist/hooks/use-websocket-chat-admin.js.map +1 -0
  17. package/dist/hooks/use-websocket-chat-admin.mjs +9 -0
  18. package/dist/hooks/use-websocket-chat-admin.mjs.map +1 -0
  19. package/dist/hooks/use-websocket-chat-base.d.mts +4 -0
  20. package/dist/hooks/use-websocket-chat-base.d.ts +4 -0
  21. package/dist/hooks/use-websocket-chat-base.js +8 -0
  22. package/dist/hooks/use-websocket-chat-base.js.map +1 -0
  23. package/dist/hooks/use-websocket-chat-base.mjs +8 -0
  24. package/dist/hooks/use-websocket-chat-base.mjs.map +1 -0
  25. package/dist/hooks/use-websocket-chat-customer.d.mts +23 -0
  26. package/dist/hooks/use-websocket-chat-customer.d.ts +23 -0
  27. package/dist/hooks/use-websocket-chat-customer.js +9 -0
  28. package/dist/hooks/use-websocket-chat-customer.js.map +1 -0
  29. package/dist/hooks/use-websocket-chat-customer.mjs +9 -0
  30. package/dist/hooks/use-websocket-chat-customer.mjs.map +1 -0
  31. package/dist/index.d.mts +10 -1015
  32. package/dist/index.d.ts +10 -1015
  33. package/dist/index.js +727 -16678
  34. package/dist/index.js.map +1 -1
  35. package/dist/index.mjs +373 -16122
  36. package/dist/index.mjs.map +1 -1
  37. package/dist/use-websocket-chat-base-CZDONnTz.d.mts +989 -0
  38. package/dist/use-websocket-chat-base-CZDONnTz.d.ts +989 -0
  39. package/package.json +21 -2
@@ -0,0 +1,989 @@
1
+ import { Variable, ResponseMetadata, ProductNameTS } from '@elqnt/types';
2
+ import { KGNode } from '@elqnt/kg';
3
+ import { DocumentAnalysisResult, BoundingRegion, PageInfo } from '@elqnt/docs';
4
+
5
+ type ChatStatusTS = 'active' | 'disconnected' | 'abandoned' | 'closed' | 'archived';
6
+ type ChatStatus = string;
7
+ declare const ChatStatusActive: ChatStatus;
8
+ declare const ChatStatusDisconnected: ChatStatus;
9
+ declare const ChatStatusAbandoned: ChatStatus;
10
+ declare const ChatStatusClosed: ChatStatus;
11
+ declare const ChatStatusArchived: ChatStatus;
12
+ type ChatTypeTS = 'customer_support' | 'public_room' | 'private_room' | 'direct' | 'group';
13
+ type ChatType = string;
14
+ declare const ChatTypeCustomerSupport: ChatType;
15
+ declare const ChatTypePublicRoom: ChatType;
16
+ declare const ChatTypePrivateRoom: ChatType;
17
+ declare const ChatTypeDirect: ChatType;
18
+ declare const ChatTypeGroup: ChatType;
19
+ interface Chat {
20
+ orgId: string;
21
+ key: string;
22
+ title: string;
23
+ messages: ChatMessage[];
24
+ lastUpdated: number;
25
+ startTime: number;
26
+ users: ChatUser[];
27
+ status: ChatStatusTS;
28
+ aiEngaged: boolean;
29
+ humanAgentEngaged: boolean;
30
+ isWaiting: boolean;
31
+ isWaitingForAgent: boolean;
32
+ callRequested?: boolean;
33
+ callStarted?: boolean;
34
+ userRating?: number;
35
+ metadata?: {
36
+ [key: string]: any;
37
+ };
38
+ grading?: ChatGrading;
39
+ flow?: ChatFlow;
40
+ context?: ChatContext;
41
+ csatSent?: boolean;
42
+ csatSentTime?: number;
43
+ csatResponse?: any;
44
+ /**
45
+ * OpenAI Responses API - stores the last response ID for conversation continuity
46
+ */
47
+ lastResponseId?: string;
48
+ /**
49
+ * AgentContext - reference to structured context stored in separate NATS KV bucket
50
+ * Key format: {agentId}:{chatKey} in bucket agent-contexts-org-{orgId}
51
+ */
52
+ agentContextKey?: string;
53
+ /**
54
+ * Collab-specific fields
55
+ */
56
+ chatType?: ChatTypeTS;
57
+ description?: string;
58
+ }
59
+ interface ChatContext {
60
+ memory: {
61
+ [key: string]: any;
62
+ };
63
+ turnCount: number;
64
+ lastIntent: string;
65
+ activeTopic: string;
66
+ }
67
+ interface ChatFlow {
68
+ flowDefinitionId: string;
69
+ flowInstanceId?: string;
70
+ flowInstanceLastUpdated?: number;
71
+ tools?: ChatTool[];
72
+ }
73
+ interface ChatTool {
74
+ name: string;
75
+ description: string;
76
+ type: string;
77
+ parameters?: {
78
+ [key: string]: any;
79
+ };
80
+ }
81
+ type ChatRoleTS = 'user' | 'ai' | 'event' | 'humanAgent' | 'observer' | 'dataQuery' | 'system' | 'tool';
82
+ type ChatRole = string;
83
+ declare const ChatRoleUser: ChatRole;
84
+ declare const ChatRoleAI: ChatRole;
85
+ declare const ChatRoleEvent: ChatRole;
86
+ declare const ChatRoleHumanAgent: ChatRole;
87
+ declare const ChatRoleObserver: ChatRole;
88
+ declare const ChatRoleDataQuery: ChatRole;
89
+ declare const ChatRoleSystem: ChatRole;
90
+ declare const ChatRoleTool: ChatRole;
91
+ interface ChatUser {
92
+ id: string;
93
+ role: ChatRoleTS;
94
+ name: string;
95
+ email: string;
96
+ phone?: string;
97
+ authProvider: string;
98
+ authToken: string;
99
+ metadata?: {
100
+ [key: string]: any;
101
+ };
102
+ }
103
+ type AgentStatusTS = 'online' | 'away' | 'busy' | 'offline';
104
+ type AgentStatus = string;
105
+ declare const AgentStatusOnline: AgentStatus;
106
+ declare const AgentStatusAway: AgentStatus;
107
+ declare const AgentStatusBusy: AgentStatus;
108
+ declare const AgentStatusOffline: AgentStatus;
109
+ /**
110
+ * AgentSession represents an active agent session stored in Redis
111
+ */
112
+ interface AgentSession {
113
+ agentId: string;
114
+ orgId: string;
115
+ onlineSince: number;
116
+ lastActivity: number;
117
+ status: AgentStatusTS;
118
+ chatsHandled: number;
119
+ activeChats: string[];
120
+ userAgent?: string;
121
+ ipAddress?: string;
122
+ metadata?: {
123
+ [key: string]: any;
124
+ };
125
+ }
126
+ type ChatEventType = string;
127
+ /**
128
+ * ** user events
129
+ */
130
+ declare const ChatEventTypeUserJoined: ChatEventType;
131
+ declare const ChatEventTypeUserLeft: ChatEventType;
132
+ declare const ChatEventTypeTyping: ChatEventType;
133
+ declare const ChatEventTypeStoppedTyping: ChatEventType;
134
+ declare const ChatEventTypeRead: ChatEventType;
135
+ declare const ChatEventTypeDelivered: ChatEventType;
136
+ declare const ChatEventTypeReconnected: ChatEventType;
137
+ declare const ChatEventTypeError: ChatEventType;
138
+ declare const ChatEventTypeWaiting: ChatEventType;
139
+ declare const ChatEventTypeLoadChat: ChatEventType;
140
+ declare const ChatEventTypeLoadChatResponse: ChatEventType;
141
+ declare const ChatEventTypeMessage: ChatEventType;
142
+ declare const ChatEventTypeWaitingForAgent: ChatEventType;
143
+ declare const ChatEventTypeMessageStatusUpdate: ChatEventType;
144
+ declare const ChatEventTypeHumanAgentJoined: ChatEventType;
145
+ declare const ChatEventTypeHumanAgentLeft: ChatEventType;
146
+ declare const ChatEventTypeObserverJoined: ChatEventType;
147
+ declare const ChatEventTypeObserverLeft: ChatEventType;
148
+ declare const ChatEventTypeListChats: ChatEventType;
149
+ declare const ChatEventTypeChatUpdated: ChatEventType;
150
+ declare const ChatEventTypeChatRemoved: ChatEventType;
151
+ declare const ChatEventTypeSyncMetadata: ChatEventType;
152
+ declare const ChatEventTypeSyncMetadataResponse: ChatEventType;
153
+ declare const ChatEventTypeSyncUserSession: ChatEventType;
154
+ declare const ChatEventTypeSyncUserSessionResponse: ChatEventType;
155
+ declare const ChatEventTypeClientAction: ChatEventType;
156
+ declare const ChatEventTypeClientActionCallback: ChatEventType;
157
+ declare const ChatEventTypeBlockUser: ChatEventType;
158
+ /**
159
+ * ** collab room management events
160
+ */
161
+ declare const ChatEventTypeCreateRoom: ChatEventType;
162
+ declare const ChatEventTypeRoomCreated: ChatEventType;
163
+ declare const ChatEventTypeJoinRoom: ChatEventType;
164
+ declare const ChatEventTypeLeaveRoom: ChatEventType;
165
+ declare const ChatEventTypeDeleteRoom: ChatEventType;
166
+ declare const ChatEventTypeRoomDeleted: ChatEventType;
167
+ declare const ChatEventTypeUpdateRoom: ChatEventType;
168
+ declare const ChatEventTypeRoomUpdated: ChatEventType;
169
+ declare const ChatEventTypeInviteUser: ChatEventType;
170
+ declare const ChatEventTypeUserInvited: ChatEventType;
171
+ declare const ChatEventTypeRoomUserJoined: ChatEventType;
172
+ declare const ChatEventTypeRoomUserLeft: ChatEventType;
173
+ declare const ChatEventTypeUserRemoved: ChatEventType;
174
+ declare const ChatEventTypeListRooms: ChatEventType;
175
+ declare const ChatEventTypeRoomsResponse: ChatEventType;
176
+ /**
177
+ * ** collab message events
178
+ */
179
+ declare const ChatEventTypeMessageEdited: ChatEventType;
180
+ declare const ChatEventTypeMessageDeleted: ChatEventType;
181
+ declare const ChatEventTypeMessageReaction: ChatEventType;
182
+ declare const ChatEventTypeMessageReply: ChatEventType;
183
+ declare const ChatEventTypeMentionUser: ChatEventType;
184
+ declare const ChatEventTypeMessageEditedResponse: ChatEventType;
185
+ declare const ChatEventTypeMessageDeletedResponse: ChatEventType;
186
+ declare const ChatEventTypeMessageReactionResponse: ChatEventType;
187
+ /**
188
+ * ** collab user presence events
189
+ */
190
+ declare const ChatEventTypeUserPresenceStart: ChatEventType;
191
+ declare const ChatEventTypeUserPresenceEnd: ChatEventType;
192
+ declare const ChatEventTypeUserStatusChange: ChatEventType;
193
+ declare const ChatEventTypeUserActivity: ChatEventType;
194
+ declare const ChatEventTypeUserPresenceChanged: ChatEventType;
195
+ declare const ChatEventTypeUserActivityUpdate: ChatEventType;
196
+ declare const ChatEventTypeGetOnlineUsers: ChatEventType;
197
+ declare const ChatEventTypeOnlineUsersResponse: ChatEventType;
198
+ /**
199
+ * ** shop assist events
200
+ */
201
+ declare const ChatEventTypeEndChat: ChatEventType;
202
+ declare const ChatEventTypeChatEnded: ChatEventType;
203
+ /**
204
+ * ** agent session events
205
+ */
206
+ declare const ChatEventTypeAgentSessionStart: ChatEventType;
207
+ declare const ChatEventTypeAgentSessionEnd: ChatEventType;
208
+ declare const ChatEventTypeAgentStatusChange: ChatEventType;
209
+ declare const ChatEventTypeAgentActivityPing: ChatEventType;
210
+ declare const ChatEventTypeAgentChatAssigned: ChatEventType;
211
+ declare const ChatEventTypeAgentChatCompleted: ChatEventType;
212
+ /**
213
+ * ** AI agents retrieval events
214
+ */
215
+ declare const ChatEventTypeGetAgents: ChatEventType;
216
+ declare const ChatEventTypeGetAgentsResponse: ChatEventType;
217
+ /**
218
+ * ** CSAT events
219
+ */
220
+ declare const ChatEventTypeCSATRequest: ChatEventType;
221
+ declare const ChatEventTypeCSATSurvey: ChatEventType;
222
+ declare const ChatEventTypeCSATResponse: ChatEventType;
223
+ /**
224
+ * ** User Suggested Actions events
225
+ */
226
+ declare const ChatEventTypeUserSuggestedActions: ChatEventType;
227
+ declare const ChatEventTypeUserSuggestedActionSelected: ChatEventType;
228
+ /**
229
+ * ** Summary events
230
+ */
231
+ declare const ChatEventTypeSummaryUpdate: ChatEventType;
232
+ /**
233
+ * ** Agent Context events
234
+ */
235
+ declare const ChatEventTypeAgentContextUpdate: ChatEventType;
236
+ declare const ChatEventTypeAgentExecutionStarted: ChatEventType;
237
+ declare const ChatEventTypeAgentExecutionEnded: ChatEventType;
238
+ declare const ChatEventTypeLoadAgentContext: ChatEventType;
239
+ declare const ChatEventTypeLoadAgentContextResponse: ChatEventType;
240
+ /**
241
+ * ** Plan → Approve → Execute events
242
+ */
243
+ declare const ChatEventTypePlanPendingApproval: ChatEventType;
244
+ declare const ChatEventTypePlanApproved: ChatEventType;
245
+ declare const ChatEventTypePlanRejected: ChatEventType;
246
+ declare const ChatEventTypePlanCompleted: ChatEventType;
247
+ declare const ChatEventTypeStepStarted: ChatEventType;
248
+ declare const ChatEventTypeStepCompleted: ChatEventType;
249
+ declare const ChatEventTypeStepFailed: ChatEventType;
250
+ /**
251
+ * ** New Chat events
252
+ */
253
+ declare const ChatEventTypeNewChat: ChatEventType;
254
+ declare const ChatEventTypeNewChatCreated: ChatEventType;
255
+ /**
256
+ * ** Heartbeat events
257
+ */
258
+ declare const ChatEventTypePing: ChatEventType;
259
+ declare const ChatEventTypePong: ChatEventType;
260
+ type ChatEventTypeTS = "message" | "user_joined" | "user_left" | "typing" | "stopped_typing" | "read" | "delivered" | "reconnected" | "error" | "message_status_update" | "load_chat" | "load_chat_response" | "waiting" | "waiting_for_agent" | "human_agent_joined" | "end_chat" | "chat_ended" | "human_agent_left" | "observer_joined" | "observer_left" | "list_chats" | "chat_updated" | "chat_removed" | "sync_metadata" | "sync_metadata_response" | "sync_user_session" | "sync_user_session_response" | "agent_session_start" | "agent_session_end" | "agent_status_change" | "agent_activity_ping" | "agent_chat_assigned" | "agent_chat_completed" | "client_action" | "client_action_callback" | "show_csat_survey" | "csat_response" | "user_suggested_actions" | "user_suggested_action_selected" | "summary_update" | "agent_context_update" | "agent_execution_started" | "agent_execution_ended" | "load_agent_context" | "load_agent_context_response" | "plan_pending_approval" | "plan_approved" | "plan_rejected" | "plan_completed" | "step_started" | "step_completed" | "step_failed" | "new_chat" | "new_chat_created" | "block_user" | "ping" | "pong" | "create_room" | "room_created" | "join_room" | "leave_room" | "delete_room" | "room_deleted" | "update_room" | "room_updated" | "invite_user" | "user_invited" | "room_user_joined" | "room_user_left" | "user_removed" | "list_rooms" | "rooms_response" | "message_edited" | "message_deleted" | "message_reaction" | "message_reply" | "mention_user" | "message_edited_response" | "message_deleted_response" | "message_reaction_response" | "user_presence_start" | "user_presence_end" | "user_status_change" | "user_activity" | "user_presence_changed" | "user_activity_update" | "get_online_users" | "online_users" | "get_agents" | "get_agents_response";
261
+ type MessageStatus = string;
262
+ declare const MessageStatusSending: MessageStatus;
263
+ declare const MessageStatusSent: MessageStatus;
264
+ declare const MessageStatusDelivered: MessageStatus;
265
+ declare const MessageStatusRead: MessageStatus;
266
+ declare const MessageStatusFailed: MessageStatus;
267
+ type MessageStatusTS = "sending" | "sent" | "delivered" | "read" | "failed";
268
+ /**
269
+ * EmojiReaction represents an emoji reaction to a message
270
+ */
271
+ interface EmojiReaction {
272
+ emoji: string;
273
+ count: number;
274
+ users?: string[];
275
+ }
276
+ /**
277
+ * Location represents geographical coordinates
278
+ */
279
+ interface Location {
280
+ latitude: number;
281
+ longitude: number;
282
+ address?: string;
283
+ }
284
+ /**
285
+ * AttachmentFile represents a file within an attachment
286
+ */
287
+ interface AttachmentFile {
288
+ type: string;
289
+ url: string;
290
+ thumbnailUrl?: string;
291
+ name?: string;
292
+ size?: number;
293
+ }
294
+ type AttachmentType = string;
295
+ /**
296
+ * Attachment types for both user and system attachments
297
+ */
298
+ declare const AttachmentTypeDocument: AttachmentType;
299
+ declare const AttachmentTypeDocumentAnalysis: AttachmentType;
300
+ declare const AttachmentTypeImage: AttachmentType;
301
+ declare const AttachmentTypeAudio: AttachmentType;
302
+ declare const AttachmentTypeVideo: AttachmentType;
303
+ declare const AttachmentTypeLocation: AttachmentType;
304
+ declare const AttachmentTypeReferences: AttachmentType;
305
+ declare const AttachmentTypeSubsections: AttachmentType;
306
+ declare const AttachmentTypeArticles: AttachmentType;
307
+ declare const AttachmentTypeRecords: AttachmentType;
308
+ declare const AttachmentTypeActions: AttachmentType;
309
+ declare const AttachmentTypeBullets: AttachmentType;
310
+ declare const AttachmentTypeSticker: AttachmentType;
311
+ declare const AttachmentTypeData: AttachmentType;
312
+ declare const AttachmentTypeKGNodes: AttachmentType;
313
+ declare const AttachmentTypeDocumentSources: AttachmentType;
314
+ type AttachmentTypeTS = "document" | "document_analysis" | "document_sources" | "image" | "audio" | "video" | "location" | "references" | "subsections" | "articles" | "records" | "actions" | "bullets" | "sticker" | "data" | "kgNodes";
315
+ /**
316
+ * DocumentSource represents an aggregated document source with page references
317
+ */
318
+ interface DocumentSource {
319
+ doc_id: string;
320
+ title: string;
321
+ url: string;
322
+ page_numbers: number[];
323
+ reference_count: number;
324
+ bounding_regions?: BoundingRegion[];
325
+ page_infos?: PageInfo[];
326
+ }
327
+ /**
328
+ * Attachment represents any type of attachment to a message
329
+ */
330
+ interface Attachment {
331
+ type: AttachmentTypeTS;
332
+ documentAnalysis?: DocumentAnalysisResult;
333
+ documentSources?: DocumentSource[];
334
+ title?: string;
335
+ url: string;
336
+ files?: AttachmentFile[];
337
+ location?: Location;
338
+ data?: {
339
+ [key: string]: Variable;
340
+ };
341
+ kgNodes?: KGNode[];
342
+ actions?: Action[];
343
+ }
344
+ interface Action {
345
+ id: string;
346
+ title: string;
347
+ icon?: string;
348
+ description?: string;
349
+ onAction?: () => void;
350
+ }
351
+ /**
352
+ * ChatMessage represents the core message structure
353
+ */
354
+ interface ChatMessage {
355
+ /**
356
+ * Core fields
357
+ */
358
+ id: string;
359
+ role: ChatRoleTS;
360
+ content: string;
361
+ time: number;
362
+ status: MessageStatusTS;
363
+ /**
364
+ * Sender information
365
+ */
366
+ senderId: string;
367
+ senderName?: string;
368
+ /**
369
+ * Timing
370
+ */
371
+ createdAt: number;
372
+ updatedAt?: number;
373
+ /**
374
+ * Message relations
375
+ */
376
+ replyTo?: string;
377
+ threadId?: string;
378
+ mentions?: string[];
379
+ /**
380
+ * Attachments and reactions
381
+ */
382
+ attachments?: Attachment[];
383
+ reactions?: EmojiReaction[];
384
+ /**
385
+ * Additional data
386
+ */
387
+ variables?: {
388
+ [key: string]: Variable;
389
+ };
390
+ /**
391
+ * Tool call
392
+ */
393
+ name?: string;
394
+ toolCallId?: string;
395
+ toolCalls?: ToolCall[];
396
+ /**
397
+ * LLM usage
398
+ */
399
+ llmUsage?: LLMUsage;
400
+ }
401
+ interface ChatEvent {
402
+ type: ChatEventTypeTS;
403
+ orgId: string;
404
+ chatKey: string;
405
+ userId: string;
406
+ timestamp: number;
407
+ data?: {
408
+ [key: string]: any;
409
+ };
410
+ message?: ChatMessage;
411
+ }
412
+ interface ChatGrading {
413
+ chatKey: string;
414
+ grade: number;
415
+ topic: string;
416
+ summary: string;
417
+ }
418
+ interface ChatSession {
419
+ id: string;
420
+ status: ChatSessionStatus;
421
+ user?: ChatUser;
422
+ activeChatKey?: string;
423
+ preferences?: ChatSessionPreferences;
424
+ lastActivity: number;
425
+ expiresAt: number;
426
+ metadata?: {
427
+ [key: string]: any;
428
+ };
429
+ }
430
+ type ChatSessionStatus = string;
431
+ declare const ChatSessionStatusActive: ChatSessionStatus;
432
+ declare const ChatSessionStatusIdle: ChatSessionStatus;
433
+ declare const ChatSessionStatusExpired: ChatSessionStatus;
434
+ interface ChatSessionPreferences {
435
+ language: string;
436
+ theme: string;
437
+ notifications: boolean;
438
+ timeZone: string;
439
+ messageDisplay: string;
440
+ autoTranslate: boolean;
441
+ rateLimits?: ChatRateLimits;
442
+ }
443
+ interface ChatRateLimits {
444
+ maxMessagesPerMinute: number;
445
+ maxTokensPerDay: number;
446
+ cooldownPeriod: number;
447
+ }
448
+ /**
449
+ * ==========================
450
+ * todo: move to common/llm
451
+ */
452
+ interface LLMConfig {
453
+ Provider: string;
454
+ Model: string;
455
+ Temperature: number;
456
+ MaxTokens: number;
457
+ SystemPrompt: string;
458
+ Tools: LLMTool[];
459
+ Memory?: LLMMemoryConfig;
460
+ }
461
+ interface LLMMemoryConfig {
462
+ MaxMessages: number;
463
+ IncludeSystem: boolean;
464
+ WindowSize: number;
465
+ Strategy: string;
466
+ }
467
+ interface LLMTool {
468
+ Name: string;
469
+ Type: string;
470
+ Function: LLMFunction;
471
+ }
472
+ interface LLMFunction {
473
+ Name: string;
474
+ Description: string;
475
+ Parameters: any;
476
+ }
477
+ interface ToolCall {
478
+ Name: string;
479
+ Arguments: {
480
+ [key: string]: any;
481
+ };
482
+ ID: string;
483
+ Description: string;
484
+ }
485
+ interface LLMResponse {
486
+ Content: string;
487
+ ToolCalls: ToolCall[];
488
+ Usage?: LLMUsage;
489
+ ResponseId: string;
490
+ }
491
+ interface LLMUsage {
492
+ inputTokens: number;
493
+ outputTokens: number;
494
+ totalTokens: number;
495
+ }
496
+ /**
497
+ * ChatSummary represents lightweight chat information for caching and listing
498
+ */
499
+ interface ChatSummary {
500
+ chatKey: string;
501
+ title: string;
502
+ userId?: string;
503
+ status: ChatStatus;
504
+ lastUpdated: number;
505
+ waitingSince?: number;
506
+ metadata?: {
507
+ [key: string]: any;
508
+ };
509
+ }
510
+ interface GetChatRequest {
511
+ orgId: string;
512
+ chatKey: string;
513
+ }
514
+ interface GetChatResponse {
515
+ chat?: Chat;
516
+ metadata: ResponseMetadata;
517
+ }
518
+ interface ChatProductReference {
519
+ id: string;
520
+ title: string;
521
+ price: number;
522
+ image?: string;
523
+ url?: string;
524
+ }
525
+ /**
526
+ * Chat Archival Models
527
+ */
528
+ interface ChatArchivalRequest {
529
+ orgId: string;
530
+ chatKey: string;
531
+ chat: Chat;
532
+ }
533
+ interface ChatArchivalResponse {
534
+ success: boolean;
535
+ error?: string;
536
+ message?: string;
537
+ }
538
+ /**
539
+ * Agent Session Request/Response Models
540
+ */
541
+ interface StartAgentSessionRequest {
542
+ orgId: string;
543
+ agentId: string;
544
+ userAgent?: string;
545
+ ipAddress?: string;
546
+ }
547
+ interface StartAgentSessionResponse {
548
+ metadata: ResponseMetadata;
549
+ }
550
+ interface EndAgentSessionRequest {
551
+ orgId: string;
552
+ agentId: string;
553
+ }
554
+ interface EndAgentSessionResponse {
555
+ metadata: ResponseMetadata;
556
+ }
557
+ interface UpdateAgentStatusRequest {
558
+ orgId: string;
559
+ agentId: string;
560
+ status: AgentStatusTS;
561
+ }
562
+ interface UpdateAgentStatusResponse {
563
+ metadata: ResponseMetadata;
564
+ }
565
+ interface UpdateAgentLastActivityRequest {
566
+ orgId: string;
567
+ agentId: string;
568
+ }
569
+ interface UpdateAgentLastActivityResponse {
570
+ metadata: ResponseMetadata;
571
+ }
572
+ interface AssignChatToAgentRequest {
573
+ orgId: string;
574
+ agentId: string;
575
+ chatKey: string;
576
+ }
577
+ interface AssignChatToAgentResponse {
578
+ metadata: ResponseMetadata;
579
+ }
580
+ interface CompleteChatByAgentRequest {
581
+ orgId: string;
582
+ agentId: string;
583
+ chatKey: string;
584
+ }
585
+ interface CompleteChatByAgentResponse {
586
+ metadata: ResponseMetadata;
587
+ }
588
+ interface GetAgentSessionRequest {
589
+ orgId: string;
590
+ agentId: string;
591
+ }
592
+ interface GetAgentSessionResponse {
593
+ session?: AgentSession;
594
+ metadata: ResponseMetadata;
595
+ }
596
+ interface GetOnlineAgentsRequest {
597
+ orgId: string;
598
+ }
599
+ interface GetOnlineAgentsResponse {
600
+ sessions: AgentSession[];
601
+ metadata: ResponseMetadata;
602
+ }
603
+ interface GetOnlineAgentCountRequest {
604
+ orgId: string;
605
+ }
606
+ interface GetOnlineAgentCountResponse {
607
+ count: number;
608
+ metadata: ResponseMetadata;
609
+ }
610
+ /**
611
+ * Queue-specific chat request/response types
612
+ */
613
+ interface GetQueueChatsRequest {
614
+ orgId: string;
615
+ queueId: string;
616
+ }
617
+ interface GetQueueChatsResponse {
618
+ chats: ChatSummary[];
619
+ metadata: ResponseMetadata;
620
+ }
621
+ interface GetQueueChatCountRequest {
622
+ orgId: string;
623
+ queueId: string;
624
+ }
625
+ interface GetQueueChatCountResponse {
626
+ count: number;
627
+ metadata: ResponseMetadata;
628
+ }
629
+ type UserStatusTS = 'online' | 'away' | 'busy' | 'offline';
630
+ type UserStatus = string;
631
+ declare const UserStatusOnline: UserStatus;
632
+ declare const UserStatusAway: UserStatus;
633
+ declare const UserStatusBusy: UserStatus;
634
+ declare const UserStatusOffline: UserStatus;
635
+ /**
636
+ * UserSession for tracking online users
637
+ */
638
+ interface UserSession {
639
+ orgId: string;
640
+ userId: string;
641
+ userName: string;
642
+ status: UserStatusTS;
643
+ onlineSince: number;
644
+ lastActivity: number;
645
+ }
646
+ /**
647
+ * User status update requests
648
+ */
649
+ interface UpdateUserStatusRequest {
650
+ orgId: string;
651
+ userId: string;
652
+ status: UserStatusTS;
653
+ }
654
+ interface UpdateUserStatusResponse {
655
+ metadata: ResponseMetadata;
656
+ }
657
+ /**
658
+ * Get online users
659
+ */
660
+ interface GetOnlineUsersRequest {
661
+ orgId: string;
662
+ }
663
+ interface GetOnlineUsersResponse {
664
+ metadata: ResponseMetadata;
665
+ users: UserSession[];
666
+ }
667
+ /**
668
+ * Analytics Trigger Models
669
+ */
670
+ interface TriggerAnalyticsScanRequest {
671
+ org_id?: string;
672
+ }
673
+ interface TriggerAnalyticsScanResponse {
674
+ metadata: ResponseMetadata;
675
+ chats_archived: number;
676
+ }
677
+ /**
678
+ * Active chat requests/responses
679
+ */
680
+ interface GetActiveChatCountRequest {
681
+ orgId: string;
682
+ }
683
+ interface GetActiveChatCountResponse {
684
+ count: number;
685
+ metadata: ResponseMetadata;
686
+ }
687
+ interface GetActiveChatsRequest {
688
+ orgId: string;
689
+ pastHours?: number;
690
+ }
691
+ interface GetActiveChatsResponse {
692
+ chats: ChatSummary[];
693
+ metadata: ResponseMetadata;
694
+ }
695
+ /**
696
+ * Waiting for agent requests/responses
697
+ */
698
+ interface GetWaitingForAgentChatCountRequest {
699
+ orgId: string;
700
+ }
701
+ interface GetWaitingForAgentChatCountResponse {
702
+ count: number;
703
+ metadata: ResponseMetadata;
704
+ }
705
+ interface GetWaitingForAgentChatsRequest {
706
+ orgId: string;
707
+ }
708
+ interface GetWaitingForAgentChatsResponse {
709
+ chats: ChatSummary[];
710
+ metadata: ResponseMetadata;
711
+ }
712
+ /**
713
+ * User chats requests/responses
714
+ */
715
+ interface GetUserChatsRequest {
716
+ orgId: string;
717
+ userId: string;
718
+ }
719
+ interface GetUserChatsResponse {
720
+ chats: ChatSummary[];
721
+ metadata: ResponseMetadata;
722
+ }
723
+ /**
724
+ * Daily counter requests/responses
725
+ */
726
+ interface GetDailyChatCountRequest {
727
+ orgId: string;
728
+ date: string;
729
+ timezone: string;
730
+ }
731
+ interface GetDailyChatCountResponse {
732
+ count: number;
733
+ date: string;
734
+ timezone: string;
735
+ metadata: any;
736
+ }
737
+ declare const QueueTypes: {
738
+ readonly skill: {
739
+ readonly value: "skill";
740
+ readonly label: "Skill-based";
741
+ readonly description: "Route by agent expertise and skills";
742
+ };
743
+ readonly priority: {
744
+ readonly value: "priority";
745
+ readonly label: "Priority-based";
746
+ readonly description: "Route by customer tier and urgency level";
747
+ };
748
+ readonly department: {
749
+ readonly value: "department";
750
+ readonly label: "Department-based";
751
+ readonly description: "Route by business function alignment";
752
+ };
753
+ readonly complexity: {
754
+ readonly value: "complexity";
755
+ readonly label: "Complexity-based";
756
+ readonly description: "Route by issue difficulty assessment";
757
+ };
758
+ };
759
+ type QueueTypeTS = keyof typeof QueueTypes;
760
+ type QueueTypeOptionTS = typeof QueueTypes[QueueTypeTS];
761
+ /**
762
+ * QueueType represents the routing algorithm type
763
+ */
764
+ type QueueType = string;
765
+ /**
766
+ * Queue Type Constants - These are hardcoded routing algorithms, not admin-configurable
767
+ */
768
+ declare const QueueTypeSkill: QueueType;
769
+ /**
770
+ * Queue Type Constants - These are hardcoded routing algorithms, not admin-configurable
771
+ */
772
+ declare const QueueTypePriority: QueueType;
773
+ /**
774
+ * Queue Type Constants - These are hardcoded routing algorithms, not admin-configurable
775
+ */
776
+ declare const QueueTypeDepartment: QueueType;
777
+ /**
778
+ * Queue Type Constants - These are hardcoded routing algorithms, not admin-configurable
779
+ */
780
+ declare const QueueTypeComplexity: QueueType;
781
+ /**
782
+ * AgentQueue represents an individual queue within a queue type
783
+ */
784
+ interface AgentQueue {
785
+ id: string;
786
+ orgId: string;
787
+ type: QueueTypeTS;
788
+ name: string;
789
+ title: string;
790
+ description: string;
791
+ agentIds: string[];
792
+ config: {
793
+ [key: string]: any;
794
+ };
795
+ isActive: boolean;
796
+ isDefault: boolean;
797
+ createdAt: string;
798
+ updatedAt: string;
799
+ createdBy?: string;
800
+ updatedBy?: string;
801
+ }
802
+ /**
803
+ * GetAgentQueuesFilter represents filtering options for agent queues
804
+ */
805
+ interface GetAgentQueuesFilter {
806
+ type?: QueueType;
807
+ isActive?: boolean;
808
+ }
809
+ /**
810
+ * Agent Queue Operations
811
+ */
812
+ interface CreateAgentQueueRequest {
813
+ orgId: string;
814
+ type: QueueType;
815
+ name: string;
816
+ title: string;
817
+ description: string;
818
+ agentIds?: string[];
819
+ config?: {
820
+ [key: string]: any;
821
+ };
822
+ isDefault?: boolean;
823
+ createdBy?: string;
824
+ updatedBy?: string;
825
+ }
826
+ interface CreateAgentQueueResponse {
827
+ queue?: AgentQueue;
828
+ metadata: any;
829
+ }
830
+ interface GetAgentQueuesRequest {
831
+ orgId: string;
832
+ type?: QueueType;
833
+ isActive?: boolean;
834
+ }
835
+ interface GetAgentQueuesResponse {
836
+ queues: (AgentQueue | undefined)[];
837
+ metadata: any;
838
+ }
839
+ interface UpdateAgentQueueRequest {
840
+ orgId: string;
841
+ id: string;
842
+ type: QueueType;
843
+ name: string;
844
+ title: string;
845
+ description: string;
846
+ agentIds?: string[];
847
+ config?: {
848
+ [key: string]: any;
849
+ };
850
+ isDefault?: boolean;
851
+ updatedBy?: string;
852
+ }
853
+ interface UpdateAgentQueueResponse {
854
+ queue?: AgentQueue;
855
+ metadata: any;
856
+ }
857
+ interface DeleteAgentQueueRequest {
858
+ orgId: string;
859
+ id: string;
860
+ }
861
+ interface DeleteAgentQueueResponse {
862
+ metadata: any;
863
+ }
864
+ /**
865
+ * ChatQueueInfo extends Chat with queue routing information
866
+ */
867
+ interface ChatQueueInfo {
868
+ recommendedQueueId?: string;
869
+ recommendedQueueName?: string;
870
+ assignedQueueId?: string;
871
+ assignedQueueName?: string;
872
+ }
873
+ declare const GetWaitingForAgentChatCountSubject = "chat.get_waiting_for_agent_chat_count";
874
+ declare const GetActiveChatCountSubject = "chat.get_active_chat_count";
875
+ declare const GetWaitingForAgentChatsSubject = "chat.get_waiting_for_agent_chats";
876
+ declare const GetActiveChatsSubject = "chat.get_active_chats";
877
+ declare const GetUserChatsSubject = "chat.get_user_chats";
878
+ declare const GetChatSubject = "chat.get_chat";
879
+ /**
880
+ * Chat Archival Subjects
881
+ */
882
+ declare const ChatArchiveSubjectPattern = "chat.archive.%s.server";
883
+ /**
884
+ * Agent Session Subjects
885
+ */
886
+ declare const StartAgentSessionSubject = "chat.agent_session.start";
887
+ declare const EndAgentSessionSubject = "chat.agent_session.end";
888
+ declare const UpdateAgentStatusSubject = "chat.agent_session.update_status";
889
+ declare const UpdateAgentLastActivitySubject = "chat.agent_session.update_last_activity";
890
+ declare const AssignChatToAgentSubject = "chat.agent_session.assign_chat";
891
+ declare const CompleteChatByAgentSubject = "chat.agent_session.complete_chat";
892
+ declare const GetAgentSessionSubject = "chat.agent_session.get";
893
+ declare const GetOnlineAgentsSubject = "chat.agent_session.get_online_agents";
894
+ declare const GetOnlineAgentCountSubject = "chat.agent_session.get_online_agent_count";
895
+ /**
896
+ * Queue Management Subjects
897
+ */
898
+ declare const CreateAgentQueueSubject = "chat.agent_queue.create";
899
+ declare const GetAgentQueuesSubject = "chat.agent_queue.get";
900
+ declare const UpdateAgentQueueSubject = "chat.agent_queue.update";
901
+ declare const DeleteAgentQueueSubject = "chat.agent_queue.delete";
902
+ /**
903
+ * Queue-specific Chat Subjects
904
+ */
905
+ declare const GetQueueChatsSubject = "chat.queue.get_chats";
906
+ declare const GetQueueChatCountSubject = "chat.queue.get_chat_count";
907
+ /**
908
+ * Daily Counter Subjects
909
+ */
910
+ declare const GetDailyChatCountSubject = "chat.get_daily_chat_count";
911
+ /**
912
+ * User Status Subjects
913
+ */
914
+ declare const UpdateUserStatusSubject = "chat.user.status.update";
915
+ declare const GetOnlineUsersSubject = "chat.users.online.get";
916
+ /**
917
+ * Analytics Trigger Subjects
918
+ */
919
+ declare const TriggerAnalyticsScanSubject = "chat.analytics.trigger-scan";
920
+ /**
921
+ * Org Setup Subject
922
+ */
923
+ declare const SetupOrgSubject = "chat.org.setup";
924
+
925
+ type ConnectionState = "disconnected" | "connecting" | "connected" | "reconnecting";
926
+ interface WebSocketError {
927
+ code: "CONNECTION_FAILED" | "PARSE_ERROR" | "SEND_FAILED" | "TIMEOUT" | "NETWORK_ERROR";
928
+ message: string;
929
+ retryable: boolean;
930
+ timestamp: number;
931
+ }
932
+ interface RetryConfig {
933
+ maxRetries?: number;
934
+ intervals?: number[];
935
+ backoffMultiplier?: number;
936
+ maxBackoffTime?: number;
937
+ }
938
+ interface ConnectionMetrics {
939
+ latency: number;
940
+ messagesSent: number;
941
+ messagesReceived: number;
942
+ messagesQueued: number;
943
+ reconnectCount: number;
944
+ lastError?: WebSocketError;
945
+ connectedAt?: number;
946
+ lastMessageAt?: number;
947
+ }
948
+ interface QueueConfig {
949
+ maxSize?: number;
950
+ dropStrategy?: "oldest" | "newest";
951
+ }
952
+ interface Logger {
953
+ debug: (message: string, ...args: any[]) => void;
954
+ info: (message: string, ...args: any[]) => void;
955
+ warn: (message: string, ...args: any[]) => void;
956
+ error: (message: string, ...args: any[]) => void;
957
+ }
958
+ interface UseWebSocketChatBaseConfig {
959
+ serverBaseUrl: string;
960
+ orgId: string;
961
+ clientType: "customer" | "humanAgent" | "observer";
962
+ product: ProductNameTS;
963
+ onMessage?: (event: ChatEvent) => void;
964
+ retryConfig?: RetryConfig;
965
+ queueConfig?: QueueConfig;
966
+ debug?: boolean;
967
+ logger?: Logger;
968
+ heartbeatInterval?: number;
969
+ heartbeatTimeout?: number;
970
+ }
971
+ interface UseWebSocketChatBaseReturn {
972
+ connectionState: ConnectionState;
973
+ isConnected: boolean;
974
+ sendMessage: (event: Omit<ChatEvent, "timestamp">, overrideUserId?: string) => Promise<void>;
975
+ error: WebSocketError | undefined;
976
+ connect: (userId: string) => Promise<void>;
977
+ startNewChat: (userId: string, data?: {
978
+ [key: string]: any;
979
+ }) => Promise<string>;
980
+ startTime: Date | undefined;
981
+ disconnect: (intentional?: boolean) => void;
982
+ metrics: ConnectionMetrics;
983
+ on: (eventType: string, handler: (data: any) => void) => () => void;
984
+ off: (eventType: string, handler: (data: any) => void) => void;
985
+ clearError: () => void;
986
+ }
987
+ declare const useWebSocketChatBase: ({ serverBaseUrl, orgId, clientType, product, onMessage, retryConfig, queueConfig, debug, logger, heartbeatInterval, heartbeatTimeout, }: UseWebSocketChatBaseConfig) => UseWebSocketChatBaseReturn;
988
+
989
+ export { ChatEventTypeReconnected as $, ChatRoleEvent as A, ChatRoleHumanAgent as B, type Chat as C, ChatRoleObserver as D, ChatRoleDataQuery as E, ChatRoleSystem as F, ChatRoleTool as G, type ChatUser as H, type AgentStatusTS as I, type AgentStatus as J, AgentStatusOnline as K, type Logger as L, AgentStatusAway as M, AgentStatusBusy as N, AgentStatusOffline as O, type AgentSession as P, type QueueConfig as Q, type RetryConfig as R, type ChatEventType as S, ChatEventTypeUserJoined as T, type UseWebSocketChatBaseConfig as U, ChatEventTypeUserLeft as V, type WebSocketError as W, ChatEventTypeTyping as X, ChatEventTypeStoppedTyping as Y, ChatEventTypeRead as Z, ChatEventTypeDelivered as _, type ChatMessage as a, ChatEventTypeCSATSurvey as a$, ChatEventTypeError as a0, ChatEventTypeWaiting as a1, ChatEventTypeLoadChat as a2, ChatEventTypeLoadChatResponse as a3, ChatEventTypeMessage as a4, ChatEventTypeWaitingForAgent as a5, ChatEventTypeMessageStatusUpdate as a6, ChatEventTypeHumanAgentJoined as a7, ChatEventTypeHumanAgentLeft as a8, ChatEventTypeObserverJoined as a9, ChatEventTypeMessageEdited as aA, ChatEventTypeMessageDeleted as aB, ChatEventTypeMessageReaction as aC, ChatEventTypeMessageReply as aD, ChatEventTypeMentionUser as aE, ChatEventTypeMessageEditedResponse as aF, ChatEventTypeMessageDeletedResponse as aG, ChatEventTypeMessageReactionResponse as aH, ChatEventTypeUserPresenceStart as aI, ChatEventTypeUserPresenceEnd as aJ, ChatEventTypeUserStatusChange as aK, ChatEventTypeUserActivity as aL, ChatEventTypeUserPresenceChanged as aM, ChatEventTypeUserActivityUpdate as aN, ChatEventTypeGetOnlineUsers as aO, ChatEventTypeOnlineUsersResponse as aP, ChatEventTypeEndChat as aQ, ChatEventTypeChatEnded as aR, ChatEventTypeAgentSessionStart as aS, ChatEventTypeAgentSessionEnd as aT, ChatEventTypeAgentStatusChange as aU, ChatEventTypeAgentActivityPing as aV, ChatEventTypeAgentChatAssigned as aW, ChatEventTypeAgentChatCompleted as aX, ChatEventTypeGetAgents as aY, ChatEventTypeGetAgentsResponse as aZ, ChatEventTypeCSATRequest as a_, ChatEventTypeObserverLeft as aa, ChatEventTypeListChats as ab, ChatEventTypeChatUpdated as ac, ChatEventTypeChatRemoved as ad, ChatEventTypeSyncMetadata as ae, ChatEventTypeSyncMetadataResponse as af, ChatEventTypeSyncUserSession as ag, ChatEventTypeSyncUserSessionResponse as ah, ChatEventTypeClientAction as ai, ChatEventTypeClientActionCallback as aj, ChatEventTypeBlockUser as ak, ChatEventTypeCreateRoom as al, ChatEventTypeRoomCreated as am, ChatEventTypeJoinRoom as an, ChatEventTypeLeaveRoom as ao, ChatEventTypeDeleteRoom as ap, ChatEventTypeRoomDeleted as aq, ChatEventTypeUpdateRoom as ar, ChatEventTypeRoomUpdated as as, ChatEventTypeInviteUser as at, ChatEventTypeUserInvited as au, ChatEventTypeRoomUserJoined as av, ChatEventTypeRoomUserLeft as aw, ChatEventTypeUserRemoved as ax, ChatEventTypeListRooms as ay, ChatEventTypeRoomsResponse as az, type ConnectionState as b, type LLMTool as b$, ChatEventTypeCSATResponse as b0, ChatEventTypeUserSuggestedActions as b1, ChatEventTypeUserSuggestedActionSelected as b2, ChatEventTypeSummaryUpdate as b3, ChatEventTypeAgentContextUpdate as b4, ChatEventTypeAgentExecutionStarted as b5, ChatEventTypeAgentExecutionEnded as b6, ChatEventTypeLoadAgentContext as b7, ChatEventTypeLoadAgentContextResponse as b8, ChatEventTypePlanPendingApproval as b9, AttachmentTypeVideo as bA, AttachmentTypeLocation as bB, AttachmentTypeReferences as bC, AttachmentTypeSubsections as bD, AttachmentTypeArticles as bE, AttachmentTypeRecords as bF, AttachmentTypeActions as bG, AttachmentTypeBullets as bH, AttachmentTypeSticker as bI, AttachmentTypeData as bJ, AttachmentTypeKGNodes as bK, AttachmentTypeDocumentSources as bL, type AttachmentTypeTS as bM, type DocumentSource as bN, type Attachment as bO, type Action as bP, type ChatEvent as bQ, type ChatGrading as bR, type ChatSession as bS, type ChatSessionStatus as bT, ChatSessionStatusActive as bU, ChatSessionStatusIdle as bV, ChatSessionStatusExpired as bW, type ChatSessionPreferences as bX, type ChatRateLimits as bY, type LLMConfig as bZ, type LLMMemoryConfig as b_, ChatEventTypePlanApproved as ba, ChatEventTypePlanRejected as bb, ChatEventTypePlanCompleted as bc, ChatEventTypeStepStarted as bd, ChatEventTypeStepCompleted as be, ChatEventTypeStepFailed as bf, ChatEventTypeNewChat as bg, ChatEventTypeNewChatCreated as bh, ChatEventTypePing as bi, ChatEventTypePong as bj, type ChatEventTypeTS as bk, type MessageStatus as bl, MessageStatusSending as bm, MessageStatusSent as bn, MessageStatusDelivered as bo, MessageStatusRead as bp, MessageStatusFailed as bq, type MessageStatusTS as br, type EmojiReaction as bs, type Location as bt, type AttachmentFile as bu, type AttachmentType as bv, AttachmentTypeDocument as bw, AttachmentTypeDocumentAnalysis as bx, AttachmentTypeImage as by, AttachmentTypeAudio as bz, type ConnectionMetrics as c, QueueTypeDepartment as c$, type LLMFunction as c0, type ToolCall as c1, type LLMResponse as c2, type LLMUsage as c3, type ChatSummary as c4, type GetChatRequest as c5, type GetChatResponse as c6, type ChatProductReference as c7, type ChatArchivalRequest as c8, type ChatArchivalResponse as c9, UserStatusBusy as cA, UserStatusOffline as cB, type UserSession as cC, type UpdateUserStatusRequest as cD, type UpdateUserStatusResponse as cE, type GetOnlineUsersRequest as cF, type GetOnlineUsersResponse as cG, type TriggerAnalyticsScanRequest as cH, type TriggerAnalyticsScanResponse as cI, type GetActiveChatCountRequest as cJ, type GetActiveChatCountResponse as cK, type GetActiveChatsRequest as cL, type GetActiveChatsResponse as cM, type GetWaitingForAgentChatCountRequest as cN, type GetWaitingForAgentChatCountResponse as cO, type GetWaitingForAgentChatsRequest as cP, type GetWaitingForAgentChatsResponse as cQ, type GetUserChatsRequest as cR, type GetUserChatsResponse as cS, type GetDailyChatCountRequest as cT, type GetDailyChatCountResponse as cU, QueueTypes as cV, type QueueTypeTS as cW, type QueueTypeOptionTS as cX, type QueueType as cY, QueueTypeSkill as cZ, QueueTypePriority as c_, type StartAgentSessionRequest as ca, type StartAgentSessionResponse as cb, type EndAgentSessionRequest as cc, type EndAgentSessionResponse as cd, type UpdateAgentStatusRequest as ce, type UpdateAgentStatusResponse as cf, type UpdateAgentLastActivityRequest as cg, type UpdateAgentLastActivityResponse as ch, type AssignChatToAgentRequest as ci, type AssignChatToAgentResponse as cj, type CompleteChatByAgentRequest as ck, type CompleteChatByAgentResponse as cl, type GetAgentSessionRequest as cm, type GetAgentSessionResponse as cn, type GetOnlineAgentsRequest as co, type GetOnlineAgentsResponse as cp, type GetOnlineAgentCountRequest as cq, type GetOnlineAgentCountResponse as cr, type GetQueueChatsRequest as cs, type GetQueueChatsResponse as ct, type GetQueueChatCountRequest as cu, type GetQueueChatCountResponse as cv, type UserStatusTS as cw, type UserStatus as cx, UserStatusOnline as cy, UserStatusAway as cz, type UseWebSocketChatBaseReturn as d, QueueTypeComplexity as d0, type AgentQueue as d1, type GetAgentQueuesFilter as d2, type CreateAgentQueueRequest as d3, type CreateAgentQueueResponse as d4, type GetAgentQueuesRequest as d5, type GetAgentQueuesResponse as d6, type UpdateAgentQueueRequest as d7, type UpdateAgentQueueResponse as d8, type DeleteAgentQueueRequest as d9, UpdateUserStatusSubject as dA, GetOnlineUsersSubject as dB, TriggerAnalyticsScanSubject as dC, SetupOrgSubject as dD, type DeleteAgentQueueResponse as da, type ChatQueueInfo as db, GetWaitingForAgentChatCountSubject as dc, GetActiveChatCountSubject as dd, GetWaitingForAgentChatsSubject as de, GetActiveChatsSubject as df, GetUserChatsSubject as dg, GetChatSubject as dh, ChatArchiveSubjectPattern as di, StartAgentSessionSubject as dj, EndAgentSessionSubject as dk, UpdateAgentStatusSubject as dl, UpdateAgentLastActivitySubject as dm, AssignChatToAgentSubject as dn, CompleteChatByAgentSubject as dp, GetAgentSessionSubject as dq, GetOnlineAgentsSubject as dr, GetOnlineAgentCountSubject as ds, CreateAgentQueueSubject as dt, GetAgentQueuesSubject as du, UpdateAgentQueueSubject as dv, DeleteAgentQueueSubject as dw, GetQueueChatsSubject as dx, GetQueueChatCountSubject as dy, GetDailyChatCountSubject as dz, type ChatStatusTS as e, type ChatStatus as f, ChatStatusActive as g, ChatStatusDisconnected as h, ChatStatusAbandoned as i, ChatStatusClosed as j, ChatStatusArchived as k, type ChatTypeTS as l, type ChatType as m, ChatTypeCustomerSupport as n, ChatTypePublicRoom as o, ChatTypePrivateRoom as p, ChatTypeDirect as q, ChatTypeGroup as r, type ChatContext as s, type ChatFlow as t, useWebSocketChatBase as u, type ChatTool as v, type ChatRoleTS as w, type ChatRole as x, ChatRoleUser as y, ChatRoleAI as z };