@microsoft/omnichannel-chat-sdk 0.3.1-main.c96fb51 → 1.0.1-main.1e6bcff

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/README.md +70 -8
  3. package/lib/OmnichannelChatSDK.d.ts +38 -24
  4. package/lib/OmnichannelChatSDK.js +894 -285
  5. package/lib/OmnichannelChatSDK.js.map +1 -1
  6. package/lib/config/settings.d.ts +2 -1
  7. package/lib/config/settings.js +3 -1
  8. package/lib/config/settings.js.map +1 -1
  9. package/lib/core/{IAuthSettings.d.ts → AuthSettings.d.ts} +1 -1
  10. package/lib/core/{IAuthSettings.js → AuthSettings.js} +1 -1
  11. package/lib/core/AuthSettings.js.map +1 -0
  12. package/lib/core/ChatConfig.d.ts +9 -0
  13. package/lib/core/{IChatConfig.js → ChatConfig.js} +1 -1
  14. package/lib/core/ChatConfig.js.map +1 -0
  15. package/lib/core/{IChatSDKConfig.d.ts → ChatSDKConfig.d.ts} +7 -7
  16. package/lib/core/{IChatSDKConfig.js → ChatSDKConfig.js} +1 -1
  17. package/lib/core/ChatSDKConfig.js.map +1 -0
  18. package/lib/core/{IChatTranscriptBody.d.ts → ChatTranscriptBody.d.ts} +1 -1
  19. package/lib/core/ChatTranscriptBody.js +3 -0
  20. package/lib/core/ChatTranscriptBody.js.map +1 -0
  21. package/lib/core/{ILiveChatContext.d.ts → LiveChatContext.d.ts} +1 -1
  22. package/lib/core/LiveChatContext.js +3 -0
  23. package/lib/core/LiveChatContext.js.map +1 -0
  24. package/lib/core/LiveChatVersion.d.ts +5 -0
  25. package/lib/core/LiveChatVersion.js +9 -0
  26. package/lib/core/LiveChatVersion.js.map +1 -0
  27. package/lib/core/{IOmnichannelConfig.d.ts → OmnichannelConfig.d.ts} +1 -1
  28. package/lib/core/OmnichannelConfig.js +3 -0
  29. package/lib/core/OmnichannelConfig.js.map +1 -0
  30. package/lib/core/PostChatContext.d.ts +5 -0
  31. package/lib/core/PostChatContext.js +3 -0
  32. package/lib/core/PostChatContext.js.map +1 -0
  33. package/lib/core/{IStartChatOptionalParams.d.ts → StartChatOptionalParams.d.ts} +3 -3
  34. package/lib/core/StartChatOptionalParams.js +3 -0
  35. package/lib/core/StartChatOptionalParams.js.map +1 -0
  36. package/lib/core/messaging/ACSChatMessageType.d.ts +7 -0
  37. package/lib/core/messaging/ACSChatMessageType.js +11 -0
  38. package/lib/core/messaging/ACSChatMessageType.js.map +1 -0
  39. package/lib/core/messaging/ACSClient.d.ts +44 -0
  40. package/lib/core/messaging/ACSClient.js +588 -0
  41. package/lib/core/messaging/ACSClient.js.map +1 -0
  42. package/lib/core/messaging/ACSClientConfig.d.ts +4 -0
  43. package/lib/core/messaging/ACSClientConfig.js +3 -0
  44. package/lib/core/messaging/ACSClientConfig.js.map +1 -0
  45. package/lib/core/messaging/ACSParticipantDisplayName.d.ts +6 -0
  46. package/lib/core/messaging/ACSParticipantDisplayName.js +10 -0
  47. package/lib/core/messaging/ACSParticipantDisplayName.js.map +1 -0
  48. package/lib/core/messaging/ACSSessionInfo.d.ts +5 -0
  49. package/lib/core/messaging/ACSSessionInfo.js +3 -0
  50. package/lib/core/messaging/ACSSessionInfo.js.map +1 -0
  51. package/lib/core/{ChatAdapterConfig.d.ts → messaging/ChatAdapterConfig.d.ts} +2 -0
  52. package/lib/core/{ChatAdapterConfig.js → messaging/ChatAdapterConfig.js} +0 -0
  53. package/lib/core/messaging/ChatAdapterConfig.js.map +1 -0
  54. package/lib/core/{ChatAdapterProtocols.d.ts → messaging/ChatAdapterProtocols.d.ts} +1 -0
  55. package/lib/core/{ChatAdapterProtocols.js → messaging/ChatAdapterProtocols.js} +3 -1
  56. package/lib/core/messaging/ChatAdapterProtocols.js.map +1 -0
  57. package/lib/core/{IChatSDKMessage.d.ts → messaging/ChatSDKMessage.d.ts} +2 -1
  58. package/lib/core/messaging/ChatSDKMessage.js +3 -0
  59. package/lib/core/messaging/ChatSDKMessage.js.map +1 -0
  60. package/lib/core/{IC3Config.d.ts → messaging/IC3Config.d.ts} +0 -0
  61. package/lib/core/{IC3Config.js → messaging/IC3Config.js} +0 -0
  62. package/lib/core/messaging/IC3Config.js.map +1 -0
  63. package/lib/core/{MessageTags.d.ts → messaging/MessageTags.d.ts} +0 -0
  64. package/lib/core/{MessageTags.js → messaging/MessageTags.js} +1 -1
  65. package/lib/core/messaging/MessageTags.js.map +1 -0
  66. package/lib/core/messaging/OmnichannelMessage.d.ts +64 -0
  67. package/lib/core/messaging/OmnichannelMessage.js +52 -0
  68. package/lib/core/messaging/OmnichannelMessage.js.map +1 -0
  69. package/lib/core/{OnNewMessageOptionalParams.d.ts → messaging/OnNewMessageOptionalParams.d.ts} +0 -0
  70. package/lib/core/{OnNewMessageOptionalParams.js → messaging/OnNewMessageOptionalParams.js} +0 -0
  71. package/lib/core/messaging/OnNewMessageOptionalParams.js.map +1 -0
  72. package/lib/external/ACSAdapter/AMSFileManager.d.ts +39 -0
  73. package/lib/external/ACSAdapter/AMSFileManager.js +306 -0
  74. package/lib/external/ACSAdapter/AMSFileManager.js.map +1 -0
  75. package/lib/external/ACSAdapter/createFormatEgressTagsMiddleware.d.ts +2 -0
  76. package/lib/external/ACSAdapter/createFormatEgressTagsMiddleware.js +31 -0
  77. package/lib/external/ACSAdapter/createFormatEgressTagsMiddleware.js.map +1 -0
  78. package/lib/external/ACSAdapter/createFormatIngressTagsMiddleware.d.ts +2 -0
  79. package/lib/external/ACSAdapter/createFormatIngressTagsMiddleware.js +25 -0
  80. package/lib/external/ACSAdapter/createFormatIngressTagsMiddleware.js.map +1 -0
  81. package/lib/external/IC3Adapter/IChatToken.d.ts +2 -0
  82. package/lib/index.d.ts +2 -2
  83. package/lib/telemetry/AriaTelemetry.d.ts +3 -0
  84. package/lib/telemetry/AriaTelemetry.js +124 -4
  85. package/lib/telemetry/AriaTelemetry.js.map +1 -1
  86. package/lib/telemetry/EventMarker.d.ts +3 -0
  87. package/lib/telemetry/EventMarker.js +13 -0
  88. package/lib/telemetry/EventMarker.js.map +1 -0
  89. package/lib/telemetry/ScenarioMarker.d.ts +11 -7
  90. package/lib/telemetry/ScenarioMarker.js +16 -7
  91. package/lib/telemetry/ScenarioMarker.js.map +1 -1
  92. package/lib/telemetry/ScenarioType.d.ts +2 -0
  93. package/lib/telemetry/ScenarioType.js +2 -0
  94. package/lib/telemetry/ScenarioType.js.map +1 -1
  95. package/lib/telemetry/TelemetryEvent.d.ts +7 -4
  96. package/lib/telemetry/TelemetryEvent.js +6 -10
  97. package/lib/telemetry/TelemetryEvent.js.map +1 -1
  98. package/lib/tsconfig.tsbuildinfo +5086 -1319
  99. package/lib/utils/createOmnichannelMessage.d.ts +11 -0
  100. package/lib/utils/createOmnichannelMessage.js +63 -0
  101. package/lib/utils/createOmnichannelMessage.js.map +1 -0
  102. package/lib/utils/libraries.d.ts +3 -1
  103. package/lib/utils/libraries.js +9 -2
  104. package/lib/utils/libraries.js.map +1 -1
  105. package/lib/utils/locale.d.ts +3 -0
  106. package/lib/utils/locale.js +60 -0
  107. package/lib/utils/locale.js.map +1 -0
  108. package/lib/utils/loggers.d.ts +50 -6
  109. package/lib/utils/loggers.js +221 -2
  110. package/lib/utils/loggers.js.map +1 -1
  111. package/lib/utils/utilities.js +10 -3
  112. package/lib/utils/utilities.js.map +1 -1
  113. package/lib/validators/OmnichannelConfigValidator.d.ts +2 -2
  114. package/lib/validators/OmnichannelConfigValidator.js.map +1 -1
  115. package/lib/validators/SDKConfigValidators.d.ts +3 -3
  116. package/lib/validators/SDKConfigValidators.js.map +1 -1
  117. package/package.json +5 -1
  118. package/lib/core/ChatAdapterConfig.js.map +0 -1
  119. package/lib/core/ChatAdapterProtocols.js.map +0 -1
  120. package/lib/core/IAuthSettings.js.map +0 -1
  121. package/lib/core/IC3Config.js.map +0 -1
  122. package/lib/core/IChatConfig.d.ts +0 -5
  123. package/lib/core/IChatConfig.js.map +0 -1
  124. package/lib/core/IChatSDKConfig.js.map +0 -1
  125. package/lib/core/IChatSDKMessage.js +0 -3
  126. package/lib/core/IChatSDKMessage.js.map +0 -1
  127. package/lib/core/IChatTranscriptBody.js +0 -3
  128. package/lib/core/IChatTranscriptBody.js.map +0 -1
  129. package/lib/core/ILiveChatContext.js +0 -3
  130. package/lib/core/ILiveChatContext.js.map +0 -1
  131. package/lib/core/IOmnichannelConfig.js +0 -3
  132. package/lib/core/IOmnichannelConfig.js.map +0 -1
  133. package/lib/core/IStartChatOptionalParams.js +0 -3
  134. package/lib/core/IStartChatOptionalParams.js.map +0 -1
  135. package/lib/core/MessageTags.js.map +0 -1
  136. package/lib/core/OnNewMessageOptionalParams.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -3,9 +3,31 @@ All notable changes to this project will be documented in this file.
3
3
 
4
4
  ## [Unreleased]
5
5
 
6
+ ### Added
7
+ - Add `getPostChatSurveyContext` API method
8
+ - Add `GetPostChatSurveyContext` telemetry event
9
+ - Add `widgetId` & `clientMessageId` as metadata on sending message
10
+ - Update `ChatConfig` interface with `LiveChatVersion`, `allowedFileExtensions` & `maxUploadFileSize` properties
11
+ - Add ability to automatically detect locale from chat config
12
+ - Add `runtimeId` attribute in `OmnichannelChatSDK` & `ChatSDKRuntimeId` field in telemetry
13
+
14
+ ### Fix
15
+ - Add `acs_webchat-chat-adapter` middlewares to format `channelData.tags`
16
+ - Skip `session init` call on existing conversation
17
+ - Fix `chat reconnect` not ending the conversation on calling `ChatSDK.endChat()`
18
+
19
+ ### Changed
20
+ - README: added examples on usages of the post chat APIs.
21
+ - Uptake [@azure/communication-chat@1.1.1](https://www.npmjs.com/package/@azure/communication-chat/v/1.1.1)
22
+ - Uptake [acs_webchat-chat-adapter@0.0.35-beta.2](https://unpkg.com/acs_webchat-chat-adapter@0.0.35-beta.2/dist/chat-adapter.js)
23
+
24
+ ## [1.0.0] - 2021-10-08
6
25
  ### Added
7
26
  - Add `GetAuthToken` & `GetPreChatSurvey` telemetry events
8
27
  - Add `Domain` telemetry base property
28
+ - Add `GetCurrentLiveChatContext`, `GetMessages`, `SendMessages`, `OnNewMessage` & `OnTypingEvent` telemetry events
29
+ - Live Chat V2 Support
30
+ - Add `PlatformDetails` telemetry event
9
31
 
10
32
  ### Changed
11
33
  - Uptake [@microsoft/ocsdk@0.3.0](https://www.npmjs.com/package/@microsoft/ocsdk/v/0.3.0)
package/README.md CHANGED
@@ -11,9 +11,10 @@ Please make sure you have a chat widget configured before using this package or
11
11
  ## Table of Contents
12
12
  - [Live Chat Widget vs. Chat SDK](#live-chat-widget-vs-chat-sdk)
13
13
  - [Installation](#installation)
14
+ - [Installation on React Native](#installation-on-react-native)
14
15
  - [API Reference](#api-reference)
15
16
  - [API Examples](#api-examples)
16
- - [Sample Apps](samples/)
17
+ - [Sample Apps](https://github.com/microsoft/omnichannel-chat-sdk-samples)
17
18
  - [Common Scenarios](#common-scenarios)
18
19
  - [Feature Comparisons](#feature-comparisons)
19
20
  - [Telemetry](#telemetry)
@@ -34,14 +35,12 @@ Omnichannel offers an live chat widget (LCW) by default. You can use the Chat SD
34
35
  | Bring Your Own Widget | ❌ | ✔ | |
35
36
  | Web Support | ✔ | ✔ |
36
37
  | React Native Support | ❌ | ✔ |
37
- | Escalation to Voice & Video | ✔ | Web Only |
38
- | Co-browse | ✔ | Web Only |
39
- | Screen Sharing | ✔ | Web Only |
38
+ | Escalation to Voice & Video | ✔ | | Only supported on Web |
39
+ | Co-browse | ✔ | 3rd party add-on | Only supported on Web |
40
+ | Screen Sharing | ✔ | 3rd party add-on | Only supported on Web |
40
41
  | Authenticated Chat | ✔ | ✔ |
41
42
  | Pre-chat Survey | ✔ | ✔ |
42
- | Post-chat Survey | ✔ | |
43
- | Queue Position | ✔ | ✔ |
44
- | Average Wait Time | ✔ | ✔ |
43
+ | Post-chat Survey | ✔ | |
45
44
  | Download Transcript | ✔ | ✔ |
46
45
  | Email Transcript | ✔ | ✔ |
47
46
  | Data Masking | ✔ | ✔ |
@@ -51,6 +50,8 @@ Omnichannel offers an live chat widget (LCW) by default. You can use the Chat SD
51
50
  | Persistent Chat | ✔ | ✔ |
52
51
  | Chat Reconnect | ✔ | ✔ |
53
52
  | Operating Hours | ✔ | ✔ |
53
+ | Queue Position | ✔ | ✔ | No SDK method. Handled as *system message* |
54
+ | Average Wait Time | ✔ | ✔ | No SDK method. Handled as *system message* |
54
55
 
55
56
  **\*** BYOI: Bring Your Own Implementation
56
57
 
@@ -60,6 +61,51 @@ Omnichannel offers an live chat widget (LCW) by default. You can use the Chat SD
60
61
  npm install @microsoft/omnichannel-chat-sdk --save
61
62
  ```
62
63
 
64
+ ## Installation on React Native
65
+
66
+ The following steps will be required to run Omnichannel Chat SDK on React Native:
67
+
68
+ 1. Install `node-libs-react-native`
69
+ ```
70
+ npm install node-libs-react-native --save-dev
71
+ ```
72
+
73
+ 1. Install `react-native-randomBytes`
74
+ ```
75
+ npm install react-native-randombytes --save-dev
76
+ ```
77
+
78
+ 1. Install `react-native-get-random-values`
79
+ ```
80
+ npm install react-native-get-random-values --save-dev
81
+ ```
82
+
83
+ 1. Install `react-native-url-polyfill`
84
+ ```
85
+ npm install react-native-url-polyfill --save-dev
86
+ ```
87
+
88
+ 1. Update *metro.config.js* to use React Native compatible Node Core modules
89
+ ```ts
90
+ module.exports = {
91
+ // ...
92
+ resolver: {
93
+ extraNodeModules: {
94
+ ...require('node-libs-react-native'),
95
+ net: require.resolve('node-libs-react-native/mock/net'),
96
+ tls: require.resolve('node-libs-react-native/mock/tls')
97
+ }
98
+ }
99
+ };
100
+ ```
101
+
102
+ 1. Add following *import* on top of your entry point file
103
+ ```ts
104
+ import 'node-libs-react-native/globals';
105
+ import 'react-native-get-random-values';
106
+ import 'react-native-url-polyfill';
107
+ ```
108
+
63
109
  ## API Reference
64
110
 
65
111
  | Method | Description | Notes |
@@ -86,7 +132,8 @@ Omnichannel offers an live chat widget (LCW) by default. You can use the Chat SD
86
132
  | OmnichannelChatSDK.uploadFileAttachment() | Send file attachment | |
87
133
  | OmnichannelChatSDK.downloadFileAttachment() | Download file attachment | |
88
134
  | OmnichannelChatSDK.createChatAdapter() | Get IC3Adapter | **Web only** |
89
- | OmnichannelChatSDK.getVoiceVideoCalling() | Get VoiceVideoCall SDK for Escalation to Voice & Video| **Web only** |
135
+ | OmnichannelChatSDK.getVoiceVideoCalling() | Get VoiceVideoCall SDK for Escalation to Voice & Video | **Web only** |
136
+ | OmnichannelChatSDK.getPostChatSurveyContext() | Get post chat survey link, survey locale, and whether an agent has joined the survey | |
90
137
 
91
138
  ## API examples
92
139
 
@@ -164,6 +211,21 @@ Omnichannel offers an live chat widget (LCW) by default. You can use the Chat SD
164
211
  const preChatSurvey = await getPreChatSurvey(parseToJSON); // Adaptive Cards payload data as string
165
212
  ```
166
213
 
214
+ ### Get PostChat Survey
215
+ ```ts
216
+ try {
217
+ const context = await chatSDK.getPostChatSurveyContext();
218
+ if (context.participantJoined) { // participantJoined will be true if an agent has joined the conversation, or a bot has joined the conversation and the bot survey flag has been turned on on the admin side.
219
+ // formsProLocale is the default language you have set on the CustomerVoice portal. You can override this url parameter with any locale that CustomerVoice supports.
220
+ // If "&lang=" is not set on the url, the locale will be English.
221
+ const linkToSend = context.surveyInviteLink + "&lang=" + context.formsProLocale;
222
+ // This link is accessible and will redirect to the survey page. Use it as you see fit.
223
+ }
224
+ } catch (ex) {
225
+ // If the post chat should not be shown by any reason (e.g. post chat is not enabled), promise will be rejected.
226
+ }
227
+ ```
228
+
167
229
  ### Start Chat
168
230
  ```ts
169
231
  const customContext = {
@@ -1,32 +1,43 @@
1
- import IChatConfig from "./core/IChatConfig";
2
- import IChatSDKConfig from "./core/IChatSDKConfig";
3
- import IChatSDKMessage from "./core/IChatSDKMessage";
1
+ import ACSClient from "./core/messaging/ACSClient";
2
+ import { ParticipantsRemovedEvent } from '@azure/communication-signaling';
3
+ import ChatConfig from "./core/ChatConfig";
4
+ import ChatReconnectContext from "./core/ChatReconnectContext";
5
+ import ChatReconnectOptionalParams from "./core/ChatReconnectOptionalParams";
6
+ import ChatSDKConfig from "./core/ChatSDKConfig";
7
+ import ChatSDKMessage from "./core/messaging/ChatSDKMessage";
8
+ import ChatTranscriptBody from "./core/ChatTranscriptBody";
9
+ import FileMetadata from "@microsoft/omnichannel-amsclient/lib/FileMetadata";
10
+ import FramedClient from "@microsoft/omnichannel-amsclient/lib/FramedClient";
11
+ import FramedlessClient from "@microsoft/omnichannel-amsclient/lib/FramedlessClient";
4
12
  import IChatToken from "./external/IC3Adapter/IChatToken";
5
- import IChatTranscriptBody from "./core/IChatTranscriptBody";
6
13
  import IFileInfo from "@microsoft/omnichannel-ic3core/lib/interfaces/IFileInfo";
7
14
  import IFileMetadata from "@microsoft/omnichannel-ic3core/lib/model/IFileMetadata";
8
- import ILiveChatContext from "./core/ILiveChatContext";
9
15
  import IMessage from "@microsoft/omnichannel-ic3core/lib/model/IMessage";
10
- import IOmnichannelConfig from "./core/IOmnichannelConfig";
11
16
  import IRawMessage from "@microsoft/omnichannel-ic3core/lib/model/IRawMessage";
12
17
  import IRawThread from "@microsoft/omnichannel-ic3core/lib/interfaces/IRawThread";
13
- import IStartChatOptionalParams from "./core/IStartChatOptionalParams";
18
+ import LiveChatContext from "./core/LiveChatContext";
14
19
  import LiveWorkItemDetails from "./core/LiveWorkItemDetails";
15
- import OnNewMessageOptionalParams from "./core/OnNewMessageOptionalParams";
16
- import ChatReconnectOptionalParams from "./core/ChatReconnectOptionalParams";
17
- import ChatReconnectContext from "./core/ChatReconnectContext";
20
+ import OmnichannelConfig from "./core/OmnichannelConfig";
21
+ import OmnichannelMessage from "./core/messaging/OmnichannelMessage";
22
+ import OnNewMessageOptionalParams from "./core/messaging/OnNewMessageOptionalParams";
23
+ import StartChatOptionalParams from "./core/StartChatOptionalParams";
18
24
  declare class OmnichannelChatSDK {
19
25
  private debug;
26
+ runtimeId: string;
20
27
  OCSDKProvider: unknown;
21
28
  IC3SDKProvider: unknown;
22
29
  OCClient: any;
23
30
  IC3Client: any;
24
- omnichannelConfig: IOmnichannelConfig;
25
- chatSDKConfig: IChatSDKConfig;
31
+ ACSClient: ACSClient | null;
32
+ AMSClient: FramedClient | FramedlessClient | null;
33
+ omnichannelConfig: OmnichannelConfig;
34
+ chatSDKConfig: ChatSDKConfig;
26
35
  isInitialized: boolean;
36
+ localeId: string;
27
37
  requestId: string;
28
38
  private chatToken;
29
39
  private liveChatConfig;
40
+ private liveChatVersion;
30
41
  private dataMaskingRules;
31
42
  private authSettings;
32
43
  private authenticatedUserToken;
@@ -37,39 +48,42 @@ declare class OmnichannelChatSDK {
37
48
  private scenarioMarker;
38
49
  private ic3ClientLogger;
39
50
  private ocSdkLogger;
51
+ private acsClientLogger;
52
+ private acsAdapterLogger;
40
53
  private isPersistentChat;
41
54
  private isChatReconnect;
42
55
  private reconnectId;
43
56
  private refreshTokenTimer;
44
- constructor(omnichannelConfig: IOmnichannelConfig, chatSDKConfig?: IChatSDKConfig);
57
+ constructor(omnichannelConfig: OmnichannelConfig, chatSDKConfig?: ChatSDKConfig);
45
58
  setDebug(flag: boolean): void;
46
- initialize(): Promise<IChatConfig>;
59
+ initialize(): Promise<ChatConfig>;
47
60
  getChatReconnectContext(optionalParams?: ChatReconnectOptionalParams): Promise<ChatReconnectContext>;
48
- startChat(optionalParams?: IStartChatOptionalParams): Promise<void>;
61
+ startChat(optionalParams?: StartChatOptionalParams): Promise<void>;
49
62
  endChat(): Promise<void>;
50
- getCurrentLiveChatContext(): Promise<ILiveChatContext | {}>;
63
+ getCurrentLiveChatContext(): Promise<LiveChatContext | {}>;
51
64
  getConversationDetails(): Promise<LiveWorkItemDetails>;
52
65
  /**
53
66
  * Gets PreChat Survey.
54
67
  * @param parse Whether to parse PreChatSurvey to JSON or not.
55
68
  */
56
69
  getPreChatSurvey(parse?: boolean): Promise<any>;
57
- getLiveChatConfig(cached?: boolean): Promise<IChatConfig>;
70
+ getLiveChatConfig(cached?: boolean): Promise<ChatConfig>;
58
71
  getChatToken(cached?: boolean): Promise<IChatToken>;
59
72
  getCallingToken(): Promise<string>;
60
- getMessages(): Promise<IMessage[] | undefined>;
73
+ getMessages(): Promise<IMessage[] | OmnichannelMessage[] | undefined>;
61
74
  getDataMaskingRules(): Promise<any>;
62
- sendMessage(message: IChatSDKMessage): Promise<void>;
75
+ sendMessage(message: ChatSDKMessage): Promise<void>;
63
76
  onNewMessage(onNewMessageCallback: CallableFunction, optionalParams?: OnNewMessageOptionalParams | unknown): Promise<void>;
64
77
  sendTypingEvent(): Promise<void>;
65
78
  onTypingEvent(onTypingEventCallback: CallableFunction): Promise<void>;
66
- onAgentEndSession(onAgentEndSessionCallback: (message: IRawThread) => void): Promise<void>;
67
- uploadFileAttachment(fileInfo: IFileInfo | File): Promise<IRawMessage>;
68
- downloadFileAttachment(fileMetadata: IFileMetadata): Promise<Blob>;
69
- emailLiveChatTranscript(body: IChatTranscriptBody): Promise<any>;
79
+ onAgentEndSession(onAgentEndSessionCallback: (message: IRawThread | ParticipantsRemovedEvent) => void): Promise<void>;
80
+ uploadFileAttachment(fileInfo: IFileInfo | File): Promise<IRawMessage | OmnichannelMessage>;
81
+ downloadFileAttachment(fileMetadata: FileMetadata | IFileMetadata): Promise<Blob>;
82
+ emailLiveChatTranscript(body: ChatTranscriptBody): Promise<any>;
70
83
  getLiveChatTranscript(): Promise<any>;
71
- createChatAdapter(protocol?: string): Promise<unknown>;
84
+ createChatAdapter(protocol?: string | null): Promise<unknown>;
72
85
  getVoiceVideoCalling(params?: any): Promise<any>;
86
+ getPostChatSurveyContext(): Promise<any>;
73
87
  private getIC3Client;
74
88
  private getChatConfig;
75
89
  private resolveIC3ClientUrl;