@ujet/websdk-headless 6.13.0 → 6.15.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/index.d.ts CHANGED
@@ -28,6 +28,44 @@ declare enum ChannelType {
28
28
  VOICEMAIL = "voicemail"
29
29
  }
30
30
 
31
+ /**
32
+ * Chat wire-protocol vocabulary shared by every provider. Values are the
33
+ * strings on the wire — the server and the agent app match them verbatim.
34
+ */
35
+ declare enum MessageType {
36
+ TEXT = "text",
37
+ NOTI = "noti",
38
+ SERVER_MESSAGE = "server_message",
39
+ TYPING = "typing",
40
+ PREVIEW = "preview",
41
+ TRANSLATION_UPDATE = "translation_update"
42
+ }
43
+ /** `event` values carried by a `noti` message. */
44
+ declare enum NotiEvent {
45
+ MEMBER_JOINED = "memberJoined",
46
+ MEMBER_LEFT = "memberLeft",
47
+ CHAT_ENDED = "chatEnded",
48
+ CHAT_DISMISSED = "chatDismissed",
49
+ TASK_VA_STARTED = "taskVaStarted",
50
+ TASK_VA_FINISHED = "taskVaFinished",
51
+ TASK_VA_FAILED = "taskVaFailed",
52
+ ESCALATION_STARTED = "escalationStarted",
53
+ ESCALATION_ACCEPTED = "escalationAccepted",
54
+ ESCALATION_FAILED = "escalationFailed",
55
+ CHECK_IN_REQUIRED = "checkInRequired",
56
+ CHECK_IN_TIMED_OUT = "checkInTimedOut",
57
+ COBROWSE_REQUESTED_FROM_AGENT = "cobrowseRequestedFromAgent",
58
+ COBROWSE_REQUESTED_FROM_END_USER = "cobrowseRequestedFromEndUser"
59
+ }
60
+ /** Participant kinds — the prefix of a `<type>-<id>` identity and the `$userType` of a message. */
61
+ declare enum UserType {
62
+ END_USER = "end_user",
63
+ USER = "user",
64
+ VIRTUAL_AGENT = "virtual_agent",
65
+ SYSTEM = "system"
66
+ }
67
+ declare function toIdentity(userType: UserType, id: number | string): string;
68
+
31
69
  interface LanguageOption {
32
70
  lang: string;
33
71
  name: string;
@@ -1434,4 +1472,4 @@ declare const COBROWSE_EVENTS: {
1434
1472
  };
1435
1473
  type CobrowseEvent = (typeof COBROWSE_EVENTS)[keyof typeof COBROWSE_EVENTS];
1436
1474
 
1437
- export { AnotherTabVoiceCallError, type AttachmentKey, BaseProvider, BaseVoiceProvider, COBROWSE_EVENTS, type CallApiResponse, CallInProgressError, type CallRequest, type CallResponse, ChannelType, Chat, type ChatDeflectionResponse, type ChatDocumentItem, type ChatEndUserEventRequest, ChatEndedError, type ChatHistoryItem, type ChatHistoryResponse, type ChatMessageRequest, type ChatMessageResponse, type ChatRequest, type ChatResponse, type ChatSurveyResponse, type ChatTaskMessageResponse, type CheckInModalStateRequest, type CheckInResponse, CheckInStatus, type CheckInVisibilityStateRequest, Client, type ClientEvent, type ClientOption, type CobrowseEvent, type CobrowseMessages, type CobrowseOption, type CobrowseRequest, type CompanyResponse, type ConnectCallback, type ConnectOption, type ConnectRequest, type ConnectResult, type ConnectionQualityLevel, type ConnectionQualityWarning, type CustomFormPayload, ENVIRONMENT, type EmailRequest, type EmailResponse, type EscalateRequest, type EventHandler, EventManager, type FeatureFlagsResponse, FeatureNotEnabledError, type FileTypeItem, type FormData, type GenerateTranscriptResponse, type GetServerMessage, type GetTimeSlotsRequest, type HumanAgent, InboundDisabledError, type IssueChatTokenMethod, type IssueVoiceTokenMethod, type LanguageOption, type LogData, type LogHistoryData, Logger, type LoggerHandler, type MediaIndex, type MediaRef, MediaStore, type MenuChannel, type MenuItem, type MenuResponse, type MenusRoutingInputs, type MessageRequest, type MessageResponse, MicPermissionDeniedError, type MicPermissionState, NoActiveVoiceCallError, OPTIONS, OperationHoursError, type PdfStatusResponse, PostSessionStatus, type ProviderContext, ProviderError, ProviderType, type QuestionItem, RISK_FLAG_EVENTS, type RateRequest, type RecordingOption, type RecordingPermission, type RefusedBy, type RequestMethod, type RequestReturn, type ServerAuthResponse, type ServerVoiceCallStatus, SmartActionError, type SmartActionMediaType, type SmartActionResponse, type SmartActionType, type SurveyAnswers, type TokenResponse, type TriggerItem, type TriggerMessage, type UjetConversationHistoryQuery, type UjetConversationHistoryResponse, type UjetConversationMessageItem, UnauthorizedError, UnknownVoiceError, type UserProfile, VERSION, VOICE_EVENTS, type VirtualAgent, VoiceCall, VoiceCallError, type VoiceCallRequest, type VoiceCallResponse, type VoiceCallStatus, type VoiceCobrowseRequestedEvent, type VoiceCobrowseResolvedEvent, type VoiceConnectionQualityEvent, type VoiceErrorCode, type VoiceErrorEvent, type VoiceFeedbackType, type VoiceProviderConstructor, type VoiceProviderMessage, type VoiceProviderMessageType, type VoiceRecordingPermissionRequiredEvent, type VoiceSmartActionRequestedEvent, type VoiceSmartActionResolvedEvent, type VoiceStatusChangedEvent, type WaitTimeResponse, addProviderType, addVoiceProviderType, getErrorMessage, getErrorStatus, getVoiceProviderType, hasErrorCode, isAfterHoursError, isMobilePlatform };
1475
+ export { AnotherTabVoiceCallError, type AttachmentKey, BaseProvider, BaseVoiceProvider, COBROWSE_EVENTS, type CallApiResponse, CallInProgressError, type CallRequest, type CallResponse, ChannelType, Chat, type ChatDeflectionResponse, type ChatDocumentItem, type ChatEndUserEventRequest, ChatEndedError, type ChatHistoryItem, type ChatHistoryResponse, type ChatMessageRequest, type ChatMessageResponse, type ChatRequest, type ChatResponse, type ChatSurveyResponse, type ChatTaskMessageResponse, type CheckInModalStateRequest, type CheckInResponse, CheckInStatus, type CheckInVisibilityStateRequest, Client, type ClientEvent, type ClientOption, type CobrowseEvent, type CobrowseMessages, type CobrowseOption, type CobrowseRequest, type CompanyResponse, type ConnectCallback, type ConnectOption, type ConnectRequest, type ConnectResult, type ConnectionQualityLevel, type ConnectionQualityWarning, type CustomFormPayload, ENVIRONMENT, type EmailRequest, type EmailResponse, type EscalateRequest, type EventHandler, EventManager, type FeatureFlagsResponse, FeatureNotEnabledError, type FileTypeItem, type FormData, type GenerateTranscriptResponse, type GetServerMessage, type GetTimeSlotsRequest, type HumanAgent, InboundDisabledError, type IssueChatTokenMethod, type IssueVoiceTokenMethod, type LanguageOption, type LogData, type LogHistoryData, Logger, type LoggerHandler, type MediaIndex, type MediaRef, MediaStore, type MenuChannel, type MenuItem, type MenuResponse, type MenusRoutingInputs, type MessageRequest, type MessageResponse, MessageType, MicPermissionDeniedError, type MicPermissionState, NoActiveVoiceCallError, NotiEvent, OPTIONS, OperationHoursError, type PdfStatusResponse, PostSessionStatus, type ProviderContext, ProviderError, ProviderType, type QuestionItem, RISK_FLAG_EVENTS, type RateRequest, type RecordingOption, type RecordingPermission, type RefusedBy, type RequestMethod, type RequestReturn, type ServerAuthResponse, type ServerVoiceCallStatus, SmartActionError, type SmartActionMediaType, type SmartActionResponse, type SmartActionType, type SurveyAnswers, type TokenResponse, type TriggerItem, type TriggerMessage, type UjetConversationHistoryQuery, type UjetConversationHistoryResponse, type UjetConversationMessageItem, UnauthorizedError, UnknownVoiceError, type UserProfile, UserType, VERSION, VOICE_EVENTS, type VirtualAgent, VoiceCall, VoiceCallError, type VoiceCallRequest, type VoiceCallResponse, type VoiceCallStatus, type VoiceCobrowseRequestedEvent, type VoiceCobrowseResolvedEvent, type VoiceConnectionQualityEvent, type VoiceErrorCode, type VoiceErrorEvent, type VoiceFeedbackType, type VoiceProviderConstructor, type VoiceProviderMessage, type VoiceProviderMessageType, type VoiceRecordingPermissionRequiredEvent, type VoiceSmartActionRequestedEvent, type VoiceSmartActionResolvedEvent, type VoiceStatusChangedEvent, type WaitTimeResponse, addProviderType, addVoiceProviderType, getErrorMessage, getErrorStatus, getVoiceProviderType, hasErrorCode, isAfterHoursError, isMobilePlatform, toIdentity };