Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@microsoft/omnichannel-chat-sdk

Package Overview
Dependencies
Maintainers
11
Versions
347
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@microsoft/omnichannel-chat-sdk - npm Package Compare versions

Comparing version 0.1.1-main.8cef1e8 to 0.1.1-main.9ed3854

lib/core/ChatAdapterConfig.d.ts

1

CHANGELOG.md

@@ -10,2 +10,3 @@ # Changelog

- Expose `sessiontInit`'s `initContext` on `startChat`'s optional paramaters
- Add ability to use custom `ic3Config` & `chatAdapterConfig`

@@ -12,0 +13,0 @@ ### Changed

@@ -0,1 +1,3 @@

import ChatAdapterConfig from "./ChatAdapterConfig";
import IC3Config from "./IC3Config";
interface IDataMaskingSDKConfig {

@@ -6,6 +8,8 @@ disable: boolean;

interface IChatSDKConfig {
dataMasking: IDataMaskingSDKConfig;
dataMasking?: IDataMaskingSDKConfig;
getAuthToken?: () => Promise<string | null>;
ic3Config?: IC3Config;
chatAdapterConfig?: ChatAdapterConfig;
}
export { IDataMaskingSDKConfig };
export default IChatSDKConfig;

@@ -59,3 +59,5 @@ import IChatConfig from "./core/IChatConfig";

private getChatConfig;
private resolveIC3ClientUrl;
private resolveChatAdapterUrl;
}
export default OmnichannelChatSDK;

@@ -524,3 +524,3 @@ "use strict";

case 0:
ic3AdapterCDNUrl = libraries_1.default.getIC3AdapterCDNUrl();
ic3AdapterCDNUrl = this.resolveChatAdapterUrl(protocol);
return [4 /*yield*/, WebUtils_1.loadScript(ic3AdapterCDNUrl, function () {

@@ -533,3 +533,3 @@ /* istanbul ignore next */

userId: 'teamsvisitor',
sdkURL: libraries_1.default.getIC3ClientCDNUrl()
sdkURL: _this.resolveIC3ClientUrl(),
};

@@ -647,3 +647,3 @@ var adapter = new window.Microsoft.BotFramework.WebChat.IC3Adapter(adapterConfig);

case 0:
ic3ClientCDNUrl = libraries_1.default.getIC3ClientCDNUrl();
ic3ClientCDNUrl = this.resolveIC3ClientUrl();
window.addEventListener("ic3:sdk:load", function () { return __awaiter(_this, void 0, void 0, function () {

@@ -741,2 +741,23 @@ var ic3sdk, IC3SDKProvider, IC3Client;

};
OmnichannelChatSDK.prototype.resolveIC3ClientUrl = function () {
if (this.chatSDKConfig.ic3Config && 'ic3ClientCDNUrl' in this.chatSDKConfig.ic3Config) {
return this.chatSDKConfig.ic3Config.ic3ClientCDNUrl;
}
if (this.chatSDKConfig.ic3Config && 'ic3ClientVersion' in this.chatSDKConfig.ic3Config) {
return libraries_1.default.getIC3ClientCDNUrl(this.chatSDKConfig.ic3Config.ic3ClientVersion);
}
return libraries_1.default.getIC3ClientCDNUrl();
};
OmnichannelChatSDK.prototype.resolveChatAdapterUrl = function (protocol) {
if (protocol !== ChatAdapterProtocols_1.default.IC3) {
throw new Error("ChatAdapter for protocol " + protocol + " currently not supported");
}
if (this.chatSDKConfig.chatAdapterConfig && 'webChatIC3AdapterCDNUrl' in this.chatSDKConfig.chatAdapterConfig) {
return this.chatSDKConfig.chatAdapterConfig.webChatIC3AdapterCDNUrl;
}
if (this.chatSDKConfig.chatAdapterConfig && 'webChatIC3AdapterVersion' in this.chatSDKConfig.chatAdapterConfig) {
return libraries_1.default.getIC3AdapterCDNUrl(this.chatSDKConfig.chatAdapterConfig.webChatIC3AdapterVersion);
}
return libraries_1.default.getIC3AdapterCDNUrl();
};
return OmnichannelChatSDK;

@@ -743,0 +764,0 @@ }());

8

lib/utils/libraries.d.ts

@@ -1,8 +0,8 @@

declare const getIC3ClientCDNUrl: () => string;
declare const getIC3AdapterCDNUrl: () => string;
declare const getIC3ClientCDNUrl: (version?: string) => string;
declare const getIC3AdapterCDNUrl: (version?: string) => string;
declare const _default: {
getIC3ClientCDNUrl: () => string;
getIC3AdapterCDNUrl: () => string;
getIC3ClientCDNUrl: (version?: string) => string;
getIC3AdapterCDNUrl: (version?: string) => string;
};
export default _default;
export { getIC3ClientCDNUrl, getIC3AdapterCDNUrl };

@@ -5,9 +5,11 @@ "use strict";

var settings_1 = require("../config/settings");
var getIC3ClientCDNUrl = function () {
var IC3ClientCDNUrl = "https://comms.omnichannelengagementhub.com/release/" + settings_1.ic3ClientVersion + "/Scripts/SDK/SDK.min.js";
var getIC3ClientCDNUrl = function (version) {
if (version === void 0) { version = settings_1.ic3ClientVersion; }
var IC3ClientCDNUrl = "https://comms.omnichannelengagementhub.com/release/" + version + "/Scripts/SDK/SDK.min.js";
return IC3ClientCDNUrl;
};
exports.getIC3ClientCDNUrl = getIC3ClientCDNUrl;
var getIC3AdapterCDNUrl = function () {
var IC3AdapterCDNUrl = "https://webchatic3.blob.core.windows.net/webchat-ic3adapter/" + settings_1.webChatIC3AdapterVersion + "/botframework-webchat-adapter-ic3.production.min.js";
var getIC3AdapterCDNUrl = function (version) {
if (version === void 0) { version = settings_1.webChatIC3AdapterVersion; }
var IC3AdapterCDNUrl = "https://webchatic3.blob.core.windows.net/webchat-ic3adapter/" + version + "/botframework-webchat-adapter-ic3.production.min.js";
return IC3AdapterCDNUrl;

@@ -14,0 +16,0 @@ };

@@ -17,6 +17,6 @@ "use strict";

if (typeof dataMaskingConfig.disable !== "boolean") {
dataMaskingConfig.disable = defaultChatSDKConfig.dataMasking.disable;
dataMaskingConfig.disable = defaultChatSDKConfig.dataMasking.disable; // eslint-disable-line @typescript-eslint/no-non-null-assertion
}
if (typeof dataMaskingConfig.maskingCharacter !== "string" || dataMaskingConfig.maskingCharacter.length !== 1) {
dataMaskingConfig.maskingCharacter = defaultChatSDKConfig.dataMasking.maskingCharacter;
dataMaskingConfig.maskingCharacter = defaultChatSDKConfig.dataMasking.maskingCharacter; // eslint-disable-line @typescript-eslint/no-non-null-assertion
}

@@ -23,0 +23,0 @@ };

{
"name": "@microsoft/omnichannel-chat-sdk",
"version": "0.1.1-main.8cef1e8",
"version": "0.1.1-main.9ed3854",
"description": "Microsoft Omnichannel Chat SDK",

@@ -5,0 +5,0 @@ "files": [

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

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc