@microsoft/omnichannel-chat-widget 1.7.3-main.b61c751 → 1.7.3-main.c5e352d
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/lib/cjs/common/telemetry/TelemetryConstants.js +1 -0
- package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/BotAuthActivitySubscriber.js +15 -6
- package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/HiddenAdaptiveCardActivitySubscriber.js +1 -1
- package/lib/cjs/components/livechatwidget/common/createAdapter.js +12 -2
- package/lib/cjs/components/livechatwidget/common/startChat.js +3 -3
- package/lib/cjs/components/livechatwidget/interfaces/IBotAuthActivitySubscriberOptionalParams.js +1 -0
- package/lib/cjs/components/webchatcontainerstateful/interfaces/IBotAuthConfig.js +1 -0
- package/lib/esm/common/telemetry/TelemetryConstants.js +1 -0
- package/lib/esm/components/livechatwidget/common/ActivitySubscriber/BotAuthActivitySubscriber.js +15 -6
- package/lib/esm/components/livechatwidget/common/ActivitySubscriber/HiddenAdaptiveCardActivitySubscriber.js +1 -1
- package/lib/esm/components/livechatwidget/common/createAdapter.js +11 -2
- package/lib/esm/components/livechatwidget/common/startChat.js +3 -3
- package/lib/esm/components/livechatwidget/interfaces/IBotAuthActivitySubscriberOptionalParams.js +1 -0
- package/lib/esm/components/webchatcontainerstateful/interfaces/IBotAuthConfig.js +1 -0
- package/lib/types/common/telemetry/TelemetryConstants.d.ts +2 -1
- package/lib/types/components/livechatwidget/common/ActivitySubscriber/BotAuthActivitySubscriber.d.ts +4 -1
- package/lib/types/components/livechatwidget/common/createAdapter.d.ts +2 -1
- package/lib/types/components/livechatwidget/interfaces/IBotAuthActivitySubscriberOptionalParams.d.ts +4 -0
- package/lib/types/components/webchatcontainerstateful/interfaces/IBotAuthConfig.d.ts +4 -0
- package/lib/types/components/webchatcontainerstateful/interfaces/IWebChatContainerStatefulProps.d.ts +2 -0
- package/package.json +2 -2
|
@@ -215,6 +215,7 @@ exports.TelemetryEvent = TelemetryEvent;
|
|
|
215
215
|
TelemetryEvent["PostChatSurveyLoadingPaneLoaded"] = "PostChatSurveyLoadingPaneLoaded";
|
|
216
216
|
TelemetryEvent["PostChatSurveyLoaded"] = "PostChatSurveyLoaded";
|
|
217
217
|
TelemetryEvent["ChatDisconnectThreadEventReceived"] = "ChatDisconnectThreadEventReceived";
|
|
218
|
+
TelemetryEvent["HiddenAdaptiveCardMessageReceived"] = "HiddenAdaptiveCardMessageReceived";
|
|
218
219
|
})(TelemetryEvent || (exports.TelemetryEvent = TelemetryEvent = {}));
|
|
219
220
|
class TelemetryConstants {
|
|
220
221
|
static map(eventTypeOrScenarioType) {
|
package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/BotAuthActivitySubscriber.js
CHANGED
|
@@ -13,8 +13,6 @@ function _toPrimitive(input, hint) { if (typeof input !== "object" || input ===
|
|
|
13
13
|
const supportedSignInCardContentTypes = ["application/vnd.microsoft.card.signin", "application/vnd.microsoft.card.oauth"];
|
|
14
14
|
const botOauthUrlRegex = /[\S]+.botframework.com\/api\/oauth\/signin\?signin=([\S]+)/;
|
|
15
15
|
const delay = t => new Promise(resolve => setTimeout(resolve, t));
|
|
16
|
-
const fetchBotAuthConfigRetries = 3;
|
|
17
|
-
const fetchBotAuthConfigRetryInterval = 1000;
|
|
18
16
|
let response;
|
|
19
17
|
const extractSignInId = signInUrl => {
|
|
20
18
|
const result = botOauthUrlRegex.exec(signInUrl);
|
|
@@ -43,7 +41,7 @@ const extractSasUrl = async attachment => {
|
|
|
43
41
|
}
|
|
44
42
|
return sasUrl;
|
|
45
43
|
};
|
|
46
|
-
const fetchBotAuthConfig = async retries => {
|
|
44
|
+
const fetchBotAuthConfig = async (retries, interval) => {
|
|
47
45
|
_TelemetryHelper.TelemetryHelper.logLoadingEvent(_TelemetryConstants.LogLevel.INFO, {
|
|
48
46
|
Event: _TelemetryConstants.TelemetryEvent.SetBotAuthProviderFetchConfig
|
|
49
47
|
});
|
|
@@ -64,14 +62,25 @@ const fetchBotAuthConfig = async retries => {
|
|
|
64
62
|
// Base Case
|
|
65
63
|
throw new Error();
|
|
66
64
|
}
|
|
67
|
-
await delay(
|
|
68
|
-
return await fetchBotAuthConfig(--retries);
|
|
65
|
+
await delay(interval);
|
|
66
|
+
return await fetchBotAuthConfig(--retries, interval);
|
|
69
67
|
};
|
|
70
68
|
class BotAuthActivitySubscriber {
|
|
71
69
|
constructor() {
|
|
70
|
+
let optionalParams = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
72
71
|
_defineProperty(this, "observer", void 0);
|
|
73
72
|
_defineProperty(this, "signInCardSeen", void 0);
|
|
73
|
+
_defineProperty(this, "fetchBotAuthConfigRetries", void 0);
|
|
74
|
+
_defineProperty(this, "fetchBotAuthConfigRetryInterval", void 0);
|
|
74
75
|
this.signInCardSeen = new Set();
|
|
76
|
+
this.fetchBotAuthConfigRetries = 3;
|
|
77
|
+
this.fetchBotAuthConfigRetryInterval = 1000;
|
|
78
|
+
if (optionalParams.fetchBotAuthConfigRetries) {
|
|
79
|
+
this.fetchBotAuthConfigRetries = optionalParams.fetchBotAuthConfigRetries;
|
|
80
|
+
}
|
|
81
|
+
if (optionalParams.fetchBotAuthConfigRetryInterval) {
|
|
82
|
+
this.fetchBotAuthConfigRetryInterval = optionalParams.fetchBotAuthConfigRetryInterval;
|
|
83
|
+
}
|
|
75
84
|
}
|
|
76
85
|
applicable(activity) {
|
|
77
86
|
var _activity$attachments;
|
|
@@ -110,7 +119,7 @@ class BotAuthActivitySubscriber {
|
|
|
110
119
|
_omnichannelChatComponents.BroadcastService.postMessage(event);
|
|
111
120
|
}
|
|
112
121
|
try {
|
|
113
|
-
const response = await fetchBotAuthConfig(fetchBotAuthConfigRetries);
|
|
122
|
+
const response = await fetchBotAuthConfig(this.fetchBotAuthConfigRetries, this.fetchBotAuthConfigRetryInterval);
|
|
114
123
|
if (response === false) {
|
|
115
124
|
_TelemetryHelper.TelemetryHelper.logLoadingEvent(_TelemetryConstants.LogLevel.INFO, {
|
|
116
125
|
Event: _TelemetryConstants.TelemetryEvent.SetBotAuthProviderHideCard
|
|
@@ -56,7 +56,7 @@ class HiddenAdaptiveCardActivitySubscriber {
|
|
|
56
56
|
const allInvisible = body.every(item => item.isVisible === false);
|
|
57
57
|
if (allInvisible) {
|
|
58
58
|
_TelemetryHelper.TelemetryHelper.logLoadingEvent(_TelemetryConstants.LogLevel.INFO, {
|
|
59
|
-
Event: _TelemetryConstants.TelemetryEvent.
|
|
59
|
+
Event: _TelemetryConstants.TelemetryEvent.HiddenAdaptiveCardMessageReceived,
|
|
60
60
|
Description: "All elements in AdaptiveCard are invisible"
|
|
61
61
|
});
|
|
62
62
|
return true;
|
|
@@ -12,8 +12,13 @@ var _ChatAdapterShim = require("./ChatAdapterShim");
|
|
|
12
12
|
var _PauseActivitySubscriber = require("./ActivitySubscriber/PauseActivitySubscriber");
|
|
13
13
|
var _BotAuthActivitySubscriber = require("./ActivitySubscriber/BotAuthActivitySubscriber");
|
|
14
14
|
var _HiddenAdaptiveCardActivitySubscriber = require("./ActivitySubscriber/HiddenAdaptiveCardActivitySubscriber");
|
|
15
|
+
const defaultBotAuthConfig = {
|
|
16
|
+
fetchBotAuthConfigRetries: 3,
|
|
17
|
+
fetchBotAuthConfigRetryInterval: 1000
|
|
18
|
+
};
|
|
19
|
+
|
|
15
20
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
16
|
-
const createAdapter = async chatSDK => {
|
|
21
|
+
const createAdapter = async (chatSDK, props) => {
|
|
17
22
|
const chatAdapterOptionalParams = {
|
|
18
23
|
IC3Adapter: {
|
|
19
24
|
options: {
|
|
@@ -39,9 +44,14 @@ const createAdapter = async chatSDK => {
|
|
|
39
44
|
let adapter = await chatSDK.createChatAdapter(chatAdapterOptionalParams);
|
|
40
45
|
//so far, there is no need to convert to the shim adapter when using visual tests
|
|
41
46
|
if (chatSDK.isMockModeOn !== true) {
|
|
47
|
+
var _props$webChatContain, _props$webChatContain2, _props$webChatContain3, _props$webChatContain4;
|
|
48
|
+
const botAuthActivitySubscriberOptionalParams = {
|
|
49
|
+
fetchBotAuthConfigRetries: (props === null || props === void 0 ? void 0 : (_props$webChatContain = props.webChatContainerProps) === null || _props$webChatContain === void 0 ? void 0 : (_props$webChatContain2 = _props$webChatContain.botAuthConfig) === null || _props$webChatContain2 === void 0 ? void 0 : _props$webChatContain2.fetchBotAuthConfigRetries) || defaultBotAuthConfig.fetchBotAuthConfigRetries,
|
|
50
|
+
fetchBotAuthConfigRetryInterval: (props === null || props === void 0 ? void 0 : (_props$webChatContain3 = props.webChatContainerProps) === null || _props$webChatContain3 === void 0 ? void 0 : (_props$webChatContain4 = _props$webChatContain3.botAuthConfig) === null || _props$webChatContain4 === void 0 ? void 0 : _props$webChatContain4.fetchBotAuthConfigRetryInterval) || defaultBotAuthConfig.fetchBotAuthConfigRetryInterval
|
|
51
|
+
};
|
|
42
52
|
adapter = new _ChatAdapterShim.ChatAdapterShim(adapter);
|
|
43
53
|
adapter.addSubscriber(new _PauseActivitySubscriber.PauseActivitySubscriber());
|
|
44
|
-
adapter.addSubscriber(new _BotAuthActivitySubscriber.BotAuthActivitySubscriber());
|
|
54
|
+
adapter.addSubscriber(new _BotAuthActivitySubscriber.BotAuthActivitySubscriber(botAuthActivitySubscriberOptionalParams));
|
|
45
55
|
// Remove this code after ICM ID:544623085 is fixed
|
|
46
56
|
adapter.addSubscriber(new _HiddenAdaptiveCardActivitySubscriber.HiddenAdaptiveCardActivitySubscriber());
|
|
47
57
|
return adapter.chatAdapter;
|
|
@@ -209,7 +209,7 @@ const initStartChat = async (chatSDK, dispatch, setAdapter, state, props, params
|
|
|
209
209
|
isStartChatSuccessful = false;
|
|
210
210
|
throw error;
|
|
211
211
|
}
|
|
212
|
-
await createAdapterAndSubscribe(chatSDK, dispatch, setAdapter);
|
|
212
|
+
await createAdapterAndSubscribe(chatSDK, dispatch, setAdapter, props);
|
|
213
213
|
|
|
214
214
|
// Set app state to Active
|
|
215
215
|
if (isStartChatSuccessful) {
|
|
@@ -260,10 +260,10 @@ const initStartChat = async (chatSDK, dispatch, setAdapter, state, props, params
|
|
|
260
260
|
|
|
261
261
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
262
262
|
exports.initStartChat = initStartChat;
|
|
263
|
-
const createAdapterAndSubscribe = async (chatSDK, dispatch, setAdapter) => {
|
|
263
|
+
const createAdapterAndSubscribe = async (chatSDK, dispatch, setAdapter, props) => {
|
|
264
264
|
var _newAdapter$activity$;
|
|
265
265
|
// New adapter creation
|
|
266
|
-
const newAdapter = await (0, _createAdapter.createAdapter)(chatSDK);
|
|
266
|
+
const newAdapter = await (0, _createAdapter.createAdapter)(chatSDK, props);
|
|
267
267
|
setAdapter(newAdapter);
|
|
268
268
|
const chatToken = await chatSDK.getChatToken();
|
|
269
269
|
dispatch({
|
package/lib/cjs/components/livechatwidget/interfaces/IBotAuthActivitySubscriberOptionalParams.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -209,6 +209,7 @@ export let TelemetryEvent;
|
|
|
209
209
|
TelemetryEvent["PostChatSurveyLoadingPaneLoaded"] = "PostChatSurveyLoadingPaneLoaded";
|
|
210
210
|
TelemetryEvent["PostChatSurveyLoaded"] = "PostChatSurveyLoaded";
|
|
211
211
|
TelemetryEvent["ChatDisconnectThreadEventReceived"] = "ChatDisconnectThreadEventReceived";
|
|
212
|
+
TelemetryEvent["HiddenAdaptiveCardMessageReceived"] = "HiddenAdaptiveCardMessageReceived";
|
|
212
213
|
})(TelemetryEvent || (TelemetryEvent = {}));
|
|
213
214
|
export class TelemetryConstants {
|
|
214
215
|
static map(eventTypeOrScenarioType) {
|
package/lib/esm/components/livechatwidget/common/ActivitySubscriber/BotAuthActivitySubscriber.js
CHANGED
|
@@ -9,8 +9,6 @@ import { TelemetryHelper } from "../../../../common/telemetry/TelemetryHelper";
|
|
|
9
9
|
const supportedSignInCardContentTypes = ["application/vnd.microsoft.card.signin", "application/vnd.microsoft.card.oauth"];
|
|
10
10
|
const botOauthUrlRegex = /[\S]+.botframework.com\/api\/oauth\/signin\?signin=([\S]+)/;
|
|
11
11
|
const delay = t => new Promise(resolve => setTimeout(resolve, t));
|
|
12
|
-
const fetchBotAuthConfigRetries = 3;
|
|
13
|
-
const fetchBotAuthConfigRetryInterval = 1000;
|
|
14
12
|
let response;
|
|
15
13
|
const extractSignInId = signInUrl => {
|
|
16
14
|
const result = botOauthUrlRegex.exec(signInUrl);
|
|
@@ -39,7 +37,7 @@ const extractSasUrl = async attachment => {
|
|
|
39
37
|
}
|
|
40
38
|
return sasUrl;
|
|
41
39
|
};
|
|
42
|
-
const fetchBotAuthConfig = async retries => {
|
|
40
|
+
const fetchBotAuthConfig = async (retries, interval) => {
|
|
43
41
|
TelemetryHelper.logLoadingEvent(LogLevel.INFO, {
|
|
44
42
|
Event: TelemetryEvent.SetBotAuthProviderFetchConfig
|
|
45
43
|
});
|
|
@@ -60,14 +58,25 @@ const fetchBotAuthConfig = async retries => {
|
|
|
60
58
|
// Base Case
|
|
61
59
|
throw new Error();
|
|
62
60
|
}
|
|
63
|
-
await delay(
|
|
64
|
-
return await fetchBotAuthConfig(--retries);
|
|
61
|
+
await delay(interval);
|
|
62
|
+
return await fetchBotAuthConfig(--retries, interval);
|
|
65
63
|
};
|
|
66
64
|
export class BotAuthActivitySubscriber {
|
|
67
65
|
constructor() {
|
|
66
|
+
let optionalParams = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
68
67
|
_defineProperty(this, "observer", void 0);
|
|
69
68
|
_defineProperty(this, "signInCardSeen", void 0);
|
|
69
|
+
_defineProperty(this, "fetchBotAuthConfigRetries", void 0);
|
|
70
|
+
_defineProperty(this, "fetchBotAuthConfigRetryInterval", void 0);
|
|
70
71
|
this.signInCardSeen = new Set();
|
|
72
|
+
this.fetchBotAuthConfigRetries = 3;
|
|
73
|
+
this.fetchBotAuthConfigRetryInterval = 1000;
|
|
74
|
+
if (optionalParams.fetchBotAuthConfigRetries) {
|
|
75
|
+
this.fetchBotAuthConfigRetries = optionalParams.fetchBotAuthConfigRetries;
|
|
76
|
+
}
|
|
77
|
+
if (optionalParams.fetchBotAuthConfigRetryInterval) {
|
|
78
|
+
this.fetchBotAuthConfigRetryInterval = optionalParams.fetchBotAuthConfigRetryInterval;
|
|
79
|
+
}
|
|
71
80
|
}
|
|
72
81
|
applicable(activity) {
|
|
73
82
|
var _activity$attachments;
|
|
@@ -106,7 +115,7 @@ export class BotAuthActivitySubscriber {
|
|
|
106
115
|
BroadcastService.postMessage(event);
|
|
107
116
|
}
|
|
108
117
|
try {
|
|
109
|
-
const response = await fetchBotAuthConfig(fetchBotAuthConfigRetries);
|
|
118
|
+
const response = await fetchBotAuthConfig(this.fetchBotAuthConfigRetries, this.fetchBotAuthConfigRetryInterval);
|
|
110
119
|
if (response === false) {
|
|
111
120
|
TelemetryHelper.logLoadingEvent(LogLevel.INFO, {
|
|
112
121
|
Event: TelemetryEvent.SetBotAuthProviderHideCard
|
|
@@ -50,7 +50,7 @@ export class HiddenAdaptiveCardActivitySubscriber {
|
|
|
50
50
|
const allInvisible = body.every(item => item.isVisible === false);
|
|
51
51
|
if (allInvisible) {
|
|
52
52
|
TelemetryHelper.logLoadingEvent(LogLevel.INFO, {
|
|
53
|
-
Event: TelemetryEvent.
|
|
53
|
+
Event: TelemetryEvent.HiddenAdaptiveCardMessageReceived,
|
|
54
54
|
Description: "All elements in AdaptiveCard are invisible"
|
|
55
55
|
});
|
|
56
56
|
return true;
|
|
@@ -6,9 +6,13 @@ import { ChatAdapterShim } from "./ChatAdapterShim";
|
|
|
6
6
|
import { PauseActivitySubscriber } from "./ActivitySubscriber/PauseActivitySubscriber";
|
|
7
7
|
import { BotAuthActivitySubscriber } from "./ActivitySubscriber/BotAuthActivitySubscriber";
|
|
8
8
|
import { HiddenAdaptiveCardActivitySubscriber } from "./ActivitySubscriber/HiddenAdaptiveCardActivitySubscriber";
|
|
9
|
+
const defaultBotAuthConfig = {
|
|
10
|
+
fetchBotAuthConfigRetries: 3,
|
|
11
|
+
fetchBotAuthConfigRetryInterval: 1000
|
|
12
|
+
};
|
|
9
13
|
|
|
10
14
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11
|
-
export const createAdapter = async chatSDK => {
|
|
15
|
+
export const createAdapter = async (chatSDK, props) => {
|
|
12
16
|
const chatAdapterOptionalParams = {
|
|
13
17
|
IC3Adapter: {
|
|
14
18
|
options: {
|
|
@@ -34,9 +38,14 @@ export const createAdapter = async chatSDK => {
|
|
|
34
38
|
let adapter = await chatSDK.createChatAdapter(chatAdapterOptionalParams);
|
|
35
39
|
//so far, there is no need to convert to the shim adapter when using visual tests
|
|
36
40
|
if (chatSDK.isMockModeOn !== true) {
|
|
41
|
+
var _props$webChatContain, _props$webChatContain2, _props$webChatContain3, _props$webChatContain4;
|
|
42
|
+
const botAuthActivitySubscriberOptionalParams = {
|
|
43
|
+
fetchBotAuthConfigRetries: (props === null || props === void 0 ? void 0 : (_props$webChatContain = props.webChatContainerProps) === null || _props$webChatContain === void 0 ? void 0 : (_props$webChatContain2 = _props$webChatContain.botAuthConfig) === null || _props$webChatContain2 === void 0 ? void 0 : _props$webChatContain2.fetchBotAuthConfigRetries) || defaultBotAuthConfig.fetchBotAuthConfigRetries,
|
|
44
|
+
fetchBotAuthConfigRetryInterval: (props === null || props === void 0 ? void 0 : (_props$webChatContain3 = props.webChatContainerProps) === null || _props$webChatContain3 === void 0 ? void 0 : (_props$webChatContain4 = _props$webChatContain3.botAuthConfig) === null || _props$webChatContain4 === void 0 ? void 0 : _props$webChatContain4.fetchBotAuthConfigRetryInterval) || defaultBotAuthConfig.fetchBotAuthConfigRetryInterval
|
|
45
|
+
};
|
|
37
46
|
adapter = new ChatAdapterShim(adapter);
|
|
38
47
|
adapter.addSubscriber(new PauseActivitySubscriber());
|
|
39
|
-
adapter.addSubscriber(new BotAuthActivitySubscriber());
|
|
48
|
+
adapter.addSubscriber(new BotAuthActivitySubscriber(botAuthActivitySubscriberOptionalParams));
|
|
40
49
|
// Remove this code after ICM ID:544623085 is fixed
|
|
41
50
|
adapter.addSubscriber(new HiddenAdaptiveCardActivitySubscriber());
|
|
42
51
|
return adapter.chatAdapter;
|
|
@@ -202,7 +202,7 @@ const initStartChat = async (chatSDK, dispatch, setAdapter, state, props, params
|
|
|
202
202
|
isStartChatSuccessful = false;
|
|
203
203
|
throw error;
|
|
204
204
|
}
|
|
205
|
-
await createAdapterAndSubscribe(chatSDK, dispatch, setAdapter);
|
|
205
|
+
await createAdapterAndSubscribe(chatSDK, dispatch, setAdapter, props);
|
|
206
206
|
|
|
207
207
|
// Set app state to Active
|
|
208
208
|
if (isStartChatSuccessful) {
|
|
@@ -252,10 +252,10 @@ const initStartChat = async (chatSDK, dispatch, setAdapter, state, props, params
|
|
|
252
252
|
};
|
|
253
253
|
|
|
254
254
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
255
|
-
const createAdapterAndSubscribe = async (chatSDK, dispatch, setAdapter) => {
|
|
255
|
+
const createAdapterAndSubscribe = async (chatSDK, dispatch, setAdapter, props) => {
|
|
256
256
|
var _newAdapter$activity$;
|
|
257
257
|
// New adapter creation
|
|
258
|
-
const newAdapter = await createAdapter(chatSDK);
|
|
258
|
+
const newAdapter = await createAdapter(chatSDK, props);
|
|
259
259
|
setAdapter(newAdapter);
|
|
260
260
|
const chatToken = await chatSDK.getChatToken();
|
|
261
261
|
dispatch({
|
package/lib/esm/components/livechatwidget/interfaces/IBotAuthActivitySubscriberOptionalParams.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -201,7 +201,8 @@ export declare enum TelemetryEvent {
|
|
|
201
201
|
PostChatContextCallFailed = "PostChatContextCallFailed",
|
|
202
202
|
PostChatSurveyLoadingPaneLoaded = "PostChatSurveyLoadingPaneLoaded",
|
|
203
203
|
PostChatSurveyLoaded = "PostChatSurveyLoaded",
|
|
204
|
-
ChatDisconnectThreadEventReceived = "ChatDisconnectThreadEventReceived"
|
|
204
|
+
ChatDisconnectThreadEventReceived = "ChatDisconnectThreadEventReceived",
|
|
205
|
+
HiddenAdaptiveCardMessageReceived = "HiddenAdaptiveCardMessageReceived"
|
|
205
206
|
}
|
|
206
207
|
export interface TelemetryInput {
|
|
207
208
|
scenarioType: ScenarioType;
|
package/lib/types/components/livechatwidget/common/ActivitySubscriber/BotAuthActivitySubscriber.d.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { IActivitySubscriber } from "./IActivitySubscriber";
|
|
2
|
+
import { IBotAuthActivitySubscriberOptionalParams } from "../../interfaces/IBotAuthActivitySubscriberOptionalParams";
|
|
2
3
|
export declare class BotAuthActivitySubscriber implements IActivitySubscriber {
|
|
3
4
|
observer: any;
|
|
4
5
|
private signInCardSeen;
|
|
5
|
-
|
|
6
|
+
private fetchBotAuthConfigRetries;
|
|
7
|
+
private fetchBotAuthConfigRetryInterval;
|
|
8
|
+
constructor(optionalParams?: IBotAuthActivitySubscriberOptionalParams);
|
|
6
9
|
applicable(activity: any): boolean;
|
|
7
10
|
apply(activity: any): Promise<any>;
|
|
8
11
|
next(activity: any): Promise<any>;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { ILiveChatWidgetProps } from "../interfaces/ILiveChatWidgetProps";
|
|
2
|
+
export declare const createAdapter: (chatSDK: any, props?: ILiveChatWidgetProps | undefined) => Promise<any>;
|
package/lib/types/components/webchatcontainerstateful/interfaces/IWebChatContainerStatefulProps.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { IStyle } from "@fluentui/react";
|
|
|
5
5
|
import { IWebChatProps } from "./IWebChatProps";
|
|
6
6
|
import { StyleOptions } from "botframework-webchat-api";
|
|
7
7
|
import { IAdaptiveCardStyles } from "./IAdaptiveCardStyles";
|
|
8
|
+
import { IBotAuthConfig } from "./IBotAuthConfig";
|
|
8
9
|
export interface IWebChatContainerStatefulProps {
|
|
9
10
|
containerStyles?: IStyle;
|
|
10
11
|
disableNewLineMarkdownSupport?: boolean;
|
|
@@ -16,6 +17,7 @@ export interface IWebChatContainerStatefulProps {
|
|
|
16
17
|
renderingMiddlewareProps?: IRenderingMiddlewareProps;
|
|
17
18
|
localizedTexts?: ILiveChatWidgetLocalizedTexts;
|
|
18
19
|
botMagicCode?: IBotMagicCodeConfig;
|
|
20
|
+
botAuthConfig?: IBotAuthConfig;
|
|
19
21
|
hyperlinkTextOverride?: boolean;
|
|
20
22
|
adaptiveCardStyles?: IAdaptiveCardStyles;
|
|
21
23
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microsoft/omnichannel-chat-widget",
|
|
3
|
-
"version": "1.7.3-main.
|
|
3
|
+
"version": "1.7.3-main.c5e352d",
|
|
4
4
|
"description": "Microsoft Omnichannel Chat Widget",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"types": "lib/types/index.d.ts",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
},
|
|
76
76
|
"dependencies": {
|
|
77
77
|
"@microsoft/omnichannel-chat-components": "1.1.5",
|
|
78
|
-
"@microsoft/omnichannel-chat-sdk": "^1.9.
|
|
78
|
+
"@microsoft/omnichannel-chat-sdk": "^1.9.9",
|
|
79
79
|
"abort-controller-es5": "^2.0.1",
|
|
80
80
|
"dompurify": "^2.5.4",
|
|
81
81
|
"markdown-it": "^12.3.2",
|