@microsoft/omnichannel-chat-widget 1.7.3-main.112d01b → 1.7.3-main.34ea4da
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/Constants.js +1 -0
- package/lib/cjs/common/telemetry/TelemetryConstants.js +3 -0
- package/lib/cjs/components/footerstateful/FooterStateful.js +14 -3
- package/lib/cjs/components/livechatwidget/LiveChatWidget.js +6 -1
- package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/BotAuthActivitySubscriber.js +15 -6
- package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/HiddenAdaptiveCardActivitySubscriber.js +77 -0
- package/lib/cjs/components/livechatwidget/common/chatDisconnectHelper.js +2 -2
- package/lib/cjs/components/livechatwidget/common/createAdapter.js +15 -2
- package/lib/cjs/components/livechatwidget/common/createInternetConnectionChangeHandler.js +6 -2
- package/lib/cjs/components/livechatwidget/common/createMarkdown.js +2 -2
- package/lib/cjs/components/livechatwidget/common/endChat.js +20 -5
- package/lib/cjs/components/livechatwidget/common/getMockChatSDKIfApplicable.js +26 -0
- package/lib/cjs/components/livechatwidget/common/helpers/markdownHelper.js +23 -0
- package/lib/cjs/components/livechatwidget/common/overridePropsOnMockIfApplicable.js +41 -0
- package/lib/cjs/components/livechatwidget/common/persistentChatHelper.js +2 -1
- package/lib/cjs/components/livechatwidget/common/startChat.js +37 -28
- package/lib/cjs/components/livechatwidget/common/startChatErrorHandler.js +6 -6
- package/lib/cjs/components/livechatwidget/common/updateSessionDataForTelemetry.js +8 -3
- package/lib/cjs/components/livechatwidget/interfaces/IBotAuthActivitySubscriberOptionalParams.js +1 -0
- package/lib/cjs/components/livechatwidget/interfaces/IMockProps.js +7 -0
- package/lib/cjs/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +30 -0
- package/lib/cjs/components/webchatcontainerstateful/common/DemoChatAdapter.js +87 -0
- package/lib/cjs/components/webchatcontainerstateful/common/DemoChatSDK.js +17 -0
- package/lib/cjs/components/webchatcontainerstateful/common/DesignerChatAdapter.js +41 -0
- package/lib/cjs/components/webchatcontainerstateful/common/DesignerChatSDK.js +17 -0
- package/lib/cjs/components/webchatcontainerstateful/common/MockBotCardCommandType.js +14 -0
- package/lib/cjs/components/webchatcontainerstateful/common/MockBotCommand.js +19 -0
- package/lib/cjs/components/webchatcontainerstateful/common/mockchatsdk.js +3 -0
- package/lib/cjs/components/webchatcontainerstateful/common/utils/attachmentActivityUtils.js +71 -0
- package/lib/cjs/components/webchatcontainerstateful/common/utils/chatAdapterUtils.js +90 -0
- package/lib/cjs/components/webchatcontainerstateful/interfaces/IBotAuthConfig.js +1 -0
- package/lib/cjs/plugins/createChatTranscript.js +84 -0
- package/lib/cjs/plugins/newMessageEventHandler.js +4 -2
- package/lib/esm/common/Constants.js +1 -0
- package/lib/esm/common/telemetry/TelemetryConstants.js +3 -0
- package/lib/esm/components/footerstateful/FooterStateful.js +12 -3
- package/lib/esm/components/livechatwidget/LiveChatWidget.js +6 -1
- package/lib/esm/components/livechatwidget/common/ActivitySubscriber/BotAuthActivitySubscriber.js +15 -6
- package/lib/esm/components/livechatwidget/common/ActivitySubscriber/HiddenAdaptiveCardActivitySubscriber.js +70 -0
- package/lib/esm/components/livechatwidget/common/chatDisconnectHelper.js +3 -2
- package/lib/esm/components/livechatwidget/common/createAdapter.js +14 -2
- package/lib/esm/components/livechatwidget/common/createInternetConnectionChangeHandler.js +6 -2
- package/lib/esm/components/livechatwidget/common/createMarkdown.js +2 -2
- package/lib/esm/components/livechatwidget/common/endChat.js +20 -5
- package/lib/esm/components/livechatwidget/common/getMockChatSDKIfApplicable.js +20 -0
- package/lib/esm/components/livechatwidget/common/helpers/markdownHelper.js +15 -0
- package/lib/esm/components/livechatwidget/common/overridePropsOnMockIfApplicable.js +34 -0
- package/lib/esm/components/livechatwidget/common/persistentChatHelper.js +2 -1
- package/lib/esm/components/livechatwidget/common/startChat.js +37 -28
- package/lib/esm/components/livechatwidget/common/startChatErrorHandler.js +7 -7
- package/lib/esm/components/livechatwidget/common/updateSessionDataForTelemetry.js +7 -2
- package/lib/esm/components/livechatwidget/interfaces/IBotAuthActivitySubscriberOptionalParams.js +1 -0
- package/lib/esm/components/livechatwidget/interfaces/IMockProps.js +6 -0
- package/lib/esm/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +31 -1
- package/lib/esm/components/webchatcontainerstateful/common/DemoChatAdapter.js +79 -0
- package/lib/esm/components/webchatcontainerstateful/common/DemoChatSDK.js +10 -0
- package/lib/esm/components/webchatcontainerstateful/common/DesignerChatAdapter.js +33 -0
- package/lib/esm/components/webchatcontainerstateful/common/DesignerChatSDK.js +10 -0
- package/lib/esm/components/webchatcontainerstateful/common/MockBotCardCommandType.js +7 -0
- package/lib/esm/components/webchatcontainerstateful/common/MockBotCommand.js +12 -0
- package/lib/esm/components/webchatcontainerstateful/common/mockchatsdk.js +3 -0
- package/lib/esm/components/webchatcontainerstateful/common/utils/attachmentActivityUtils.js +61 -0
- package/lib/esm/components/webchatcontainerstateful/common/utils/chatAdapterUtils.js +77 -0
- package/lib/esm/components/webchatcontainerstateful/interfaces/IBotAuthConfig.js +1 -0
- package/lib/esm/plugins/createChatTranscript.js +84 -0
- package/lib/esm/plugins/newMessageEventHandler.js +4 -2
- package/lib/types/common/Constants.d.ts +1 -0
- package/lib/types/common/telemetry/TelemetryConstants.d.ts +4 -1
- package/lib/types/components/livechatwidget/common/ActivitySubscriber/BotAuthActivitySubscriber.d.ts +4 -1
- package/lib/types/components/livechatwidget/common/ActivitySubscriber/HiddenAdaptiveCardActivitySubscriber.d.ts +7 -0
- package/lib/types/components/livechatwidget/common/createAdapter.d.ts +2 -1
- package/lib/types/components/livechatwidget/common/getMockChatSDKIfApplicable.d.ts +1 -0
- package/lib/types/components/livechatwidget/common/helpers/markdownHelper.d.ts +2 -0
- package/lib/types/components/livechatwidget/common/overridePropsOnMockIfApplicable.d.ts +3 -0
- package/lib/types/components/livechatwidget/common/updateSessionDataForTelemetry.d.ts +1 -1
- package/lib/types/components/livechatwidget/interfaces/IBotAuthActivitySubscriberOptionalParams.d.ts +4 -0
- package/lib/types/components/livechatwidget/interfaces/ILiveChatWidgetProps.d.ts +2 -0
- package/lib/types/components/livechatwidget/interfaces/IMockProps.d.ts +8 -0
- package/lib/types/components/webchatcontainerstateful/common/DemoChatAdapter.d.ts +10 -0
- package/lib/types/components/webchatcontainerstateful/common/DemoChatSDK.d.ts +6 -0
- package/lib/types/components/webchatcontainerstateful/common/DesignerChatAdapter.d.ts +8 -0
- package/lib/types/components/webchatcontainerstateful/common/DesignerChatSDK.d.ts +6 -0
- package/lib/types/components/webchatcontainerstateful/common/MockBotCardCommandType.d.ts +6 -0
- package/lib/types/components/webchatcontainerstateful/common/MockBotCommand.d.ts +11 -0
- package/lib/types/components/webchatcontainerstateful/common/mockadapter.d.ts +2 -1
- package/lib/types/components/webchatcontainerstateful/common/mockchatsdk.d.ts +6 -0
- package/lib/types/components/webchatcontainerstateful/common/utils/attachmentActivityUtils.d.ts +9 -0
- package/lib/types/components/webchatcontainerstateful/common/utils/chatAdapterUtils.d.ts +9 -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 +3 -3
|
@@ -6,15 +6,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.logWidgetLoadComplete = exports.handleStartChatError = void 0;
|
|
7
7
|
var _omnichannelChatSdk = require("@microsoft/omnichannel-chat-sdk");
|
|
8
8
|
var _TelemetryConstants = require("../../../common/telemetry/TelemetryConstants");
|
|
9
|
-
var
|
|
10
|
-
var _TelemetryManager = require("../../../common/telemetry/TelemetryManager");
|
|
11
|
-
var _ConversationState = require("../../../contexts/common/ConversationState");
|
|
12
|
-
var _LiveChatWidgetActionType = require("../../../contexts/common/LiveChatWidgetActionType");
|
|
9
|
+
var _Constants = require("../../../common/Constants");
|
|
13
10
|
var _endChat = require("./endChat");
|
|
11
|
+
var _ConversationState = require("../../../contexts/common/ConversationState");
|
|
14
12
|
var _DataStoreManager = require("../../../common/contextDataStore/DataStoreManager");
|
|
15
|
-
var
|
|
16
|
-
var _Constants = require("../../../common/Constants");
|
|
13
|
+
var _LiveChatWidgetActionType = require("../../../contexts/common/LiveChatWidgetActionType");
|
|
17
14
|
var _StartChatFailureType = require("../../../contexts/common/StartChatFailureType");
|
|
15
|
+
var _TelemetryHelper = require("../../../common/telemetry/TelemetryHelper");
|
|
16
|
+
var _TelemetryManager = require("../../../common/telemetry/TelemetryManager");
|
|
17
|
+
var _utils = require("../../../common/utils");
|
|
18
18
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
19
19
|
const handleStartChatError = (dispatch, chatSDK, props, ex, isStartChatSuccessful) => {
|
|
20
20
|
var _props$controlProps;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.updateTelemetryData = void 0;
|
|
7
7
|
var _TelemetryConstants = require("../../../common/telemetry/TelemetryConstants");
|
|
8
8
|
var _omnichannelChatComponents = require("@microsoft/omnichannel-chat-components");
|
|
9
9
|
var _LiveChatWidgetActionType = require("../../../contexts/common/LiveChatWidgetActionType");
|
|
@@ -11,6 +11,13 @@ var _TelemetryHelper = require("../../../common/telemetry/TelemetryHelper");
|
|
|
11
11
|
var _TelemetryManager = require("../../../common/telemetry/TelemetryManager");
|
|
12
12
|
var _utils = require("../../../common/utils");
|
|
13
13
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
14
|
+
const updateTelemetryData = async (chatSDK, dispatch) => {
|
|
15
|
+
// load it concurrently, this will reduce the load time
|
|
16
|
+
await Promise.all([updateSessionDataForTelemetry(chatSDK, dispatch), updateConversationDataForTelemetry(chatSDK, dispatch)]);
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
20
|
+
exports.updateTelemetryData = updateTelemetryData;
|
|
14
21
|
const updateSessionDataForTelemetry = async (chatSDK, dispatch) => {
|
|
15
22
|
if (chatSDK) {
|
|
16
23
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -26,12 +33,10 @@ const updateSessionDataForTelemetry = async (chatSDK, dispatch) => {
|
|
|
26
33
|
chatSession
|
|
27
34
|
}
|
|
28
35
|
});
|
|
29
|
-
await updateConversationDataForTelemetry(chatSDK, dispatch);
|
|
30
36
|
}
|
|
31
37
|
};
|
|
32
38
|
|
|
33
39
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
34
|
-
exports.updateSessionDataForTelemetry = updateSessionDataForTelemetry;
|
|
35
40
|
const updateConversationDataForTelemetry = async (chatSDK, dispatch) => {
|
|
36
41
|
if (chatSDK) {
|
|
37
42
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
package/lib/cjs/components/livechatwidget/interfaces/IBotAuthActivitySubscriberOptionalParams.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -354,6 +354,23 @@ const LiveChatWidgetStateful = props => {
|
|
|
354
354
|
}
|
|
355
355
|
}
|
|
356
356
|
});
|
|
357
|
+
_omnichannelChatComponents.BroadcastService.getMessageByEventName(_TelemetryConstants.BroadcastEvent.NetworkReconnected).subscribe(async () => {
|
|
358
|
+
var _window2, _window2$location;
|
|
359
|
+
if ((0, _utils.isThisSessionPopout)((_window2 = window) === null || _window2 === void 0 ? void 0 : (_window2$location = _window2.location) === null || _window2$location === void 0 ? void 0 : _window2$location.href)) {
|
|
360
|
+
return;
|
|
361
|
+
}
|
|
362
|
+
const conversationDetails = await (0, _utils.getConversationDetailsCall)(chatSDK);
|
|
363
|
+
if ((conversationDetails === null || conversationDetails === void 0 ? void 0 : conversationDetails.state) === _Constants.LiveWorkItemState.WrapUp || (conversationDetails === null || conversationDetails === void 0 ? void 0 : conversationDetails.state) === _Constants.LiveWorkItemState.Closed) {
|
|
364
|
+
dispatch({
|
|
365
|
+
type: _LiveChatWidgetActionType.LiveChatWidgetActionType.SET_CHAT_DISCONNECT_EVENT_RECEIVED,
|
|
366
|
+
payload: true
|
|
367
|
+
});
|
|
368
|
+
_TelemetryHelper.TelemetryHelper.logActionEvent(_TelemetryConstants.LogLevel.INFO, {
|
|
369
|
+
Event: _TelemetryConstants.TelemetryEvent.ChatDisconnectThreadEventReceived,
|
|
370
|
+
Description: "Chat disconnected due to timeout, user went offline or blocked the device (including closing laptop)"
|
|
371
|
+
});
|
|
372
|
+
}
|
|
373
|
+
});
|
|
357
374
|
|
|
358
375
|
/**
|
|
359
376
|
* This will allow to sync multiple tabs to handle minimize and maximize state,
|
|
@@ -671,11 +688,24 @@ const LiveChatWidgetStateful = props => {
|
|
|
671
688
|
|
|
672
689
|
// Handle Chat disconnect cases
|
|
673
690
|
(0, _react2.useEffect)(() => {
|
|
691
|
+
var _inMemoryState$appSta5;
|
|
674
692
|
const inMemoryState = (0, _createReducer.executeReducer)(state, {
|
|
675
693
|
type: _LiveChatWidgetActionType.LiveChatWidgetActionType.GET_IN_MEMORY_STATE,
|
|
676
694
|
payload: null
|
|
677
695
|
});
|
|
678
696
|
(0, _chatDisconnectHelper.handleChatDisconnect)(props, inMemoryState, setWebChatStyles);
|
|
697
|
+
const chatDisconnectState = inMemoryState === null || inMemoryState === void 0 ? void 0 : (_inMemoryState$appSta5 = inMemoryState.appStates) === null || _inMemoryState$appSta5 === void 0 ? void 0 : _inMemoryState$appSta5.chatDisconnectEventReceived;
|
|
698
|
+
if (chatDisconnectState && adapter) {
|
|
699
|
+
try {
|
|
700
|
+
adapter.end();
|
|
701
|
+
adapter.close();
|
|
702
|
+
} catch (e) {
|
|
703
|
+
_TelemetryHelper.TelemetryHelper.logWebChatEvent(_TelemetryConstants.LogLevel.ERROR, {
|
|
704
|
+
Event: _TelemetryConstants.TelemetryEvent.EndingAdapterAfterDisconnectionError,
|
|
705
|
+
Description: _Constants.WidgetLoadCustomErrorString.CloseAdapterAfterDisconnectionErrorString
|
|
706
|
+
});
|
|
707
|
+
}
|
|
708
|
+
}
|
|
679
709
|
}, [state.appStates.chatDisconnectEventReceived]);
|
|
680
710
|
|
|
681
711
|
// if props state gets updates we need to update the renderingMiddlewareProps in the state
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.DemoChatAdapter = void 0;
|
|
7
|
+
require("rxjs/add/operator/share");
|
|
8
|
+
require("rxjs/add/observable/of");
|
|
9
|
+
var _Observable = require("rxjs/Observable");
|
|
10
|
+
var _mockadapter = _interopRequireDefault(require("./mockadapter"));
|
|
11
|
+
var _chatAdapterUtils = require("./utils/chatAdapterUtils");
|
|
12
|
+
var _attachmentActivityUtils = require("./utils/attachmentActivityUtils");
|
|
13
|
+
var _MockBotCommand = _interopRequireDefault(require("./MockBotCommand"));
|
|
14
|
+
var _MockBotCardCommandType = _interopRequireDefault(require("./MockBotCardCommandType"));
|
|
15
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
|
+
class DemoChatAdapter extends _mockadapter.default {
|
|
17
|
+
constructor() {
|
|
18
|
+
super();
|
|
19
|
+
setTimeout(() => {
|
|
20
|
+
(0, _chatAdapterUtils.postSystemMessageActivity)(this.activityObserver, "You're currently using a demo.", 0);
|
|
21
|
+
(0, _chatAdapterUtils.postBotMessageActivity)(this.activityObserver, "Type `/help` to learn more", undefined, 0); // send init message from bot
|
|
22
|
+
}, 1000);
|
|
23
|
+
}
|
|
24
|
+
postBotCommandsActivity() {
|
|
25
|
+
let delay = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1000;
|
|
26
|
+
(0, _chatAdapterUtils.postBotAttachmentActivity)(this.activityObserver, [{
|
|
27
|
+
contentType: "application/vnd.microsoft.card.thumbnail",
|
|
28
|
+
content: {
|
|
29
|
+
buttons: [{
|
|
30
|
+
title: "Send system message",
|
|
31
|
+
type: "imBack",
|
|
32
|
+
value: "send system message"
|
|
33
|
+
}, {
|
|
34
|
+
title: "Send typing",
|
|
35
|
+
type: "imBack",
|
|
36
|
+
value: "send typing"
|
|
37
|
+
}, {
|
|
38
|
+
title: "Send bot message",
|
|
39
|
+
type: "imBack",
|
|
40
|
+
value: "send bot message"
|
|
41
|
+
}],
|
|
42
|
+
title: "Commands"
|
|
43
|
+
}
|
|
44
|
+
}], delay);
|
|
45
|
+
}
|
|
46
|
+
postActivity(activity) {
|
|
47
|
+
if (activity) {
|
|
48
|
+
(0, _chatAdapterUtils.postEchoActivity)(this.activityObserver, activity, _chatAdapterUtils.customerUser);
|
|
49
|
+
if (activity.text) {
|
|
50
|
+
switch (true) {
|
|
51
|
+
case activity.text === _MockBotCommand.default.Help:
|
|
52
|
+
this.postBotCommandsActivity();
|
|
53
|
+
break;
|
|
54
|
+
case activity.text === _MockBotCommand.default.SendSystemMessage:
|
|
55
|
+
(0, _chatAdapterUtils.postSystemMessageActivity)(this.activityObserver, "Contoso has joined the chat.");
|
|
56
|
+
break;
|
|
57
|
+
case activity.text === _MockBotCommand.default.SendTyping:
|
|
58
|
+
(0, _chatAdapterUtils.postBotTypingActivity)(this.activityObserver);
|
|
59
|
+
break;
|
|
60
|
+
case activity.text === _MockBotCommand.default.SendAttachment:
|
|
61
|
+
(0, _chatAdapterUtils.postBotAttachmentActivity)(this.activityObserver, [(0, _attachmentActivityUtils.createJpgFileAttachment)()]);
|
|
62
|
+
break;
|
|
63
|
+
case activity.text === _MockBotCommand.default.SendBotMessage:
|
|
64
|
+
(0, _chatAdapterUtils.postBotMessageActivity)(this.activityObserver, "Hi, how can I help you?");
|
|
65
|
+
break;
|
|
66
|
+
case activity.text === `${_MockBotCommand.default.Card} ${_MockBotCardCommandType.default.Signin}`:
|
|
67
|
+
(0, _chatAdapterUtils.postBotAttachmentActivity)(this.activityObserver, [(0, _attachmentActivityUtils.createSigninCardAttachment)()]);
|
|
68
|
+
break;
|
|
69
|
+
case activity.text === `${_MockBotCommand.default.Card} ${_MockBotCardCommandType.default.Hero}`:
|
|
70
|
+
(0, _chatAdapterUtils.postBotAttachmentActivity)(this.activityObserver, [(0, _attachmentActivityUtils.createHeroCardAttachment)()]);
|
|
71
|
+
break;
|
|
72
|
+
case activity.text === `${_MockBotCommand.default.Card} ${_MockBotCardCommandType.default.Thumbnail}`:
|
|
73
|
+
(0, _chatAdapterUtils.postBotAttachmentActivity)(this.activityObserver, [(0, _attachmentActivityUtils.createThumbnailCardAttachment)()]);
|
|
74
|
+
break;
|
|
75
|
+
case activity.text.startsWith(`${_MockBotCommand.default.Bot} `):
|
|
76
|
+
(0, _chatAdapterUtils.postBotMessageActivity)(this.activityObserver, activity.text.substring(5));
|
|
77
|
+
break;
|
|
78
|
+
case activity.text.startsWith(`${_MockBotCommand.default.System} `):
|
|
79
|
+
(0, _chatAdapterUtils.postSystemMessageActivity)(this.activityObserver, activity.text.substring(8));
|
|
80
|
+
break;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
return _Observable.Observable.of(activity.id || "");
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
exports.DemoChatAdapter = DemoChatAdapter;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.DemoChatSDK = void 0;
|
|
7
|
+
var _DemoChatAdapter = require("./DemoChatAdapter");
|
|
8
|
+
var _mockchatsdk = require("./mockchatsdk");
|
|
9
|
+
class DemoChatSDK extends _mockchatsdk.MockChatSDK {
|
|
10
|
+
constructor() {
|
|
11
|
+
super();
|
|
12
|
+
}
|
|
13
|
+
createChatAdapter() {
|
|
14
|
+
return new _DemoChatAdapter.DemoChatAdapter();
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.DemoChatSDK = DemoChatSDK;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.DesignerChatAdapter = void 0;
|
|
7
|
+
var _Observable = require("rxjs/Observable");
|
|
8
|
+
var _mockadapter = _interopRequireDefault(require("./mockadapter"));
|
|
9
|
+
var _chatAdapterUtils = require("./utils/chatAdapterUtils");
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
class DesignerChatAdapter extends _mockadapter.default {
|
|
12
|
+
constructor() {
|
|
13
|
+
super();
|
|
14
|
+
setTimeout(() => {
|
|
15
|
+
(0, _chatAdapterUtils.postBotMessageActivity)(this.activityObserver, "Id venenatis a condimentum vitae?", undefined, 0);
|
|
16
|
+
this.postUserActivity("Diam donec adipiscing tristique risus nec feugiat in fermentum", 0);
|
|
17
|
+
(0, _chatAdapterUtils.postSystemMessageActivity)(this.activityObserver, "We are finding the best agent for your inquiry, please hold ...", 100);
|
|
18
|
+
(0, _chatAdapterUtils.postSystemMessageActivity)(this.activityObserver, "John has joined the chat", 100);
|
|
19
|
+
(0, _chatAdapterUtils.postBotMessageActivity)(this.activityObserver, "Neque viverra justo nec ultrices dui sapien eget mi proin", undefined, 100);
|
|
20
|
+
}, 1000);
|
|
21
|
+
}
|
|
22
|
+
postUserActivity(text) {
|
|
23
|
+
let delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1000;
|
|
24
|
+
setTimeout(() => {
|
|
25
|
+
(0, _chatAdapterUtils.postEchoActivity)(this.activityObserver, {
|
|
26
|
+
text,
|
|
27
|
+
from: {
|
|
28
|
+
..._chatAdapterUtils.customerUser
|
|
29
|
+
},
|
|
30
|
+
type: "message"
|
|
31
|
+
}, _chatAdapterUtils.customerUser, 0);
|
|
32
|
+
}, delay);
|
|
33
|
+
}
|
|
34
|
+
postActivity(activity) {
|
|
35
|
+
if (activity) {
|
|
36
|
+
(0, _chatAdapterUtils.postEchoActivity)(this.activityObserver, activity, _chatAdapterUtils.customerUser);
|
|
37
|
+
}
|
|
38
|
+
return _Observable.Observable.of(activity.id || "");
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.DesignerChatAdapter = DesignerChatAdapter;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.DesignerChatSDK = void 0;
|
|
7
|
+
var _DesignerChatAdapter = require("./DesignerChatAdapter");
|
|
8
|
+
var _mockchatsdk = require("./mockchatsdk");
|
|
9
|
+
class DesignerChatSDK extends _mockchatsdk.MockChatSDK {
|
|
10
|
+
constructor() {
|
|
11
|
+
super();
|
|
12
|
+
}
|
|
13
|
+
createChatAdapter() {
|
|
14
|
+
return new _DesignerChatAdapter.DesignerChatAdapter();
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.DesignerChatSDK = DesignerChatSDK;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var MockBotCardCommandType;
|
|
8
|
+
(function (MockBotCardCommandType) {
|
|
9
|
+
MockBotCardCommandType["Hero"] = "hero";
|
|
10
|
+
MockBotCardCommandType["Signin"] = "signin";
|
|
11
|
+
MockBotCardCommandType["Thumbnail"] = "thumbnail";
|
|
12
|
+
})(MockBotCardCommandType || (MockBotCardCommandType = {}));
|
|
13
|
+
var _default = MockBotCardCommandType;
|
|
14
|
+
exports.default = _default;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var MockBotCommand;
|
|
8
|
+
(function (MockBotCommand) {
|
|
9
|
+
MockBotCommand["Bot"] = "/bot";
|
|
10
|
+
MockBotCommand["Card"] = "/card";
|
|
11
|
+
MockBotCommand["Help"] = "/help";
|
|
12
|
+
MockBotCommand["SendAttachment"] = "send attachment";
|
|
13
|
+
MockBotCommand["SendBotMessage"] = "send bot message";
|
|
14
|
+
MockBotCommand["SendSystemMessage"] = "send system message";
|
|
15
|
+
MockBotCommand["SendTyping"] = "send typing";
|
|
16
|
+
MockBotCommand["System"] = "/system";
|
|
17
|
+
})(MockBotCommand || (MockBotCommand = {}));
|
|
18
|
+
var _default = MockBotCommand;
|
|
19
|
+
exports.default = _default;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.createThumbnailCardAttachment = exports.createSigninCardAttachment = exports.createJpgFileAttachment = exports.createHeroCardAttachment = void 0;
|
|
7
|
+
const createJpgFileAttachment = () => {
|
|
8
|
+
return {
|
|
9
|
+
contentType: "image/jpeg",
|
|
10
|
+
name: "600x400.jpg",
|
|
11
|
+
contentUrl: "https://raw.githubusercontent.com/microsoft/omnichannel-chat-sdk/e7e75d4ede351e1cf2e52f13860d2284848c4af0/playwright/public/images/600x400.jpg"
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
exports.createJpgFileAttachment = createJpgFileAttachment;
|
|
15
|
+
const createHeroCardAttachment = () => {
|
|
16
|
+
return {
|
|
17
|
+
contentType: "application/vnd.microsoft.card.hero",
|
|
18
|
+
content: {
|
|
19
|
+
buttons: [{
|
|
20
|
+
title: "Bellevue",
|
|
21
|
+
type: "imBack",
|
|
22
|
+
value: "Bellevue"
|
|
23
|
+
}, {
|
|
24
|
+
title: "Redmond",
|
|
25
|
+
type: "imBack",
|
|
26
|
+
value: "Redmond"
|
|
27
|
+
}, {
|
|
28
|
+
title: "Seattle",
|
|
29
|
+
type: "imBack",
|
|
30
|
+
value: "Seattle"
|
|
31
|
+
}],
|
|
32
|
+
title: "Choose your location"
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
exports.createHeroCardAttachment = createHeroCardAttachment;
|
|
37
|
+
const createThumbnailCardAttachment = () => {
|
|
38
|
+
return {
|
|
39
|
+
contentType: "application/vnd.microsoft.card.thumbnail",
|
|
40
|
+
content: {
|
|
41
|
+
title: "Microsoft",
|
|
42
|
+
subtitle: "Our mission is to empower every person and every organization on the planet to achieve more.",
|
|
43
|
+
text: "Microsoft creates platforms and tools powered by AI to deliver innovative solutions that meet the evolving needs of our customers. The technology company is committed to making AI available broadly and doing so responsibly, with a mission to empower every person and every organization on the planet to achieve more.",
|
|
44
|
+
images: [{
|
|
45
|
+
alt: "Microsoft logo",
|
|
46
|
+
url: "https://img-prod-cms-rt-microsoft-com.akamaized.net/cms/api/am/imageFileData/RE1Mu3b?ver=5c31" // logo from https://microsoft.com
|
|
47
|
+
}],
|
|
48
|
+
|
|
49
|
+
buttons: [{
|
|
50
|
+
title: "Learn more",
|
|
51
|
+
type: "openUrl",
|
|
52
|
+
value: "https://www.microsoft.com/"
|
|
53
|
+
}]
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
exports.createThumbnailCardAttachment = createThumbnailCardAttachment;
|
|
58
|
+
const createSigninCardAttachment = () => {
|
|
59
|
+
return {
|
|
60
|
+
contentType: "application/vnd.microsoft.card.signin",
|
|
61
|
+
content: {
|
|
62
|
+
text: "Please login",
|
|
63
|
+
buttons: [{
|
|
64
|
+
type: "signin",
|
|
65
|
+
title: "Signin",
|
|
66
|
+
value: "https://login.live.com/"
|
|
67
|
+
}]
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
exports.createSigninCardAttachment = createSigninCardAttachment;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.postSystemMessageActivity = exports.postEchoActivity = exports.postBotTypingActivity = exports.postBotMessageActivity = exports.postBotAttachmentActivity = exports.customerUser = exports.botUser = void 0;
|
|
7
|
+
var _omnichannelChatSdk = require("@microsoft/omnichannel-chat-sdk");
|
|
8
|
+
const customerUser = {
|
|
9
|
+
id: "usedId",
|
|
10
|
+
name: "User",
|
|
11
|
+
role: "user"
|
|
12
|
+
};
|
|
13
|
+
exports.customerUser = customerUser;
|
|
14
|
+
const botUser = {
|
|
15
|
+
id: "botId",
|
|
16
|
+
name: "Bot",
|
|
17
|
+
role: "bot"
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
// WebChat expects an "echo" activity to confirm the message has been sent successfully
|
|
21
|
+
exports.botUser = botUser;
|
|
22
|
+
const postEchoActivity = function (activityObserver, activity, user) {
|
|
23
|
+
let delay = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1000;
|
|
24
|
+
const echoActivity = {
|
|
25
|
+
...activity,
|
|
26
|
+
id: (0, _omnichannelChatSdk.uuidv4)(),
|
|
27
|
+
from: {
|
|
28
|
+
...activity.from,
|
|
29
|
+
...user
|
|
30
|
+
},
|
|
31
|
+
timestamp: new Date().toISOString()
|
|
32
|
+
};
|
|
33
|
+
setTimeout(() => {
|
|
34
|
+
activityObserver === null || activityObserver === void 0 ? void 0 : activityObserver.next(echoActivity); // mock message sent activity
|
|
35
|
+
}, delay);
|
|
36
|
+
};
|
|
37
|
+
exports.postEchoActivity = postEchoActivity;
|
|
38
|
+
const postBotMessageActivity = function (activityObserver, text) {
|
|
39
|
+
let tags = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "";
|
|
40
|
+
let delay = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1000;
|
|
41
|
+
setTimeout(() => {
|
|
42
|
+
activityObserver === null || activityObserver === void 0 ? void 0 : activityObserver.next({
|
|
43
|
+
id: (0, _omnichannelChatSdk.uuidv4)(),
|
|
44
|
+
from: {
|
|
45
|
+
...botUser
|
|
46
|
+
},
|
|
47
|
+
text,
|
|
48
|
+
type: "message",
|
|
49
|
+
channelData: {
|
|
50
|
+
tags
|
|
51
|
+
},
|
|
52
|
+
timestamp: new Date().toISOString()
|
|
53
|
+
});
|
|
54
|
+
}, delay);
|
|
55
|
+
};
|
|
56
|
+
exports.postBotMessageActivity = postBotMessageActivity;
|
|
57
|
+
const postSystemMessageActivity = function (activityObserver, text) {
|
|
58
|
+
let delay = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1000;
|
|
59
|
+
postBotMessageActivity(activityObserver, text, "system", delay);
|
|
60
|
+
};
|
|
61
|
+
exports.postSystemMessageActivity = postSystemMessageActivity;
|
|
62
|
+
const postBotTypingActivity = function (activityObserver) {
|
|
63
|
+
let delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1000;
|
|
64
|
+
setTimeout(() => {
|
|
65
|
+
activityObserver === null || activityObserver === void 0 ? void 0 : activityObserver.next({
|
|
66
|
+
id: (0, _omnichannelChatSdk.uuidv4)(),
|
|
67
|
+
from: {
|
|
68
|
+
...botUser
|
|
69
|
+
},
|
|
70
|
+
type: "typing"
|
|
71
|
+
});
|
|
72
|
+
}, delay);
|
|
73
|
+
};
|
|
74
|
+
exports.postBotTypingActivity = postBotTypingActivity;
|
|
75
|
+
const postBotAttachmentActivity = function (activityObserver) {
|
|
76
|
+
let attachments = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
77
|
+
let delay = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1000;
|
|
78
|
+
setTimeout(() => {
|
|
79
|
+
activityObserver === null || activityObserver === void 0 ? void 0 : activityObserver.next({
|
|
80
|
+
id: (0, _omnichannelChatSdk.uuidv4)(),
|
|
81
|
+
from: {
|
|
82
|
+
...botUser
|
|
83
|
+
},
|
|
84
|
+
attachments,
|
|
85
|
+
type: "message",
|
|
86
|
+
timestamp: new Date().toISOString()
|
|
87
|
+
});
|
|
88
|
+
}, delay);
|
|
89
|
+
};
|
|
90
|
+
exports.postBotAttachmentActivity = postBotAttachmentActivity;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -376,6 +376,90 @@ class TranscriptHTMLBuilder {
|
|
|
376
376
|
window.addEventListener("online", () => {
|
|
377
377
|
document.body.innerHTML = \`${this.networkOnlineMessage} <button onclick="window.location.reload()"> Refresh </button>\`;
|
|
378
378
|
});
|
|
379
|
+
|
|
380
|
+
document.addEventListener("copy", (event) => {
|
|
381
|
+
const clonedSelectedContent = window.getSelection().getRangeAt(0).cloneContents();
|
|
382
|
+
const copiedContent = document.createElement("div");
|
|
383
|
+
copiedContent.appendChild(clonedSelectedContent);
|
|
384
|
+
|
|
385
|
+
event.clipboardData.setData("text/plain", getAllText(copiedContent));
|
|
386
|
+
event.preventDefault();
|
|
387
|
+
});
|
|
388
|
+
|
|
389
|
+
|
|
390
|
+
getAllText = (element) => {
|
|
391
|
+
let plainText = "";
|
|
392
|
+
Array.from(element.childNodes).forEach((node) => {
|
|
393
|
+
// ignore aria-hidden elements and keyboard help text
|
|
394
|
+
const ariaHiddenAttr = node.attributes ? node.attributes.getNamedItem("aria-hidden") : null;
|
|
395
|
+
if ((ariaHiddenAttr && ariaHiddenAttr.value === "true") || node.classList && node.classList.contains("webchat__keyboard-help")) {
|
|
396
|
+
return;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
// get all texts inside activity body, including message, translated message, attachment name, adaptive card content, status footer, etc.
|
|
400
|
+
if (node.classList && node.classList.contains("webchat__basic-transcript__activity-body")) {
|
|
401
|
+
plainText += this.processTranscriptActivityNode(node);
|
|
402
|
+
return;
|
|
403
|
+
}
|
|
404
|
+
if (node.nodeType === Node.TEXT_NODE) {
|
|
405
|
+
plainText += node.textContent + '\\n';
|
|
406
|
+
} else {
|
|
407
|
+
plainText += this.getAllText(node);
|
|
408
|
+
}
|
|
409
|
+
});
|
|
410
|
+
return plainText;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
processTranscriptActivityNode = (node) => {
|
|
414
|
+
const divs = node.getElementsByTagName("div");
|
|
415
|
+
let plainText = "";
|
|
416
|
+
|
|
417
|
+
if (divs && divs.length > 1 && divs[1]) {
|
|
418
|
+
const messageRow = node.querySelector(".webchat__stacked-layout__message-row[aria-roledescription='message']");
|
|
419
|
+
const author = node.querySelector(".message-name");
|
|
420
|
+
const attachmentRow = node.querySelector(".webchat__stacked-layout__attachment-row[aria-roledescription='attachment']");
|
|
421
|
+
|
|
422
|
+
if (messageRow) {
|
|
423
|
+
let message = messageRow.getElementsByClassName("webchat__text-content__markdown");
|
|
424
|
+
|
|
425
|
+
if (message.length === 0) {
|
|
426
|
+
message = messageRow.getElementsByClassName("markdown");
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
if (message.length > 0) {
|
|
430
|
+
plainText += author.textContent + '\\n' + message[0].textContent + '\\n';
|
|
431
|
+
}
|
|
432
|
+
} else if (attachmentRow) {
|
|
433
|
+
const attachment = attachmentRow.getElementsByClassName("webchat__fileContent__fileName");
|
|
434
|
+
const adaptiveCard = this.getAdaptiveCardContent(attachmentRow.querySelector(".ac-container.ac-adaptiveCard"));
|
|
435
|
+
|
|
436
|
+
plainText += attachment && attachment.length > 0 ? author.textContent +'\\n' + attachment[0].textContent +'\\n': author.textContent +'\\n' + adaptiveCard +'\\n';
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
const statusElements = node.getElementsByClassName("webchat__stacked-layout__status");
|
|
440
|
+
if (statusElements.length > 0) {
|
|
441
|
+
const timestampelement = statusElements[0].querySelector(".message-timestamp");
|
|
442
|
+
plainText += timestampelement ? timestampelement.textContent+'\\n\\n' : '\\n';
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
return plainText;
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
getAdaptiveCardContent = (node) => {
|
|
450
|
+
if (!node) {
|
|
451
|
+
return undefined;
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
let plainText = "";
|
|
455
|
+
const rows = node.querySelectorAll(".ac-textBlock p");
|
|
456
|
+
rows.forEach((row) => {
|
|
457
|
+
plainText += row.textContent+ '\\n';
|
|
458
|
+
});
|
|
459
|
+
|
|
460
|
+
return plainText;
|
|
461
|
+
}
|
|
462
|
+
|
|
379
463
|
<\/script>
|
|
380
464
|
<div id="transcript"></div>
|
|
381
465
|
<script>
|
|
@@ -20,7 +20,7 @@ const createOnNewAdapterActivityHandler = (chatId, userId) => {
|
|
|
20
20
|
const raiseMessageEvent = (activity, isHistoryMessage) => {
|
|
21
21
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
22
22
|
const polyfillMessagePayloadForEvent = payload => {
|
|
23
|
-
var _activity$conversatio, _TelemetryManager$Int;
|
|
23
|
+
var _activity$conversatio, _TelemetryManager$Int, _attachments;
|
|
24
24
|
return {
|
|
25
25
|
...payload,
|
|
26
26
|
channelData: activity === null || activity === void 0 ? void 0 : activity.channelData,
|
|
@@ -29,7 +29,9 @@ const createOnNewAdapterActivityHandler = (chatId, userId) => {
|
|
|
29
29
|
id: activity === null || activity === void 0 ? void 0 : activity.id,
|
|
30
30
|
isChatComplete: false,
|
|
31
31
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
32
|
-
text: activity === null || activity === void 0 ? void 0 : activity.text
|
|
32
|
+
text: activity === null || activity === void 0 ? void 0 : activity.text,
|
|
33
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
34
|
+
attachment: (activity === null || activity === void 0 ? void 0 : (_attachments = activity.attachments) === null || _attachments === void 0 ? void 0 : _attachments.length) >= 1 ? activity === null || activity === void 0 ? void 0 : activity.attachments : []
|
|
33
35
|
};
|
|
34
36
|
};
|
|
35
37
|
if ((activity === null || activity === void 0 ? void 0 : activity.type) === _Constants.Constants.message) {
|
|
@@ -276,6 +276,7 @@ _defineProperty(WidgetLoadTelemetryMessage, "PersistedStateRetrievedMessage", "P
|
|
|
276
276
|
export class WidgetLoadCustomErrorString {}
|
|
277
277
|
_defineProperty(WidgetLoadCustomErrorString, "AuthenticationFailedErrorString", "Authentication was not successful");
|
|
278
278
|
_defineProperty(WidgetLoadCustomErrorString, "NetworkErrorString", "Network Error");
|
|
279
|
+
_defineProperty(WidgetLoadCustomErrorString, "CloseAdapterAfterDisconnectionErrorString", "Error trying to end/close chat adapter after the widget is back on-line, for an already disconnected session");
|
|
279
280
|
export class PrepareEndChatDescriptionConstants {}
|
|
280
281
|
_defineProperty(PrepareEndChatDescriptionConstants, "ConversationEndedByCustomerWithoutPostChat", "Conversation ended by customer. Post chat not configured or should not show.");
|
|
281
282
|
_defineProperty(PrepareEndChatDescriptionConstants, "ConversationEndedByCustomerWithInvalidPostChat", "Conversation ended by customer. Post chat context is invalid.");
|
|
@@ -95,6 +95,7 @@ export let TelemetryEvent;
|
|
|
95
95
|
TelemetryEvent["GetConversationDetailsCallStarted"] = "GetConversationDetailsCallStarted";
|
|
96
96
|
TelemetryEvent["GetConversationDetailsCallFailed"] = "GetConversationDetailsCallFailed";
|
|
97
97
|
TelemetryEvent["EndChatSDKCallFailed"] = "EndChatSDKCallFailed";
|
|
98
|
+
TelemetryEvent["DisconnectEndChatSDKCallFailed"] = "DisconnectEndChatSDKCallFailed";
|
|
98
99
|
TelemetryEvent["GetChatReconnectContextSDKCallStarted"] = "GetChatReconnectContextSDKCallStarted";
|
|
99
100
|
TelemetryEvent["GetChatReconnectContextSDKCallFailed"] = "GetChatReconnectContextSDKCallFailed";
|
|
100
101
|
TelemetryEvent["ParseAdaptiveCardFailed"] = "ParseAdaptiveCardFailed";
|
|
@@ -208,6 +209,8 @@ export let TelemetryEvent;
|
|
|
208
209
|
TelemetryEvent["PostChatSurveyLoadingPaneLoaded"] = "PostChatSurveyLoadingPaneLoaded";
|
|
209
210
|
TelemetryEvent["PostChatSurveyLoaded"] = "PostChatSurveyLoaded";
|
|
210
211
|
TelemetryEvent["ChatDisconnectThreadEventReceived"] = "ChatDisconnectThreadEventReceived";
|
|
212
|
+
TelemetryEvent["HiddenAdaptiveCardMessageReceived"] = "HiddenAdaptiveCardMessageReceived";
|
|
213
|
+
TelemetryEvent["EndingAdapterAfterDisconnectionError"] = "EndingAdapterAfterDisconnectionError";
|
|
211
214
|
})(TelemetryEvent || (TelemetryEvent = {}));
|
|
212
215
|
export class TelemetryConstants {
|
|
213
216
|
static map(eventTypeOrScenarioType) {
|