@microsoft/omnichannel-chat-sdk 1.11.8 → 1.11.9-main.37a1dbb
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/README.md +4 -0
- package/lib/OmnichannelChatSDK.d.ts +21 -0
- package/lib/OmnichannelChatSDK.js +254 -77
- package/lib/OmnichannelChatSDK.js.map +1 -1
- package/lib/config/settings.d.ts +1 -1
- package/lib/config/settings.js +1 -1
- package/lib/core/messaging/ACSClient.d.ts +2 -0
- package/lib/core/messaging/ACSClient.js +22 -0
- package/lib/core/messaging/ACSClient.js.map +1 -1
- package/lib/telemetry/TelemetryEvent.d.ts +2 -1
- package/lib/telemetry/TelemetryEvent.js +1 -0
- package/lib/telemetry/TelemetryEvent.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1088,6 +1088,10 @@ const chatSDK = new OmnichannelChatSDK.OmnichannelChatSDK(omnichannelConfig, cha
|
|
|
1088
1088
|
await chatSDK.initialize();
|
|
1089
1089
|
```
|
|
1090
1090
|
|
|
1091
|
+
# Releasing
|
|
1092
|
+
|
|
1093
|
+
See [docs/RELEASING.md](docs/RELEASING.md) for how to publish new versions to npm.
|
|
1094
|
+
|
|
1091
1095
|
# Contributing
|
|
1092
1096
|
|
|
1093
1097
|
This project welcomes contributions and suggestions. Most contributions require you to agree to a
|
|
@@ -85,6 +85,7 @@ declare class OmnichannelChatSDK {
|
|
|
85
85
|
private debugACS;
|
|
86
86
|
private detailedDebugEnabled;
|
|
87
87
|
private regexCompiledForDataMasking;
|
|
88
|
+
private isEndingChat;
|
|
88
89
|
constructor(omnichannelConfig: OmnichannelConfig, chatSDKConfig?: ChatSDKConfig);
|
|
89
90
|
/**
|
|
90
91
|
* Executes an operation with mutual exclusion to prevent race conditions
|
|
@@ -129,8 +130,28 @@ declare class OmnichannelChatSDK {
|
|
|
129
130
|
startChat(optionalParams?: StartChatOptionalParams): Promise<void>;
|
|
130
131
|
private internalStartChat;
|
|
131
132
|
private closeChat;
|
|
133
|
+
/**
|
|
134
|
+
* Ends the chat by closing the session and disconnecting from the conversation.
|
|
135
|
+
*
|
|
136
|
+
* On React Native, automatically waits for conversational survey completion if enabled.
|
|
137
|
+
* On Web, disconnects immediately as the widget handles surveys independently.
|
|
138
|
+
*
|
|
139
|
+
* @param endChatOptionalParams - Optional parameters
|
|
140
|
+
* @param endChatOptionalParams.isSessionEnded - Skip survey wait if session already ended
|
|
141
|
+
* @example
|
|
142
|
+
* await chatSDK.endChat();
|
|
143
|
+
* await chatSDK.endChat({ isSessionEnded: true });
|
|
144
|
+
*/
|
|
132
145
|
endChat(endChatOptionalParams?: EndChatOptionalParams): Promise<void>;
|
|
133
146
|
private internalEndChat;
|
|
147
|
+
/**
|
|
148
|
+
* Waits for a message with specific tags. Used for conversational survey detection.
|
|
149
|
+
* Automatically unregisters the listener after the promise resolves to prevent memory leaks.
|
|
150
|
+
* Includes timeout to prevent indefinite hanging if messages never arrive.
|
|
151
|
+
*/
|
|
152
|
+
private waitForMessageTags;
|
|
153
|
+
private waitForSurveyStart;
|
|
154
|
+
private waitForConversationalSurveyEnd;
|
|
134
155
|
getCurrentLiveChatContext(): Promise<GetCurrentLiveChatContextResponse>;
|
|
135
156
|
getConversationDetails(optionalParams?: GetConversationDetailsOptionalParams): Promise<LiveWorkItemDetails>;
|
|
136
157
|
/**
|