@microsoft/omnichannel-chat-sdk
Advanced tools
Comparing version 0.2.1-main.02dac57 to 0.2.1-main.1279ae6
@@ -27,3 +27,3 @@ import ChatAdapterConfig from "./ChatAdapterConfig"; | ||
} | ||
export { IDataMaskingSDKConfig }; | ||
export { IDataMaskingSDKConfig, PersistentChatConfig }; | ||
export default IChatSDKConfig; |
@@ -35,2 +35,7 @@ "use strict"; | ||
}; | ||
var validatePersistentChatConfig = function (persistentChatConfig) { | ||
if (typeof persistentChatConfig.tokenUpdateTime !== "number" || !persistentChatConfig.tokenUpdateTime) { | ||
persistentChatConfig.tokenUpdateTime = defaultChatSDKConfig.persistentChat.tokenUpdateTime; // eslint-disable-line @typescript-eslint/no-non-null-assertion | ||
} | ||
}; | ||
var validateSDKConfig = function (chatSDKConfig) { | ||
@@ -40,4 +45,7 @@ if (chatSDKConfig.dataMasking) { | ||
} | ||
if (chatSDKConfig.persistentChat) { | ||
validatePersistentChatConfig(chatSDKConfig.persistentChat); | ||
} | ||
}; | ||
exports.default = validateSDKConfig; | ||
//# sourceMappingURL=SDKConfigValidators.js.map |
{ | ||
"name": "@microsoft/omnichannel-chat-sdk", | ||
"version": "0.2.1-main.02dac57", | ||
"version": "0.2.1-main.1279ae6", | ||
"description": "Microsoft Omnichannel Chat SDK", | ||
@@ -5,0 +5,0 @@ "files": [ |
@@ -51,2 +51,3 @@ # Omnichannel Chat SDK | ||
| Chat Reconnect | β | β | | ||
| Operating Hours | β | β | | ||
@@ -471,2 +472,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) | ||
@@ -491,3 +507,3 @@ | ||
// Subscribes to incoming message (OPTION 1) | ||
// Subscribes to incoming message | ||
chatSDK.onNewMessage((message) => { | ||
@@ -498,10 +514,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 | ||
} | ||
}); | ||
... | ||
@@ -508,0 +516,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
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
750237
9161
685