@microsoft/omnichannel-chat-widget 1.8.3 → 1.8.4-main.4478bbf

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 (118) hide show
  1. package/lib/cjs/common/Constants.js +5 -0
  2. package/lib/cjs/common/facades/FacadeChatSDK.js +6 -0
  3. package/lib/cjs/common/telemetry/AppInsightsEvents.js +4 -5
  4. package/lib/cjs/common/telemetry/TelemetryConstants.js +43 -2
  5. package/lib/cjs/common/telemetry/loggers/appInsightsLogger.js +26 -10
  6. package/lib/cjs/common/utils/SecureEventBus.js +307 -0
  7. package/lib/cjs/common/utils/dispatchCustomEvent.js +25 -0
  8. package/lib/cjs/components/chatbuttonstateful/ChatButtonStateful.js +16 -4
  9. package/lib/cjs/components/headerstateful/HeaderStateful.js +8 -2
  10. package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/AddActivitySubscriber.js +127 -0
  11. package/lib/cjs/components/livechatwidget/common/ChatWidgetEvents.js +15 -0
  12. package/lib/cjs/components/livechatwidget/common/PersistentConversationHandler.js +284 -0
  13. package/lib/cjs/components/livechatwidget/common/createAdapter.js +2 -0
  14. package/lib/cjs/components/livechatwidget/common/defaultProps/defaultPersistentChatHistoryProps.js +18 -0
  15. package/lib/cjs/components/livechatwidget/common/endChat.js +7 -1
  16. package/lib/cjs/components/livechatwidget/common/initWebChatComposer.js +7 -5
  17. package/lib/cjs/components/livechatwidget/common/renderSurveyHelpers.js +2 -2
  18. package/lib/cjs/components/livechatwidget/common/setPostChatContextAndLoadSurvey.js +3 -3
  19. package/lib/cjs/components/livechatwidget/common/startChat.js +5 -1
  20. package/lib/cjs/components/livechatwidget/common/startChatErrorHandler.js +24 -4
  21. package/lib/cjs/components/livechatwidget/interfaces/IPersistentChatHistoryProps.js +1 -0
  22. package/lib/cjs/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +12 -3
  23. package/lib/cjs/components/postchatsurveypanestateful/PostChatSurveyPaneStateful.js +29 -2
  24. package/lib/cjs/components/prechatsurveypanestateful/PreChatSurveyPaneStateful.js +12 -3
  25. package/lib/cjs/components/webchatcontainerstateful/WebChatContainerStateful.js +31 -5
  26. package/lib/cjs/components/webchatcontainerstateful/common/activities/botActivity.js +14 -0
  27. package/lib/cjs/components/webchatcontainerstateful/common/activities/conversationDividerActivity.js +17 -0
  28. package/lib/cjs/components/webchatcontainerstateful/common/activityConverters/convertPersistentChatHistoryMessageToActivity.js +97 -0
  29. package/lib/cjs/components/webchatcontainerstateful/common/defaultProps/defaultMiddlewareLocalizedTexts.js +2 -1
  30. package/lib/cjs/components/webchatcontainerstateful/common/defaultProps/defaultWebChatStatefulProps.js +1 -1
  31. package/lib/cjs/components/webchatcontainerstateful/hooks/usePersistentChatHistory.js +59 -0
  32. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/WebChatEventSubscribers.js +122 -0
  33. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/Constants.js +10 -0
  34. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/ConversationDividerActivity.js +18 -0
  35. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/LazyLoadActivity.js +1038 -0
  36. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/LoadInlineBannerActivity.js +34 -0
  37. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityMiddleware.js +44 -0
  38. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityStatusMiddleware.js +16 -2
  39. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultInLineBannerStyle.js +20 -0
  40. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/DeliveredTimestamp.js +2 -2
  41. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/HistoryMessageTimestamp.js +59 -0
  42. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/NotDeliveredTimestamp.js +5 -3
  43. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/SendingTimestamp.js +2 -2
  44. package/lib/cjs/firstresponselatency/FirstMessageTrackerFromBot.js +3 -2
  45. package/lib/cjs/firstresponselatency/FirstResponseLatencyTracker.js +6 -2
  46. package/lib/cjs/plugins/newMessageEventHandler.js +4 -1
  47. package/lib/esm/common/Constants.js +5 -0
  48. package/lib/esm/common/facades/FacadeChatSDK.js +6 -0
  49. package/lib/esm/common/telemetry/AppInsightsEvents.js +4 -5
  50. package/lib/esm/common/telemetry/TelemetryConstants.js +41 -1
  51. package/lib/esm/common/telemetry/loggers/appInsightsLogger.js +27 -11
  52. package/lib/esm/common/utils/SecureEventBus.js +328 -0
  53. package/lib/esm/common/utils/dispatchCustomEvent.js +18 -0
  54. package/lib/esm/components/chatbuttonstateful/ChatButtonStateful.js +17 -5
  55. package/lib/esm/components/headerstateful/HeaderStateful.js +9 -3
  56. package/lib/esm/components/livechatwidget/common/ActivitySubscriber/AddActivitySubscriber.js +120 -0
  57. package/lib/esm/components/livechatwidget/common/ChatWidgetEvents.js +8 -0
  58. package/lib/esm/components/livechatwidget/common/PersistentConversationHandler.js +277 -0
  59. package/lib/esm/components/livechatwidget/common/createAdapter.js +2 -0
  60. package/lib/esm/components/livechatwidget/common/defaultProps/defaultPersistentChatHistoryProps.js +11 -0
  61. package/lib/esm/components/livechatwidget/common/endChat.js +7 -1
  62. package/lib/esm/components/livechatwidget/common/initWebChatComposer.js +7 -5
  63. package/lib/esm/components/livechatwidget/common/renderSurveyHelpers.js +2 -2
  64. package/lib/esm/components/livechatwidget/common/setPostChatContextAndLoadSurvey.js +3 -3
  65. package/lib/esm/components/livechatwidget/common/startChat.js +7 -3
  66. package/lib/esm/components/livechatwidget/common/startChatErrorHandler.js +23 -4
  67. package/lib/esm/components/livechatwidget/interfaces/IPersistentChatHistoryProps.js +1 -0
  68. package/lib/esm/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +13 -4
  69. package/lib/esm/components/postchatsurveypanestateful/PostChatSurveyPaneStateful.js +31 -4
  70. package/lib/esm/components/prechatsurveypanestateful/PreChatSurveyPaneStateful.js +13 -4
  71. package/lib/esm/components/webchatcontainerstateful/WebChatContainerStateful.js +34 -5
  72. package/lib/esm/components/webchatcontainerstateful/common/activities/botActivity.js +7 -0
  73. package/lib/esm/components/webchatcontainerstateful/common/activities/conversationDividerActivity.js +9 -0
  74. package/lib/esm/components/webchatcontainerstateful/common/activityConverters/convertPersistentChatHistoryMessageToActivity.js +90 -0
  75. package/lib/esm/components/webchatcontainerstateful/common/defaultProps/defaultMiddlewareLocalizedTexts.js +2 -1
  76. package/lib/esm/components/webchatcontainerstateful/common/defaultProps/defaultWebChatStatefulProps.js +2 -2
  77. package/lib/esm/components/webchatcontainerstateful/hooks/usePersistentChatHistory.js +51 -0
  78. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/WebChatEventSubscribers.js +115 -0
  79. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/Constants.js +3 -0
  80. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/ConversationDividerActivity.js +10 -0
  81. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/LazyLoadActivity.js +1060 -0
  82. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/LoadInlineBannerActivity.js +25 -0
  83. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityMiddleware.js +42 -0
  84. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityStatusMiddleware.js +13 -0
  85. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultInLineBannerStyle.js +13 -0
  86. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/DeliveredTimestamp.js +1 -1
  87. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/HistoryMessageTimestamp.js +52 -0
  88. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/NotDeliveredTimestamp.js +3 -2
  89. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/SendingTimestamp.js +1 -1
  90. package/lib/esm/firstresponselatency/FirstMessageTrackerFromBot.js +3 -2
  91. package/lib/esm/firstresponselatency/FirstResponseLatencyTracker.js +6 -2
  92. package/lib/esm/plugins/newMessageEventHandler.js +4 -1
  93. package/lib/types/common/Constants.d.ts +4 -0
  94. package/lib/types/common/facades/FacadeChatSDK.d.ts +3 -1
  95. package/lib/types/common/telemetry/TelemetryConstants.d.ts +38 -2
  96. package/lib/types/common/utils/SecureEventBus.d.ts +159 -0
  97. package/lib/types/common/utils/dispatchCustomEvent.d.ts +2 -0
  98. package/lib/types/components/livechatwidget/common/ActivitySubscriber/AddActivitySubscriber.d.ts +45 -0
  99. package/lib/types/components/livechatwidget/common/ChatWidgetEvents.d.ts +7 -0
  100. package/lib/types/components/livechatwidget/common/PersistentConversationHandler.d.ts +28 -0
  101. package/lib/types/components/livechatwidget/common/defaultProps/defaultPersistentChatHistoryProps.d.ts +2 -0
  102. package/lib/types/components/livechatwidget/common/startChatErrorHandler.d.ts +1 -0
  103. package/lib/types/components/livechatwidget/interfaces/ILiveChatWidgetProps.d.ts +2 -0
  104. package/lib/types/components/livechatwidget/interfaces/IPersistentChatHistoryProps.d.ts +7 -0
  105. package/lib/types/components/webchatcontainerstateful/common/activities/botActivity.d.ts +7 -0
  106. package/lib/types/components/webchatcontainerstateful/common/activities/conversationDividerActivity.d.ts +10 -0
  107. package/lib/types/components/webchatcontainerstateful/common/activityConverters/convertPersistentChatHistoryMessageToActivity.d.ts +2 -0
  108. package/lib/types/components/webchatcontainerstateful/hooks/usePersistentChatHistory.d.ts +4 -0
  109. package/lib/types/components/webchatcontainerstateful/webchatcontroller/WebChatEventSubscribers.d.ts +7 -0
  110. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/Constants.d.ts +3 -0
  111. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/ConversationDividerActivity.d.ts +4 -0
  112. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/LazyLoadActivity.d.ts +326 -0
  113. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/LoadInlineBannerActivity.d.ts +8 -0
  114. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityStatusMiddleware.d.ts +1 -0
  115. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultInLineBannerStyle.d.ts +2 -0
  116. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/HistoryMessageTimestamp.d.ts +2 -0
  117. package/lib/types/contexts/common/ILiveChatWidgetLocalizedTexts.d.ts +1 -0
  118. package/package.json +3 -3
@@ -0,0 +1,25 @@
1
+ import React, { useMemo } from "react";
2
+ import { defaultInlineBannerStyle } from "../defaultStyles/defaultInLineBannerStyle";
3
+ import { defaultMiddlewareLocalizedTexts } from "../../../../common/defaultProps/defaultMiddlewareLocalizedTexts";
4
+ import { mergeStyles } from "@fluentui/merge-styles";
5
+ const LoadInlineBannerActivity = _ref => {
6
+ let {
7
+ webChatContainerProps,
8
+ persistentChatHistory,
9
+ id
10
+ } = _ref;
11
+ const localizedTexts = useMemo(() => ({
12
+ ...defaultMiddlewareLocalizedTexts,
13
+ ...(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : webChatContainerProps.localizedTexts)
14
+ }), [webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : webChatContainerProps.localizedTexts]);
15
+ const bannerStyle = mergeStyles(persistentChatHistory === null || persistentChatHistory === void 0 ? void 0 : persistentChatHistory.bannerStyle, defaultInlineBannerStyle);
16
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
17
+ id: id,
18
+ className: bannerStyle,
19
+ role: "status",
20
+ "aria-live": "polite",
21
+ "aria-label": localizedTexts.PREVIOUS_MESSAGES_LOADING,
22
+ "aria-busy": "true"
23
+ }, localizedTexts.PREVIOUS_MESSAGES_LOADING));
24
+ };
25
+ export default LoadInlineBannerActivity;
@@ -1,3 +1,5 @@
1
+ /* eslint-disable @typescript-eslint/no-explicit-any */
2
+ /* eslint-disable react/display-name */
1
3
  /******
2
4
  * ActivityMiddleware
3
5
  *
@@ -7,8 +9,10 @@
7
9
  * 3. Decodes certain html characters that came through from chat services
8
10
  ******/
9
11
 
12
+ import LazyLoadActivity, { LazyLoadHandler } from "./activities/LazyLoadActivity";
10
13
  import { LogLevel, TelemetryEvent } from "../../../../../common/telemetry/TelemetryConstants";
11
14
  import { Constants } from "../../../../../common/Constants";
15
+ import ConversationDividerActivity from "./activities/ConversationDividerActivity";
12
16
  import { DirectLineActivityType } from "../../enums/DirectLineActivityType";
13
17
  import { DirectLineSenderRole } from "../../enums/DirectLineSenderRole";
14
18
  import React from "react";
@@ -17,6 +21,7 @@ import { defaultSystemMessageStyles } from "./defaultStyles/defaultSystemMessage
17
21
  import { defaultUserMessageStyles } from "./defaultStyles/defaultUserMessageStyles";
18
22
  import { escapeHtml } from "../../../../../common/utils";
19
23
  const loggedSystemMessages = new Array();
24
+ let lastRenderedAt = 0; // Track last rendered receivedAt timestamp for deduplication
20
25
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
21
26
  const handleSystemMessage = (next, args, card, renderMarkdown, systemMessageStyleProps) => {
22
27
  var _card$activity, _card$activity$channe, _card$activity$channe2, _card$activity2, _card$activity2$chann, _card$activity3, _card$activity3$chann, _card$activity3$chann2, _card$activity4, _card$activity4$chann, _card$activity5, _card$activity5$chann, _card$nextVisibleActi, _card$nextVisibleActi2, _card$activity6, _card$activity6$chann, _card$activity7, _card$nextVisibleActi3, _card$activity8;
@@ -81,6 +86,43 @@ export const createActivityMiddleware = (renderMarkdown, systemMessageStyleProps
81
86
  if (isTagIncluded(card, Constants.systemMessageTag)) {
82
87
  return handleSystemMessage(next, args, card, renderMarkdown, systemMessageStyleProps);
83
88
  }
89
+ if (isTagIncluded(card, Constants.persistentChatHistoryMessagePullTriggerTag)) {
90
+ var _card$activity9, _card$activity9$chann, _card$activity9$chann2;
91
+ // Safety check: if this is a new chat session and flag is false, auto-correct it
92
+ if (!LazyLoadHandler.hasMoreHistoryAvailable) {
93
+ LazyLoadHandler.setHasMoreHistoryAvailable(true);
94
+ }
95
+ const receivedAt = card === null || card === void 0 ? void 0 : (_card$activity9 = card.activity) === null || _card$activity9 === void 0 ? void 0 : (_card$activity9$chann = _card$activity9.channelData) === null || _card$activity9$chann === void 0 ? void 0 : (_card$activity9$chann2 = _card$activity9$chann.webChat) === null || _card$activity9$chann2 === void 0 ? void 0 : _card$activity9$chann2.receivedAt;
96
+ if (receivedAt < lastRenderedAt) {
97
+ card.activity = null;
98
+ return () => false;
99
+ }
100
+ lastRenderedAt = receivedAt;
101
+
102
+ // Return a function that checks availability at render time
103
+ return () => {
104
+ // Double-check at render time in case history availability changed
105
+ if (!LazyLoadHandler.hasMoreHistoryAvailable) {
106
+ return null;
107
+ }
108
+ return /*#__PURE__*/React.createElement(LazyLoadActivity, null);
109
+ };
110
+ }
111
+ if (isTagIncluded(card, Constants.persistentChatHistoryMessageTag)) {
112
+ const userMessageStyles = {
113
+ ...defaultUserMessageStyles,
114
+ ...userMessageStyleProps
115
+ };
116
+ return function () {
117
+ return /*#__PURE__*/React.createElement("div", {
118
+ className: card.activity.from.role === DirectLineSenderRole.User ? Constants.sentMessageClassName : Constants.receivedMessageClassName,
119
+ style: userMessageStyles
120
+ }, next(...args)(...arguments));
121
+ };
122
+ }
123
+ if (isTagIncluded(card, Constants.conversationDividerTag)) {
124
+ return /*#__PURE__*/React.createElement(ConversationDividerActivity, null);
125
+ }
84
126
  if (card.activity.text && card.activity.type === DirectLineActivityType.Message) {
85
127
  if (!card.activity.channelData.isHtmlEncoded && card.activity.channelId === Constants.webchatChannelId) {
86
128
  card.activity.text = escapeHtml(card.activity.text);
@@ -1,5 +1,6 @@
1
1
  import { Constants, WebChatMiddlewareConstants } from "../../../../../common/Constants";
2
2
  import { DeliveredTimestamp } from "./timestamps/DeliveredTimestamp";
3
+ import { HistoryMessageTimestamp } from "./timestamps/HistoryMessageTimestamp";
3
4
  import { NotDeliveredTimestamp } from "./timestamps/NotDeliveredTimestamp";
4
5
  import React from "react";
5
6
  import { SendStatus } from "../../enums/SendStatus";
@@ -26,6 +27,11 @@ export const activityStatusMiddleware = () => next => args => {
26
27
  current_role = role,
27
28
  current_timestamp = timestamp;
28
29
  let sameTimestampGroupTemp = sameTimestampGroup;
30
+ if (tags !== null && tags !== void 0 && tags.includes(Constants.persistentChatHistoryMessageTag)) {
31
+ return /*#__PURE__*/React.createElement(HistoryMessageTimestamp, {
32
+ args: args
33
+ });
34
+ }
29
35
  if (args[WebChatMiddlewareConstants.nextVisibleActivity]) {
30
36
  const {
31
37
  nextVisibleActivity: {
@@ -35,6 +41,7 @@ export const activityStatusMiddleware = () => next => args => {
35
41
  timestamp
36
42
  }
37
43
  } = args;
44
+
38
45
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
39
46
  const next_name = name,
40
47
  next_timestamp = timestamp;
@@ -61,4 +68,10 @@ export const activityStatusMiddleware = () => next => args => {
61
68
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
62
69
  ;
63
70
  }
71
+ };
72
+
73
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
74
+ export const createActivityStatusMiddleware = function () {
75
+ let locale = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "en-us";
76
+ return activityStatusMiddleware;
64
77
  };
@@ -0,0 +1,13 @@
1
+ import { defaultSystemMessageStyles } from "./defaultSystemMessageStyles";
2
+ // Adjust the import path if necessary
3
+
4
+ export const defaultInlineBannerStyle = {
5
+ ...defaultSystemMessageStyles,
6
+ visibility: "visible",
7
+ height: "20px",
8
+ display: "flex",
9
+ justifyContent: "center",
10
+ alignItems: "center",
11
+ margin: "5px 10px",
12
+ cursor: "pointer"
13
+ };
@@ -4,7 +4,7 @@ import { Stack } from "@fluentui/react";
4
4
  import { defaultMiddlewareLocalizedTexts } from "../../../../common/defaultProps/defaultMiddlewareLocalizedTexts";
5
5
  import { defaultTimestampContentStyles } from "../defaultStyles/defaultTimestampContentStyles";
6
6
  import { getTimestampHourMinute } from "../../../../../../common/utils";
7
- import { useChatContextStore } from "../../../../../..";
7
+ import useChatContextStore from "../../../../../../hooks/useChatContextStore";
8
8
 
9
9
  /* eslint @typescript-eslint/no-explicit-any: "off" */
10
10
  export const DeliveredTimestamp = _ref => {
@@ -0,0 +1,52 @@
1
+ import React from "react";
2
+ import { Stack } from "@fluentui/react";
3
+ import { defaultMiddlewareLocalizedTexts } from "../../../../common/defaultProps/defaultMiddlewareLocalizedTexts";
4
+ import { defaultTimestampContentStyles } from "../defaultStyles/defaultTimestampContentStyles";
5
+ import { getTimestampHourMinute } from "../../../../../../common/utils";
6
+ import useChatContextStore from "../../../../../../hooks/useChatContextStore";
7
+
8
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
9
+ export const HistoryMessageTimestamp = _ref => {
10
+ var _state$domainStates$r, _state$domainStates$r2, _state$domainStates$m;
11
+ let {
12
+ args
13
+ } = _ref;
14
+ const [state] = useChatContextStore();
15
+ const dir = ((_state$domainStates$r = state.domainStates.renderingMiddlewareProps) === null || _state$domainStates$r === void 0 ? void 0 : _state$domainStates$r.timestampDir) ?? state.domainStates.globalDir;
16
+ const {
17
+ activity: {
18
+ timestamp,
19
+ from: {
20
+ name,
21
+ role
22
+ }
23
+ }
24
+ } = args;
25
+ const contentStyles = {
26
+ ...defaultTimestampContentStyles,
27
+ ...((_state$domainStates$r2 = state.domainStates.renderingMiddlewareProps) === null || _state$domainStates$r2 === void 0 ? void 0 : _state$domainStates$r2.timestampContentStyleProps)
28
+ };
29
+ const getTimeElement = timestamp => {
30
+ const timeString = getTimestampHourMinute(timestamp);
31
+ const isAmPmFormat = timeString.toLowerCase().includes("am") || timeString.toLowerCase().includes("pm");
32
+ if (dir === "rtl" && isAmPmFormat) {
33
+ return /*#__PURE__*/React.createElement("span", {
34
+ dir: "ltr"
35
+ }, timeString);
36
+ } else {
37
+ return /*#__PURE__*/React.createElement("span", {
38
+ dir: dir
39
+ }, timeString);
40
+ }
41
+ };
42
+ return /*#__PURE__*/React.createElement(Stack, {
43
+ style: contentStyles,
44
+ dir: dir
45
+ }, role === "bot" && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
46
+ dir: dir,
47
+ "aria-hidden": "false"
48
+ }, name, " : ", getTimeElement(timestamp))), role === "user" && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
49
+ "aria-hidden": "false",
50
+ dir: dir
51
+ }, " ", getTimeElement(timestamp), " - ", ((_state$domainStates$m = state.domainStates.middlewareLocalizedTexts) === null || _state$domainStates$m === void 0 ? void 0 : _state$domainStates$m.MIDDLEWARE_MESSAGE_DELIVERED) ?? defaultMiddlewareLocalizedTexts.MIDDLEWARE_MESSAGE_DELIVERED), " "));
52
+ };
@@ -7,9 +7,9 @@ import { defaultTimestampFailedStyles } from "../defaultStyles/defaultTimestampF
7
7
  import { defaultTimestampRetryStyles } from "../defaultStyles/defaultTimestampRetryStyles";
8
8
  import { getTimestampHourMinute } from "../../../../../../common/utils";
9
9
  import { hooks } from "botframework-webchat";
10
- import { useChatContextStore } from "../../../../../..";
10
+ import useChatContextStore from "../../../../../../hooks/useChatContextStore";
11
11
 
12
- /* eslint @typescript-eslint/no-explicit-any: "off" */
12
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
13
13
  export const NotDeliveredTimestamp = _ref => {
14
14
  var _state$domainStates$r, _state$domainStates$r2, _state$domainStates$r3, _state$domainStates$r4, _state$domainStates$m, _state$domainStates$m2;
15
15
  let {
@@ -69,6 +69,7 @@ export const NotDeliveredTimestamp = _ref => {
69
69
  style: failedTextStyles
70
70
  }, " ", ((_state$domainStates$m = state.domainStates.middlewareLocalizedTexts) === null || _state$domainStates$m === void 0 ? void 0 : _state$domainStates$m.MIDDLEWARE_MESSAGE_NOT_DELIVERED) ?? defaultMiddlewareLocalizedTexts.MIDDLEWARE_MESSAGE_NOT_DELIVERED, " "), /*#__PURE__*/React.createElement("span", null, " \xA0-\xA0 "), /*#__PURE__*/React.createElement("span", {
71
71
  style: retryTextStyles,
72
+ role: "button",
72
73
  onClick: onRetryClick,
73
74
  onKeyDown: onRetryKeyEnter,
74
75
  tabIndex: 0
@@ -2,7 +2,7 @@ import React from "react";
2
2
  import { Stack } from "@fluentui/react";
3
3
  import { defaultMiddlewareLocalizedTexts } from "../../../../common/defaultProps/defaultMiddlewareLocalizedTexts";
4
4
  import { defaultTimestampContentStyles } from "../defaultStyles/defaultTimestampContentStyles";
5
- import { useChatContextStore } from "../../../../../..";
5
+ import useChatContextStore from "../../../../../../hooks/useChatContextStore";
6
6
 
7
7
  /* eslint @typescript-eslint/no-explicit-any: "off" */
8
8
  export const SendingTimestamp = () => {
@@ -31,7 +31,7 @@ export const createTrackingForFirstMessage = () => {
31
31
  * Starts tracking the time for the first bot message after widget loads.
32
32
  * Sets a 5-second timeout to auto-reset if no bot message is received.
33
33
  */
34
- const widgetLoadListener = BroadcastService.getMessageByEventName(TelemetryEvent.WidgetLoadComplete).subscribe(() => {
34
+ const widgetLoadListener = BroadcastService.getMessageByEventName(TelemetryEvent.StartChatComplete).subscribe(() => {
35
35
  if (isTracking) return;
36
36
  isTracking = true;
37
37
  startTime = new Date().getTime();
@@ -86,7 +86,8 @@ export const createTrackingForFirstMessage = () => {
86
86
  CustomProperties: {
87
87
  elapsedTime,
88
88
  widgetLoadedAt: startTime,
89
- botMessage: stopTrackingMessage
89
+ botMessage: stopTrackingMessage,
90
+ type: payload === null || payload === void 0 ? void 0 : payload.type
90
91
  }
91
92
  });
92
93
  disconnectListener();
@@ -7,6 +7,7 @@ function _toPrimitive(input, hint) { if (typeof input !== "object" || input ===
7
7
  import { BroadcastEvent, LogLevel, TelemetryEvent } from "../common/telemetry/TelemetryConstants";
8
8
  import { BroadcastService } from "@microsoft/omnichannel-chat-components";
9
9
  import { TelemetryHelper } from "../common/telemetry/TelemetryHelper";
10
+ import { Constants } from "../common/Constants";
10
11
  export let FirstResponseLatencyTracker = /*#__PURE__*/function () {
11
12
  function FirstResponseLatencyTracker() {
12
13
  _classCallCheck(this, FirstResponseLatencyTracker);
@@ -127,7 +128,8 @@ export let FirstResponseLatencyTracker = /*#__PURE__*/function () {
127
128
  CustomProperties: {
128
129
  elapsedTime,
129
130
  userMessage: this.startTrackingMessage,
130
- botMessage: this.stopTrackingMessage
131
+ botMessage: this.stopTrackingMessage,
132
+ type: payload === null || payload === void 0 ? void 0 : payload.type
131
133
  }
132
134
  });
133
135
  }
@@ -168,7 +170,9 @@ export let FirstResponseLatencyTracker = /*#__PURE__*/function () {
168
170
  value: function stopClock(payload) {
169
171
  try {
170
172
  if (!payload || !payload.Id) {
171
- throw new Error("Invalid payload");
173
+ if ((payload === null || payload === void 0 ? void 0 : payload.type) !== Constants.typing) {
174
+ throw new Error("Invalid payload");
175
+ }
172
176
  }
173
177
 
174
178
  // Only allow stopTracking if sender is valid and tracking is active
@@ -78,6 +78,9 @@ export const createOnNewAdapterActivityHandler = (chatId, userId, startTime) =>
78
78
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
79
79
  const messageHasNoAttachments = !(activity !== null && activity !== void 0 && activity.attachments) || (activity === null || activity === void 0 ? void 0 : activity.attachments.length) === 0;
80
80
  if (messageHasNoTags && messageHasNoText && messageHasNoAttachments) {
81
+ if ((activity === null || activity === void 0 ? void 0 : activity.type) === Constants.typing) {
82
+ return true;
83
+ }
81
84
  return false;
82
85
  }
83
86
  return true;
@@ -106,7 +109,7 @@ export const createOnNewAdapterActivityHandler = (chatId, userId, startTime) =>
106
109
  });
107
110
  };
108
111
  const raiseMessageEvent = activity => {
109
- if ((activity === null || activity === void 0 ? void 0 : activity.type) === Constants.message) {
112
+ if ((activity === null || activity === void 0 ? void 0 : activity.type) === Constants.message || (activity === null || activity === void 0 ? void 0 : activity.type) === Constants.typing) {
110
113
  const scenarioType = getScenarioType(activity);
111
114
  switch (scenarioType) {
112
115
  case ScenarioType.UserSendMessageStrategy:
@@ -28,6 +28,9 @@ export declare class Constants {
28
28
  static readonly channelIdKey = "ChannelId-";
29
29
  static readonly ChannelId = "lcw";
30
30
  static readonly CustomerTag = "FromCustomer";
31
+ static persistentChatHistoryMessageTag: string;
32
+ static persistentChatHistoryMessagePullTriggerTag: string;
33
+ static conversationDividerTag: string;
31
34
  static readonly GifContentType = "image/gif";
32
35
  static readonly video = "video";
33
36
  static readonly audio = "audio";
@@ -43,6 +46,7 @@ export declare class Constants {
43
46
  static readonly averageWaitTimeMessageTag = "averagewaittime";
44
47
  static readonly message = "message";
45
48
  static readonly hiddenTag = "Hidden";
49
+ static readonly typing = "typing";
46
50
  static readonly prefixTimestampTag = "ServerMessageTimestamp_";
47
51
  static readonly acsChannel = "ACS_CHANNEL";
48
52
  static readonly publicMessageTag = "public";
@@ -1,4 +1,4 @@
1
- import { ChatAdapter, ChatSDKMessage, GetAgentAvailabilityResponse, GetLiveChatTranscriptResponse, GetVoiceVideoCallingResponse, IFileInfo, IRawMessage, MaskingRules, OmnichannelChatSDK, VoiceVideoCallingOptionalParams } from "@microsoft/omnichannel-chat-sdk";
1
+ import { ChatAdapter, ChatSDKMessage, GetAgentAvailabilityResponse, GetLiveChatTranscriptResponse, GetPersistentChatHistoryResponse, GetVoiceVideoCallingResponse, IFileInfo, IRawMessage, MaskingRules, OmnichannelChatSDK, VoiceVideoCallingOptionalParams } from "@microsoft/omnichannel-chat-sdk";
2
2
  import { IFacadeChatSDKInput } from "./types/IFacadeChatSDKInput";
3
3
  import ChatAdapterOptionalParams from "@microsoft/omnichannel-chat-sdk/lib/core/messaging/ChatAdapterOptionalParams";
4
4
  import ChatConfig from "@microsoft/omnichannel-chat-sdk/lib/core/ChatConfig";
@@ -13,6 +13,7 @@ import GetChatTokenOptionalParams from "@microsoft/omnichannel-chat-sdk/lib/core
13
13
  import GetConversationDetailsOptionalParams from "@microsoft/omnichannel-chat-sdk/lib/core/GetConversationDetailsOptionalParams";
14
14
  import GetLiveChatConfigOptionalParams from "@microsoft/omnichannel-chat-sdk/lib/core/GetLiveChatConfigOptionalParams";
15
15
  import GetLiveChatTranscriptOptionalParams from "@microsoft/omnichannel-chat-sdk/lib/core/GetLiveChatTranscriptOptionalParams";
16
+ import GetPersistentChatHistoryOptionalParams from "@microsoft/omnichannel-chat-sdk/lib/core/GetPersistentChatHistoryOptionalParams";
16
17
  import IChatToken from "@microsoft/omnichannel-chat-sdk/lib/external/IC3Adapter/IChatToken";
17
18
  import IFileMetadata from "@microsoft/omnichannel-ic3core/lib/model/IFileMetadata";
18
19
  import IMessage from "@microsoft/omnichannel-ic3core/lib/model/IMessage";
@@ -73,4 +74,5 @@ export declare class FacadeChatSDK {
73
74
  getPostChatSurveyContext(): Promise<PostChatContext>;
74
75
  getAgentAvailability(optionalParams?: GetAgentAvailabilityOptionalParams): Promise<GetAgentAvailabilityResponse>;
75
76
  getReconnectableChats(reconnectableChatsParams?: any): Promise<any>;
77
+ fetchPersistentConversationHistory(getPersistentChatHistoryOptionalParams?: GetPersistentChatHistoryOptionalParams): Promise<GetPersistentChatHistoryResponse>;
76
78
  }
@@ -56,9 +56,11 @@ export declare enum BroadcastEvent {
56
56
  SyncMinimize = "SyncMinimize",
57
57
  OnWidgetError = "OnWidgetError",
58
58
  FMLTrackingCompletedAck = "FMLTrackingCompletedAck",
59
- FMLTrackingCompleted = "FMLTrackingCompleted"
59
+ FMLTrackingCompleted = "FMLTrackingCompleted",
60
+ PersistentConversationReset = "PersistentConversationReset"
60
61
  }
61
62
  export declare enum TelemetryEvent {
63
+ FetchPersistentChatHistoryFailed = "FetchPersistentChatHistoryFailed",
62
64
  CallAdded = "CallAdded",
63
65
  LocalVideoStreamAdded = "LocalVideoStreamAdded",
64
66
  LocalVideoStreamRemoved = "LocalVideoStreamRemoved",
@@ -268,8 +270,37 @@ export declare enum TelemetryEvent {
268
270
  UXCitationPaneCompleted = "UXCitationPaneCompleted",
269
271
  UXLiveChatWidgetStart = "UXLiveChatWidgetStart",
270
272
  UXLiveChatWidgetCompleted = "UXLiveChatWidgetCompleted",
273
+ UXPostChatPaneStarted = "UXPostChatPaneStarted",
274
+ UXPostChatPaneCompleted = "UXPostChatPaneCompleted",
271
275
  AppInsightsInitialized = "AppInsightsInitialized",
272
- AppInsightsInitFailed = "AppInsightsInitFailed"
276
+ AppInsightsInitFailed = "AppInsightsInitFailed",
277
+ ConvertPersistentChatHistoryMessageToActivityFailed = "ConvertPersistentChatHistoryMessageToActivityFailed",
278
+ UXLCWPersistentChatHistoryInitialized = "UXLCWPersistentChatHistoryInitialized",
279
+ LCWPersistentChatHistoryFetchStarted = "LCWPersistentChatHistoryFetchStarted",
280
+ LCWPersistentChatHistoryFetchCompleted = "LCWPersistentChatHistoryFetchCompleted",
281
+ LCWPersistentChatHistoryFetchFailed = "LCWPersistentChatHistoryFetchFailed",
282
+ LCWWebChatStorePollingStarted = "LCWWebChatStorePollingStarted",
283
+ LCWWebChatStoreReady = "LCWWebChatStoreReady",
284
+ LCWWebChatConnected = "LCWWebChatConnected",
285
+ LCWWebChatDisconnected = "LCWWebChatDisconnected",
286
+ LCWWebChatConnectionCheckFailed = "LCWWebChatConnectionCheckFailed",
287
+ LCWPersistentConversationHandlerInitialized = "LCWPersistentConversationHandlerInitialized",
288
+ LCWPersistentHistoryPullBlocked = "LCWPersistentHistoryPullBlocked",
289
+ LCWPersistentHistoryPullCompleted = "LCWPersistentHistoryPullCompleted",
290
+ LCWLazyLoadInitializationStarted = "LCWLazyLoadInitializationStarted",
291
+ LCWLazyLoadContainerNotFound = "LCWLazyLoadContainerNotFound",
292
+ LCWLazyLoadInitializationCompleted = "LCWLazyLoadInitializationCompleted",
293
+ LCWLazyLoadSessionMetrics = "LCWLazyLoadSessionMetrics",
294
+ LCWLazyLoadTargetElementNotFound = "LCWLazyLoadTargetElementNotFound",
295
+ LCWLazyLoadScrollFailed = "LCWLazyLoadScrollFailed",
296
+ LCWLazyLoadActivityMounted = "LCWLazyLoadActivityMounted",
297
+ LCWLazyLoadReset = "LCWLazyLoadReset",
298
+ LCWLazyLoadNoMoreHistory = "LCWLazyLoadNoMoreHistory",
299
+ LCWLazyLoadDestroyed = "LCWLazyLoadDestroyed",
300
+ SecureEventBusUnauthorizedDispatch = "SecureEventBusUnauthorizedDispatch",
301
+ SecureEventBusListenerError = "SecureEventBusListenerError",
302
+ SecureEventBusDispatchError = "SecureEventBusDispatchError",
303
+ StartChatComplete = "StartChatComplete"
273
304
  }
274
305
  export interface TelemetryInput {
275
306
  scenarioType: ScenarioType;
@@ -280,3 +311,8 @@ export declare class TelemetryConstants {
280
311
  private static map;
281
312
  static mapEventToScenario(eventTypeOrScenarioType: TelemetryEvent): ScenarioType;
282
313
  }
314
+ export declare enum ConversationStage {
315
+ Initialization = "Initialization",
316
+ CSREngagement = "CSR Engagement",
317
+ ConversationEnd = "Conversation End"
318
+ }
@@ -0,0 +1,159 @@
1
+ /**
2
+ * SecureEventBus class implementing the singleton pattern for secure event communication.
3
+ * Provides authentication-based event dispatching to prevent unauthorized external access.
4
+ */
5
+ declare class SecureEventBus {
6
+ private static instance;
7
+ private listeners;
8
+ private readonly authToken;
9
+ private eventCounter;
10
+ /**
11
+ * Private constructor to enforce singleton pattern.
12
+ * Generates a unique authentication token for this session.
13
+ */
14
+ private constructor();
15
+ /**
16
+ * Get the singleton instance of SecureEventBus.
17
+ * Creates a new instance if one doesn't exist.
18
+ *
19
+ * @returns The singleton instance of SecureEventBus
20
+ *
21
+ * @example
22
+ * ```typescript
23
+ * const eventBus = SecureEventBus.getInstance();
24
+ * ```
25
+ */
26
+ static getInstance(): SecureEventBus;
27
+ /**
28
+ * Generate a cryptographically secure authentication token.
29
+ * Uses crypto.getRandomValues when available, falls back to Math.random.
30
+ *
31
+ * @private
32
+ * @returns A 64-character hexadecimal string representing the authentication token
33
+ */
34
+ private generateAuthToken;
35
+ /**
36
+ * Get the authentication token for this SecureEventBus instance.
37
+ * This token is required for dispatching events and should only be used internally.
38
+ *
39
+ * @returns The authentication token string
40
+ *
41
+ * @example
42
+ * ```typescript
43
+ * const eventBus = SecureEventBus.getInstance();
44
+ * const token = eventBus.getAuthToken();
45
+ * eventBus.dispatch('myEvent', { data: 'value' }, token);
46
+ * ```
47
+ */
48
+ getAuthToken(): string;
49
+ /**
50
+ * Dispatch an event with authentication to all registered listeners.
51
+ * Verifies the authentication token before dispatching to prevent unauthorized access.
52
+ *
53
+ * @param eventName - The name of the event to dispatch
54
+ * @param payload - The data to send with the event (optional)
55
+ * @param token - Authentication token (must match the internal token)
56
+ * @returns true if event was successfully dispatched, false if unauthorized or error occurred
57
+ *
58
+ * @example
59
+ * ```typescript
60
+ * const eventBus = SecureEventBus.getInstance();
61
+ * const token = eventBus.getAuthToken();
62
+ *
63
+ * // Dispatch with payload
64
+ * const success = eventBus.dispatch('userAction', { action: 'click', target: 'button' }, token);
65
+ *
66
+ * // Dispatch without payload
67
+ * eventBus.dispatch('windowClosed', undefined, token);
68
+ * ```
69
+ */
70
+ dispatch(eventName: string, payload?: any, token?: string): boolean;
71
+ /**
72
+ * Subscribe to an event with a callback function.
73
+ * The callback will be executed whenever the specified event is dispatched.
74
+ *
75
+ * @param eventName - The name of the event to listen for
76
+ * @param callback - The function to execute when the event is fired
77
+ * @returns A function that can be called to unsubscribe from the event
78
+ *
79
+ * @example
80
+ * ```typescript
81
+ * const eventBus = SecureEventBus.getInstance();
82
+ *
83
+ * // Subscribe to an event
84
+ * const unsubscribe = eventBus.subscribe('chatMessage', (message) => {
85
+ * console.log('New message:', message.text);
86
+ * console.log('From user:', message.userId);
87
+ * });
88
+ *
89
+ * // Later, unsubscribe
90
+ * unsubscribe();
91
+ * ```
92
+ */
93
+ subscribe(eventName: string, callback: (payload: any) => void): () => void;
94
+ /**
95
+ * Remove all listeners for a specific event.
96
+ * This completely removes the event from the internal listeners map.
97
+ *
98
+ * @param eventName - The name of the event to remove all listeners for
99
+ *
100
+ * @example
101
+ * ```typescript
102
+ * const eventBus = SecureEventBus.getInstance();
103
+ *
104
+ * // Remove all listeners for 'chatClosed' event
105
+ * eventBus.removeAllListeners('chatClosed');
106
+ * ```
107
+ */
108
+ removeAllListeners(eventName: string): void;
109
+ /**
110
+ * Clear all listeners for all events.
111
+ * This resets the entire event bus to its initial state.
112
+ * Useful for cleanup during application shutdown or testing.
113
+ *
114
+ * @example
115
+ * ```typescript
116
+ * const eventBus = SecureEventBus.getInstance();
117
+ *
118
+ * // Clear all event listeners
119
+ * eventBus.clear();
120
+ * ```
121
+ */
122
+ clear(): void;
123
+ /**
124
+ * Get the number of listeners for a specific event.
125
+ * Useful for debugging and monitoring purposes.
126
+ *
127
+ * @param eventName - The name of the event to count listeners for
128
+ * @returns The number of listeners registered for the event
129
+ *
130
+ * @example
131
+ * ```typescript
132
+ * const eventBus = SecureEventBus.getInstance();
133
+ *
134
+ * // Check how many listeners are registered for 'userAction'
135
+ * const count = eventBus.getListenerCount('userAction');
136
+ * console.log(`${count} listeners registered for userAction`);
137
+ * ```
138
+ */
139
+ getListenerCount(eventName: string): number;
140
+ /**
141
+ * Get all registered event names.
142
+ * Returns an array of event names that currently have listeners.
143
+ * Useful for debugging and monitoring purposes.
144
+ *
145
+ * @returns An array of event names that have registered listeners
146
+ *
147
+ * @example
148
+ * ```typescript
149
+ * const eventBus = SecureEventBus.getInstance();
150
+ *
151
+ * // Get all registered events
152
+ * const events = eventBus.getRegisteredEvents();
153
+ * console.log('Active events:', events);
154
+ * // Output: ['userAction', 'chatMessage', 'windowResize']
155
+ * ```
156
+ */
157
+ getRegisteredEvents(): string[];
158
+ }
159
+ export default SecureEventBus;
@@ -0,0 +1,2 @@
1
+ declare const dispatchCustomEvent: (name: string, payload?: any) => void;
2
+ export default dispatchCustomEvent;
@@ -0,0 +1,45 @@
1
+ import { IActivitySubscriber } from "./IActivitySubscriber";
2
+ /**
3
+ * The `AddActivitySubscriber` class is responsible for subscribing to the `ADD_ACTIVITY` event
4
+ * from the `ChatWidgetEvents` and notifying an observer when a new activity is added.
5
+ *
6
+ * This class implements the `IActivitySubscriber` interface and acts as a bridge between
7
+ * the event system and the observer pattern.
8
+ */
9
+ export declare class AddActivitySubscriber implements IActivitySubscriber {
10
+ /**
11
+ * The observer that will be notified when a new activity is added.
12
+ * This is expected to be an object with a `next` method, such as an RxJS `Observer`.
13
+ */
14
+ observer: any;
15
+ /**
16
+ * Set to track processed activity IDs to prevent duplicate processing.
17
+ */
18
+ private processedActivityIds;
19
+ /**
20
+ * Unsubscribe function for the secure event listener
21
+ */
22
+ private unsubscribeFromSecureEvent;
23
+ /**
24
+ * Subscription for PersistentConversationReset event
25
+ */
26
+ private resetEventListener;
27
+ /**
28
+ * Constructor initializes the `AddActivitySubscriber` and sets up a secure event listener
29
+ * for the `ChatWidgetEvents.ADD_ACTIVITY` event. When the event is triggered, it checks
30
+ * if the event payload contains an `activity` and notifies the observer.
31
+ */
32
+ constructor();
33
+ /**
34
+ * The `next` method is a placeholder for processing the activity.
35
+ * This method can be overridden or extended as needed.
36
+ *
37
+ * @param activity - The activity object to process.
38
+ * @returns The activity object (asynchronously).
39
+ */
40
+ next(activity: any): Promise<any>;
41
+ /**
42
+ * Reset the processed activity IDs when a conversation resets
43
+ */
44
+ reset(): void;
45
+ }
@@ -0,0 +1,7 @@
1
+ declare enum ChatWidgetEvents {
2
+ ADD_ACTIVITY = "CHAT_WIDGET/ADD_ACTIVITY",
3
+ FETCH_PERSISTENT_CHAT_HISTORY = "CHAT_WIDGET/FETCH_PERSISTENT_CHAT_HISTORY",
4
+ NO_MORE_HISTORY_AVAILABLE = "CHAT_WIDGET/NO_MORE_HISTORY_AVAILABLE",
5
+ HIDE_LOADING_BANNER = "CHAT_WIDGET/HIDE_LOADING_BANNER"
6
+ }
7
+ export default ChatWidgetEvents;