@microsoft/omnichannel-chat-sdk 0.3.1-main.dcd02d3 → 1.0.1-main.67b480d

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 (139) hide show
  1. package/CHANGELOG.md +30 -1
  2. package/README.md +71 -8
  3. package/lib/OmnichannelChatSDK.d.ts +36 -24
  4. package/lib/OmnichannelChatSDK.js +950 -333
  5. package/lib/OmnichannelChatSDK.js.map +1 -1
  6. package/lib/api/createVoiceVideoCalling.d.ts +1 -0
  7. package/lib/api/createVoiceVideoCalling.js +91 -83
  8. package/lib/api/createVoiceVideoCalling.js.map +1 -1
  9. package/lib/config/settings.d.ts +2 -1
  10. package/lib/config/settings.js +3 -1
  11. package/lib/config/settings.js.map +1 -1
  12. package/lib/core/{IAuthSettings.d.ts → AuthSettings.d.ts} +1 -1
  13. package/lib/core/{IAuthSettings.js → AuthSettings.js} +1 -1
  14. package/lib/core/AuthSettings.js.map +1 -0
  15. package/lib/core/ChatConfig.d.ts +9 -0
  16. package/lib/core/{IChatConfig.js → ChatConfig.js} +1 -1
  17. package/lib/core/ChatConfig.js.map +1 -0
  18. package/lib/core/{IChatSDKConfig.d.ts → ChatSDKConfig.d.ts} +7 -7
  19. package/lib/core/{IChatSDKConfig.js → ChatSDKConfig.js} +1 -1
  20. package/lib/core/ChatSDKConfig.js.map +1 -0
  21. package/lib/core/{IChatTranscriptBody.d.ts → ChatTranscriptBody.d.ts} +1 -1
  22. package/lib/core/ChatTranscriptBody.js +3 -0
  23. package/lib/core/ChatTranscriptBody.js.map +1 -0
  24. package/lib/core/{ILiveChatContext.d.ts → LiveChatContext.d.ts} +1 -1
  25. package/lib/core/LiveChatContext.js +3 -0
  26. package/lib/core/LiveChatContext.js.map +1 -0
  27. package/lib/core/LiveChatVersion.d.ts +5 -0
  28. package/lib/core/LiveChatVersion.js +9 -0
  29. package/lib/core/LiveChatVersion.js.map +1 -0
  30. package/lib/core/{IOmnichannelConfig.d.ts → OmnichannelConfig.d.ts} +1 -1
  31. package/lib/core/OmnichannelConfig.js +3 -0
  32. package/lib/core/OmnichannelConfig.js.map +1 -0
  33. package/lib/core/PostChatContext.d.ts +5 -0
  34. package/lib/core/PostChatContext.js +3 -0
  35. package/lib/core/PostChatContext.js.map +1 -0
  36. package/lib/core/{IStartChatOptionalParams.d.ts → StartChatOptionalParams.d.ts} +3 -3
  37. package/lib/core/StartChatOptionalParams.js +3 -0
  38. package/lib/core/StartChatOptionalParams.js.map +1 -0
  39. package/lib/core/messaging/ACSChatMessageType.d.ts +7 -0
  40. package/lib/core/messaging/ACSChatMessageType.js +11 -0
  41. package/lib/core/messaging/ACSChatMessageType.js.map +1 -0
  42. package/lib/core/messaging/ACSClient.d.ts +44 -0
  43. package/lib/core/messaging/ACSClient.js +588 -0
  44. package/lib/core/messaging/ACSClient.js.map +1 -0
  45. package/lib/core/messaging/ACSClientConfig.d.ts +4 -0
  46. package/lib/core/messaging/ACSClientConfig.js +3 -0
  47. package/lib/core/messaging/ACSClientConfig.js.map +1 -0
  48. package/lib/core/messaging/ACSParticipantDisplayName.d.ts +6 -0
  49. package/lib/core/messaging/ACSParticipantDisplayName.js +10 -0
  50. package/lib/core/messaging/ACSParticipantDisplayName.js.map +1 -0
  51. package/lib/core/messaging/ACSSessionInfo.d.ts +5 -0
  52. package/lib/core/messaging/ACSSessionInfo.js +3 -0
  53. package/lib/core/messaging/ACSSessionInfo.js.map +1 -0
  54. package/lib/core/{ChatAdapterConfig.d.ts → messaging/ChatAdapterConfig.d.ts} +2 -0
  55. package/lib/core/{ChatAdapterConfig.js → messaging/ChatAdapterConfig.js} +0 -0
  56. package/lib/core/messaging/ChatAdapterConfig.js.map +1 -0
  57. package/lib/core/{ChatAdapterProtocols.d.ts → messaging/ChatAdapterProtocols.d.ts} +1 -0
  58. package/lib/core/{ChatAdapterProtocols.js → messaging/ChatAdapterProtocols.js} +3 -1
  59. package/lib/core/messaging/ChatAdapterProtocols.js.map +1 -0
  60. package/lib/core/{IChatSDKMessage.d.ts → messaging/ChatSDKMessage.d.ts} +2 -1
  61. package/lib/core/messaging/ChatSDKMessage.js +3 -0
  62. package/lib/core/messaging/ChatSDKMessage.js.map +1 -0
  63. package/lib/core/{IC3Config.d.ts → messaging/IC3Config.d.ts} +0 -0
  64. package/lib/core/{IC3Config.js → messaging/IC3Config.js} +0 -0
  65. package/lib/core/messaging/IC3Config.js.map +1 -0
  66. package/lib/core/{MessageTags.d.ts → messaging/MessageTags.d.ts} +0 -0
  67. package/lib/core/{MessageTags.js → messaging/MessageTags.js} +1 -1
  68. package/lib/core/messaging/MessageTags.js.map +1 -0
  69. package/lib/core/messaging/OmnichannelMessage.d.ts +64 -0
  70. package/lib/core/messaging/OmnichannelMessage.js +52 -0
  71. package/lib/core/messaging/OmnichannelMessage.js.map +1 -0
  72. package/lib/core/{OnNewMessageOptionalParams.d.ts → messaging/OnNewMessageOptionalParams.d.ts} +0 -0
  73. package/lib/core/{OnNewMessageOptionalParams.js → messaging/OnNewMessageOptionalParams.js} +0 -0
  74. package/lib/core/messaging/OnNewMessageOptionalParams.js.map +1 -0
  75. package/lib/external/ACSAdapter/AMSFileManager.d.ts +39 -0
  76. package/lib/external/ACSAdapter/AMSFileManager.js +306 -0
  77. package/lib/external/ACSAdapter/AMSFileManager.js.map +1 -0
  78. package/lib/external/ACSAdapter/createFormatEgressTagsMiddleware.d.ts +2 -0
  79. package/lib/external/ACSAdapter/createFormatEgressTagsMiddleware.js +31 -0
  80. package/lib/external/ACSAdapter/createFormatEgressTagsMiddleware.js.map +1 -0
  81. package/lib/external/ACSAdapter/createFormatIngressTagsMiddleware.d.ts +2 -0
  82. package/lib/external/ACSAdapter/createFormatIngressTagsMiddleware.js +25 -0
  83. package/lib/external/ACSAdapter/createFormatIngressTagsMiddleware.js.map +1 -0
  84. package/lib/external/IC3Adapter/IChatToken.d.ts +2 -0
  85. package/lib/index.d.ts +2 -2
  86. package/lib/telemetry/AriaTelemetry.d.ts +4 -0
  87. package/lib/telemetry/AriaTelemetry.js +150 -13
  88. package/lib/telemetry/AriaTelemetry.js.map +1 -1
  89. package/lib/telemetry/EventMarker.d.ts +3 -0
  90. package/lib/telemetry/EventMarker.js +13 -0
  91. package/lib/telemetry/EventMarker.js.map +1 -0
  92. package/lib/telemetry/ScenarioMarker.d.ts +9 -7
  93. package/lib/telemetry/ScenarioMarker.js +12 -7
  94. package/lib/telemetry/ScenarioMarker.js.map +1 -1
  95. package/lib/telemetry/ScenarioType.d.ts +2 -0
  96. package/lib/telemetry/ScenarioType.js +2 -0
  97. package/lib/telemetry/ScenarioType.js.map +1 -1
  98. package/lib/telemetry/TelemetryEvent.d.ts +9 -4
  99. package/lib/telemetry/TelemetryEvent.js +8 -10
  100. package/lib/telemetry/TelemetryEvent.js.map +1 -1
  101. package/lib/tsconfig.tsbuildinfo +5087 -1320
  102. package/lib/utils/createOmnichannelMessage.d.ts +11 -0
  103. package/lib/utils/createOmnichannelMessage.js +63 -0
  104. package/lib/utils/createOmnichannelMessage.js.map +1 -0
  105. package/lib/utils/libraries.d.ts +3 -1
  106. package/lib/utils/libraries.js +9 -2
  107. package/lib/utils/libraries.js.map +1 -1
  108. package/lib/utils/locale.d.ts +2 -0
  109. package/lib/utils/locale.js +59 -0
  110. package/lib/utils/locale.js.map +1 -0
  111. package/lib/utils/loggers.d.ts +42 -6
  112. package/lib/utils/loggers.js +197 -2
  113. package/lib/utils/loggers.js.map +1 -1
  114. package/lib/utils/utilities.js +10 -3
  115. package/lib/utils/utilities.js.map +1 -1
  116. package/lib/validators/OmnichannelConfigValidator.d.ts +2 -2
  117. package/lib/validators/OmnichannelConfigValidator.js.map +1 -1
  118. package/lib/validators/SDKConfigValidators.d.ts +3 -3
  119. package/lib/validators/SDKConfigValidators.js.map +1 -1
  120. package/package.json +7 -3
  121. package/lib/core/ChatAdapterConfig.js.map +0 -1
  122. package/lib/core/ChatAdapterProtocols.js.map +0 -1
  123. package/lib/core/IAuthSettings.js.map +0 -1
  124. package/lib/core/IC3Config.js.map +0 -1
  125. package/lib/core/IChatConfig.d.ts +0 -5
  126. package/lib/core/IChatConfig.js.map +0 -1
  127. package/lib/core/IChatSDKConfig.js.map +0 -1
  128. package/lib/core/IChatSDKMessage.js +0 -3
  129. package/lib/core/IChatSDKMessage.js.map +0 -1
  130. package/lib/core/IChatTranscriptBody.js +0 -3
  131. package/lib/core/IChatTranscriptBody.js.map +0 -1
  132. package/lib/core/ILiveChatContext.js +0 -3
  133. package/lib/core/ILiveChatContext.js.map +0 -1
  134. package/lib/core/IOmnichannelConfig.js +0 -3
  135. package/lib/core/IOmnichannelConfig.js.map +0 -1
  136. package/lib/core/IStartChatOptionalParams.js +0 -3
  137. package/lib/core/IStartChatOptionalParams.js.map +0 -1
  138. package/lib/core/MessageTags.js.map +0 -1
  139. package/lib/core/OnNewMessageOptionalParams.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -3,8 +3,37 @@ 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
+
12
+ ### Fix
13
+ - Add `acs_webchat-chat-adapter` middlewares to format `channelData.tags`
14
+ - Skip `session init` call on existing conversation
15
+
16
+ ### Changed
17
+ - README: added examples on usages of the post chat APIs.
18
+ - Uptake [@azure/communication-chat@1.1.1](https://www.npmjs.com/package/@azure/communication-chat/v/1.1.1)
19
+ - 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)
20
+
21
+ ## [1.0.0] - 2021-10-08
22
+ ### Added
23
+ - Add `GetAuthToken` & `GetPreChatSurvey` telemetry events
24
+ - Add `Domain` telemetry base property
25
+ - Add `GetCurrentLiveChatContext`, `GetMessages`, `SendMessages`, `OnNewMessage` & `OnTypingEvent` telemetry events
26
+ - Live Chat V2 Support
27
+ - Add `PlatformDetails` telemetry event
28
+
29
+ ### Changed
30
+ - Uptake [@microsoft/ocsdk@0.3.0](https://www.npmjs.com/package/@microsoft/ocsdk/v/0.3.0)
31
+ - Uptake [@microsoft/omnichannel-ic3core@0.1.2](https://www.npmjs.com/package/@microsoft/omnichannel-ic3core/v/0.1.2)
32
+
6
33
  ### Fixed
7
34
  - `onNewMessage` with `rehydrate` flag set to `true` crashing when `getMessages` returns `undefined`
35
+ - Fix `AriaTelemetry` unable to read property `logEvent` of undefined on `React Native`
36
+ - Fix `Escalation to Voice & Video` library not being imported properly
8
37
 
9
38
  ## [0.3.0] - 2021-09-03
10
39
  ### Added
@@ -30,7 +59,7 @@ All notable changes to this project will be documented in this file.
30
59
  ## [0.2.0] - 2021-04-30
31
60
  ### Added
32
61
  - React Native sample app using Omnichannel Chat SDK with [react-native-gifted-chat](https://github.com/FaridSafi/react-native-gifted-chat)
33
- - Escalation to Voice & View support (Web Only)
62
+ - Escalation to Voice & Video support (Web Only)
34
63
  - React sample app using Omnichannel Chat SDK with [BotFramework-WebChat](https://github.com/microsoft/BotFramework-WebChat)
35
64
  - Expose `sessiontInit`'s `initContext` on `startChat`'s optional paramaters
36
65
  - Add ability to use custom `ic3Config` & `chatAdapterConfig`
package/README.md CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  [![npm version](https://badge.fury.io/js/%40microsoft%2Fomnichannel-chat-sdk.svg)](https://badge.fury.io/js/%40microsoft%2Fomnichannel-chat-sdk)
4
4
  ![Release CI](https://github.com/microsoft/omnichannel-chat-sdk/workflows/Release%20CI/badge.svg)
5
+ ![npm](https://img.shields.io/npm/dm/@microsoft/omnichannel-chat-sdk)
5
6
 
6
7
  Headless Chat SDK to build your own chat widget against Dynamics 365 Omnichannel Services.
7
8
 
@@ -10,9 +11,10 @@ Please make sure you have a chat widget configured before using this package or
10
11
  ## Table of Contents
11
12
  - [Live Chat Widget vs. Chat SDK](#live-chat-widget-vs-chat-sdk)
12
13
  - [Installation](#installation)
14
+ - [Installation on React Native](#installation-on-react-native)
13
15
  - [API Reference](#api-reference)
14
16
  - [API Examples](#api-examples)
15
- - [Sample Apps](samples/)
17
+ - [Sample Apps](https://github.com/microsoft/omnichannel-chat-sdk-samples)
16
18
  - [Common Scenarios](#common-scenarios)
17
19
  - [Feature Comparisons](#feature-comparisons)
18
20
  - [Telemetry](#telemetry)
@@ -33,14 +35,12 @@ Omnichannel offers an live chat widget (LCW) by default. You can use the Chat SD
33
35
  | Bring Your Own Widget | ❌ | ✔ | |
34
36
  | Web Support | ✔ | ✔ |
35
37
  | React Native Support | ❌ | ✔ |
36
- | Escalation to Voice & Video | ✔ | Web Only |
37
- | Co-browse | ✔ | Web Only |
38
- | 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 |
39
41
  | Authenticated Chat | ✔ | ✔ |
40
42
  | Pre-chat Survey | ✔ | ✔ |
41
- | Post-chat Survey | ✔ | |
42
- | Queue Position | ✔ | ✔ |
43
- | Average Wait Time | ✔ | ✔ |
43
+ | Post-chat Survey | ✔ | |
44
44
  | Download Transcript | ✔ | ✔ |
45
45
  | Email Transcript | ✔ | ✔ |
46
46
  | Data Masking | ✔ | ✔ |
@@ -50,6 +50,8 @@ Omnichannel offers an live chat widget (LCW) by default. You can use the Chat SD
50
50
  | Persistent Chat | ✔ | ✔ |
51
51
  | Chat Reconnect | ✔ | ✔ |
52
52
  | Operating Hours | ✔ | ✔ |
53
+ | Queue Position | ✔ | ✔ | No SDK method. Handled as *system message* |
54
+ | Average Wait Time | ✔ | ✔ | No SDK method. Handled as *system message* |
53
55
 
54
56
  **\*** BYOI: Bring Your Own Implementation
55
57
 
@@ -59,6 +61,51 @@ Omnichannel offers an live chat widget (LCW) by default. You can use the Chat SD
59
61
  npm install @microsoft/omnichannel-chat-sdk --save
60
62
  ```
61
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
+
62
109
  ## API Reference
63
110
 
64
111
  | Method | Description | Notes |
@@ -85,7 +132,8 @@ Omnichannel offers an live chat widget (LCW) by default. You can use the Chat SD
85
132
  | OmnichannelChatSDK.uploadFileAttachment() | Send file attachment | |
86
133
  | OmnichannelChatSDK.downloadFileAttachment() | Download file attachment | |
87
134
  | OmnichannelChatSDK.createChatAdapter() | Get IC3Adapter | **Web only** |
88
- | 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 | |
89
137
 
90
138
  ## API examples
91
139
 
@@ -163,6 +211,21 @@ Omnichannel offers an live chat widget (LCW) by default. You can use the Chat SD
163
211
  const preChatSurvey = await getPreChatSurvey(parseToJSON); // Adaptive Cards payload data as string
164
212
  ```
165
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
+
166
229
  ### Start Chat
167
230
  ```ts
168
231
  const customContext = {
@@ -1,32 +1,41 @@
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;
20
26
  OCSDKProvider: unknown;
21
27
  IC3SDKProvider: unknown;
22
28
  OCClient: any;
23
29
  IC3Client: any;
24
- omnichannelConfig: IOmnichannelConfig;
25
- chatSDKConfig: IChatSDKConfig;
30
+ ACSClient: ACSClient | null;
31
+ AMSClient: FramedClient | FramedlessClient | null;
32
+ omnichannelConfig: OmnichannelConfig;
33
+ chatSDKConfig: ChatSDKConfig;
26
34
  isInitialized: boolean;
27
35
  requestId: string;
28
36
  private chatToken;
29
37
  private liveChatConfig;
38
+ private liveChatVersion;
30
39
  private dataMaskingRules;
31
40
  private authSettings;
32
41
  private authenticatedUserToken;
@@ -37,39 +46,42 @@ declare class OmnichannelChatSDK {
37
46
  private scenarioMarker;
38
47
  private ic3ClientLogger;
39
48
  private ocSdkLogger;
49
+ private acsClientLogger;
50
+ private acsAdapterLogger;
40
51
  private isPersistentChat;
41
52
  private isChatReconnect;
42
53
  private reconnectId;
43
54
  private refreshTokenTimer;
44
- constructor(omnichannelConfig: IOmnichannelConfig, chatSDKConfig?: IChatSDKConfig);
55
+ constructor(omnichannelConfig: OmnichannelConfig, chatSDKConfig?: ChatSDKConfig);
45
56
  setDebug(flag: boolean): void;
46
- initialize(): Promise<IChatConfig>;
57
+ initialize(): Promise<ChatConfig>;
47
58
  getChatReconnectContext(optionalParams?: ChatReconnectOptionalParams): Promise<ChatReconnectContext>;
48
- startChat(optionalParams?: IStartChatOptionalParams): Promise<void>;
59
+ startChat(optionalParams?: StartChatOptionalParams): Promise<void>;
49
60
  endChat(): Promise<void>;
50
- getCurrentLiveChatContext(): Promise<ILiveChatContext | {}>;
61
+ getCurrentLiveChatContext(): Promise<LiveChatContext | {}>;
51
62
  getConversationDetails(): Promise<LiveWorkItemDetails>;
52
63
  /**
53
64
  * Gets PreChat Survey.
54
65
  * @param parse Whether to parse PreChatSurvey to JSON or not.
55
66
  */
56
67
  getPreChatSurvey(parse?: boolean): Promise<any>;
57
- getLiveChatConfig(cached?: boolean): Promise<IChatConfig>;
68
+ getLiveChatConfig(cached?: boolean): Promise<ChatConfig>;
58
69
  getChatToken(cached?: boolean): Promise<IChatToken>;
59
70
  getCallingToken(): Promise<string>;
60
- getMessages(): Promise<IMessage[] | undefined>;
71
+ getMessages(): Promise<IMessage[] | OmnichannelMessage[] | undefined>;
61
72
  getDataMaskingRules(): Promise<any>;
62
- sendMessage(message: IChatSDKMessage): Promise<void>;
73
+ sendMessage(message: ChatSDKMessage): Promise<void>;
63
74
  onNewMessage(onNewMessageCallback: CallableFunction, optionalParams?: OnNewMessageOptionalParams | unknown): Promise<void>;
64
75
  sendTypingEvent(): Promise<void>;
65
76
  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>;
77
+ onAgentEndSession(onAgentEndSessionCallback: (message: IRawThread | ParticipantsRemovedEvent) => void): Promise<void>;
78
+ uploadFileAttachment(fileInfo: IFileInfo | File): Promise<IRawMessage | OmnichannelMessage>;
79
+ downloadFileAttachment(fileMetadata: FileMetadata | IFileMetadata): Promise<Blob>;
80
+ emailLiveChatTranscript(body: ChatTranscriptBody): Promise<any>;
70
81
  getLiveChatTranscript(): Promise<any>;
71
- createChatAdapter(protocol?: string): Promise<unknown>;
82
+ createChatAdapter(protocol?: string | null): Promise<unknown>;
72
83
  getVoiceVideoCalling(params?: any): Promise<any>;
84
+ getPostChatSurveyContext(): Promise<any>;
73
85
  private getIC3Client;
74
86
  private getChatConfig;
75
87
  private resolveIC3ClientUrl;