@microsoft/omnichannel-chat-sdk
Advanced tools
Comparing version 0.2.1-main.8a2a55f to 0.2.1-main.9662a36
@@ -15,2 +15,5 @@ # Changelog | ||
- Uptake [botframework-webchat-adapter-ic3@0.1.0-master.2dba07b](https://www.npmjs.com/package/botframework-webchat-adapter-ic3/v/0.1.0-master.2dba07b) | ||
- Uptake [jest@27.1.0](https://www.npmjs.com/package/jest/v/27.1.0) | ||
- Update [@types/jest@27.0.1](https://www.npmjs.com/package/@types/jest/v/27.0.1) | ||
- Uptake [ts-jest@27.0.5](https://www.npmjs.com/package/ts-jest/v/27.0.5) | ||
@@ -17,0 +20,0 @@ ### Fixed |
{ | ||
"name": "@microsoft/omnichannel-chat-sdk", | ||
"version": "0.2.1-main.8a2a55f", | ||
"version": "0.2.1-main.9662a36", | ||
"description": "Microsoft Omnichannel Chat SDK", | ||
@@ -32,9 +32,9 @@ "files": [ | ||
"devDependencies": { | ||
"@types/jest": "^26.0.10", | ||
"@typescript-eslint/eslint-plugin": "^4.9.1", | ||
"@typescript-eslint/parser": "^4.9.1", | ||
"eslint": "^7.15.0", | ||
"jest": "^26.6.3", | ||
"ts-jest": "^26.5.1", | ||
"typescript": "^3.9.5" | ||
"@types/jest": "^27.0.1", | ||
"@typescript-eslint/eslint-plugin": "^4.30.0", | ||
"@typescript-eslint/parser": "^4.30.0", | ||
"eslint": "^7.32.0", | ||
"jest": "^27.1.0", | ||
"ts-jest": "^27.0.5", | ||
"typescript": "^3.9.10" | ||
}, | ||
@@ -41,0 +41,0 @@ "dependencies": { |
@@ -19,2 +19,3 @@ # Omnichannel Chat SDK | ||
- [Telemetry](#telemetry) | ||
- [Troubleshooting Guide](docs/TROUBLESHOOTING_GUIDE.md) | ||
@@ -52,2 +53,3 @@ ## Live Chat Widget vs. Chat SDK | ||
| Chat Reconnect | β | β | | ||
| Operating Hours | β | β | | ||
@@ -472,2 +474,17 @@ **\*** BYOI: Bring Your Own Implementation | ||
### Operating Hours | ||
```ts | ||
const chatConfig = await chatSDK.getLiveChatConfig(); | ||
const {LiveWSAndLiveChatEngJoin: liveWSAndLiveChatEngJoin} = liveChatConfig; | ||
const {OutOfOperatingHours: outOfOperatingHours} = liveWSAndLiveChatEngJoin; | ||
if (outOfOperatingHours === "True") { | ||
// Handles UX on Out of Operating Hours | ||
} else { | ||
await chatSDK.startChat(); | ||
// Renders Custom Chat Widget | ||
} | ||
``` | ||
### Use [BotFramework-WebChat](https://github.com/microsoft/BotFramework-WebChat) | ||
@@ -492,3 +509,3 @@ | ||
// Subscribes to incoming message (OPTION 1) | ||
// Subscribes to incoming message | ||
chatSDK.onNewMessage((message) => { | ||
@@ -499,10 +516,2 @@ console.log(`[NewMessage] ${message.content}`); // IC3 protocol message data | ||
// Subscribes to incoming message (OPTION 2) | ||
(chatAdapter as any).activity$.subscribe((activity: any) => { | ||
if (activity.type === "message") { | ||
console.log("[Message activity]"); | ||
console.log(activity); // DirectLine protocol activity data | ||
} | ||
}); | ||
... | ||
@@ -509,0 +518,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9161
686
748542