@microsoft/omnichannel-chat-widget 0.1.0-main.c461296 → 0.1.0-main.d80ebb6

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.
Files changed (101) hide show
  1. package/README.md +35 -11
  2. package/lib/cjs/common/Constants.js +46 -6
  3. package/lib/cjs/common/telemetry/TelemetryConstants.js +27 -2
  4. package/lib/cjs/common/telemetry/TelemetryHelper.js +13 -0
  5. package/lib/cjs/common/telemetry/TelemetryManager.js +16 -5
  6. package/lib/cjs/common/telemetry/defaultConfigs/defaultAriaConfig.js +1 -1
  7. package/lib/cjs/common/telemetry/defaultConfigs/defaultTelemetryConfiguration.js +4 -1
  8. package/lib/cjs/common/telemetry/loggers/ariaTelemetryLogger.js +33 -13
  9. package/lib/cjs/common/telemetry/loggers/consoleLogger.js +6 -5
  10. package/lib/cjs/common/utils.js +30 -2
  11. package/lib/cjs/components/callingcontainerstateful/CallingContainerStateful.js +14 -0
  12. package/lib/cjs/components/chatbuttonstateful/ChatButtonStateful.js +16 -4
  13. package/lib/cjs/components/confirmationpanestateful/ConfirmationPaneStateful.js +4 -39
  14. package/lib/cjs/components/footerstateful/FooterStateful.js +1 -2
  15. package/lib/cjs/components/footerstateful/downloadtranscriptstateful/DownloadTranscriptStateful.js +11 -2
  16. package/lib/cjs/components/headerstateful/HeaderStateful.js +1 -7
  17. package/lib/cjs/components/livechatwidget/common/defaultProps/dummyDefaultProps.js +12 -15
  18. package/lib/cjs/components/livechatwidget/common/endChat.js +63 -12
  19. package/lib/cjs/components/livechatwidget/common/initCallingSdk.js +1 -1
  20. package/lib/cjs/components/livechatwidget/common/initWebChatComposer.js +15 -3
  21. package/lib/cjs/components/livechatwidget/common/reconnectChatHelper.js +105 -20
  22. package/lib/cjs/components/livechatwidget/common/registerTelemetryLoggers.js +6 -17
  23. package/lib/cjs/components/livechatwidget/common/startChat.js +87 -39
  24. package/lib/cjs/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +113 -21
  25. package/lib/cjs/components/postchatloadingpanestateful/PostChatLoadingPaneStateful.js +8 -0
  26. package/lib/cjs/components/prechatsurveypanestateful/PreChatSurveyPaneStateful.js +4 -5
  27. package/lib/cjs/components/proactivechatpanestateful/ProactiveChatPaneStateful.js +16 -0
  28. package/lib/cjs/components/webchatcontainerstateful/WebChatContainerStateful.js +80 -0
  29. package/lib/cjs/components/webchatcontainerstateful/interfaces/IBotMagicCodeConfig.js +1 -0
  30. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/BotMagicCodeStore.js +14 -0
  31. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityMiddleware.js +16 -2
  32. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/cardActionMiddleware.js +52 -0
  33. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/cardActionMiddleware.spec.js +98 -0
  34. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/mesageTimestampMiddleware.js +116 -0
  35. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/webchattelemetry/WebChatLogger.js +45 -0
  36. package/lib/cjs/contexts/common/LiveChatWidgetActionType.js +8 -7
  37. package/lib/cjs/contexts/common/LiveChatWidgetContextInitialState.js +2 -1
  38. package/lib/cjs/contexts/createReducer.js +8 -10
  39. package/lib/cjs/plugins/newMessageEventHandler.js +10 -13
  40. package/lib/esm/common/Constants.js +42 -5
  41. package/lib/esm/common/telemetry/TelemetryConstants.js +27 -2
  42. package/lib/esm/common/telemetry/TelemetryHelper.js +13 -1
  43. package/lib/esm/common/telemetry/TelemetryManager.js +14 -5
  44. package/lib/esm/common/telemetry/defaultConfigs/defaultAriaConfig.js +1 -1
  45. package/lib/esm/common/telemetry/defaultConfigs/defaultTelemetryConfiguration.js +4 -1
  46. package/lib/esm/common/telemetry/loggers/ariaTelemetryLogger.js +36 -14
  47. package/lib/esm/common/telemetry/loggers/consoleLogger.js +6 -5
  48. package/lib/esm/common/utils.js +19 -1
  49. package/lib/esm/components/callingcontainerstateful/CallingContainerStateful.js +14 -0
  50. package/lib/esm/components/chatbuttonstateful/ChatButtonStateful.js +18 -6
  51. package/lib/esm/components/confirmationpanestateful/ConfirmationPaneStateful.js +7 -37
  52. package/lib/esm/components/footerstateful/FooterStateful.js +1 -2
  53. package/lib/esm/components/footerstateful/downloadtranscriptstateful/DownloadTranscriptStateful.js +9 -3
  54. package/lib/esm/components/headerstateful/HeaderStateful.js +1 -7
  55. package/lib/esm/components/livechatwidget/common/defaultProps/dummyDefaultProps.js +12 -16
  56. package/lib/esm/components/livechatwidget/common/endChat.js +58 -13
  57. package/lib/esm/components/livechatwidget/common/initCallingSdk.js +1 -1
  58. package/lib/esm/components/livechatwidget/common/initWebChatComposer.js +13 -4
  59. package/lib/esm/components/livechatwidget/common/reconnectChatHelper.js +94 -20
  60. package/lib/esm/components/livechatwidget/common/registerTelemetryLoggers.js +5 -14
  61. package/lib/esm/components/livechatwidget/common/startChat.js +90 -44
  62. package/lib/esm/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +106 -24
  63. package/lib/esm/components/postchatloadingpanestateful/PostChatLoadingPaneStateful.js +6 -0
  64. package/lib/esm/components/prechatsurveypanestateful/PreChatSurveyPaneStateful.js +6 -7
  65. package/lib/esm/components/proactivechatpanestateful/ProactiveChatPaneStateful.js +16 -0
  66. package/lib/esm/components/webchatcontainerstateful/WebChatContainerStateful.js +72 -0
  67. package/lib/esm/components/webchatcontainerstateful/interfaces/IBotMagicCodeConfig.js +1 -0
  68. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/BotMagicCodeStore.js +5 -0
  69. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityMiddleware.js +16 -2
  70. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/cardActionMiddleware.js +41 -0
  71. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/cardActionMiddleware.spec.js +94 -0
  72. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/mesageTimestampMiddleware.js +106 -0
  73. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/webchattelemetry/WebChatLogger.js +32 -0
  74. package/lib/esm/contexts/common/LiveChatWidgetActionType.js +8 -7
  75. package/lib/esm/contexts/common/LiveChatWidgetContextInitialState.js +2 -1
  76. package/lib/esm/contexts/createReducer.js +8 -9
  77. package/lib/esm/plugins/newMessageEventHandler.js +10 -12
  78. package/lib/types/common/Constants.d.ts +23 -2
  79. package/lib/types/common/interfaces/IContextDataStore.d.ts +1 -1
  80. package/lib/types/common/telemetry/TelemetryConstants.d.ts +22 -4
  81. package/lib/types/common/telemetry/TelemetryHelper.d.ts +2 -0
  82. package/lib/types/common/telemetry/definitions/Payload.d.ts +12 -9
  83. package/lib/types/common/telemetry/interfaces/ITelemetryConfig.d.ts +3 -3
  84. package/lib/types/common/utils.d.ts +3 -0
  85. package/lib/types/components/confirmationpanestateful/interfaces/IConfirmationPaneStatefulParams.d.ts +4 -4
  86. package/lib/types/components/footerstateful/audionotificationstateful/interfaces/IAudioNotificationStatefulParams.d.ts +0 -1
  87. package/lib/types/components/livechatwidget/common/endChat.d.ts +4 -1
  88. package/lib/types/components/livechatwidget/common/reconnectChatHelper.d.ts +5 -2
  89. package/lib/types/components/livechatwidget/interfaces/ILiveChatWidgetComponentOverrides.d.ts +1 -0
  90. package/lib/types/components/livechatwidget/interfaces/ILiveChatWidgetProps.d.ts +1 -1
  91. package/lib/types/components/reconnectchatpanestateful/interfaces/IReconnectChatPaneStatefulProps.d.ts +1 -0
  92. package/lib/types/components/webchatcontainerstateful/interfaces/IBotMagicCodeConfig.d.ts +4 -0
  93. package/lib/types/components/webchatcontainerstateful/interfaces/IWebChatContainerStatefulProps.d.ts +2 -0
  94. package/lib/types/components/webchatcontainerstateful/webchatcontroller/BotMagicCodeStore.d.ts +3 -0
  95. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/cardActionMiddleware.d.ts +2 -0
  96. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/cardActionMiddleware.spec.d.ts +1 -0
  97. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/mesageTimestampMiddleware.d.ts +5 -0
  98. package/lib/types/components/webchatcontainerstateful/webchatcontroller/webchattelemetry/WebChatLogger.d.ts +1 -0
  99. package/lib/types/contexts/common/ILiveChatWidgetContext.d.ts +1 -0
  100. package/lib/types/contexts/common/LiveChatWidgetActionType.d.ts +9 -8
  101. package/package.json +6 -7
@@ -0,0 +1,106 @@
1
+ import { WebChatActionType } from "../../enums/WebChatActionType";
2
+ import { Constants } from "../../../../../common/Constants"; // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unused-vars
3
+
4
+ const createMessageTimeStampMiddleware = _ref => {
5
+ let {
6
+ dispatch
7
+ } = _ref;
8
+ return next => action => {
9
+ if (isApplicable(action)) {
10
+ return next(evaluateTagsAndOverrideTimeStamp(action));
11
+ }
12
+
13
+ return next(action);
14
+ };
15
+ };
16
+
17
+ const isApplicable = action => {
18
+ return action.type === WebChatActionType.DIRECT_LINE_INCOMING_ACTIVITY && isPVAConversation(action) && isPayloadValid(action) && isValidChannel(action);
19
+ };
20
+
21
+ const isPayloadValid = action => {
22
+ var _action$payload;
23
+
24
+ return action === null || action === void 0 ? void 0 : (_action$payload = action.payload) === null || _action$payload === void 0 ? void 0 : _action$payload.activity;
25
+ };
26
+
27
+ const isValidChannel = action => {
28
+ var _action$payload2, _action$payload2$acti;
29
+
30
+ return (action === null || action === void 0 ? void 0 : (_action$payload2 = action.payload) === null || _action$payload2 === void 0 ? void 0 : (_action$payload2$acti = _action$payload2.activity) === null || _action$payload2$acti === void 0 ? void 0 : _action$payload2$acti.channelId) === Constants.acsChannel;
31
+ };
32
+
33
+ const isPVAConversation = action => {
34
+ return !isTagIncluded(action, Constants.systemMessageTag) && !isTagIncluded(action, Constants.publicMessageTag) && !isRoleUserOn(action);
35
+ };
36
+
37
+ const isTagIncluded = (action, tag) => {
38
+ return isDataTagsPresent(action) && action.payload.activity.channelData.tags.includes(tag);
39
+ };
40
+
41
+ const isRoleUserOn = action => {
42
+ var _action$payload3, _action$payload3$acti, _action$payload3$acti2;
43
+
44
+ return (action === null || action === void 0 ? void 0 : (_action$payload3 = action.payload) === null || _action$payload3 === void 0 ? void 0 : (_action$payload3$acti = _action$payload3.activity) === null || _action$payload3$acti === void 0 ? void 0 : (_action$payload3$acti2 = _action$payload3$acti.from) === null || _action$payload3$acti2 === void 0 ? void 0 : _action$payload3$acti2.role) === Constants.userMessageTag;
45
+ };
46
+
47
+ const overrideTimeStamp = (timestampOriginal, timeStampNew) => {
48
+ return isTimestampValid(timeStampNew) ? timeStampNew : timestampOriginal;
49
+ };
50
+
51
+ const isTimestampValid = timeStamp => {
52
+ const regex = /(\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])(T)(\d{2})(:{1})(\d{2})(:{1})(\d{2})(.\d+)([Z]{1}))/;
53
+ return regex.test(timeStamp);
54
+ };
55
+
56
+ const isDataTagsPresent = action => {
57
+ var _action$payload4, _action$payload4$acti, _action$payload4$acti2;
58
+
59
+ return (action === null || action === void 0 ? void 0 : (_action$payload4 = action.payload) === null || _action$payload4 === void 0 ? void 0 : (_action$payload4$acti = _action$payload4.activity) === null || _action$payload4$acti === void 0 ? void 0 : (_action$payload4$acti2 = _action$payload4$acti.channelData) === null || _action$payload4$acti2 === void 0 ? void 0 : _action$payload4$acti2.tags) && action.payload.activity.channelData.tags.length > 0;
60
+ };
61
+
62
+ const evaluateTagsAndOverrideTimeStamp = action => {
63
+ const tagValue = tagLookup(action, Constants.prefixTimestampTag);
64
+
65
+ if (tagValue) {
66
+ const newTimestamp = extractTimeStamp(tagValue);
67
+ action.payload.activity.timestamp = overrideTimeStamp(action.payload.activity.timestamp, newTimestamp);
68
+ }
69
+
70
+ return action;
71
+ };
72
+
73
+ const extractTimeStamp = timeStamp => {
74
+ if (timeStamp && timeStamp.length > 0) {
75
+ const ts = timeStamp.split(Constants.prefixTimestampTag);
76
+
77
+ if (ts && ts.length > 1) {
78
+ return ts[1];
79
+ }
80
+ }
81
+
82
+ return timeStamp;
83
+ };
84
+
85
+ const tagLookup = (action, tag) => {
86
+ if (!isDataTagsPresent(action)) {
87
+ return null;
88
+ }
89
+
90
+ const tags = action.payload.activity.channelData.tags;
91
+ let value;
92
+
93
+ if (tags && tags.length > 0) {
94
+ for (let i = 0; i < tags.length; i++) {
95
+ value = tags[i];
96
+
97
+ if (value && value.indexOf(tag) > -1) {
98
+ return value;
99
+ }
100
+ }
101
+ }
102
+
103
+ return null;
104
+ };
105
+
106
+ export default createMessageTimeStampMiddleware;
@@ -0,0 +1,32 @@
1
+ import { LogLevel } from "../../../../common/telemetry/TelemetryConstants";
2
+ import { TelemetryHelper } from "../../../../common/telemetry/TelemetryHelper";
3
+ export function createWebChatTelemetry() {
4
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
5
+ const handleTelemetry = event => {
6
+ const {
7
+ level
8
+ } = event;
9
+ const loglevel = level ? level.toUpperCase() : "";
10
+
11
+ switch (loglevel) {
12
+ case LogLevel.DEBUG:
13
+ TelemetryHelper.logWebChatEvent(LogLevel.DEBUG, event);
14
+ break;
15
+
16
+ case LogLevel.WARN:
17
+ TelemetryHelper.logWebChatEvent(LogLevel.WARN, event);
18
+ break;
19
+
20
+ case LogLevel.ERROR:
21
+ TelemetryHelper.logWebChatEvent(LogLevel.ERROR, event);
22
+ break;
23
+
24
+ case LogLevel.INFO:
25
+ default:
26
+ TelemetryHelper.logWebChatEvent(LogLevel.INFO, event);
27
+ break;
28
+ }
29
+ };
30
+
31
+ return handleTelemetry;
32
+ }
@@ -10,13 +10,13 @@ export let LiveChatWidgetActionType;
10
10
  LiveChatWidgetActionType[LiveChatWidgetActionType["SET_PREVIOUS_FOCUSED_ELEMENT"] = 6] = "SET_PREVIOUS_FOCUSED_ELEMENT";
11
11
  LiveChatWidgetActionType[LiveChatWidgetActionType["SET_OUTSIDE_OPERATING_HOURS"] = 7] = "SET_OUTSIDE_OPERATING_HOURS";
12
12
  LiveChatWidgetActionType[LiveChatWidgetActionType["SET_PRE_CHAT_SURVEY_RESPONSE"] = 8] = "SET_PRE_CHAT_SURVEY_RESPONSE";
13
- LiveChatWidgetActionType[LiveChatWidgetActionType["SET_SHOW_CONFIRMATION"] = 9] = "SET_SHOW_CONFIRMATION";
14
- LiveChatWidgetActionType[LiveChatWidgetActionType["SET_SHOW_EMAIL_TRANSCRIPT_PANE"] = 10] = "SET_SHOW_EMAIL_TRANSCRIPT_PANE";
15
- LiveChatWidgetActionType[LiveChatWidgetActionType["SET_PRECHAT_RESPONSE_EMAIL"] = 11] = "SET_PRECHAT_RESPONSE_EMAIL";
16
- LiveChatWidgetActionType[LiveChatWidgetActionType["SET_AUDIO_NOTIFICATION"] = 12] = "SET_AUDIO_NOTIFICATION";
17
- LiveChatWidgetActionType[LiveChatWidgetActionType["SET_E2VV_ENABLED"] = 13] = "SET_E2VV_ENABLED";
18
- LiveChatWidgetActionType[LiveChatWidgetActionType["SET_POST_CHAT_CONTEXT"] = 14] = "SET_POST_CHAT_CONTEXT";
19
- LiveChatWidgetActionType[LiveChatWidgetActionType["SET_SHOULD_SHOW_POST_CHAT"] = 15] = "SET_SHOULD_SHOW_POST_CHAT";
13
+ LiveChatWidgetActionType[LiveChatWidgetActionType["SET_CUSTOM_CONTEXT"] = 9] = "SET_CUSTOM_CONTEXT";
14
+ LiveChatWidgetActionType[LiveChatWidgetActionType["SET_SHOW_CONFIRMATION"] = 10] = "SET_SHOW_CONFIRMATION";
15
+ LiveChatWidgetActionType[LiveChatWidgetActionType["SET_SHOW_EMAIL_TRANSCRIPT_PANE"] = 11] = "SET_SHOW_EMAIL_TRANSCRIPT_PANE";
16
+ LiveChatWidgetActionType[LiveChatWidgetActionType["SET_PRECHAT_RESPONSE_EMAIL"] = 12] = "SET_PRECHAT_RESPONSE_EMAIL";
17
+ LiveChatWidgetActionType[LiveChatWidgetActionType["SET_AUDIO_NOTIFICATION"] = 13] = "SET_AUDIO_NOTIFICATION";
18
+ LiveChatWidgetActionType[LiveChatWidgetActionType["SET_E2VV_ENABLED"] = 14] = "SET_E2VV_ENABLED";
19
+ LiveChatWidgetActionType[LiveChatWidgetActionType["SET_POST_CHAT_CONTEXT"] = 15] = "SET_POST_CHAT_CONTEXT";
20
20
  LiveChatWidgetActionType[LiveChatWidgetActionType["SHOW_CALLING_CONTAINER"] = 16] = "SHOW_CALLING_CONTAINER";
21
21
  LiveChatWidgetActionType[LiveChatWidgetActionType["SET_INCOMING_CALL"] = 17] = "SET_INCOMING_CALL";
22
22
  LiveChatWidgetActionType[LiveChatWidgetActionType["DISABLE_VIDEO_CALL"] = 18] = "DISABLE_VIDEO_CALL";
@@ -32,4 +32,5 @@ export let LiveChatWidgetActionType;
32
32
  LiveChatWidgetActionType[LiveChatWidgetActionType["SET_CONVERSATION_ENDED_BY_AGENT"] = 28] = "SET_CONVERSATION_ENDED_BY_AGENT";
33
33
  LiveChatWidgetActionType[LiveChatWidgetActionType["SET_WIDGET_STATE"] = 29] = "SET_WIDGET_STATE";
34
34
  LiveChatWidgetActionType[LiveChatWidgetActionType["SET_LIVE_CHAT_CONTEXT"] = 30] = "SET_LIVE_CHAT_CONTEXT";
35
+ LiveChatWidgetActionType[LiveChatWidgetActionType["SET_BOT_OAUTH_SIGNIN_ID"] = 31] = "SET_BOT_OAUTH_SIGNIN_ID";
35
36
  })(LiveChatWidgetActionType || (LiveChatWidgetActionType = {}));
@@ -18,7 +18,8 @@ export const getLiveChatWidgetContextInitialState = props => {
18
18
  postChatContext: undefined,
19
19
  telemetryInternalData: {},
20
20
  globalDir: "ltr",
21
- liveChatContext: undefined
21
+ liveChatContext: undefined,
22
+ customContext: undefined
22
23
  },
23
24
  appStates: {
24
25
  conversationState: ConversationState.Closed,
@@ -1,6 +1,5 @@
1
1
  /* eslint-disable indent */
2
2
  import { LiveChatWidgetActionType } from "./common/LiveChatWidgetActionType";
3
- import { TelemetryManager } from "../common/telemetry/TelemetryManager";
4
3
  export const createReducer = () => {
5
4
  const reducer = (state, action) => {
6
5
  var _action$payload, _action$payload2, _action$payload3;
@@ -62,6 +61,14 @@ export const createReducer = () => {
62
61
  }
63
62
  };
64
63
 
64
+ case LiveChatWidgetActionType.SET_CUSTOM_CONTEXT:
65
+ return { ...state,
66
+ domainStates: { ...state.domainStates,
67
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
68
+ customContext: action.payload
69
+ }
70
+ };
71
+
65
72
  case LiveChatWidgetActionType.SET_PREVIOUS_FOCUSED_ELEMENT:
66
73
  return { ...state,
67
74
  appStates: { ...state.appStates,
@@ -84,13 +91,6 @@ export const createReducer = () => {
84
91
  }
85
92
  };
86
93
 
87
- case LiveChatWidgetActionType.SET_SHOULD_SHOW_POST_CHAT:
88
- return { ...state,
89
- appStates: { ...state.appStates,
90
- shouldShowPostChat: action.payload
91
- }
92
- };
93
-
94
94
  case LiveChatWidgetActionType.SHOW_CALLING_CONTAINER:
95
95
  return { ...state,
96
96
  uiStates: { ...state.uiStates,
@@ -188,7 +188,6 @@ export const createReducer = () => {
188
188
  };
189
189
 
190
190
  case LiveChatWidgetActionType.SET_TELEMETRY_DATA:
191
- TelemetryManager.InternalTelemetryData = action.payload;
192
191
  return { ...state,
193
192
  domainStates: { ...state.domainStates,
194
193
  telemetryInternalData: action.payload
@@ -2,7 +2,6 @@ import { BroadcastEvent, LogLevel, TelemetryEvent } from "../common/telemetry/Te
2
2
  import { BroadcastService } from "@microsoft/omnichannel-chat-components";
3
3
  import { Constants } from "../common/Constants";
4
4
  import { TelemetryHelper } from "../common/telemetry/TelemetryHelper";
5
- import { TelemetryManager } from "../common/telemetry/TelemetryManager";
6
5
  export const createOnNewAdapterActivityHandler = (chatId, userId) => {
7
6
  const onNewAdapterActivityHandler = activity => {
8
7
  var _activity$channelData, _activity$channelData2, _activity$channelData3;
@@ -17,18 +16,16 @@ export const createOnNewAdapterActivityHandler = (chatId, userId) => {
17
16
 
18
17
  const raiseMessageEvent = activity => {
19
18
  if ((activity === null || activity === void 0 ? void 0 : activity.type) === Constants.message) {
20
- var _TelemetryManager$Int, _activity$from;
19
+ var _text, _text2, _activity$channelData4, _activity$from;
21
20
 
22
21
  const payload = {
22
+ // To identify hidden contents vs empty content
23
23
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
24
- text: activity === null || activity === void 0 ? void 0 : activity.text,
25
- id: activity === null || activity === void 0 ? void 0 : activity.id,
24
+ text: (activity === null || activity === void 0 ? void 0 : (_text = activity.text) === null || _text === void 0 ? void 0 : _text.length) >= 1 ? `*contents hidden (${activity === null || activity === void 0 ? void 0 : (_text2 = activity.text) === null || _text2 === void 0 ? void 0 : _text2.length} chars)*` : "",
26
25
  type: activity === null || activity === void 0 ? void 0 : activity.type,
27
26
  timestamp: activity === null || activity === void 0 ? void 0 : activity.timestamp,
28
- chatId: chatId,
29
27
  userId: userId,
30
- conversationId: ((_TelemetryManager$Int = TelemetryManager.InternalTelemetryData) === null || _TelemetryManager$Int === void 0 ? void 0 : _TelemetryManager$Int.conversationId) ?? "",
31
- channelData: activity === null || activity === void 0 ? void 0 : activity.channelData,
28
+ tags: activity === null || activity === void 0 ? void 0 : (_activity$channelData4 = activity.channelData) === null || _activity$channelData4 === void 0 ? void 0 : _activity$channelData4.tags,
32
29
  messageType: ""
33
30
  };
34
31
 
@@ -45,18 +42,18 @@ export const createOnNewAdapterActivityHandler = (chatId, userId) => {
45
42
  Description: "New message sent"
46
43
  });
47
44
  } else {
48
- var _activity$channelData4, _activity$channelData5;
45
+ var _activity$channelData5, _activity$channelData6;
49
46
 
50
- if (activity !== null && activity !== void 0 && (_activity$channelData4 = activity.channelData) !== null && _activity$channelData4 !== void 0 && (_activity$channelData5 = _activity$channelData4.tags) !== null && _activity$channelData5 !== void 0 && _activity$channelData5.includes(Constants.systemMessageTag)) {
47
+ if (activity !== null && activity !== void 0 && (_activity$channelData5 = activity.channelData) !== null && _activity$channelData5 !== void 0 && (_activity$channelData6 = _activity$channelData5.tags) !== null && _activity$channelData6 !== void 0 && _activity$channelData6.includes(Constants.systemMessageTag)) {
51
48
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
52
49
  payload.messageType = Constants.systemMessageTag;
53
50
  } else {
54
- var _activity$channelData6, _activity$channelData7, _activity$channelData8;
51
+ var _activity$channelData7, _activity$channelData8, _activity$channelData9;
55
52
 
56
53
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
57
54
  const messageHasNoText = !(activity !== null && activity !== void 0 && activity.text); // eslint-disable-next-line @typescript-eslint/no-explicit-any
58
55
 
59
- const messageHasNoTags = !(activity !== null && activity !== void 0 && activity.channelData) || !(activity !== null && activity !== void 0 && (_activity$channelData6 = activity.channelData) !== null && _activity$channelData6 !== void 0 && _activity$channelData6.tags) || (activity === null || activity === void 0 ? void 0 : (_activity$channelData7 = activity.channelData) === null || _activity$channelData7 === void 0 ? void 0 : (_activity$channelData8 = _activity$channelData7.tags) === null || _activity$channelData8 === void 0 ? void 0 : _activity$channelData8.length) === 0; // eslint-disable-next-line @typescript-eslint/no-explicit-any
56
+ const messageHasNoTags = !(activity !== null && activity !== void 0 && activity.channelData) || !(activity !== null && activity !== void 0 && (_activity$channelData7 = activity.channelData) !== null && _activity$channelData7 !== void 0 && _activity$channelData7.tags) || (activity === null || activity === void 0 ? void 0 : (_activity$channelData8 = activity.channelData) === null || _activity$channelData8 === void 0 ? void 0 : (_activity$channelData9 = _activity$channelData8.tags) === null || _activity$channelData9 === void 0 ? void 0 : _activity$channelData9.length) === 0; // eslint-disable-next-line @typescript-eslint/no-explicit-any
60
57
 
61
58
  const messageHasNoAttachments = !(activity !== null && activity !== void 0 && activity.attachments) || (activity === null || activity === void 0 ? void 0 : activity.attachments.length) === 0;
62
59
 
@@ -74,7 +71,8 @@ export const createOnNewAdapterActivityHandler = (chatId, userId) => {
74
71
  BroadcastService.postMessage(newMessageReceivedEvent);
75
72
  TelemetryHelper.logActionEvent(LogLevel.INFO, {
76
73
  Event: TelemetryEvent.MessageReceived,
77
- Description: "New message received"
74
+ Description: "New message received",
75
+ Data: payload
78
76
  });
79
77
  }
80
78
  }
@@ -1,4 +1,6 @@
1
1
  export declare class Constants {
2
+ static readonly magicCodeBroadcastChannel = "MagicCodeChannel";
3
+ static readonly magicCodeResponseBroadcastChannel = "MagicCodeResponseChannel";
2
4
  static readonly systemMessageTag = "system";
3
5
  static readonly userMessageTag = "user";
4
6
  static readonly historyMessageTag = "history";
@@ -15,7 +17,6 @@ export declare class Constants {
15
17
  static readonly true = "true";
16
18
  static readonly false = "false";
17
19
  static readonly maximumUnreadMessageCount = 99;
18
- static readonly widgetStateDataKey = "LcwChatWidgetState";
19
20
  static readonly channelIdKey = "ChannelId-";
20
21
  static readonly ChannelId = "lcw";
21
22
  static readonly CustomerTag = "FromCustomer";
@@ -33,6 +34,10 @@ export declare class Constants {
33
34
  static readonly queuePositionMessageTag = "queueposition";
34
35
  static readonly averageWaitTimeMessageTag = "averagewaittime";
35
36
  static readonly message = "message";
37
+ static readonly hiddenTag = "Hidden";
38
+ static readonly prefixTimestampTag = "ServerMessageTimestamp_";
39
+ static readonly acsChannel = "ACS_CHANNEL";
40
+ static readonly publicMessageTag = "public";
36
41
  static readonly supportedAdaptiveCardContentTypes: Array<string>;
37
42
  static readonly maxUploadFileSize = "500000";
38
43
  static readonly imageRegex: RegExp;
@@ -58,7 +63,6 @@ export declare class Constants {
58
63
  static readonly ProactiveChatInviteTimeoutInMs = 60000;
59
64
  static readonly InputSubmit = "InputSubmit";
60
65
  static readonly ReconnectIdAttributeName = "oc.reconnectid";
61
- static readonly redirectPageRequest = "redirectPageRequest";
62
66
  static readonly LiveChatWidget = "LiveChatWidgetNew";
63
67
  static readonly GuidPattern = "xx-x-4m-ym-xxx";
64
68
  static readonly Default = "default";
@@ -71,6 +75,7 @@ export declare class Constants {
71
75
  static readonly OpenLinkIconCssClass = "webchat__markdown__external-link-icon";
72
76
  static readonly internetConnectionTestUrl = "https://ocsdk-prod.azureedge.net/public/connecttest.txt";
73
77
  static readonly internetConnectionTestUrlText = "Omnichannel Connect Test";
78
+ static readonly ChatWidgetStateChangedPrefix = "ChatWidgetStateChanged";
74
79
  }
75
80
  export declare const Regex: {
76
81
  new (): {};
@@ -137,6 +142,12 @@ export declare enum ElementType {
137
142
  export declare enum ChatSDKError {
138
143
  WidgetUseOutsideOperatingHour = "WidgetUseOutsideOperatingHour"
139
144
  }
145
+ export declare enum EnvironmentVersion {
146
+ prod = "prod",
147
+ dogfood = "df",
148
+ int = "int",
149
+ test = "test"
150
+ }
140
151
  export declare class TranscriptConstants {
141
152
  static readonly ChatTranscriptsBodyColor = "#F5F5F5";
142
153
  static readonly TranscriptMessageEmojiMessageType = "http://schema.skype.com/emoji";
@@ -149,3 +160,13 @@ export declare class TranscriptConstants {
149
160
  static readonly AgentDialogColor = "#2266E3";
150
161
  static readonly AgentFontColor = "white";
151
162
  }
163
+ export declare class AriaTelemetryConstants {
164
+ static readonly GERMANY_ENDPOINT: string;
165
+ static readonly GCCH_ENDPOINT: string;
166
+ static readonly DOD_ENDPOINT: string;
167
+ static readonly EUROPE_ENDPOINT: string;
168
+ static readonly MOONCAKE_ENDPOINT: string;
169
+ static readonly Public: string;
170
+ static readonly EU: string;
171
+ static readonly lcwEUDomainNames: Array<string>;
172
+ }
@@ -6,7 +6,7 @@ export interface IContextDataStore {
6
6
  /**
7
7
  * setData: Set data to data store
8
8
  */
9
- setData: (key: string, value: string) => void;
9
+ setData: (key: string, value: any, type: string) => void;
10
10
  /**
11
11
  * removeData: Remove data from data store by key
12
12
  */
@@ -19,15 +19,24 @@ export declare enum LogLevel {
19
19
  }
20
20
  export declare enum BroadcastEvent {
21
21
  LoadPostChatSurvey = "LoadPostChatSurvey",
22
- EndChat = "EndChat",
22
+ ChatEnded = "ChatEnded",
23
23
  NewMessageNotification = "NewMessageNotification",
24
24
  UnreadMessageCount = "UnreadMessageCount",
25
- ChatWidgetStateChanged = "ChatWidgetStateChanged",
25
+ StartProactiveChat = "StartProactiveChat",
26
26
  ProactiveChatStartChat = "ProactiveChatStartChat",
27
27
  ProactiveChatStartPopoutChat = "ProactiveChatStartPopoutChat",
28
+ ProactiveChatIsInPopoutMode = "ProactiveChatIsInPopoutMode",
29
+ ResetProactiveChatParams = "ResetProactiveChatParams",
28
30
  InvalidAdaptiveCardFormat = "InvalidAdaptiveCardFormat",
29
31
  NewMessageSent = "NewMessageSent",
30
- NewMessageReceived = "NewMessageReceived"
32
+ NewMessageReceived = "NewMessageReceived",
33
+ RedirectPageRequest = "RedirectPageRequest",
34
+ StartChat = "StartChat",
35
+ StartChatSkippingChatButtonRendering = "StartChatSkippingChatButtonRendering",
36
+ StartUnauthenticatedReconnectChat = "StartUnauthenticatedReconnectChat",
37
+ EndChat = "EndChat",
38
+ SetCustomContext = "SetCustomContext",
39
+ ChatRetrievedFromCache = "ChatRetrievedFromCache"
31
40
  }
32
41
  export declare enum TelemetryEvent {
33
42
  CallAdded = "CallAdded",
@@ -75,7 +84,10 @@ export declare enum TelemetryEvent {
75
84
  PrechatSurveyLoaded = "PrechatSurveyLoaded",
76
85
  PrechatSubmitted = "PrechatSubmitted",
77
86
  StartChatSDKCall = "StartChatCall",
87
+ StartChatEventRecevied = "StartChatEventReceived",
78
88
  EndChatSDKCall = "EndChatCall",
89
+ EndChatEventReceived = "EndChatEventReceived",
90
+ WindowClosed = "WindowClosed",
79
91
  OnNewMessageFailed = "OnNewMessageFailed",
80
92
  OnNewMessageAudioNotificationFailed = "OnNewMessageAudioNotificationFailed",
81
93
  DownloadTranscriptResponseNullOrUndefined = "DownloadTranscriptResponseNullOrUndefined",
@@ -89,6 +101,7 @@ export declare enum TelemetryEvent {
89
101
  LoadingPaneLoaded = "LoadingPaneLoaded",
90
102
  EmailTranscriptLoaded = "EmailTranscriptLoaded",
91
103
  OutOfOfficePaneLoaded = "OutOfOfficePaneLoaded",
104
+ PostChatSurveyLoadingPaneLoaded = "PostChatSurveyLoadingPaneLoaded",
92
105
  PostChatSurveyLoaded = "PostChatSurveyLoaded",
93
106
  ConfirmationPaneLoaded = "ConfirmationPaneLoaded",
94
107
  ProactiveChatPaneLoaded = "ProactiveChatPaneLoaded",
@@ -99,6 +112,8 @@ export declare enum TelemetryEvent {
99
112
  EmailTranscriptButtonClicked = "EmailTranscriptButtonClicked",
100
113
  EmailTranscriptCancelButtonClicked = "EmailTranscriptCancelButtonClicked",
101
114
  AudioToggleButtonClicked = "AudioToggleButtonClicked",
115
+ SuppressBotMagicCodeSucceeded = "SuppressBotMagicCodeSucceeded",
116
+ SuppressBotMagicCodeFailed = "SuppressBotMagicCodeFailed",
102
117
  ProcessingHTMLTextMiddlewareFailed = "ProcessingHTMLTextMiddlewareFailed",
103
118
  ProcessingSanitizationMiddlewareFailed = "ProcessingSanitizationMiddlewareFailed",
104
119
  FormatTagsMiddlewareJSONStringifyFailed = "FormatTagsMiddlewareJSONStringifyFailed",
@@ -110,6 +125,7 @@ export declare enum TelemetryEvent {
110
125
  InvalidConfiguration = "InvalidConfiguration",
111
126
  SendTypingIndicatorSucceeded = "SendTypingIndicatorSucceeded",
112
127
  SendTypingIndicatorFailed = "SendTypingIndicatorFailed",
128
+ WebChatEvent = "WebChatEvent",
113
129
  PreChatSurveyStartChatMethodFailed = "PreChatSurveyStartChatMethodFailed",
114
130
  ChatAlreadyTriggered = "ChatAlreadyTriggered",
115
131
  StartProactiveChatEventReceived = "StartProactiveChatEventReceived",
@@ -122,11 +138,13 @@ export declare enum TelemetryEvent {
122
138
  ReconnectChatStartNewConversation = "ReconnectChatStartNewConversation",
123
139
  ReconnectChatMinimize = "ReconnectChatMinimize",
124
140
  MessageSent = "MessageSent",
125
- MessageReceived = "MessageReceived"
141
+ MessageReceived = "MessageReceived",
142
+ CustomContextReceived = "CustomContextReceived"
126
143
  }
127
144
  export interface TelemetryInput {
128
145
  scenarioType: ScenarioType;
129
146
  payload: TelemetryData;
147
+ telemetryInfo?: any;
130
148
  }
131
149
  export declare class TelemetryConstants {
132
150
  private static map;
@@ -11,6 +11,7 @@ export interface TelemetryEventWrapper {
11
11
  Description?: string;
12
12
  ExceptionDetails?: any;
13
13
  ElapsedTimeInMilliseconds?: number;
14
+ Data?: any;
14
15
  }
15
16
  export declare class TelemetryHelper {
16
17
  static callId: string;
@@ -35,4 +36,5 @@ export declare class TelemetryHelper {
35
36
  static logActionEvent: (logLevel: LogLevel, payload: TelemetryEventWrapper) => void;
36
37
  static logSDKEvent: (logLevel: LogLevel, payload: TelemetryEventWrapper) => void;
37
38
  static logConfigDataEvent: (logLevel: LogLevel, payload: TelemetryEventWrapper) => void;
39
+ static logWebChatEvent: (logLevel: LogLevel, payload: TelemetryEventWrapper) => void;
38
40
  }
@@ -1,4 +1,7 @@
1
- export interface ConfigValidationTelemetryData {
1
+ export interface BaseTelemetryData {
2
+ Data?: any;
3
+ }
4
+ export interface ConfigValidationTelemetryData extends BaseTelemetryData {
2
5
  Event?: string;
3
6
  RequestId?: string;
4
7
  LCWVersion?: string;
@@ -8,7 +11,7 @@ export interface ConfigValidationTelemetryData {
8
11
  ExceptionDetails?: object;
9
12
  Domain?: string;
10
13
  }
11
- export interface LoadTelemetryData {
14
+ export interface LoadTelemetryData extends BaseTelemetryData {
12
15
  Event?: string;
13
16
  ResourcePath?: string;
14
17
  ElapsedTimeInMilliseconds?: number;
@@ -20,18 +23,18 @@ export interface LoadTelemetryData {
20
23
  OCChatWidgetVersion?: string;
21
24
  OCChatComponentsVersion?: string;
22
25
  }
23
- export interface MessageProcessingErrorData {
26
+ export interface MessageProcessingErrorData extends BaseTelemetryData {
24
27
  Event: string;
25
28
  ExceptionDetails: object;
26
29
  }
27
- export interface OCChatSDKTelemetryData {
30
+ export interface OCChatSDKTelemetryData extends BaseTelemetryData {
28
31
  RequestId: string;
29
32
  Event?: string;
30
33
  ElapsedTimeInMilliseconds?: number;
31
34
  TransactionId: string;
32
35
  ExceptionDetails?: object;
33
36
  }
34
- export interface IC3ClientTelemetryData {
37
+ export interface IC3ClientTelemetryData extends BaseTelemetryData {
35
38
  SubscriptionId?: string;
36
39
  EndpointUrl?: string;
37
40
  EndpointId?: string;
@@ -42,7 +45,7 @@ export interface IC3ClientTelemetryData {
42
45
  ShouldBubbleToHost?: boolean;
43
46
  Description?: string;
44
47
  }
45
- export interface WebChatTelemetryData {
48
+ export interface WebChatTelemetryData extends BaseTelemetryData {
46
49
  data?: any;
47
50
  dimensions?: any;
48
51
  duration?: number;
@@ -53,7 +56,7 @@ export interface WebChatTelemetryData {
53
56
  name?: string;
54
57
  type?: string;
55
58
  }
56
- export interface ACSAdapterTelemetryData {
59
+ export interface ACSAdapterTelemetryData extends BaseTelemetryData {
57
60
  Description?: string;
58
61
  ACSUserId?: string;
59
62
  ChatThreadId?: string;
@@ -63,14 +66,14 @@ export interface ACSAdapterTelemetryData {
63
66
  ErrorCode?: string;
64
67
  ExceptionDetails?: any;
65
68
  }
66
- export interface ActionTelemetryData {
69
+ export interface ActionTelemetryData extends BaseTelemetryData {
67
70
  Event?: string;
68
71
  ElapsedTimeInMilliseconds?: number;
69
72
  ActionType?: string;
70
73
  ExceptionDetails?: object;
71
74
  Description?: string;
72
75
  }
73
- export interface CallingTelemetryData {
76
+ export interface CallingTelemetryData extends BaseTelemetryData {
74
77
  CallId?: string;
75
78
  Event?: string;
76
79
  ElapsedTimeInMilliseconds?: number;
@@ -32,13 +32,13 @@ export interface ITelemetryConfig {
32
32
  /**
33
33
  * Omnichannel chat widget version
34
34
  */
35
- chatWidgetVersion?: string;
35
+ chatWidgetVersion: string;
36
36
  /**
37
37
  * Omnichannel chat components version
38
38
  */
39
- chatComponentVersion?: string;
39
+ chatComponentVersion: string;
40
40
  /**
41
41
  * Omnichannel Chat SDK Version
42
42
  */
43
- OCChatSDKVersion?: string;
43
+ OCChatSDKVersion: string;
44
44
  }
@@ -21,3 +21,6 @@ export declare const isNullOrUndefined: (obj: any) => boolean;
21
21
  export declare const isNullOrEmptyString: (s: string) => boolean;
22
22
  export declare const newGuid: () => string;
23
23
  export declare const createTimer: () => ITimer;
24
+ export declare const getDomain: (hostValue: any) => string;
25
+ export declare const getWidgetCacheId: (orgId: string, widgetId: string) => string;
26
+ export declare const getWidgetEndChatEventName: (orgId: string, widgetId: string) => string;
@@ -1,3 +1,4 @@
1
+ import { ILiveChatWidgetContext } from "../../../contexts/common/ILiveChatWidgetContext";
1
2
  import { IConfirmationPaneStatefulProps } from "./IConfirmationPaneStatefulProps";
2
3
  export interface IConfirmationPaneStatefulParams extends IConfirmationPaneStatefulProps {
3
4
  /**
@@ -5,10 +6,9 @@ export interface IConfirmationPaneStatefulParams extends IConfirmationPaneStatef
5
6
  */
6
7
  setPostChatContext: () => Promise<void>;
7
8
  /**
8
- * endChat: Internal Prop injected for triggering end of a chat using chatSDK
9
+ * prepareEndChat: Internal Prop injected for checking PostChat contexts and trigerring end of chat
9
10
  * @param adapter : The chat adapter for the live chat session
10
- * @param skipEndChatSDK : If set to true endchat will skip chatSDK endChat call
11
- * @param skipCloseChat : If set to true endchat will skip closing the live chat instance
11
+ * @param state : The chat state where the conversation is currently in
12
12
  */
13
- endChat: (adapter: any, skipEndChatSDK?: boolean, skipCloseChat?: boolean) => Promise<void>;
13
+ prepareEndChat: (adapter: any, state: ILiveChatWidgetContext) => Promise<void>;
14
14
  }
@@ -1,5 +1,4 @@
1
1
  export interface IAudioNotificationStatefulParams {
2
2
  audioSrc?: string;
3
- hideAudioNotificationButton?: boolean;
4
3
  isAudioMuted?: boolean;
5
4
  }
@@ -1,4 +1,7 @@
1
1
  import { Dispatch } from "react";
2
2
  import { ILiveChatWidgetAction } from "../../../contexts/common/ILiveChatWidgetAction";
3
3
  import { ILiveChatWidgetProps } from "../interfaces/ILiveChatWidgetProps";
4
- export declare const endChat: (props: ILiveChatWidgetProps, chatSDK: any, setAdapter: any, setWebChatStyles: any, dispatch: Dispatch<ILiveChatWidgetAction>, adapter: any, skipEndChatSDK?: boolean | undefined, skipCloseChat?: boolean | undefined) => Promise<void>;
4
+ import { ILiveChatWidgetContext } from "../../../contexts/common/ILiveChatWidgetContext";
5
+ declare const prepareEndChat: (props: ILiveChatWidgetProps, chatSDK: any, setAdapter: any, setWebChatStyles: any, dispatch: Dispatch<ILiveChatWidgetAction>, adapter: any, state: ILiveChatWidgetContext) => Promise<void>;
6
+ declare const endChat: (props: ILiveChatWidgetProps, chatSDK: any, setAdapter: any, setWebChatStyles: any, dispatch: Dispatch<ILiveChatWidgetAction>, adapter: any, skipEndChatSDK?: boolean | undefined, skipCloseChat?: boolean | undefined, postMessageToOtherTab?: boolean | undefined) => Promise<void>;
7
+ export { prepareEndChat, endChat };
@@ -2,6 +2,9 @@ import "regenerator-runtime/runtime";
2
2
  import { Dispatch } from "react";
3
3
  import { ILiveChatWidgetAction } from "../../../contexts/common/ILiveChatWidgetAction";
4
4
  import { ILiveChatWidgetProps } from "../interfaces/ILiveChatWidgetProps";
5
+ declare const getChatReconnectContext: (chatSDK: any, reconnectId?: string | undefined) => Promise<any>;
5
6
  declare const getReconnectIdForAuthenticatedChat: (props: ILiveChatWidgetProps, chatSDK: any) => Promise<string | undefined>;
6
- declare const handleUnauthenticatedReconnectChat: (dispatch: Dispatch<ILiveChatWidgetAction>, reconnectId: string, initStartChat: any) => Promise<void>;
7
- export { getReconnectIdForAuthenticatedChat, handleUnauthenticatedReconnectChat };
7
+ declare const handleUnauthenticatedReconnectChat: (chatSDK: any, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any, reconnectId: string, initStartChat: any, redirectInSameWindow: boolean | undefined) => Promise<void>;
8
+ declare const startUnauthenticatedReconnectChat: (chatSDK: any, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any, reconnectId: string, initStartChat: any) => Promise<void>;
9
+ declare const handleRedirectUnauthenticatedReconnectChat: (chatSDK: any, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any, initStartChat: any, reconnectId: string, redirectInSameWindow: boolean | undefined) => Promise<void>;
10
+ export { getChatReconnectContext, getReconnectIdForAuthenticatedChat, handleUnauthenticatedReconnectChat, startUnauthenticatedReconnectChat, handleRedirectUnauthenticatedReconnectChat };
@@ -9,6 +9,7 @@ export interface ILiveChatWidgetComponentOverrides {
9
9
  outOfOfficeHoursPane?: ReactNode | string;
10
10
  postChatLoadingPane?: ReactNode | string;
11
11
  postChatSurveyPane?: ReactNode | string;
12
+ preChatSurveyPane?: ReactNode | string;
12
13
  proactiveChatPane?: ReactNode | string;
13
14
  reconnectChatPane?: ReactNode | string;
14
15
  webChatContainer?: ReactNode | string;
@@ -45,7 +45,7 @@ export interface ILiveChatWidgetProps {
45
45
  proactiveChatPaneProps?: IProactiveChatPaneStatefulProps;
46
46
  reconnectChatPaneProps?: IReconnectChatPaneStatefulProps;
47
47
  styleProps?: ILiveChatWidgetStyleProps;
48
- telemetryConfig?: ITelemetryConfig;
48
+ telemetryConfig: ITelemetryConfig;
49
49
  webChatContainerProps?: IWebChatContainerStatefulProps;
50
50
  liveChatContextFromCache?: ILiveChatWidgetContext;
51
51
  contextDataStore?: IContextDataStore;
@@ -3,4 +3,5 @@ export interface IReconnectChatPaneStatefulProps extends IReconnectChatPaneProps
3
3
  authClientFunction?: string;
4
4
  isReconnectEnabled?: boolean;
5
5
  reconnectId?: string;
6
+ redirectInSameWindow?: boolean;
6
7
  }
@@ -0,0 +1,4 @@
1
+ export interface IBotMagicCodeConfig {
2
+ disabled?: boolean;
3
+ fwdUrl?: string;
4
+ }