@elqnt/chat 3.1.0 → 3.3.0
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.
- package/dist/hooks/index.d.mts +2 -2
- package/dist/hooks/index.d.ts +2 -2
- package/dist/hooks/index.js +73 -6
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +73 -6
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +85 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +81 -6
- package/dist/index.mjs.map +1 -1
- package/dist/models/index.d.mts +89 -4
- package/dist/models/index.d.ts +89 -4
- package/dist/models/index.js +12 -0
- package/dist/models/index.js.map +1 -1
- package/dist/models/index.mjs +8 -0
- package/dist/models/index.mjs.map +1 -1
- package/dist/transport/index.js +70 -4
- package/dist/transport/index.js.map +1 -1
- package/dist/transport/index.mjs +70 -4
- package/dist/transport/index.mjs.map +1 -1
- package/package.json +4 -4
package/dist/models/index.d.mts
CHANGED
|
@@ -158,6 +158,12 @@ declare const ChatEventTypeStoppedTyping: ChatEventType;
|
|
|
158
158
|
declare const ChatEventTypeRead: ChatEventType;
|
|
159
159
|
declare const ChatEventTypeDelivered: ChatEventType;
|
|
160
160
|
declare const ChatEventTypeReconnected: ChatEventType;
|
|
161
|
+
/**
|
|
162
|
+
* ChatEventTypeTransportReconnected is CLIENT-SYNTHETIC: emitted by the
|
|
163
|
+
* browser SSE transport when it re-establishes a dropped stream, so the
|
|
164
|
+
* app layer can re-sync chat state. Never sent by the server.
|
|
165
|
+
*/
|
|
166
|
+
declare const ChatEventTypeTransportReconnected: ChatEventType;
|
|
161
167
|
declare const ChatEventTypeError: ChatEventType;
|
|
162
168
|
declare const ChatEventTypeWaiting: ChatEventType;
|
|
163
169
|
declare const ChatEventTypeLoadChat: ChatEventType;
|
|
@@ -295,7 +301,7 @@ declare const ChatEventTypeAttachmentProcessingProgress: ChatEventType;
|
|
|
295
301
|
declare const ChatEventTypeAttachmentProcessingComplete: ChatEventType;
|
|
296
302
|
declare const ChatEventTypeAttachmentProcessingError: ChatEventType;
|
|
297
303
|
declare const ChatEventTypeRetryAttachment: ChatEventType;
|
|
298
|
-
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" | "skill_activate" | "skill_deactivate" | "skills_changed" | "attachment_processing_started" | "attachment_processing_progress" | "attachment_processing_complete" | "attachment_processing_error" | "retry_attachment";
|
|
304
|
+
type ChatEventTypeTS = "message" | "user_joined" | "user_left" | "typing" | "stopped_typing" | "read" | "delivered" | "reconnected" | "transport_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" | "skill_activate" | "skill_deactivate" | "skills_changed" | "attachment_processing_started" | "attachment_processing_progress" | "attachment_processing_complete" | "attachment_processing_error" | "retry_attachment";
|
|
299
305
|
type MessageStatus = string;
|
|
300
306
|
declare const MessageStatusSending: MessageStatus;
|
|
301
307
|
declare const MessageStatusSent: MessageStatus;
|
|
@@ -443,6 +449,20 @@ interface ChatMessage {
|
|
|
443
449
|
* LLM usage
|
|
444
450
|
*/
|
|
445
451
|
llmUsage?: LLMUsage;
|
|
452
|
+
/**
|
|
453
|
+
* Error details for synthetic error messages (rendered in-chat when a
|
|
454
|
+
* turn fails; see ChatEventTypeError). Nil for normal messages.
|
|
455
|
+
*/
|
|
456
|
+
error?: ChatMessageError;
|
|
457
|
+
}
|
|
458
|
+
/**
|
|
459
|
+
* ChatMessageError is the client-facing payload of a failed turn: a stable
|
|
460
|
+
* code (e.g. LLM_FAILURE, TURN_TIMEOUT) and whether resending the original
|
|
461
|
+
* user message is worth offering.
|
|
462
|
+
*/
|
|
463
|
+
interface ChatMessageError {
|
|
464
|
+
code?: string;
|
|
465
|
+
retryable?: boolean;
|
|
446
466
|
}
|
|
447
467
|
interface ChatEvent {
|
|
448
468
|
type: ChatEventTypeTS;
|
|
@@ -503,6 +523,18 @@ interface LLMConfig {
|
|
|
503
523
|
SystemPrompt: string;
|
|
504
524
|
Tools: LLMTool[];
|
|
505
525
|
Memory?: LLMMemoryConfig;
|
|
526
|
+
/**
|
|
527
|
+
* PreferredLanguage, when non-empty, locks the assistant's reply
|
|
528
|
+
* language for this turn — overriding the per-message detection
|
|
529
|
+
* providers would otherwise run on messages[0]. Sourced from the
|
|
530
|
+
* user's stored profile so a user who speaks both Arabic and English
|
|
531
|
+
* gets the language they actually prefer instead of whichever one
|
|
532
|
+
* happened to dominate their first utterance (especially relevant
|
|
533
|
+
* for voice notes, where Whisper sometimes mislabels mixed speech).
|
|
534
|
+
* Use the human-readable form ("English", "Arabic", "French") that
|
|
535
|
+
* the providers prepend straight into "Speak only in <lang>.".
|
|
536
|
+
*/
|
|
537
|
+
PreferredLanguage: string;
|
|
506
538
|
}
|
|
507
539
|
interface LLMMemoryConfig {
|
|
508
540
|
MaxMessages: number;
|
|
@@ -533,6 +565,7 @@ interface LLMResponse {
|
|
|
533
565
|
ToolCalls: ToolCall[];
|
|
534
566
|
Usage?: LLMUsage;
|
|
535
567
|
ResponseId: string;
|
|
568
|
+
Truncated: boolean;
|
|
536
569
|
}
|
|
537
570
|
interface LLMUsage {
|
|
538
571
|
inputTokens: number;
|
|
@@ -836,14 +869,45 @@ interface GetAgentContextResponse {
|
|
|
836
869
|
agentContext: any;
|
|
837
870
|
metadata: ResponseMetadata;
|
|
838
871
|
}
|
|
872
|
+
/**
|
|
873
|
+
* ListIdleChatsRequest asks for chats idle longer than IdleMinutes, optionally
|
|
874
|
+
* filtered to a single product (metadata.product). Product is only a filter —
|
|
875
|
+
* the chat service applies no policy of its own.
|
|
876
|
+
*/
|
|
877
|
+
interface ListIdleChatsRequest {
|
|
878
|
+
idleMinutes: number;
|
|
879
|
+
product: string;
|
|
880
|
+
limit: number;
|
|
881
|
+
}
|
|
882
|
+
/**
|
|
883
|
+
* ListIdleChatsResponse returns the matching chats (full objects, so the caller
|
|
884
|
+
* can write analytics without a second round-trip).
|
|
885
|
+
*/
|
|
886
|
+
interface ListIdleChatsResponse {
|
|
887
|
+
chats: Chat[];
|
|
888
|
+
metadata: ResponseMetadata;
|
|
889
|
+
}
|
|
890
|
+
/**
|
|
891
|
+
* CloseChatRequest targets a single chat by org + key (used by both
|
|
892
|
+
* close-and-delete and mark-closed).
|
|
893
|
+
*/
|
|
894
|
+
interface CloseChatRequest {
|
|
895
|
+
orgId: string;
|
|
896
|
+
chatKey: string;
|
|
897
|
+
}
|
|
898
|
+
interface CloseChatResponse {
|
|
899
|
+
metadata: ResponseMetadata;
|
|
900
|
+
}
|
|
839
901
|
interface MemoryContact {
|
|
840
902
|
name: string;
|
|
841
903
|
role?: string;
|
|
842
904
|
notes?: string;
|
|
905
|
+
lastMentionedAt?: number;
|
|
843
906
|
}
|
|
844
907
|
interface MemoryNote {
|
|
845
908
|
text: string;
|
|
846
|
-
|
|
909
|
+
extractedAt?: number;
|
|
910
|
+
source?: string;
|
|
847
911
|
}
|
|
848
912
|
interface MemoryProfile {
|
|
849
913
|
preferredName?: string;
|
|
@@ -851,10 +915,24 @@ interface MemoryProfile {
|
|
|
851
915
|
language?: string;
|
|
852
916
|
company?: string;
|
|
853
917
|
role?: string;
|
|
918
|
+
/**
|
|
919
|
+
* Mobile is the user's own WhatsApp/phone number (E.164, digits-only).
|
|
920
|
+
* Captured explicitly at onboarding / Memory edit (NOT auto-extracted) and
|
|
921
|
+
* rendered into the agent system prompt via renderUserProfile, so an agent
|
|
922
|
+
* can message the user on their own number (e.g. send_whatsapp_on_behalf).
|
|
923
|
+
*/
|
|
924
|
+
mobile?: string;
|
|
925
|
+
/**
|
|
926
|
+
* Email is a denormalized copy of the admin user's email so the agent
|
|
927
|
+
* prompt carries it alongside mobile regardless of signup channel. The
|
|
928
|
+
* admin users table stays the identity source of truth — patching this
|
|
929
|
+
* field never changes the login email.
|
|
930
|
+
*/
|
|
931
|
+
email?: string;
|
|
854
932
|
contacts?: MemoryContact[];
|
|
855
933
|
notes?: MemoryNote[];
|
|
856
934
|
version: number;
|
|
857
|
-
updatedAt:
|
|
935
|
+
updatedAt: number;
|
|
858
936
|
}
|
|
859
937
|
declare const QueueTypes: {
|
|
860
938
|
readonly skill: {
|
|
@@ -1002,6 +1080,13 @@ declare const GetChatSubject = "chat.get_chat";
|
|
|
1002
1080
|
* Chat Archival Subjects
|
|
1003
1081
|
*/
|
|
1004
1082
|
declare const ChatArchiveSubjectPattern = "chat.archive.%s.server";
|
|
1083
|
+
/**
|
|
1084
|
+
* Chat Maintenance Subjects (generic, product-agnostic; product backends
|
|
1085
|
+
* call these to drive their own retention/lifecycle policy).
|
|
1086
|
+
*/
|
|
1087
|
+
declare const ListIdleChatsSubject = "chat.maintenance.list_idle_chats";
|
|
1088
|
+
declare const CloseAndDeleteChatSubject = "chat.maintenance.close_and_delete_chat";
|
|
1089
|
+
declare const MarkChatClosedSubject = "chat.maintenance.mark_closed";
|
|
1005
1090
|
/**
|
|
1006
1091
|
* Agent Session Subjects
|
|
1007
1092
|
*/
|
|
@@ -1070,4 +1155,4 @@ interface SummarizeChatResponse {
|
|
|
1070
1155
|
error?: string;
|
|
1071
1156
|
}
|
|
1072
1157
|
|
|
1073
|
-
export { type Action, type AgentQueue, type AgentSession, type AgentStatus, AgentStatusAway, AgentStatusBusy, AgentStatusOffline, AgentStatusOnline, type AgentStatusTS, type AssignChatToAgentRequest, type AssignChatToAgentResponse, AssignChatToAgentSubject, type Attachment, type AttachmentFile, type AttachmentProcessingCompleteData, type AttachmentProcessingErrorData, type AttachmentProcessingProgressData, type AttachmentProcessingStartedData, type AttachmentType, AttachmentTypeActions, AttachmentTypeArticles, AttachmentTypeAudio, AttachmentTypeBullets, AttachmentTypeData, AttachmentTypeDataFile, AttachmentTypeDocument, AttachmentTypeDocumentAnalysis, AttachmentTypeDocumentSources, AttachmentTypeImage, AttachmentTypeKGNodes, AttachmentTypeLocation, AttachmentTypeRecords, AttachmentTypeReferences, AttachmentTypeSpreadsheet, AttachmentTypeSticker, AttachmentTypeSubsections, type AttachmentTypeTS, AttachmentTypeVideo, type Chat, type ChatArchivalRequest, type ChatArchivalResponse, ChatArchiveSubjectPattern, type ChatContext, type ChatEvent, type ChatEventType, ChatEventTypeAgentActivityPing, ChatEventTypeAgentChatAssigned, ChatEventTypeAgentChatCompleted, ChatEventTypeAgentContextUpdate, ChatEventTypeAgentExecutionEnded, ChatEventTypeAgentExecutionStarted, ChatEventTypeAgentSessionEnd, ChatEventTypeAgentSessionStart, ChatEventTypeAgentStatusChange, ChatEventTypeAttachmentProcessingComplete, ChatEventTypeAttachmentProcessingError, ChatEventTypeAttachmentProcessingProgress, ChatEventTypeAttachmentProcessingStarted, ChatEventTypeBlockUser, ChatEventTypeCSATRequest, ChatEventTypeCSATResponse, ChatEventTypeCSATSurvey, ChatEventTypeChatEnded, ChatEventTypeChatRemoved, ChatEventTypeChatUpdated, ChatEventTypeClientAction, ChatEventTypeClientActionCallback, ChatEventTypeCreateRoom, ChatEventTypeDeleteRoom, ChatEventTypeDelivered, ChatEventTypeEndChat, ChatEventTypeError, ChatEventTypeGetAgents, ChatEventTypeGetAgentsResponse, ChatEventTypeGetOnlineUsers, ChatEventTypeHumanAgentJoined, ChatEventTypeHumanAgentLeft, ChatEventTypeInviteUser, ChatEventTypeJoinRoom, ChatEventTypeLeaveRoom, ChatEventTypeListChats, ChatEventTypeListRooms, ChatEventTypeLoadAgentContext, ChatEventTypeLoadAgentContextResponse, ChatEventTypeLoadChat, ChatEventTypeLoadChatResponse, ChatEventTypeMentionUser, ChatEventTypeMessage, ChatEventTypeMessageDeleted, ChatEventTypeMessageDeletedResponse, ChatEventTypeMessageEdited, ChatEventTypeMessageEditedResponse, ChatEventTypeMessageReaction, ChatEventTypeMessageReactionResponse, ChatEventTypeMessageReply, ChatEventTypeMessageStatusUpdate, ChatEventTypeNewChat, ChatEventTypeNewChatCreated, ChatEventTypeObserverJoined, ChatEventTypeObserverLeft, ChatEventTypeOnlineUsersResponse, ChatEventTypePing, ChatEventTypePlanApproved, ChatEventTypePlanCompleted, ChatEventTypePlanPendingApproval, ChatEventTypePlanRejected, ChatEventTypePong, ChatEventTypeRead, ChatEventTypeReconnected, ChatEventTypeRetryAttachment, ChatEventTypeRoomCreated, ChatEventTypeRoomDeleted, ChatEventTypeRoomUpdated, ChatEventTypeRoomUserJoined, ChatEventTypeRoomUserLeft, ChatEventTypeRoomsResponse, ChatEventTypeSkillActivate, ChatEventTypeSkillDeactivate, ChatEventTypeSkillsChanged, ChatEventTypeStepCompleted, ChatEventTypeStepFailed, ChatEventTypeStepStarted, ChatEventTypeStoppedTyping, ChatEventTypeSummaryUpdate, ChatEventTypeSyncMetadata, ChatEventTypeSyncMetadataResponse, ChatEventTypeSyncUserSession, ChatEventTypeSyncUserSessionResponse, type ChatEventTypeTS, ChatEventTypeTyping, ChatEventTypeUpdateRoom, ChatEventTypeUserActivity, ChatEventTypeUserActivityUpdate, ChatEventTypeUserInvited, ChatEventTypeUserJoined, ChatEventTypeUserLeft, ChatEventTypeUserPresenceChanged, ChatEventTypeUserPresenceEnd, ChatEventTypeUserPresenceStart, ChatEventTypeUserRemoved, ChatEventTypeUserStatusChange, ChatEventTypeUserSuggestedActionSelected, ChatEventTypeUserSuggestedActions, ChatEventTypeWaiting, ChatEventTypeWaitingForAgent, type ChatFlow, type ChatGrading, type ChatMessage, type ChatProductReference, type ChatQueueInfo, type ChatRateLimits, type ChatRole, ChatRoleAI, ChatRoleDataQuery, ChatRoleEvent, ChatRoleHumanAgent, ChatRoleObserver, ChatRoleSystem, type ChatRoleTS, ChatRoleTool, ChatRoleUser, type ChatSession, type ChatSessionPreferences, type ChatSessionStatus, ChatSessionStatusActive, ChatSessionStatusExpired, ChatSessionStatusIdle, type ChatStatus, ChatStatusAbandoned, ChatStatusActive, ChatStatusArchived, ChatStatusClosed, ChatStatusCompleted, ChatStatusDisconnected, type ChatStatusTS, type ChatStatusUpdate, type ChatSummary, type ChatTool, type ChatType, ChatTypeCustomerSupport, ChatTypeDirect, ChatTypeGroup, ChatTypePrivateRoom, ChatTypePublicRoom, type ChatTypeTS, type ChatUser, type CompleteChatByAgentRequest, type CompleteChatByAgentResponse, CompleteChatByAgentSubject, type CreateAgentQueueRequest, type CreateAgentQueueResponse, CreateAgentQueueSubject, type DeleteAgentQueueRequest, type DeleteAgentQueueResponse, DeleteAgentQueueSubject, type DocumentSource, type EmojiReaction, type EndAgentSessionRequest, type EndAgentSessionResponse, EndAgentSessionSubject, type GetActiveChatCountRequest, type GetActiveChatCountResponse, GetActiveChatCountSubject, type GetActiveChatsRequest, type GetActiveChatsResponse, GetActiveChatsSubject, type GetAgentContextRequest, type GetAgentContextResponse, GetAgentContextSubject, type GetAgentQueuesFilter, type GetAgentQueuesRequest, type GetAgentQueuesResponse, GetAgentQueuesSubject, type GetAgentSessionRequest, type GetAgentSessionResponse, GetAgentSessionSubject, type GetChatRequest, type GetChatResponse, GetChatSubject, type GetDailyChatCountRequest, type GetDailyChatCountResponse, GetDailyChatCountSubject, type GetOnlineAgentCountRequest, type GetOnlineAgentCountResponse, GetOnlineAgentCountSubject, type GetOnlineAgentsRequest, type GetOnlineAgentsResponse, GetOnlineAgentsSubject, type GetOnlineUsersRequest, type GetOnlineUsersResponse, GetOnlineUsersSubject, type GetQueueChatCountRequest, type GetQueueChatCountResponse, GetQueueChatCountSubject, type GetQueueChatsRequest, type GetQueueChatsResponse, GetQueueChatsSubject, type GetUserChatsRequest, type GetUserChatsResponse, GetUserChatsSubject, type GetWaitingForAgentChatCountRequest, type GetWaitingForAgentChatCountResponse, GetWaitingForAgentChatCountSubject, type GetWaitingForAgentChatsRequest, type GetWaitingForAgentChatsResponse, GetWaitingForAgentChatsSubject, type LLMConfig, type LLMFunction, type LLMMemoryConfig, type LLMResponse, type LLMTool, type LLMUsage, type Location, type MemoryContact, type MemoryNote, type MemoryProfile, type MessageStatus, MessageStatusDelivered, MessageStatusFailed, MessageStatusRead, MessageStatusSending, MessageStatusSent, type MessageStatusTS, type QueueType, QueueTypeComplexity, QueueTypeDepartment, type QueueTypeOptionTS, QueueTypePriority, QueueTypeSkill, type QueueTypeTS, QueueTypes, type RetryAttachmentData, SetupOrgSubject, type StartAgentSessionRequest, type StartAgentSessionResponse, StartAgentSessionSubject, type SummarizeChatResponse, type ToolCall, type TriggerAnalyticsScanRequest, type TriggerAnalyticsScanResponse, TriggerAnalyticsScanSubject, TriggerMemorySummarizationSubject, type UpdateAgentLastActivityRequest, type UpdateAgentLastActivityResponse, UpdateAgentLastActivitySubject, type UpdateAgentQueueRequest, type UpdateAgentQueueResponse, UpdateAgentQueueSubject, type UpdateAgentStatusRequest, type UpdateAgentStatusResponse, UpdateAgentStatusSubject, type UpdateUserStatusRequest, type UpdateUserStatusResponse, UpdateUserStatusSubject, type UserSession, type UserStatus, UserStatusAway, UserStatusBusy, UserStatusOffline, UserStatusOnline, type UserStatusTS };
|
|
1158
|
+
export { type Action, type AgentQueue, type AgentSession, type AgentStatus, AgentStatusAway, AgentStatusBusy, AgentStatusOffline, AgentStatusOnline, type AgentStatusTS, type AssignChatToAgentRequest, type AssignChatToAgentResponse, AssignChatToAgentSubject, type Attachment, type AttachmentFile, type AttachmentProcessingCompleteData, type AttachmentProcessingErrorData, type AttachmentProcessingProgressData, type AttachmentProcessingStartedData, type AttachmentType, AttachmentTypeActions, AttachmentTypeArticles, AttachmentTypeAudio, AttachmentTypeBullets, AttachmentTypeData, AttachmentTypeDataFile, AttachmentTypeDocument, AttachmentTypeDocumentAnalysis, AttachmentTypeDocumentSources, AttachmentTypeImage, AttachmentTypeKGNodes, AttachmentTypeLocation, AttachmentTypeRecords, AttachmentTypeReferences, AttachmentTypeSpreadsheet, AttachmentTypeSticker, AttachmentTypeSubsections, type AttachmentTypeTS, AttachmentTypeVideo, type Chat, type ChatArchivalRequest, type ChatArchivalResponse, ChatArchiveSubjectPattern, type ChatContext, type ChatEvent, type ChatEventType, ChatEventTypeAgentActivityPing, ChatEventTypeAgentChatAssigned, ChatEventTypeAgentChatCompleted, ChatEventTypeAgentContextUpdate, ChatEventTypeAgentExecutionEnded, ChatEventTypeAgentExecutionStarted, ChatEventTypeAgentSessionEnd, ChatEventTypeAgentSessionStart, ChatEventTypeAgentStatusChange, ChatEventTypeAttachmentProcessingComplete, ChatEventTypeAttachmentProcessingError, ChatEventTypeAttachmentProcessingProgress, ChatEventTypeAttachmentProcessingStarted, ChatEventTypeBlockUser, ChatEventTypeCSATRequest, ChatEventTypeCSATResponse, ChatEventTypeCSATSurvey, ChatEventTypeChatEnded, ChatEventTypeChatRemoved, ChatEventTypeChatUpdated, ChatEventTypeClientAction, ChatEventTypeClientActionCallback, ChatEventTypeCreateRoom, ChatEventTypeDeleteRoom, ChatEventTypeDelivered, ChatEventTypeEndChat, ChatEventTypeError, ChatEventTypeGetAgents, ChatEventTypeGetAgentsResponse, ChatEventTypeGetOnlineUsers, ChatEventTypeHumanAgentJoined, ChatEventTypeHumanAgentLeft, ChatEventTypeInviteUser, ChatEventTypeJoinRoom, ChatEventTypeLeaveRoom, ChatEventTypeListChats, ChatEventTypeListRooms, ChatEventTypeLoadAgentContext, ChatEventTypeLoadAgentContextResponse, ChatEventTypeLoadChat, ChatEventTypeLoadChatResponse, ChatEventTypeMentionUser, ChatEventTypeMessage, ChatEventTypeMessageDeleted, ChatEventTypeMessageDeletedResponse, ChatEventTypeMessageEdited, ChatEventTypeMessageEditedResponse, ChatEventTypeMessageReaction, ChatEventTypeMessageReactionResponse, ChatEventTypeMessageReply, ChatEventTypeMessageStatusUpdate, ChatEventTypeNewChat, ChatEventTypeNewChatCreated, ChatEventTypeObserverJoined, ChatEventTypeObserverLeft, ChatEventTypeOnlineUsersResponse, ChatEventTypePing, ChatEventTypePlanApproved, ChatEventTypePlanCompleted, ChatEventTypePlanPendingApproval, ChatEventTypePlanRejected, ChatEventTypePong, ChatEventTypeRead, ChatEventTypeReconnected, ChatEventTypeRetryAttachment, ChatEventTypeRoomCreated, ChatEventTypeRoomDeleted, ChatEventTypeRoomUpdated, ChatEventTypeRoomUserJoined, ChatEventTypeRoomUserLeft, ChatEventTypeRoomsResponse, ChatEventTypeSkillActivate, ChatEventTypeSkillDeactivate, ChatEventTypeSkillsChanged, ChatEventTypeStepCompleted, ChatEventTypeStepFailed, ChatEventTypeStepStarted, ChatEventTypeStoppedTyping, ChatEventTypeSummaryUpdate, ChatEventTypeSyncMetadata, ChatEventTypeSyncMetadataResponse, ChatEventTypeSyncUserSession, ChatEventTypeSyncUserSessionResponse, type ChatEventTypeTS, ChatEventTypeTransportReconnected, ChatEventTypeTyping, ChatEventTypeUpdateRoom, ChatEventTypeUserActivity, ChatEventTypeUserActivityUpdate, ChatEventTypeUserInvited, ChatEventTypeUserJoined, ChatEventTypeUserLeft, ChatEventTypeUserPresenceChanged, ChatEventTypeUserPresenceEnd, ChatEventTypeUserPresenceStart, ChatEventTypeUserRemoved, ChatEventTypeUserStatusChange, ChatEventTypeUserSuggestedActionSelected, ChatEventTypeUserSuggestedActions, ChatEventTypeWaiting, ChatEventTypeWaitingForAgent, type ChatFlow, type ChatGrading, type ChatMessage, type ChatMessageError, type ChatProductReference, type ChatQueueInfo, type ChatRateLimits, type ChatRole, ChatRoleAI, ChatRoleDataQuery, ChatRoleEvent, ChatRoleHumanAgent, ChatRoleObserver, ChatRoleSystem, type ChatRoleTS, ChatRoleTool, ChatRoleUser, type ChatSession, type ChatSessionPreferences, type ChatSessionStatus, ChatSessionStatusActive, ChatSessionStatusExpired, ChatSessionStatusIdle, type ChatStatus, ChatStatusAbandoned, ChatStatusActive, ChatStatusArchived, ChatStatusClosed, ChatStatusCompleted, ChatStatusDisconnected, type ChatStatusTS, type ChatStatusUpdate, type ChatSummary, type ChatTool, type ChatType, ChatTypeCustomerSupport, ChatTypeDirect, ChatTypeGroup, ChatTypePrivateRoom, ChatTypePublicRoom, type ChatTypeTS, type ChatUser, CloseAndDeleteChatSubject, type CloseChatRequest, type CloseChatResponse, type CompleteChatByAgentRequest, type CompleteChatByAgentResponse, CompleteChatByAgentSubject, type CreateAgentQueueRequest, type CreateAgentQueueResponse, CreateAgentQueueSubject, type DeleteAgentQueueRequest, type DeleteAgentQueueResponse, DeleteAgentQueueSubject, type DocumentSource, type EmojiReaction, type EndAgentSessionRequest, type EndAgentSessionResponse, EndAgentSessionSubject, type GetActiveChatCountRequest, type GetActiveChatCountResponse, GetActiveChatCountSubject, type GetActiveChatsRequest, type GetActiveChatsResponse, GetActiveChatsSubject, type GetAgentContextRequest, type GetAgentContextResponse, GetAgentContextSubject, type GetAgentQueuesFilter, type GetAgentQueuesRequest, type GetAgentQueuesResponse, GetAgentQueuesSubject, type GetAgentSessionRequest, type GetAgentSessionResponse, GetAgentSessionSubject, type GetChatRequest, type GetChatResponse, GetChatSubject, type GetDailyChatCountRequest, type GetDailyChatCountResponse, GetDailyChatCountSubject, type GetOnlineAgentCountRequest, type GetOnlineAgentCountResponse, GetOnlineAgentCountSubject, type GetOnlineAgentsRequest, type GetOnlineAgentsResponse, GetOnlineAgentsSubject, type GetOnlineUsersRequest, type GetOnlineUsersResponse, GetOnlineUsersSubject, type GetQueueChatCountRequest, type GetQueueChatCountResponse, GetQueueChatCountSubject, type GetQueueChatsRequest, type GetQueueChatsResponse, GetQueueChatsSubject, type GetUserChatsRequest, type GetUserChatsResponse, GetUserChatsSubject, type GetWaitingForAgentChatCountRequest, type GetWaitingForAgentChatCountResponse, GetWaitingForAgentChatCountSubject, type GetWaitingForAgentChatsRequest, type GetWaitingForAgentChatsResponse, GetWaitingForAgentChatsSubject, type LLMConfig, type LLMFunction, type LLMMemoryConfig, type LLMResponse, type LLMTool, type LLMUsage, type ListIdleChatsRequest, type ListIdleChatsResponse, ListIdleChatsSubject, type Location, MarkChatClosedSubject, type MemoryContact, type MemoryNote, type MemoryProfile, type MessageStatus, MessageStatusDelivered, MessageStatusFailed, MessageStatusRead, MessageStatusSending, MessageStatusSent, type MessageStatusTS, type QueueType, QueueTypeComplexity, QueueTypeDepartment, type QueueTypeOptionTS, QueueTypePriority, QueueTypeSkill, type QueueTypeTS, QueueTypes, type RetryAttachmentData, SetupOrgSubject, type StartAgentSessionRequest, type StartAgentSessionResponse, StartAgentSessionSubject, type SummarizeChatResponse, type ToolCall, type TriggerAnalyticsScanRequest, type TriggerAnalyticsScanResponse, TriggerAnalyticsScanSubject, TriggerMemorySummarizationSubject, type UpdateAgentLastActivityRequest, type UpdateAgentLastActivityResponse, UpdateAgentLastActivitySubject, type UpdateAgentQueueRequest, type UpdateAgentQueueResponse, UpdateAgentQueueSubject, type UpdateAgentStatusRequest, type UpdateAgentStatusResponse, UpdateAgentStatusSubject, type UpdateUserStatusRequest, type UpdateUserStatusResponse, UpdateUserStatusSubject, type UserSession, type UserStatus, UserStatusAway, UserStatusBusy, UserStatusOffline, UserStatusOnline, type UserStatusTS };
|
package/dist/models/index.d.ts
CHANGED
|
@@ -158,6 +158,12 @@ declare const ChatEventTypeStoppedTyping: ChatEventType;
|
|
|
158
158
|
declare const ChatEventTypeRead: ChatEventType;
|
|
159
159
|
declare const ChatEventTypeDelivered: ChatEventType;
|
|
160
160
|
declare const ChatEventTypeReconnected: ChatEventType;
|
|
161
|
+
/**
|
|
162
|
+
* ChatEventTypeTransportReconnected is CLIENT-SYNTHETIC: emitted by the
|
|
163
|
+
* browser SSE transport when it re-establishes a dropped stream, so the
|
|
164
|
+
* app layer can re-sync chat state. Never sent by the server.
|
|
165
|
+
*/
|
|
166
|
+
declare const ChatEventTypeTransportReconnected: ChatEventType;
|
|
161
167
|
declare const ChatEventTypeError: ChatEventType;
|
|
162
168
|
declare const ChatEventTypeWaiting: ChatEventType;
|
|
163
169
|
declare const ChatEventTypeLoadChat: ChatEventType;
|
|
@@ -295,7 +301,7 @@ declare const ChatEventTypeAttachmentProcessingProgress: ChatEventType;
|
|
|
295
301
|
declare const ChatEventTypeAttachmentProcessingComplete: ChatEventType;
|
|
296
302
|
declare const ChatEventTypeAttachmentProcessingError: ChatEventType;
|
|
297
303
|
declare const ChatEventTypeRetryAttachment: ChatEventType;
|
|
298
|
-
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" | "skill_activate" | "skill_deactivate" | "skills_changed" | "attachment_processing_started" | "attachment_processing_progress" | "attachment_processing_complete" | "attachment_processing_error" | "retry_attachment";
|
|
304
|
+
type ChatEventTypeTS = "message" | "user_joined" | "user_left" | "typing" | "stopped_typing" | "read" | "delivered" | "reconnected" | "transport_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" | "skill_activate" | "skill_deactivate" | "skills_changed" | "attachment_processing_started" | "attachment_processing_progress" | "attachment_processing_complete" | "attachment_processing_error" | "retry_attachment";
|
|
299
305
|
type MessageStatus = string;
|
|
300
306
|
declare const MessageStatusSending: MessageStatus;
|
|
301
307
|
declare const MessageStatusSent: MessageStatus;
|
|
@@ -443,6 +449,20 @@ interface ChatMessage {
|
|
|
443
449
|
* LLM usage
|
|
444
450
|
*/
|
|
445
451
|
llmUsage?: LLMUsage;
|
|
452
|
+
/**
|
|
453
|
+
* Error details for synthetic error messages (rendered in-chat when a
|
|
454
|
+
* turn fails; see ChatEventTypeError). Nil for normal messages.
|
|
455
|
+
*/
|
|
456
|
+
error?: ChatMessageError;
|
|
457
|
+
}
|
|
458
|
+
/**
|
|
459
|
+
* ChatMessageError is the client-facing payload of a failed turn: a stable
|
|
460
|
+
* code (e.g. LLM_FAILURE, TURN_TIMEOUT) and whether resending the original
|
|
461
|
+
* user message is worth offering.
|
|
462
|
+
*/
|
|
463
|
+
interface ChatMessageError {
|
|
464
|
+
code?: string;
|
|
465
|
+
retryable?: boolean;
|
|
446
466
|
}
|
|
447
467
|
interface ChatEvent {
|
|
448
468
|
type: ChatEventTypeTS;
|
|
@@ -503,6 +523,18 @@ interface LLMConfig {
|
|
|
503
523
|
SystemPrompt: string;
|
|
504
524
|
Tools: LLMTool[];
|
|
505
525
|
Memory?: LLMMemoryConfig;
|
|
526
|
+
/**
|
|
527
|
+
* PreferredLanguage, when non-empty, locks the assistant's reply
|
|
528
|
+
* language for this turn — overriding the per-message detection
|
|
529
|
+
* providers would otherwise run on messages[0]. Sourced from the
|
|
530
|
+
* user's stored profile so a user who speaks both Arabic and English
|
|
531
|
+
* gets the language they actually prefer instead of whichever one
|
|
532
|
+
* happened to dominate their first utterance (especially relevant
|
|
533
|
+
* for voice notes, where Whisper sometimes mislabels mixed speech).
|
|
534
|
+
* Use the human-readable form ("English", "Arabic", "French") that
|
|
535
|
+
* the providers prepend straight into "Speak only in <lang>.".
|
|
536
|
+
*/
|
|
537
|
+
PreferredLanguage: string;
|
|
506
538
|
}
|
|
507
539
|
interface LLMMemoryConfig {
|
|
508
540
|
MaxMessages: number;
|
|
@@ -533,6 +565,7 @@ interface LLMResponse {
|
|
|
533
565
|
ToolCalls: ToolCall[];
|
|
534
566
|
Usage?: LLMUsage;
|
|
535
567
|
ResponseId: string;
|
|
568
|
+
Truncated: boolean;
|
|
536
569
|
}
|
|
537
570
|
interface LLMUsage {
|
|
538
571
|
inputTokens: number;
|
|
@@ -836,14 +869,45 @@ interface GetAgentContextResponse {
|
|
|
836
869
|
agentContext: any;
|
|
837
870
|
metadata: ResponseMetadata;
|
|
838
871
|
}
|
|
872
|
+
/**
|
|
873
|
+
* ListIdleChatsRequest asks for chats idle longer than IdleMinutes, optionally
|
|
874
|
+
* filtered to a single product (metadata.product). Product is only a filter —
|
|
875
|
+
* the chat service applies no policy of its own.
|
|
876
|
+
*/
|
|
877
|
+
interface ListIdleChatsRequest {
|
|
878
|
+
idleMinutes: number;
|
|
879
|
+
product: string;
|
|
880
|
+
limit: number;
|
|
881
|
+
}
|
|
882
|
+
/**
|
|
883
|
+
* ListIdleChatsResponse returns the matching chats (full objects, so the caller
|
|
884
|
+
* can write analytics without a second round-trip).
|
|
885
|
+
*/
|
|
886
|
+
interface ListIdleChatsResponse {
|
|
887
|
+
chats: Chat[];
|
|
888
|
+
metadata: ResponseMetadata;
|
|
889
|
+
}
|
|
890
|
+
/**
|
|
891
|
+
* CloseChatRequest targets a single chat by org + key (used by both
|
|
892
|
+
* close-and-delete and mark-closed).
|
|
893
|
+
*/
|
|
894
|
+
interface CloseChatRequest {
|
|
895
|
+
orgId: string;
|
|
896
|
+
chatKey: string;
|
|
897
|
+
}
|
|
898
|
+
interface CloseChatResponse {
|
|
899
|
+
metadata: ResponseMetadata;
|
|
900
|
+
}
|
|
839
901
|
interface MemoryContact {
|
|
840
902
|
name: string;
|
|
841
903
|
role?: string;
|
|
842
904
|
notes?: string;
|
|
905
|
+
lastMentionedAt?: number;
|
|
843
906
|
}
|
|
844
907
|
interface MemoryNote {
|
|
845
908
|
text: string;
|
|
846
|
-
|
|
909
|
+
extractedAt?: number;
|
|
910
|
+
source?: string;
|
|
847
911
|
}
|
|
848
912
|
interface MemoryProfile {
|
|
849
913
|
preferredName?: string;
|
|
@@ -851,10 +915,24 @@ interface MemoryProfile {
|
|
|
851
915
|
language?: string;
|
|
852
916
|
company?: string;
|
|
853
917
|
role?: string;
|
|
918
|
+
/**
|
|
919
|
+
* Mobile is the user's own WhatsApp/phone number (E.164, digits-only).
|
|
920
|
+
* Captured explicitly at onboarding / Memory edit (NOT auto-extracted) and
|
|
921
|
+
* rendered into the agent system prompt via renderUserProfile, so an agent
|
|
922
|
+
* can message the user on their own number (e.g. send_whatsapp_on_behalf).
|
|
923
|
+
*/
|
|
924
|
+
mobile?: string;
|
|
925
|
+
/**
|
|
926
|
+
* Email is a denormalized copy of the admin user's email so the agent
|
|
927
|
+
* prompt carries it alongside mobile regardless of signup channel. The
|
|
928
|
+
* admin users table stays the identity source of truth — patching this
|
|
929
|
+
* field never changes the login email.
|
|
930
|
+
*/
|
|
931
|
+
email?: string;
|
|
854
932
|
contacts?: MemoryContact[];
|
|
855
933
|
notes?: MemoryNote[];
|
|
856
934
|
version: number;
|
|
857
|
-
updatedAt:
|
|
935
|
+
updatedAt: number;
|
|
858
936
|
}
|
|
859
937
|
declare const QueueTypes: {
|
|
860
938
|
readonly skill: {
|
|
@@ -1002,6 +1080,13 @@ declare const GetChatSubject = "chat.get_chat";
|
|
|
1002
1080
|
* Chat Archival Subjects
|
|
1003
1081
|
*/
|
|
1004
1082
|
declare const ChatArchiveSubjectPattern = "chat.archive.%s.server";
|
|
1083
|
+
/**
|
|
1084
|
+
* Chat Maintenance Subjects (generic, product-agnostic; product backends
|
|
1085
|
+
* call these to drive their own retention/lifecycle policy).
|
|
1086
|
+
*/
|
|
1087
|
+
declare const ListIdleChatsSubject = "chat.maintenance.list_idle_chats";
|
|
1088
|
+
declare const CloseAndDeleteChatSubject = "chat.maintenance.close_and_delete_chat";
|
|
1089
|
+
declare const MarkChatClosedSubject = "chat.maintenance.mark_closed";
|
|
1005
1090
|
/**
|
|
1006
1091
|
* Agent Session Subjects
|
|
1007
1092
|
*/
|
|
@@ -1070,4 +1155,4 @@ interface SummarizeChatResponse {
|
|
|
1070
1155
|
error?: string;
|
|
1071
1156
|
}
|
|
1072
1157
|
|
|
1073
|
-
export { type Action, type AgentQueue, type AgentSession, type AgentStatus, AgentStatusAway, AgentStatusBusy, AgentStatusOffline, AgentStatusOnline, type AgentStatusTS, type AssignChatToAgentRequest, type AssignChatToAgentResponse, AssignChatToAgentSubject, type Attachment, type AttachmentFile, type AttachmentProcessingCompleteData, type AttachmentProcessingErrorData, type AttachmentProcessingProgressData, type AttachmentProcessingStartedData, type AttachmentType, AttachmentTypeActions, AttachmentTypeArticles, AttachmentTypeAudio, AttachmentTypeBullets, AttachmentTypeData, AttachmentTypeDataFile, AttachmentTypeDocument, AttachmentTypeDocumentAnalysis, AttachmentTypeDocumentSources, AttachmentTypeImage, AttachmentTypeKGNodes, AttachmentTypeLocation, AttachmentTypeRecords, AttachmentTypeReferences, AttachmentTypeSpreadsheet, AttachmentTypeSticker, AttachmentTypeSubsections, type AttachmentTypeTS, AttachmentTypeVideo, type Chat, type ChatArchivalRequest, type ChatArchivalResponse, ChatArchiveSubjectPattern, type ChatContext, type ChatEvent, type ChatEventType, ChatEventTypeAgentActivityPing, ChatEventTypeAgentChatAssigned, ChatEventTypeAgentChatCompleted, ChatEventTypeAgentContextUpdate, ChatEventTypeAgentExecutionEnded, ChatEventTypeAgentExecutionStarted, ChatEventTypeAgentSessionEnd, ChatEventTypeAgentSessionStart, ChatEventTypeAgentStatusChange, ChatEventTypeAttachmentProcessingComplete, ChatEventTypeAttachmentProcessingError, ChatEventTypeAttachmentProcessingProgress, ChatEventTypeAttachmentProcessingStarted, ChatEventTypeBlockUser, ChatEventTypeCSATRequest, ChatEventTypeCSATResponse, ChatEventTypeCSATSurvey, ChatEventTypeChatEnded, ChatEventTypeChatRemoved, ChatEventTypeChatUpdated, ChatEventTypeClientAction, ChatEventTypeClientActionCallback, ChatEventTypeCreateRoom, ChatEventTypeDeleteRoom, ChatEventTypeDelivered, ChatEventTypeEndChat, ChatEventTypeError, ChatEventTypeGetAgents, ChatEventTypeGetAgentsResponse, ChatEventTypeGetOnlineUsers, ChatEventTypeHumanAgentJoined, ChatEventTypeHumanAgentLeft, ChatEventTypeInviteUser, ChatEventTypeJoinRoom, ChatEventTypeLeaveRoom, ChatEventTypeListChats, ChatEventTypeListRooms, ChatEventTypeLoadAgentContext, ChatEventTypeLoadAgentContextResponse, ChatEventTypeLoadChat, ChatEventTypeLoadChatResponse, ChatEventTypeMentionUser, ChatEventTypeMessage, ChatEventTypeMessageDeleted, ChatEventTypeMessageDeletedResponse, ChatEventTypeMessageEdited, ChatEventTypeMessageEditedResponse, ChatEventTypeMessageReaction, ChatEventTypeMessageReactionResponse, ChatEventTypeMessageReply, ChatEventTypeMessageStatusUpdate, ChatEventTypeNewChat, ChatEventTypeNewChatCreated, ChatEventTypeObserverJoined, ChatEventTypeObserverLeft, ChatEventTypeOnlineUsersResponse, ChatEventTypePing, ChatEventTypePlanApproved, ChatEventTypePlanCompleted, ChatEventTypePlanPendingApproval, ChatEventTypePlanRejected, ChatEventTypePong, ChatEventTypeRead, ChatEventTypeReconnected, ChatEventTypeRetryAttachment, ChatEventTypeRoomCreated, ChatEventTypeRoomDeleted, ChatEventTypeRoomUpdated, ChatEventTypeRoomUserJoined, ChatEventTypeRoomUserLeft, ChatEventTypeRoomsResponse, ChatEventTypeSkillActivate, ChatEventTypeSkillDeactivate, ChatEventTypeSkillsChanged, ChatEventTypeStepCompleted, ChatEventTypeStepFailed, ChatEventTypeStepStarted, ChatEventTypeStoppedTyping, ChatEventTypeSummaryUpdate, ChatEventTypeSyncMetadata, ChatEventTypeSyncMetadataResponse, ChatEventTypeSyncUserSession, ChatEventTypeSyncUserSessionResponse, type ChatEventTypeTS, ChatEventTypeTyping, ChatEventTypeUpdateRoom, ChatEventTypeUserActivity, ChatEventTypeUserActivityUpdate, ChatEventTypeUserInvited, ChatEventTypeUserJoined, ChatEventTypeUserLeft, ChatEventTypeUserPresenceChanged, ChatEventTypeUserPresenceEnd, ChatEventTypeUserPresenceStart, ChatEventTypeUserRemoved, ChatEventTypeUserStatusChange, ChatEventTypeUserSuggestedActionSelected, ChatEventTypeUserSuggestedActions, ChatEventTypeWaiting, ChatEventTypeWaitingForAgent, type ChatFlow, type ChatGrading, type ChatMessage, type ChatProductReference, type ChatQueueInfo, type ChatRateLimits, type ChatRole, ChatRoleAI, ChatRoleDataQuery, ChatRoleEvent, ChatRoleHumanAgent, ChatRoleObserver, ChatRoleSystem, type ChatRoleTS, ChatRoleTool, ChatRoleUser, type ChatSession, type ChatSessionPreferences, type ChatSessionStatus, ChatSessionStatusActive, ChatSessionStatusExpired, ChatSessionStatusIdle, type ChatStatus, ChatStatusAbandoned, ChatStatusActive, ChatStatusArchived, ChatStatusClosed, ChatStatusCompleted, ChatStatusDisconnected, type ChatStatusTS, type ChatStatusUpdate, type ChatSummary, type ChatTool, type ChatType, ChatTypeCustomerSupport, ChatTypeDirect, ChatTypeGroup, ChatTypePrivateRoom, ChatTypePublicRoom, type ChatTypeTS, type ChatUser, type CompleteChatByAgentRequest, type CompleteChatByAgentResponse, CompleteChatByAgentSubject, type CreateAgentQueueRequest, type CreateAgentQueueResponse, CreateAgentQueueSubject, type DeleteAgentQueueRequest, type DeleteAgentQueueResponse, DeleteAgentQueueSubject, type DocumentSource, type EmojiReaction, type EndAgentSessionRequest, type EndAgentSessionResponse, EndAgentSessionSubject, type GetActiveChatCountRequest, type GetActiveChatCountResponse, GetActiveChatCountSubject, type GetActiveChatsRequest, type GetActiveChatsResponse, GetActiveChatsSubject, type GetAgentContextRequest, type GetAgentContextResponse, GetAgentContextSubject, type GetAgentQueuesFilter, type GetAgentQueuesRequest, type GetAgentQueuesResponse, GetAgentQueuesSubject, type GetAgentSessionRequest, type GetAgentSessionResponse, GetAgentSessionSubject, type GetChatRequest, type GetChatResponse, GetChatSubject, type GetDailyChatCountRequest, type GetDailyChatCountResponse, GetDailyChatCountSubject, type GetOnlineAgentCountRequest, type GetOnlineAgentCountResponse, GetOnlineAgentCountSubject, type GetOnlineAgentsRequest, type GetOnlineAgentsResponse, GetOnlineAgentsSubject, type GetOnlineUsersRequest, type GetOnlineUsersResponse, GetOnlineUsersSubject, type GetQueueChatCountRequest, type GetQueueChatCountResponse, GetQueueChatCountSubject, type GetQueueChatsRequest, type GetQueueChatsResponse, GetQueueChatsSubject, type GetUserChatsRequest, type GetUserChatsResponse, GetUserChatsSubject, type GetWaitingForAgentChatCountRequest, type GetWaitingForAgentChatCountResponse, GetWaitingForAgentChatCountSubject, type GetWaitingForAgentChatsRequest, type GetWaitingForAgentChatsResponse, GetWaitingForAgentChatsSubject, type LLMConfig, type LLMFunction, type LLMMemoryConfig, type LLMResponse, type LLMTool, type LLMUsage, type Location, type MemoryContact, type MemoryNote, type MemoryProfile, type MessageStatus, MessageStatusDelivered, MessageStatusFailed, MessageStatusRead, MessageStatusSending, MessageStatusSent, type MessageStatusTS, type QueueType, QueueTypeComplexity, QueueTypeDepartment, type QueueTypeOptionTS, QueueTypePriority, QueueTypeSkill, type QueueTypeTS, QueueTypes, type RetryAttachmentData, SetupOrgSubject, type StartAgentSessionRequest, type StartAgentSessionResponse, StartAgentSessionSubject, type SummarizeChatResponse, type ToolCall, type TriggerAnalyticsScanRequest, type TriggerAnalyticsScanResponse, TriggerAnalyticsScanSubject, TriggerMemorySummarizationSubject, type UpdateAgentLastActivityRequest, type UpdateAgentLastActivityResponse, UpdateAgentLastActivitySubject, type UpdateAgentQueueRequest, type UpdateAgentQueueResponse, UpdateAgentQueueSubject, type UpdateAgentStatusRequest, type UpdateAgentStatusResponse, UpdateAgentStatusSubject, type UpdateUserStatusRequest, type UpdateUserStatusResponse, UpdateUserStatusSubject, type UserSession, type UserStatus, UserStatusAway, UserStatusBusy, UserStatusOffline, UserStatusOnline, type UserStatusTS };
|
|
1158
|
+
export { type Action, type AgentQueue, type AgentSession, type AgentStatus, AgentStatusAway, AgentStatusBusy, AgentStatusOffline, AgentStatusOnline, type AgentStatusTS, type AssignChatToAgentRequest, type AssignChatToAgentResponse, AssignChatToAgentSubject, type Attachment, type AttachmentFile, type AttachmentProcessingCompleteData, type AttachmentProcessingErrorData, type AttachmentProcessingProgressData, type AttachmentProcessingStartedData, type AttachmentType, AttachmentTypeActions, AttachmentTypeArticles, AttachmentTypeAudio, AttachmentTypeBullets, AttachmentTypeData, AttachmentTypeDataFile, AttachmentTypeDocument, AttachmentTypeDocumentAnalysis, AttachmentTypeDocumentSources, AttachmentTypeImage, AttachmentTypeKGNodes, AttachmentTypeLocation, AttachmentTypeRecords, AttachmentTypeReferences, AttachmentTypeSpreadsheet, AttachmentTypeSticker, AttachmentTypeSubsections, type AttachmentTypeTS, AttachmentTypeVideo, type Chat, type ChatArchivalRequest, type ChatArchivalResponse, ChatArchiveSubjectPattern, type ChatContext, type ChatEvent, type ChatEventType, ChatEventTypeAgentActivityPing, ChatEventTypeAgentChatAssigned, ChatEventTypeAgentChatCompleted, ChatEventTypeAgentContextUpdate, ChatEventTypeAgentExecutionEnded, ChatEventTypeAgentExecutionStarted, ChatEventTypeAgentSessionEnd, ChatEventTypeAgentSessionStart, ChatEventTypeAgentStatusChange, ChatEventTypeAttachmentProcessingComplete, ChatEventTypeAttachmentProcessingError, ChatEventTypeAttachmentProcessingProgress, ChatEventTypeAttachmentProcessingStarted, ChatEventTypeBlockUser, ChatEventTypeCSATRequest, ChatEventTypeCSATResponse, ChatEventTypeCSATSurvey, ChatEventTypeChatEnded, ChatEventTypeChatRemoved, ChatEventTypeChatUpdated, ChatEventTypeClientAction, ChatEventTypeClientActionCallback, ChatEventTypeCreateRoom, ChatEventTypeDeleteRoom, ChatEventTypeDelivered, ChatEventTypeEndChat, ChatEventTypeError, ChatEventTypeGetAgents, ChatEventTypeGetAgentsResponse, ChatEventTypeGetOnlineUsers, ChatEventTypeHumanAgentJoined, ChatEventTypeHumanAgentLeft, ChatEventTypeInviteUser, ChatEventTypeJoinRoom, ChatEventTypeLeaveRoom, ChatEventTypeListChats, ChatEventTypeListRooms, ChatEventTypeLoadAgentContext, ChatEventTypeLoadAgentContextResponse, ChatEventTypeLoadChat, ChatEventTypeLoadChatResponse, ChatEventTypeMentionUser, ChatEventTypeMessage, ChatEventTypeMessageDeleted, ChatEventTypeMessageDeletedResponse, ChatEventTypeMessageEdited, ChatEventTypeMessageEditedResponse, ChatEventTypeMessageReaction, ChatEventTypeMessageReactionResponse, ChatEventTypeMessageReply, ChatEventTypeMessageStatusUpdate, ChatEventTypeNewChat, ChatEventTypeNewChatCreated, ChatEventTypeObserverJoined, ChatEventTypeObserverLeft, ChatEventTypeOnlineUsersResponse, ChatEventTypePing, ChatEventTypePlanApproved, ChatEventTypePlanCompleted, ChatEventTypePlanPendingApproval, ChatEventTypePlanRejected, ChatEventTypePong, ChatEventTypeRead, ChatEventTypeReconnected, ChatEventTypeRetryAttachment, ChatEventTypeRoomCreated, ChatEventTypeRoomDeleted, ChatEventTypeRoomUpdated, ChatEventTypeRoomUserJoined, ChatEventTypeRoomUserLeft, ChatEventTypeRoomsResponse, ChatEventTypeSkillActivate, ChatEventTypeSkillDeactivate, ChatEventTypeSkillsChanged, ChatEventTypeStepCompleted, ChatEventTypeStepFailed, ChatEventTypeStepStarted, ChatEventTypeStoppedTyping, ChatEventTypeSummaryUpdate, ChatEventTypeSyncMetadata, ChatEventTypeSyncMetadataResponse, ChatEventTypeSyncUserSession, ChatEventTypeSyncUserSessionResponse, type ChatEventTypeTS, ChatEventTypeTransportReconnected, ChatEventTypeTyping, ChatEventTypeUpdateRoom, ChatEventTypeUserActivity, ChatEventTypeUserActivityUpdate, ChatEventTypeUserInvited, ChatEventTypeUserJoined, ChatEventTypeUserLeft, ChatEventTypeUserPresenceChanged, ChatEventTypeUserPresenceEnd, ChatEventTypeUserPresenceStart, ChatEventTypeUserRemoved, ChatEventTypeUserStatusChange, ChatEventTypeUserSuggestedActionSelected, ChatEventTypeUserSuggestedActions, ChatEventTypeWaiting, ChatEventTypeWaitingForAgent, type ChatFlow, type ChatGrading, type ChatMessage, type ChatMessageError, type ChatProductReference, type ChatQueueInfo, type ChatRateLimits, type ChatRole, ChatRoleAI, ChatRoleDataQuery, ChatRoleEvent, ChatRoleHumanAgent, ChatRoleObserver, ChatRoleSystem, type ChatRoleTS, ChatRoleTool, ChatRoleUser, type ChatSession, type ChatSessionPreferences, type ChatSessionStatus, ChatSessionStatusActive, ChatSessionStatusExpired, ChatSessionStatusIdle, type ChatStatus, ChatStatusAbandoned, ChatStatusActive, ChatStatusArchived, ChatStatusClosed, ChatStatusCompleted, ChatStatusDisconnected, type ChatStatusTS, type ChatStatusUpdate, type ChatSummary, type ChatTool, type ChatType, ChatTypeCustomerSupport, ChatTypeDirect, ChatTypeGroup, ChatTypePrivateRoom, ChatTypePublicRoom, type ChatTypeTS, type ChatUser, CloseAndDeleteChatSubject, type CloseChatRequest, type CloseChatResponse, type CompleteChatByAgentRequest, type CompleteChatByAgentResponse, CompleteChatByAgentSubject, type CreateAgentQueueRequest, type CreateAgentQueueResponse, CreateAgentQueueSubject, type DeleteAgentQueueRequest, type DeleteAgentQueueResponse, DeleteAgentQueueSubject, type DocumentSource, type EmojiReaction, type EndAgentSessionRequest, type EndAgentSessionResponse, EndAgentSessionSubject, type GetActiveChatCountRequest, type GetActiveChatCountResponse, GetActiveChatCountSubject, type GetActiveChatsRequest, type GetActiveChatsResponse, GetActiveChatsSubject, type GetAgentContextRequest, type GetAgentContextResponse, GetAgentContextSubject, type GetAgentQueuesFilter, type GetAgentQueuesRequest, type GetAgentQueuesResponse, GetAgentQueuesSubject, type GetAgentSessionRequest, type GetAgentSessionResponse, GetAgentSessionSubject, type GetChatRequest, type GetChatResponse, GetChatSubject, type GetDailyChatCountRequest, type GetDailyChatCountResponse, GetDailyChatCountSubject, type GetOnlineAgentCountRequest, type GetOnlineAgentCountResponse, GetOnlineAgentCountSubject, type GetOnlineAgentsRequest, type GetOnlineAgentsResponse, GetOnlineAgentsSubject, type GetOnlineUsersRequest, type GetOnlineUsersResponse, GetOnlineUsersSubject, type GetQueueChatCountRequest, type GetQueueChatCountResponse, GetQueueChatCountSubject, type GetQueueChatsRequest, type GetQueueChatsResponse, GetQueueChatsSubject, type GetUserChatsRequest, type GetUserChatsResponse, GetUserChatsSubject, type GetWaitingForAgentChatCountRequest, type GetWaitingForAgentChatCountResponse, GetWaitingForAgentChatCountSubject, type GetWaitingForAgentChatsRequest, type GetWaitingForAgentChatsResponse, GetWaitingForAgentChatsSubject, type LLMConfig, type LLMFunction, type LLMMemoryConfig, type LLMResponse, type LLMTool, type LLMUsage, type ListIdleChatsRequest, type ListIdleChatsResponse, ListIdleChatsSubject, type Location, MarkChatClosedSubject, type MemoryContact, type MemoryNote, type MemoryProfile, type MessageStatus, MessageStatusDelivered, MessageStatusFailed, MessageStatusRead, MessageStatusSending, MessageStatusSent, type MessageStatusTS, type QueueType, QueueTypeComplexity, QueueTypeDepartment, type QueueTypeOptionTS, QueueTypePriority, QueueTypeSkill, type QueueTypeTS, QueueTypes, type RetryAttachmentData, SetupOrgSubject, type StartAgentSessionRequest, type StartAgentSessionResponse, StartAgentSessionSubject, type SummarizeChatResponse, type ToolCall, type TriggerAnalyticsScanRequest, type TriggerAnalyticsScanResponse, TriggerAnalyticsScanSubject, TriggerMemorySummarizationSubject, type UpdateAgentLastActivityRequest, type UpdateAgentLastActivityResponse, UpdateAgentLastActivitySubject, type UpdateAgentQueueRequest, type UpdateAgentQueueResponse, UpdateAgentQueueSubject, type UpdateAgentStatusRequest, type UpdateAgentStatusResponse, UpdateAgentStatusSubject, type UpdateUserStatusRequest, type UpdateUserStatusResponse, UpdateUserStatusSubject, type UserSession, type UserStatus, UserStatusAway, UserStatusBusy, UserStatusOffline, UserStatusOnline, type UserStatusTS };
|
package/dist/models/index.js
CHANGED
|
@@ -128,6 +128,7 @@ __export(models_exports, {
|
|
|
128
128
|
ChatEventTypeSyncMetadataResponse: () => ChatEventTypeSyncMetadataResponse,
|
|
129
129
|
ChatEventTypeSyncUserSession: () => ChatEventTypeSyncUserSession,
|
|
130
130
|
ChatEventTypeSyncUserSessionResponse: () => ChatEventTypeSyncUserSessionResponse,
|
|
131
|
+
ChatEventTypeTransportReconnected: () => ChatEventTypeTransportReconnected,
|
|
131
132
|
ChatEventTypeTyping: () => ChatEventTypeTyping,
|
|
132
133
|
ChatEventTypeUpdateRoom: () => ChatEventTypeUpdateRoom,
|
|
133
134
|
ChatEventTypeUserActivity: () => ChatEventTypeUserActivity,
|
|
@@ -166,6 +167,7 @@ __export(models_exports, {
|
|
|
166
167
|
ChatTypeGroup: () => ChatTypeGroup,
|
|
167
168
|
ChatTypePrivateRoom: () => ChatTypePrivateRoom,
|
|
168
169
|
ChatTypePublicRoom: () => ChatTypePublicRoom,
|
|
170
|
+
CloseAndDeleteChatSubject: () => CloseAndDeleteChatSubject,
|
|
169
171
|
CompleteChatByAgentSubject: () => CompleteChatByAgentSubject,
|
|
170
172
|
CreateAgentQueueSubject: () => CreateAgentQueueSubject,
|
|
171
173
|
DeleteAgentQueueSubject: () => DeleteAgentQueueSubject,
|
|
@@ -185,6 +187,8 @@ __export(models_exports, {
|
|
|
185
187
|
GetUserChatsSubject: () => GetUserChatsSubject,
|
|
186
188
|
GetWaitingForAgentChatCountSubject: () => GetWaitingForAgentChatCountSubject,
|
|
187
189
|
GetWaitingForAgentChatsSubject: () => GetWaitingForAgentChatsSubject,
|
|
190
|
+
ListIdleChatsSubject: () => ListIdleChatsSubject,
|
|
191
|
+
MarkChatClosedSubject: () => MarkChatClosedSubject,
|
|
188
192
|
MessageStatusDelivered: () => MessageStatusDelivered,
|
|
189
193
|
MessageStatusFailed: () => MessageStatusFailed,
|
|
190
194
|
MessageStatusRead: () => MessageStatusRead,
|
|
@@ -241,6 +245,7 @@ var ChatEventTypeStoppedTyping = "stopped_typing";
|
|
|
241
245
|
var ChatEventTypeRead = "read";
|
|
242
246
|
var ChatEventTypeDelivered = "delivered";
|
|
243
247
|
var ChatEventTypeReconnected = "reconnected";
|
|
248
|
+
var ChatEventTypeTransportReconnected = "transport_reconnected";
|
|
244
249
|
var ChatEventTypeError = "error";
|
|
245
250
|
var ChatEventTypeWaiting = "waiting";
|
|
246
251
|
var ChatEventTypeLoadChat = "load_chat";
|
|
@@ -380,6 +385,9 @@ var GetActiveChatsSubject = "chat.get_active_chats";
|
|
|
380
385
|
var GetUserChatsSubject = "chat.get_user_chats";
|
|
381
386
|
var GetChatSubject = "chat.get_chat";
|
|
382
387
|
var ChatArchiveSubjectPattern = "chat.archive.%s.server";
|
|
388
|
+
var ListIdleChatsSubject = "chat.maintenance.list_idle_chats";
|
|
389
|
+
var CloseAndDeleteChatSubject = "chat.maintenance.close_and_delete_chat";
|
|
390
|
+
var MarkChatClosedSubject = "chat.maintenance.mark_closed";
|
|
383
391
|
var StartAgentSessionSubject = "chat.agent_session.start";
|
|
384
392
|
var EndAgentSessionSubject = "chat.agent_session.end";
|
|
385
393
|
var UpdateAgentStatusSubject = "chat.agent_session.update_status";
|
|
@@ -511,6 +519,7 @@ var TriggerMemorySummarizationSubject = "chat.memory.summarize.nightly";
|
|
|
511
519
|
ChatEventTypeSyncMetadataResponse,
|
|
512
520
|
ChatEventTypeSyncUserSession,
|
|
513
521
|
ChatEventTypeSyncUserSessionResponse,
|
|
522
|
+
ChatEventTypeTransportReconnected,
|
|
514
523
|
ChatEventTypeTyping,
|
|
515
524
|
ChatEventTypeUpdateRoom,
|
|
516
525
|
ChatEventTypeUserActivity,
|
|
@@ -549,6 +558,7 @@ var TriggerMemorySummarizationSubject = "chat.memory.summarize.nightly";
|
|
|
549
558
|
ChatTypeGroup,
|
|
550
559
|
ChatTypePrivateRoom,
|
|
551
560
|
ChatTypePublicRoom,
|
|
561
|
+
CloseAndDeleteChatSubject,
|
|
552
562
|
CompleteChatByAgentSubject,
|
|
553
563
|
CreateAgentQueueSubject,
|
|
554
564
|
DeleteAgentQueueSubject,
|
|
@@ -568,6 +578,8 @@ var TriggerMemorySummarizationSubject = "chat.memory.summarize.nightly";
|
|
|
568
578
|
GetUserChatsSubject,
|
|
569
579
|
GetWaitingForAgentChatCountSubject,
|
|
570
580
|
GetWaitingForAgentChatsSubject,
|
|
581
|
+
ListIdleChatsSubject,
|
|
582
|
+
MarkChatClosedSubject,
|
|
571
583
|
MessageStatusDelivered,
|
|
572
584
|
MessageStatusFailed,
|
|
573
585
|
MessageStatusRead,
|