@microsoft/omnichannel-chat-sdk 1.9.7-main.9019907 → 1.9.7
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/lib/OmnichannelChatSDK.d.ts +128 -128
- package/lib/OmnichannelChatSDK.js +2610 -2609
- package/lib/OmnichannelChatSDK.js.map +1 -1
- package/lib/api/createVoiceVideoCalling.d.ts +53 -53
- package/lib/api/createVoiceVideoCalling.js +462 -462
- package/lib/config/ocSDKConfiguration.d.ts +7 -7
- package/lib/config/ocSDKConfiguration.js +9 -9
- package/lib/config/settings.d.ts +7 -6
- package/lib/config/settings.js +15 -13
- package/lib/config/settings.js.map +1 -1
- package/lib/core/AuthSettings.d.ts +5 -5
- package/lib/core/AuthSettings.js +2 -2
- package/lib/core/AxiosErrorCodes.d.ts +4 -4
- package/lib/core/AxiosErrorCodes.js +7 -7
- package/lib/core/CallingOptionsOptionSetNumber.d.ts +6 -6
- package/lib/core/CallingOptionsOptionSetNumber.js +9 -9
- package/lib/core/ChatConfig.d.ts +10 -10
- package/lib/core/ChatConfig.js +2 -2
- package/lib/core/ChatReconnectContext.d.ts +4 -4
- package/lib/core/ChatReconnectContext.js +2 -2
- package/lib/core/ChatReconnectOptionalParams.d.ts +3 -3
- package/lib/core/ChatReconnectOptionalParams.js +2 -2
- package/lib/core/ChatSDKConfig.d.ts +38 -38
- package/lib/core/ChatSDKConfig.js +2 -2
- package/lib/core/ChatSDKError.d.ts +64 -64
- package/lib/core/ChatSDKError.js +73 -73
- package/lib/core/ChatSDKExceptionDetails.d.ts +13 -13
- package/lib/core/ChatSDKExceptionDetails.js +2 -2
- package/lib/core/ChatTranscriptBody.d.ts +5 -5
- package/lib/core/ChatTranscriptBody.js +2 -2
- package/lib/core/ConversationMode.d.ts +5 -5
- package/lib/core/ConversationMode.js +8 -8
- package/lib/core/EmailLiveChatTranscriptOptionalParams.d.ts +4 -4
- package/lib/core/EmailLiveChatTranscriptOptionalParams.js +2 -2
- package/lib/core/GetAgentAvailabilityOptionalParams.d.ts +13 -13
- package/lib/core/GetAgentAvailabilityOptionalParams.js +2 -2
- package/lib/core/GetChatTokenOptionalParams.d.ts +3 -3
- package/lib/core/GetChatTokenOptionalParams.js +2 -2
- package/lib/core/GetConversationDetailsOptionalParams.d.ts +4 -4
- package/lib/core/GetConversationDetailsOptionalParams.js +2 -2
- package/lib/core/GetLiveChatConfigOptionalParams.d.ts +5 -5
- package/lib/core/GetLiveChatConfigOptionalParams.js +2 -2
- package/lib/core/GetLiveChatTranscriptOptionalParams.d.ts +4 -4
- package/lib/core/GetLiveChatTranscriptOptionalParams.js +2 -2
- package/lib/core/InitializeOptionalParams.d.ts +6 -6
- package/lib/core/InitializeOptionalParams.js +2 -2
- package/lib/core/LiveChatContext.d.ts +14 -14
- package/lib/core/LiveChatContext.js +2 -2
- package/lib/core/LiveChatVersion.d.ts +5 -5
- package/lib/core/LiveChatVersion.js +8 -8
- package/lib/core/LiveWorkItemDetails.d.ts +8 -8
- package/lib/core/LiveWorkItemDetails.js +2 -2
- package/lib/core/LiveWorkItemState.d.ts +8 -8
- package/lib/core/LiveWorkItemState.js +11 -11
- package/lib/core/OmnichannelConfig.d.ts +5 -5
- package/lib/core/OmnichannelConfig.js +2 -2
- package/lib/core/OmnichannelErrorCodes.d.ts +4 -4
- package/lib/core/OmnichannelErrorCodes.js +7 -7
- package/lib/core/PostChatContext.d.ts +8 -8
- package/lib/core/PostChatContext.js +2 -2
- package/lib/core/SetAuthTokenProviderOptionalParams.d.ts +3 -3
- package/lib/core/SetAuthTokenProviderOptionalParams.js +2 -2
- package/lib/core/StartChatOptionalParams.d.ts +18 -18
- package/lib/core/StartChatOptionalParams.js +2 -2
- package/lib/core/messaging/ACSChatMessageType.d.ts +7 -7
- package/lib/core/messaging/ACSChatMessageType.js +10 -10
- package/lib/core/messaging/ACSClient.d.ts +45 -45
- package/lib/core/messaging/ACSClient.js +612 -612
- package/lib/core/messaging/ACSClientConfig.d.ts +5 -5
- package/lib/core/messaging/ACSClientConfig.js +2 -2
- package/lib/core/messaging/ACSParticipantDisplayName.d.ts +6 -6
- package/lib/core/messaging/ACSParticipantDisplayName.js +9 -9
- package/lib/core/messaging/ACSSessionInfo.d.ts +5 -5
- package/lib/core/messaging/ACSSessionInfo.js +2 -2
- package/lib/core/messaging/ChatAdapterConfig.d.ts +8 -8
- package/lib/core/messaging/ChatAdapterConfig.js +2 -2
- package/lib/core/messaging/ChatAdapterOptionalParams.d.ts +24 -24
- package/lib/core/messaging/ChatAdapterOptionalParams.js +2 -2
- package/lib/core/messaging/ChatAdapterProtocols.d.ts +6 -6
- package/lib/core/messaging/ChatAdapterProtocols.js +10 -10
- package/lib/core/messaging/ChatSDKMessage.d.ts +6 -6
- package/lib/core/messaging/ChatSDKMessage.js +2 -2
- package/lib/core/messaging/IC3Config.d.ts +4 -4
- package/lib/core/messaging/IC3Config.js +2 -2
- package/lib/core/messaging/MessageTags.d.ts +3 -3
- package/lib/core/messaging/MessageTags.js +6 -6
- package/lib/core/messaging/OmnichannelMessage.d.ts +64 -64
- package/lib/core/messaging/OmnichannelMessage.js +51 -51
- package/lib/core/messaging/OnNewMessageOptionalParams.d.ts +3 -3
- package/lib/core/messaging/OnNewMessageOptionalParams.js +2 -2
- package/lib/external/ACSAdapter/AMSFileManager.d.ts +76 -76
- package/lib/external/ACSAdapter/AMSFileManager.js +394 -394
- package/lib/external/ACSAdapter/AMSFileScanner.d.ts +36 -36
- package/lib/external/ACSAdapter/AMSFileScanner.js +275 -275
- package/lib/external/ACSAdapter/activityUtils.d.ts +9 -9
- package/lib/external/ACSAdapter/activityUtils.js +79 -79
- package/lib/external/ACSAdapter/createChannelDataEgressMiddleware.d.ts +5 -5
- package/lib/external/ACSAdapter/createChannelDataEgressMiddleware.js +33 -33
- package/lib/external/ACSAdapter/createFileScanIngressMiddleware.d.ts +2 -2
- package/lib/external/ACSAdapter/createFileScanIngressMiddleware.js +95 -95
- package/lib/external/ACSAdapter/createFormatEgressTagsMiddleware.d.ts +2 -2
- package/lib/external/ACSAdapter/createFormatEgressTagsMiddleware.js +30 -30
- package/lib/external/ACSAdapter/createFormatIngressTagsMiddleware.d.ts +2 -2
- package/lib/external/ACSAdapter/createFormatIngressTagsMiddleware.js +24 -24
- package/lib/external/CallingSDK/ICallingSDKLogData.d.ts +7 -7
- package/lib/external/CallingSDK/ICallingSDKLogData.js +2 -2
- package/lib/external/IC3Adapter/IChatToken.d.ts +11 -11
- package/lib/external/IC3Adapter/IChatToken.js +3 -3
- package/lib/external/IC3Adapter/IIC3AdapterOptions.d.ts +22 -22
- package/lib/external/IC3Adapter/IIC3AdapterOptions.js +2 -2
- package/lib/external/IC3Adapter/INotification.d.ts +6 -6
- package/lib/external/IC3Adapter/INotification.js +2 -2
- package/lib/external/IC3Adapter/Notification.d.ts +7 -7
- package/lib/external/IC3Adapter/Notification.js +14 -14
- package/lib/external/IC3Client/IIC3SDKLogData.d.ts +9 -9
- package/lib/external/IC3Client/IIC3SDKLogData.js +2 -2
- package/lib/external/OCSDK/IOCSDKLogData.d.ts +14 -14
- package/lib/external/OCSDK/IOCSDKLogData.js +2 -2
- package/lib/index.d.ts +25 -25
- package/lib/index.js +34 -34
- package/lib/telemetry/AriaTelemetry.d.ts +40 -40
- package/lib/telemetry/AriaTelemetry.js +539 -539
- package/lib/telemetry/EUDomainNames.d.ts +2 -2
- package/lib/telemetry/EUDomainNames.js +16 -16
- package/lib/telemetry/EventMarker.d.ts +3 -3
- package/lib/telemetry/EventMarker.js +12 -12
- package/lib/telemetry/GCCDomainPatterns.d.ts +2 -2
- package/lib/telemetry/GCCDomainPatterns.js +7 -7
- package/lib/telemetry/LogLevel.d.ts +8 -8
- package/lib/telemetry/LogLevel.js +11 -11
- package/lib/telemetry/ScenarioMarker.d.ts +21 -21
- package/lib/telemetry/ScenarioMarker.js +82 -82
- package/lib/telemetry/ScenarioType.d.ts +11 -11
- package/lib/telemetry/ScenarioType.js +14 -14
- package/lib/telemetry/StopWatch.d.ts +6 -6
- package/lib/telemetry/StopWatch.js +14 -14
- package/lib/telemetry/TelemetryEvent.d.ts +46 -46
- package/lib/telemetry/TelemetryEvent.js +49 -49
- package/lib/telemetry/retrieveCollectorUri.d.ts +2 -2
- package/lib/telemetry/retrieveCollectorUri.js +25 -25
- package/lib/tsconfig.tsbuildinfo +1917 -1968
- package/lib/utils/AMSClientLoadStates.d.ts +6 -6
- package/lib/utils/AMSClientLoadStates.js +11 -11
- package/lib/utils/CoreServicesUtils.d.ts +7 -7
- package/lib/utils/CoreServicesUtils.js +39 -39
- package/lib/utils/WebUtils.d.ts +10 -10
- package/lib/utils/WebUtils.js +128 -128
- package/lib/utils/chatAdapterCreators.d.ts +20 -20
- package/lib/utils/chatAdapterCreators.js +208 -208
- package/lib/utils/createOcSDKConfiguration.d.ts +4 -4
- package/lib/utils/createOcSDKConfiguration.js +22 -22
- package/lib/utils/createOmnichannelMessage.d.ts +11 -11
- package/lib/utils/createOmnichannelMessage.js +77 -77
- package/lib/utils/createTelemetry.d.ts +3 -3
- package/lib/utils/createTelemetry.js +9 -9
- package/lib/utils/exceptionSuppressors.d.ts +29 -29
- package/lib/utils/exceptionSuppressors.js +49 -49
- package/lib/utils/exceptionThrowers.d.ts +119 -119
- package/lib/utils/exceptionThrowers.js +137 -137
- package/lib/utils/internalUtils.d.ts +4 -4
- package/lib/utils/internalUtils.js +16 -16
- package/lib/utils/libraries.d.ts +12 -12
- package/lib/utils/libraries.js +34 -34
- package/lib/utils/locale.d.ts +4 -4
- package/lib/utils/locale.js +60 -60
- package/lib/utils/location.d.ts +7 -7
- package/lib/utils/location.js +95 -95
- package/lib/utils/loggerUtils.d.ts +15 -15
- package/lib/utils/loggerUtils.js +55 -55
- package/lib/utils/loggers.d.ts +111 -111
- package/lib/utils/loggers.js +501 -501
- package/lib/utils/parsers.d.ts +6 -6
- package/lib/utils/parsers.js +10 -10
- package/lib/utils/platform.d.ts +9 -9
- package/lib/utils/platform.js +11 -11
- package/lib/utils/setOcUserAgent.d.ts +2 -2
- package/lib/utils/setOcUserAgent.js +21 -21
- package/lib/utils/sleep.d.ts +2 -2
- package/lib/utils/sleep.js +4 -4
- package/lib/utils/urlResolvers.d.ts +10 -10
- package/lib/utils/urlResolvers.js +64 -64
- package/lib/utils/utilities.d.ts +5 -5
- package/lib/utils/utilities.js +36 -36
- package/lib/validators/OmnichannelConfigValidator.d.ts +3 -3
- package/lib/validators/OmnichannelConfigValidator.js +28 -28
- package/lib/validators/SDKConfigValidators.d.ts +5 -5
- package/lib/validators/SDKConfigValidators.js +48 -48
- package/package.json +1 -1
- package/lib/utils/fillMobilePlatformData.d.ts +0 -2
- package/lib/utils/fillMobilePlatformData.js +0 -44
- package/lib/utils/fillMobilePlatformData.js.map +0 -1
- package/lib/utils/fillPlatformData.browser.d.ts +0 -2
- package/lib/utils/fillPlatformData.browser.js +0 -8
- package/lib/utils/fillPlatformData.browser.js.map +0 -1
- package/lib/utils/fillPlatformData.d.ts +0 -2
- package/lib/utils/fillPlatformData.js +0 -8
- package/lib/utils/fillPlatformData.js.map +0 -1
- package/lib/utils/fillWebPlatformData.d.ts +0 -2
- package/lib/utils/fillWebPlatformData.js +0 -21
- package/lib/utils/fillWebPlatformData.js.map +0 -1
@@ -1,128 +1,128 @@
|
|
1
|
-
import ACSClient from "./core/messaging/ACSClient";
|
2
|
-
import { ParticipantsRemovedEvent } from '@azure/communication-signaling';
|
3
|
-
import ChatAdapterOptionalParams from "./core/messaging/ChatAdapterOptionalParams";
|
4
|
-
import ChatConfig from "./core/ChatConfig";
|
5
|
-
import ChatReconnectContext from "./core/ChatReconnectContext";
|
6
|
-
import ChatReconnectOptionalParams from "./core/ChatReconnectOptionalParams";
|
7
|
-
import ChatSDKConfig from "./core/ChatSDKConfig";
|
8
|
-
import ChatSDKMessage from "./core/messaging/ChatSDKMessage";
|
9
|
-
import ChatTranscriptBody from "./core/ChatTranscriptBody";
|
10
|
-
import EmailLiveChatTranscriptOptionaParams from "./core/EmailLiveChatTranscriptOptionalParams";
|
11
|
-
import FileMetadata from "@microsoft/omnichannel-amsclient/lib/FileMetadata";
|
12
|
-
import FramedClient from "@microsoft/omnichannel-amsclient/lib/FramedClient";
|
13
|
-
import FramedlessClient from "@microsoft/omnichannel-amsclient/lib/FramedlessClient";
|
14
|
-
import GetAgentAvailabilityOptionalParams from "./core/GetAgentAvailabilityOptionalParams";
|
15
|
-
import GetChatTokenOptionalParams from "./core/GetChatTokenOptionalParams";
|
16
|
-
import GetConversationDetailsOptionalParams from "./core/GetConversationDetailsOptionalParams";
|
17
|
-
import GetLiveChatConfigOptionalParams from "./core/GetLiveChatConfigOptionalParams";
|
18
|
-
import GetLiveChatTranscriptOptionalParams from "./core/GetLiveChatTranscriptOptionalParams";
|
19
|
-
import IChatToken from "./external/IC3Adapter/IChatToken";
|
20
|
-
import IFileInfo from "@microsoft/omnichannel-ic3core/lib/interfaces/IFileInfo";
|
21
|
-
import IFileMetadata from "@microsoft/omnichannel-ic3core/lib/model/IFileMetadata";
|
22
|
-
import IMessage from "@microsoft/omnichannel-ic3core/lib/model/IMessage";
|
23
|
-
import IRawMessage from "@microsoft/omnichannel-ic3core/lib/model/IRawMessage";
|
24
|
-
import IRawThread from "@microsoft/omnichannel-ic3core/lib/interfaces/IRawThread";
|
25
|
-
import InitializeOptionalParams from "./core/InitializeOptionalParams";
|
26
|
-
import LiveChatContext from "./core/LiveChatContext";
|
27
|
-
import LiveWorkItemDetails from "./core/LiveWorkItemDetails";
|
28
|
-
import OmnichannelConfig from "./core/OmnichannelConfig";
|
29
|
-
import OmnichannelMessage from "./core/messaging/OmnichannelMessage";
|
30
|
-
import OnNewMessageOptionalParams from "./core/messaging/OnNewMessageOptionalParams";
|
31
|
-
import StartChatOptionalParams from "./core/StartChatOptionalParams";
|
32
|
-
declare class OmnichannelChatSDK {
|
33
|
-
private debug;
|
34
|
-
runtimeId: string;
|
35
|
-
OCSDKProvider: unknown;
|
36
|
-
IC3SDKProvider: unknown;
|
37
|
-
OCClient: any;
|
38
|
-
IC3Client: any;
|
39
|
-
ACSClient: ACSClient | null;
|
40
|
-
AMSClient: FramedClient | FramedlessClient | null;
|
41
|
-
omnichannelConfig: OmnichannelConfig;
|
42
|
-
chatSDKConfig: ChatSDKConfig;
|
43
|
-
isInitialized: boolean;
|
44
|
-
localeId: string;
|
45
|
-
requestId: string;
|
46
|
-
sessionId: string | null;
|
47
|
-
private unqServicesOrgUrl;
|
48
|
-
private coreServicesOrgUrl;
|
49
|
-
private dynamicsLocationCode;
|
50
|
-
private chatToken;
|
51
|
-
private liveChatConfig;
|
52
|
-
private liveChatVersion;
|
53
|
-
private dataMaskingRules;
|
54
|
-
private authSettings;
|
55
|
-
private authenticatedUserToken;
|
56
|
-
private preChatSurvey;
|
57
|
-
private conversation;
|
58
|
-
private callingOption;
|
59
|
-
private telemetry;
|
60
|
-
private scenarioMarker;
|
61
|
-
private ic3ClientLogger;
|
62
|
-
private ocSdkLogger;
|
63
|
-
private acsClientLogger;
|
64
|
-
private acsAdapterLogger;
|
65
|
-
private callingSdkLogger;
|
66
|
-
private amsClientLogger;
|
67
|
-
private isPersistentChat;
|
68
|
-
private isChatReconnect;
|
69
|
-
private reconnectId;
|
70
|
-
private refreshTokenTimer;
|
71
|
-
private AMSClientLoadCurrentState;
|
72
|
-
constructor(omnichannelConfig: OmnichannelConfig, chatSDKConfig?: ChatSDKConfig);
|
73
|
-
setDebug(flag: boolean): void;
|
74
|
-
private retryLoadAMSClient;
|
75
|
-
private getAMSClient;
|
76
|
-
private loadInitComponents;
|
77
|
-
private loadAmsClient;
|
78
|
-
private parallelInitialization;
|
79
|
-
private sequentialInitialization;
|
80
|
-
/**
|
81
|
-
*
|
82
|
-
* @param optionalParams
|
83
|
-
* @param parallel if true , it will run in parallel (fastest version) with components loaded in the background
|
84
|
-
* @returns livechatConfig
|
85
|
-
*/
|
86
|
-
initialize(optionalParams?: InitializeOptionalParams): Promise<ChatConfig>;
|
87
|
-
private loadChatConfig;
|
88
|
-
private getChatReconnectContextWithAuthToken;
|
89
|
-
private getChatReconnectContextWithReconnectId;
|
90
|
-
getChatReconnectContext(optionalParams?: ChatReconnectOptionalParams): Promise<ChatReconnectContext>;
|
91
|
-
startChat(optionalParams?: StartChatOptionalParams): Promise<void>;
|
92
|
-
endChat(): Promise<void>;
|
93
|
-
getCurrentLiveChatContext(): Promise<LiveChatContext | {}>;
|
94
|
-
getConversationDetails(optionalParams?: GetConversationDetailsOptionalParams): Promise<LiveWorkItemDetails>;
|
95
|
-
/**
|
96
|
-
* Gets PreChat Survey.
|
97
|
-
* @param parse Whether to parse PreChatSurvey to JSON or not.
|
98
|
-
*/
|
99
|
-
getPreChatSurvey(parse?: boolean): Promise<any>;
|
100
|
-
getLiveChatConfig(optionalParams?: GetLiveChatConfigOptionalParams): Promise<ChatConfig>;
|
101
|
-
getChatToken(cached?: boolean, optionalParams?: GetChatTokenOptionalParams): Promise<IChatToken>;
|
102
|
-
getCallingToken(): Promise<string>;
|
103
|
-
getMessages(): Promise<IMessage[] | OmnichannelMessage[] | undefined>;
|
104
|
-
getDataMaskingRules(): Promise<any>;
|
105
|
-
sendMessage(message: ChatSDKMessage): Promise<void>;
|
106
|
-
onNewMessage(onNewMessageCallback: CallableFunction, optionalParams?: OnNewMessageOptionalParams | unknown): Promise<void>;
|
107
|
-
sendTypingEvent(): Promise<void>;
|
108
|
-
onTypingEvent(onTypingEventCallback: CallableFunction): Promise<void>;
|
109
|
-
onAgentEndSession(onAgentEndSessionCallback: (message: IRawThread | ParticipantsRemovedEvent) => void): Promise<void>;
|
110
|
-
uploadFileAttachment(fileInfo: IFileInfo | File): Promise<IRawMessage | OmnichannelMessage>;
|
111
|
-
downloadFileAttachment(fileMetadata: FileMetadata | IFileMetadata): Promise<Blob>;
|
112
|
-
emailLiveChatTranscript(body: ChatTranscriptBody, optionalParams?: EmailLiveChatTranscriptOptionaParams): Promise<any>;
|
113
|
-
getLiveChatTranscript(optionalParams?: GetLiveChatTranscriptOptionalParams): Promise<any>;
|
114
|
-
createChatAdapter(optionalParams?: ChatAdapterOptionalParams): Promise<unknown>;
|
115
|
-
isVoiceVideoCallingEnabled(): boolean;
|
116
|
-
getVoiceVideoCalling(params?: any): Promise<any>;
|
117
|
-
getPostChatSurveyContext(): Promise<any>;
|
118
|
-
getAgentAvailability(optionalParams?: GetAgentAvailabilityOptionalParams): Promise<any>;
|
119
|
-
private populateInitChatOptionalParam;
|
120
|
-
private getIC3Client;
|
121
|
-
private getChatConfig;
|
122
|
-
private resolveIC3ClientUrl;
|
123
|
-
private resolveChatAdapterUrl;
|
124
|
-
private updateChatToken;
|
125
|
-
private setAuthTokenProvider;
|
126
|
-
private useCoreServicesOrgUrlIfNotSet;
|
127
|
-
}
|
128
|
-
export default OmnichannelChatSDK;
|
1
|
+
import ACSClient from "./core/messaging/ACSClient";
|
2
|
+
import { ParticipantsRemovedEvent } from '@azure/communication-signaling';
|
3
|
+
import ChatAdapterOptionalParams from "./core/messaging/ChatAdapterOptionalParams";
|
4
|
+
import ChatConfig from "./core/ChatConfig";
|
5
|
+
import ChatReconnectContext from "./core/ChatReconnectContext";
|
6
|
+
import ChatReconnectOptionalParams from "./core/ChatReconnectOptionalParams";
|
7
|
+
import ChatSDKConfig from "./core/ChatSDKConfig";
|
8
|
+
import ChatSDKMessage from "./core/messaging/ChatSDKMessage";
|
9
|
+
import ChatTranscriptBody from "./core/ChatTranscriptBody";
|
10
|
+
import EmailLiveChatTranscriptOptionaParams from "./core/EmailLiveChatTranscriptOptionalParams";
|
11
|
+
import FileMetadata from "@microsoft/omnichannel-amsclient/lib/FileMetadata";
|
12
|
+
import FramedClient from "@microsoft/omnichannel-amsclient/lib/FramedClient";
|
13
|
+
import FramedlessClient from "@microsoft/omnichannel-amsclient/lib/FramedlessClient";
|
14
|
+
import GetAgentAvailabilityOptionalParams from "./core/GetAgentAvailabilityOptionalParams";
|
15
|
+
import GetChatTokenOptionalParams from "./core/GetChatTokenOptionalParams";
|
16
|
+
import GetConversationDetailsOptionalParams from "./core/GetConversationDetailsOptionalParams";
|
17
|
+
import GetLiveChatConfigOptionalParams from "./core/GetLiveChatConfigOptionalParams";
|
18
|
+
import GetLiveChatTranscriptOptionalParams from "./core/GetLiveChatTranscriptOptionalParams";
|
19
|
+
import IChatToken from "./external/IC3Adapter/IChatToken";
|
20
|
+
import IFileInfo from "@microsoft/omnichannel-ic3core/lib/interfaces/IFileInfo";
|
21
|
+
import IFileMetadata from "@microsoft/omnichannel-ic3core/lib/model/IFileMetadata";
|
22
|
+
import IMessage from "@microsoft/omnichannel-ic3core/lib/model/IMessage";
|
23
|
+
import IRawMessage from "@microsoft/omnichannel-ic3core/lib/model/IRawMessage";
|
24
|
+
import IRawThread from "@microsoft/omnichannel-ic3core/lib/interfaces/IRawThread";
|
25
|
+
import InitializeOptionalParams from "./core/InitializeOptionalParams";
|
26
|
+
import LiveChatContext from "./core/LiveChatContext";
|
27
|
+
import LiveWorkItemDetails from "./core/LiveWorkItemDetails";
|
28
|
+
import OmnichannelConfig from "./core/OmnichannelConfig";
|
29
|
+
import OmnichannelMessage from "./core/messaging/OmnichannelMessage";
|
30
|
+
import OnNewMessageOptionalParams from "./core/messaging/OnNewMessageOptionalParams";
|
31
|
+
import StartChatOptionalParams from "./core/StartChatOptionalParams";
|
32
|
+
declare class OmnichannelChatSDK {
|
33
|
+
private debug;
|
34
|
+
runtimeId: string;
|
35
|
+
OCSDKProvider: unknown;
|
36
|
+
IC3SDKProvider: unknown;
|
37
|
+
OCClient: any;
|
38
|
+
IC3Client: any;
|
39
|
+
ACSClient: ACSClient | null;
|
40
|
+
AMSClient: FramedClient | FramedlessClient | null;
|
41
|
+
omnichannelConfig: OmnichannelConfig;
|
42
|
+
chatSDKConfig: ChatSDKConfig;
|
43
|
+
isInitialized: boolean;
|
44
|
+
localeId: string;
|
45
|
+
requestId: string;
|
46
|
+
sessionId: string | null;
|
47
|
+
private unqServicesOrgUrl;
|
48
|
+
private coreServicesOrgUrl;
|
49
|
+
private dynamicsLocationCode;
|
50
|
+
private chatToken;
|
51
|
+
private liveChatConfig;
|
52
|
+
private liveChatVersion;
|
53
|
+
private dataMaskingRules;
|
54
|
+
private authSettings;
|
55
|
+
private authenticatedUserToken;
|
56
|
+
private preChatSurvey;
|
57
|
+
private conversation;
|
58
|
+
private callingOption;
|
59
|
+
private telemetry;
|
60
|
+
private scenarioMarker;
|
61
|
+
private ic3ClientLogger;
|
62
|
+
private ocSdkLogger;
|
63
|
+
private acsClientLogger;
|
64
|
+
private acsAdapterLogger;
|
65
|
+
private callingSdkLogger;
|
66
|
+
private amsClientLogger;
|
67
|
+
private isPersistentChat;
|
68
|
+
private isChatReconnect;
|
69
|
+
private reconnectId;
|
70
|
+
private refreshTokenTimer;
|
71
|
+
private AMSClientLoadCurrentState;
|
72
|
+
constructor(omnichannelConfig: OmnichannelConfig, chatSDKConfig?: ChatSDKConfig);
|
73
|
+
setDebug(flag: boolean): void;
|
74
|
+
private retryLoadAMSClient;
|
75
|
+
private getAMSClient;
|
76
|
+
private loadInitComponents;
|
77
|
+
private loadAmsClient;
|
78
|
+
private parallelInitialization;
|
79
|
+
private sequentialInitialization;
|
80
|
+
/**
|
81
|
+
*
|
82
|
+
* @param optionalParams
|
83
|
+
* @param parallel if true , it will run in parallel (fastest version) with components loaded in the background
|
84
|
+
* @returns livechatConfig
|
85
|
+
*/
|
86
|
+
initialize(optionalParams?: InitializeOptionalParams): Promise<ChatConfig>;
|
87
|
+
private loadChatConfig;
|
88
|
+
private getChatReconnectContextWithAuthToken;
|
89
|
+
private getChatReconnectContextWithReconnectId;
|
90
|
+
getChatReconnectContext(optionalParams?: ChatReconnectOptionalParams): Promise<ChatReconnectContext>;
|
91
|
+
startChat(optionalParams?: StartChatOptionalParams): Promise<void>;
|
92
|
+
endChat(): Promise<void>;
|
93
|
+
getCurrentLiveChatContext(): Promise<LiveChatContext | {}>;
|
94
|
+
getConversationDetails(optionalParams?: GetConversationDetailsOptionalParams): Promise<LiveWorkItemDetails>;
|
95
|
+
/**
|
96
|
+
* Gets PreChat Survey.
|
97
|
+
* @param parse Whether to parse PreChatSurvey to JSON or not.
|
98
|
+
*/
|
99
|
+
getPreChatSurvey(parse?: boolean): Promise<any>;
|
100
|
+
getLiveChatConfig(optionalParams?: GetLiveChatConfigOptionalParams): Promise<ChatConfig>;
|
101
|
+
getChatToken(cached?: boolean, optionalParams?: GetChatTokenOptionalParams): Promise<IChatToken>;
|
102
|
+
getCallingToken(): Promise<string>;
|
103
|
+
getMessages(): Promise<IMessage[] | OmnichannelMessage[] | undefined>;
|
104
|
+
getDataMaskingRules(): Promise<any>;
|
105
|
+
sendMessage(message: ChatSDKMessage): Promise<void>;
|
106
|
+
onNewMessage(onNewMessageCallback: CallableFunction, optionalParams?: OnNewMessageOptionalParams | unknown): Promise<void>;
|
107
|
+
sendTypingEvent(): Promise<void>;
|
108
|
+
onTypingEvent(onTypingEventCallback: CallableFunction): Promise<void>;
|
109
|
+
onAgentEndSession(onAgentEndSessionCallback: (message: IRawThread | ParticipantsRemovedEvent) => void): Promise<void>;
|
110
|
+
uploadFileAttachment(fileInfo: IFileInfo | File): Promise<IRawMessage | OmnichannelMessage>;
|
111
|
+
downloadFileAttachment(fileMetadata: FileMetadata | IFileMetadata): Promise<Blob>;
|
112
|
+
emailLiveChatTranscript(body: ChatTranscriptBody, optionalParams?: EmailLiveChatTranscriptOptionaParams): Promise<any>;
|
113
|
+
getLiveChatTranscript(optionalParams?: GetLiveChatTranscriptOptionalParams): Promise<any>;
|
114
|
+
createChatAdapter(optionalParams?: ChatAdapterOptionalParams): Promise<unknown>;
|
115
|
+
isVoiceVideoCallingEnabled(): boolean;
|
116
|
+
getVoiceVideoCalling(params?: any): Promise<any>;
|
117
|
+
getPostChatSurveyContext(): Promise<any>;
|
118
|
+
getAgentAvailability(optionalParams?: GetAgentAvailabilityOptionalParams): Promise<any>;
|
119
|
+
private populateInitChatOptionalParam;
|
120
|
+
private getIC3Client;
|
121
|
+
private getChatConfig;
|
122
|
+
private resolveIC3ClientUrl;
|
123
|
+
private resolveChatAdapterUrl;
|
124
|
+
private updateChatToken;
|
125
|
+
private setAuthTokenProvider;
|
126
|
+
private useCoreServicesOrgUrlIfNotSet;
|
127
|
+
}
|
128
|
+
export default OmnichannelChatSDK;
|