@microsoft/omnichannel-chat-widget 0.1.0-main.106d830 → 0.1.0-main.1be2341

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 (296) hide show
  1. package/README.md +32 -0
  2. package/lib/cjs/common/Constants.js +9 -160
  3. package/lib/cjs/common/KeyCodes.js +0 -3
  4. package/lib/cjs/common/contextDataStore/DataStoreManager.js +0 -4
  5. package/lib/cjs/common/storage/default/defaultCacheManager.js +24 -0
  6. package/lib/cjs/common/storage/default/defaultClientDataStoreProvider.js +102 -0
  7. package/lib/cjs/common/storage/default/defaultInMemoryDataStore.js +78 -0
  8. package/lib/cjs/common/telemetry/TelemetryConstants.js +40 -21
  9. package/lib/cjs/common/telemetry/TelemetryHelper.js +14 -57
  10. package/lib/cjs/common/telemetry/TelemetryManager.js +6 -31
  11. package/lib/cjs/common/telemetry/defaultConfigs/defaultTelemetryConfiguration.js +4 -3
  12. package/lib/cjs/common/telemetry/loggers/ariaTelemetryLogger.js +37 -42
  13. package/lib/cjs/common/telemetry/loggers/consoleLogger.js +6 -14
  14. package/lib/cjs/common/utils.js +71 -84
  15. package/lib/cjs/components/callingcontainerstateful/CallingContainerStateful.js +19 -43
  16. package/lib/cjs/components/chatbuttonstateful/ChatButtonStateful.js +20 -26
  17. package/lib/cjs/components/confirmationpanestateful/ConfirmationPaneStateful.js +7 -32
  18. package/lib/cjs/components/dimlayer/DimLayer.js +0 -4
  19. package/lib/cjs/components/emailtranscriptpanestateful/EmailTranscriptPaneStateful.js +8 -36
  20. package/lib/cjs/components/emailtranscriptpanestateful/EmailTranscriptPaneStateful.spec.js +6 -8
  21. package/lib/cjs/components/footerstateful/FooterStateful.js +11 -42
  22. package/lib/cjs/components/footerstateful/audionotificationstateful/AudioNotificationStateful.js +0 -6
  23. package/lib/cjs/components/footerstateful/downloadtranscriptstateful/DownloadTranscriptStateful.js +15 -44
  24. package/lib/cjs/components/footerstateful/downloadtranscriptstateful/DownloadTranscriptStateful.spec.js +6 -8
  25. package/lib/cjs/components/headerstateful/HeaderStateful.js +16 -30
  26. package/lib/cjs/components/livechatwidget/LiveChatWidget.js +2 -14
  27. package/lib/cjs/components/livechatwidget/common/ActivityStreamHandler.js +37 -0
  28. package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/DefaultActivitySubscriber.js +18 -0
  29. package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/IActivitySubscriber.js +1 -0
  30. package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/PauseActivitySubscriber.js +32 -0
  31. package/lib/cjs/components/livechatwidget/common/ChatAdapterShim.js +62 -0
  32. package/lib/cjs/components/livechatwidget/common/Deferred.js +35 -0
  33. package/lib/cjs/components/livechatwidget/common/authHelper.js +50 -0
  34. package/lib/cjs/components/livechatwidget/common/createAdapter.js +10 -9
  35. package/lib/cjs/components/livechatwidget/common/createFooter.js +4 -23
  36. package/lib/cjs/components/livechatwidget/common/createInternetConnectionChangeHandler.js +10 -10
  37. package/lib/cjs/components/livechatwidget/common/createMarkdown.js +36 -43
  38. package/lib/cjs/components/livechatwidget/common/defaultProps/dummyDefaultProps.js +69 -50
  39. package/lib/cjs/components/livechatwidget/common/disposeTelemetryLoggers.js +0 -3
  40. package/lib/cjs/components/livechatwidget/common/endChat.js +57 -35
  41. package/lib/cjs/components/livechatwidget/common/getGeneralStylesForButton.js +0 -6
  42. package/lib/cjs/components/livechatwidget/common/initCallingSdk.js +7 -16
  43. package/lib/cjs/components/livechatwidget/common/initConfirmationPropsComposer.js +4 -8
  44. package/lib/cjs/components/livechatwidget/common/initWebChatComposer.js +36 -53
  45. package/lib/cjs/components/livechatwidget/common/reconnectChatHelper.js +68 -82
  46. package/lib/cjs/components/livechatwidget/common/registerTelemetryLoggers.js +7 -32
  47. package/lib/cjs/components/livechatwidget/common/setPostChatContextAndLoadSurvey.js +2 -15
  48. package/lib/cjs/components/livechatwidget/common/shareObservable.js +41 -0
  49. package/lib/cjs/components/livechatwidget/common/startChat.js +167 -100
  50. package/lib/cjs/components/livechatwidget/common/startProactiveChat.js +0 -8
  51. package/lib/cjs/components/livechatwidget/common/updateSessionDataForTelemetry.js +2 -11
  52. package/lib/cjs/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +263 -160
  53. package/lib/cjs/components/loadingpanestateful/LoadingPaneStateful.js +4 -17
  54. package/lib/cjs/components/ooohpanestateful/OOOHPaneStateful.js +4 -17
  55. package/lib/cjs/components/postchatloadingpanestateful/PostChatLoadingPaneStateful.js +4 -17
  56. package/lib/cjs/components/postchatsurveypanestateful/PostChatSurveyPaneStateful.js +9 -23
  57. package/lib/cjs/components/postchatsurveypanestateful/common/defaultStyleProps/defaultgeneralPostChatSurveyPaneStyleProps.js +1 -1
  58. package/lib/cjs/components/postchatsurveypanestateful/enums/PostChatSurveyMode.js +0 -1
  59. package/lib/cjs/components/postchatsurveypanestateful/interfaces/IPostChatSurveyPaneStatefulProps.js +1 -0
  60. package/lib/cjs/components/prechatsurveypanestateful/PreChatSurveyPaneStateful.js +11 -44
  61. package/lib/cjs/components/proactivechatpanestateful/ProactiveChatPaneStateful.js +19 -33
  62. package/lib/cjs/components/reconnectchatpanestateful/ReconnectChatPaneStateful.js +2 -24
  63. package/lib/cjs/components/webchatcontainerstateful/WebChatContainerStateful.js +94 -19
  64. package/lib/cjs/components/webchatcontainerstateful/common/defaultProps/defaultWebChatContainerStatefulProps.js +3 -7
  65. package/lib/cjs/components/webchatcontainerstateful/common/defaultProps/defaultWebChatStatefulProps.js +2 -6
  66. package/lib/cjs/components/webchatcontainerstateful/common/defaultStyles/defaultAdaptiveCardStyles.js +11 -0
  67. package/lib/cjs/components/webchatcontainerstateful/common/mockadapter.js +9 -26
  68. package/lib/cjs/components/webchatcontainerstateful/common/mockchatsdk.js +3 -16
  69. package/lib/cjs/components/webchatcontainerstateful/common/utils/BrowserInfo.js +2 -24
  70. package/lib/cjs/components/webchatcontainerstateful/common/utils/FileAttachmentIconManager.js +3 -15
  71. package/lib/cjs/components/webchatcontainerstateful/common/utils/isMaskingFromCustomer.js +5 -8
  72. package/lib/cjs/components/webchatcontainerstateful/interfaces/IAdaptiveCardStyles.js +1 -0
  73. package/lib/cjs/components/webchatcontainerstateful/interfaces/IBotMagicCodeConfig.js +1 -0
  74. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/BotMagicCodeStore.js +10 -0
  75. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/WebChatStoreLoader.js +0 -4
  76. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/enums/BrowserVendor.js +0 -1
  77. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/enums/DirectLineActivityType.js +0 -1
  78. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/enums/DirectLineSenderRole.js +0 -1
  79. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/enums/MessageType.js +0 -1
  80. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/enums/NotificationLevel.js +0 -1
  81. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/enums/NotificationScenarios.js +0 -1
  82. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/enums/SendStatus.js +0 -1
  83. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/enums/WebChatActionType.js +0 -1
  84. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/adaptermiddlewares/formatTagsEgressMiddleware.js +0 -7
  85. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/adaptermiddlewares/formatTagsIngressMiddleware.js +0 -5
  86. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityMiddleware.js +27 -37
  87. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityStatusMiddleware.js +9 -19
  88. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachmentMiddleware.js +23 -60
  89. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/avatarMiddleware.js +7 -15
  90. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/cardActionMiddleware.js +41 -0
  91. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/cardActionMiddleware.spec.js +82 -0
  92. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultReceivedMessageAnchorStyles.js +10 -0
  93. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultSystemMessageBoxStyles.js +10 -0
  94. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultTimestampFailedStyles.js +2 -3
  95. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultTimestampRetryStyles.js +2 -3
  96. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultUserMessageBoxStyles.js +10 -0
  97. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/groupActivitiesMiddleware.js +3 -9
  98. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/messageTimestampMiddleware.js +89 -0
  99. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/DeliveredTimestamp.js +2 -12
  100. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/NotDeliveredTimestamp.js +6 -28
  101. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/SendingTimestamp.js +2 -11
  102. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/typingIndicatorMiddleware.js +13 -30
  103. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/attachmentProcessingMiddleware.js +3 -9
  104. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/attachmentUploadValidatorMiddleware.js +6 -34
  105. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/channelDataMiddleware.js +1 -10
  106. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/conversationEndMiddleware.js +1 -12
  107. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/dataMaskingMiddleware.js +5 -18
  108. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/gifUploadMiddleware.js +1 -9
  109. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/htmlPlayerMiddleware.js +3 -9
  110. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/htmlTextMiddleware.js +13 -34
  111. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/maxMessageSizeValidator.js +1 -10
  112. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/preProcessingMiddleware.js +7 -11
  113. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/sanitizationMiddleware.js +5 -14
  114. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/notification/NotificationHandler.js +1 -21
  115. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/webchattelemetry/WebChatLogger.js +1 -12
  116. package/lib/cjs/contexts/ChatAdapterStore.js +0 -2
  117. package/lib/cjs/contexts/ChatContextStore.js +0 -2
  118. package/lib/cjs/contexts/ChatSDKStore.js +0 -2
  119. package/lib/cjs/contexts/common/ConversationState.js +3 -3
  120. package/lib/cjs/contexts/common/LiveChatWidgetActionType.js +26 -23
  121. package/lib/cjs/contexts/common/LiveChatWidgetContextInitialState.js +12 -12
  122. package/lib/cjs/contexts/createReducer.js +150 -97
  123. package/lib/cjs/controller/componentController.js +4 -33
  124. package/lib/cjs/hooks/useChatAdapterStore.js +0 -6
  125. package/lib/cjs/hooks/useChatContextStore.js +0 -6
  126. package/lib/cjs/hooks/useChatSDKStore.js +0 -6
  127. package/lib/cjs/index.js +0 -5
  128. package/lib/cjs/plugins/newMessageEventHandler.js +22 -46
  129. package/lib/esm/common/Constants.js +9 -148
  130. package/lib/esm/common/KeyCodes.js +0 -2
  131. package/lib/esm/common/contextDataStore/DataStoreManager.js +0 -2
  132. package/lib/esm/common/storage/default/defaultCacheManager.js +16 -0
  133. package/lib/esm/common/storage/default/defaultClientDataStoreProvider.js +95 -0
  134. package/lib/esm/common/storage/default/defaultInMemoryDataStore.js +70 -0
  135. package/lib/esm/common/telemetry/TelemetryConstants.js +44 -18
  136. package/lib/esm/common/telemetry/TelemetryHelper.js +14 -45
  137. package/lib/esm/common/telemetry/TelemetryManager.js +6 -19
  138. package/lib/esm/common/telemetry/defaultConfigs/defaultTelemetryConfiguration.js +4 -1
  139. package/lib/esm/common/telemetry/loggers/ariaTelemetryLogger.js +35 -26
  140. package/lib/esm/common/telemetry/loggers/consoleLogger.js +6 -10
  141. package/lib/esm/common/utils.js +64 -46
  142. package/lib/esm/components/callingcontainerstateful/CallingContainerStateful.js +19 -14
  143. package/lib/esm/components/chatbuttonstateful/ChatButtonStateful.js +23 -13
  144. package/lib/esm/components/confirmationpanestateful/ConfirmationPaneStateful.js +9 -13
  145. package/lib/esm/components/emailtranscriptpanestateful/EmailTranscriptPaneStateful.js +8 -15
  146. package/lib/esm/components/emailtranscriptpanestateful/EmailTranscriptPaneStateful.spec.js +6 -6
  147. package/lib/esm/components/footerstateful/FooterStateful.js +13 -23
  148. package/lib/esm/components/footerstateful/downloadtranscriptstateful/DownloadTranscriptStateful.js +15 -37
  149. package/lib/esm/components/footerstateful/downloadtranscriptstateful/DownloadTranscriptStateful.spec.js +6 -6
  150. package/lib/esm/components/headerstateful/HeaderStateful.js +16 -15
  151. package/lib/esm/components/livechatwidget/LiveChatWidget.js +2 -2
  152. package/lib/esm/components/livechatwidget/common/ActivityStreamHandler.js +30 -0
  153. package/lib/esm/components/livechatwidget/common/ActivitySubscriber/DefaultActivitySubscriber.js +11 -0
  154. package/lib/esm/components/livechatwidget/common/ActivitySubscriber/IActivitySubscriber.js +1 -0
  155. package/lib/esm/components/livechatwidget/common/ActivitySubscriber/PauseActivitySubscriber.js +25 -0
  156. package/lib/esm/components/livechatwidget/common/ChatAdapterShim.js +55 -0
  157. package/lib/esm/components/livechatwidget/common/Deferred.js +28 -0
  158. package/lib/esm/components/livechatwidget/common/authHelper.js +42 -0
  159. package/lib/esm/components/livechatwidget/common/createAdapter.js +12 -4
  160. package/lib/esm/components/livechatwidget/common/createFooter.js +4 -16
  161. package/lib/esm/components/livechatwidget/common/createInternetConnectionChangeHandler.js +10 -5
  162. package/lib/esm/components/livechatwidget/common/createMarkdown.js +38 -37
  163. package/lib/esm/components/livechatwidget/common/defaultProps/dummyDefaultProps.js +71 -37
  164. package/lib/esm/components/livechatwidget/common/endChat.js +57 -21
  165. package/lib/esm/components/livechatwidget/common/getGeneralStylesForButton.js +0 -2
  166. package/lib/esm/components/livechatwidget/common/initCallingSdk.js +9 -11
  167. package/lib/esm/components/livechatwidget/common/initConfirmationPropsComposer.js +4 -5
  168. package/lib/esm/components/livechatwidget/common/initWebChatComposer.js +39 -22
  169. package/lib/esm/components/livechatwidget/common/reconnectChatHelper.js +71 -68
  170. package/lib/esm/components/livechatwidget/common/registerTelemetryLoggers.js +7 -22
  171. package/lib/esm/components/livechatwidget/common/setPostChatContextAndLoadSurvey.js +4 -7
  172. package/lib/esm/components/livechatwidget/common/shareObservable.js +35 -0
  173. package/lib/esm/components/livechatwidget/common/startChat.js +170 -82
  174. package/lib/esm/components/livechatwidget/common/updateSessionDataForTelemetry.js +4 -2
  175. package/lib/esm/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +267 -109
  176. package/lib/esm/components/loadingpanestateful/LoadingPaneStateful.js +4 -5
  177. package/lib/esm/components/ooohpanestateful/OOOHPaneStateful.js +4 -5
  178. package/lib/esm/components/postchatloadingpanestateful/PostChatLoadingPaneStateful.js +4 -5
  179. package/lib/esm/components/postchatsurveypanestateful/PostChatSurveyPaneStateful.js +9 -11
  180. package/lib/esm/components/postchatsurveypanestateful/common/defaultStyleProps/defaultgeneralPostChatSurveyPaneStyleProps.js +1 -1
  181. package/lib/esm/components/postchatsurveypanestateful/enums/PostChatSurveyMode.js +0 -1
  182. package/lib/esm/components/postchatsurveypanestateful/interfaces/IPostChatSurveyPaneStatefulProps.js +1 -0
  183. package/lib/esm/components/prechatsurveypanestateful/PreChatSurveyPaneStateful.js +15 -29
  184. package/lib/esm/components/proactivechatpanestateful/ProactiveChatPaneStateful.js +21 -9
  185. package/lib/esm/components/reconnectchatpanestateful/ReconnectChatPaneStateful.js +2 -6
  186. package/lib/esm/components/webchatcontainerstateful/WebChatContainerStateful.js +94 -4
  187. package/lib/esm/components/webchatcontainerstateful/common/defaultProps/defaultWebChatContainerStatefulProps.js +3 -1
  188. package/lib/esm/components/webchatcontainerstateful/common/defaultProps/defaultWebChatStatefulProps.js +2 -2
  189. package/lib/esm/components/webchatcontainerstateful/common/defaultStyles/defaultAdaptiveCardStyles.js +4 -0
  190. package/lib/esm/components/webchatcontainerstateful/common/mockadapter.js +9 -18
  191. package/lib/esm/components/webchatcontainerstateful/common/mockchatsdk.js +3 -12
  192. package/lib/esm/components/webchatcontainerstateful/common/utils/BrowserInfo.js +2 -16
  193. package/lib/esm/components/webchatcontainerstateful/common/utils/FileAttachmentIconManager.js +3 -5
  194. package/lib/esm/components/webchatcontainerstateful/common/utils/isMaskingFromCustomer.js +5 -6
  195. package/lib/esm/components/webchatcontainerstateful/interfaces/IAdaptiveCardStyles.js +1 -0
  196. package/lib/esm/components/webchatcontainerstateful/interfaces/IBotMagicCodeConfig.js +1 -0
  197. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/BotMagicCodeStore.js +3 -0
  198. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/WebChatStoreLoader.js +0 -2
  199. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/enums/BrowserVendor.js +0 -1
  200. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/enums/DirectLineActivityType.js +0 -1
  201. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/enums/DirectLineSenderRole.js +0 -1
  202. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/enums/MessageType.js +0 -1
  203. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/enums/NotificationLevel.js +0 -1
  204. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/enums/NotificationScenarios.js +0 -1
  205. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/enums/SendStatus.js +0 -1
  206. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/enums/WebChatActionType.js +0 -1
  207. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/adaptermiddlewares/formatTagsEgressMiddleware.js +2 -5
  208. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/adaptermiddlewares/formatTagsIngressMiddleware.js +0 -4
  209. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityMiddleware.js +27 -22
  210. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityStatusMiddleware.js +11 -11
  211. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachmentMiddleware.js +23 -38
  212. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/avatarMiddleware.js +9 -8
  213. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/cardActionMiddleware.js +34 -0
  214. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/cardActionMiddleware.spec.js +80 -0
  215. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultReceivedMessageAnchorStyles.js +3 -0
  216. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultSystemMessageBoxStyles.js +3 -0
  217. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultTimestampFailedStyles.js +2 -1
  218. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultTimestampRetryStyles.js +2 -1
  219. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultUserMessageBoxStyles.js +3 -0
  220. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/groupActivitiesMiddleware.js +3 -7
  221. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/messageTimestampMiddleware.js +83 -0
  222. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/DeliveredTimestamp.js +3 -3
  223. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/NotDeliveredTimestamp.js +7 -14
  224. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/SendingTimestamp.js +3 -3
  225. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/typingIndicatorMiddleware.js +15 -19
  226. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/attachmentProcessingMiddleware.js +5 -8
  227. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/attachmentUploadValidatorMiddleware.js +6 -29
  228. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/channelDataMiddleware.js +3 -7
  229. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/conversationEndMiddleware.js +3 -8
  230. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/dataMaskingMiddleware.js +5 -13
  231. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/gifUploadMiddleware.js +3 -7
  232. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/htmlPlayerMiddleware.js +3 -7
  233. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/htmlTextMiddleware.js +15 -27
  234. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/maxMessageSizeValidator.js +3 -5
  235. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/preProcessingMiddleware.js +9 -9
  236. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/sanitizationMiddleware.js +7 -9
  237. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/notification/NotificationHandler.js +1 -13
  238. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/webchattelemetry/WebChatLogger.js +1 -5
  239. package/lib/esm/contexts/ChatAdapterStore.js +2 -1
  240. package/lib/esm/contexts/ChatContextStore.js +2 -1
  241. package/lib/esm/contexts/ChatSDKStore.js +2 -1
  242. package/lib/esm/contexts/common/ConversationState.js +3 -3
  243. package/lib/esm/contexts/common/LiveChatWidgetActionType.js +26 -23
  244. package/lib/esm/contexts/common/LiveChatWidgetContextInitialState.js +12 -8
  245. package/lib/esm/contexts/createReducer.js +150 -94
  246. package/lib/esm/controller/componentController.js +5 -4
  247. package/lib/esm/hooks/useChatAdapterStore.js +0 -4
  248. package/lib/esm/hooks/useChatContextStore.js +0 -4
  249. package/lib/esm/hooks/useChatSDKStore.js +0 -4
  250. package/lib/esm/plugins/newMessageEventHandler.js +22 -35
  251. package/lib/types/common/Constants.d.ts +9 -1
  252. package/lib/types/common/interfaces/IContextDataStore.d.ts +2 -2
  253. package/lib/types/common/storage/default/defaultCacheManager.d.ts +4 -0
  254. package/lib/types/common/storage/default/defaultClientDataStoreProvider.d.ts +2 -0
  255. package/lib/types/common/storage/default/defaultInMemoryDataStore.d.ts +6 -0
  256. package/lib/types/common/telemetry/TelemetryConstants.d.ts +30 -5
  257. package/lib/types/common/telemetry/TelemetryHelper.d.ts +1 -0
  258. package/lib/types/common/telemetry/definitions/Payload.d.ts +12 -9
  259. package/lib/types/common/telemetry/interfaces/ITelemetryConfig.d.ts +3 -3
  260. package/lib/types/common/utils.d.ts +7 -1
  261. package/lib/types/components/headerstateful/interfaces/IHeaderStatefulParams.d.ts +2 -1
  262. package/lib/types/components/livechatwidget/common/ActivityStreamHandler.d.ts +14 -0
  263. package/lib/types/components/livechatwidget/common/ActivitySubscriber/DefaultActivitySubscriber.d.ts +5 -0
  264. package/lib/types/components/livechatwidget/common/ActivitySubscriber/IActivitySubscriber.d.ts +6 -0
  265. package/lib/types/components/livechatwidget/common/ActivitySubscriber/PauseActivitySubscriber.d.ts +7 -0
  266. package/lib/types/components/livechatwidget/common/ChatAdapterShim.d.ts +7 -0
  267. package/lib/types/components/livechatwidget/common/Deferred.d.ts +9 -0
  268. package/lib/types/components/livechatwidget/common/authHelper.d.ts +5 -0
  269. package/lib/types/components/livechatwidget/common/endChat.d.ts +1 -1
  270. package/lib/types/components/livechatwidget/common/reconnectChatHelper.d.ts +5 -4
  271. package/lib/types/components/livechatwidget/common/shareObservable.d.ts +1 -0
  272. package/lib/types/components/livechatwidget/common/startChat.d.ts +4 -2
  273. package/lib/types/components/livechatwidget/interfaces/ILiveChatWidgetControlProps.d.ts +1 -0
  274. package/lib/types/components/livechatwidget/interfaces/ILiveChatWidgetProps.d.ts +4 -3
  275. package/lib/types/components/postchatsurveypanestateful/PostChatSurveyPaneStateful.d.ts +2 -2
  276. package/lib/types/components/postchatsurveypanestateful/interfaces/IPostChatSurveyPaneStatefulProps.d.ts +4 -0
  277. package/lib/types/components/reconnectchatpanestateful/interfaces/IReconnectChatPaneStatefulProps.d.ts +0 -1
  278. package/lib/types/components/webchatcontainerstateful/common/defaultStyles/defaultAdaptiveCardStyles.d.ts +2 -0
  279. package/lib/types/components/webchatcontainerstateful/common/mockchatsdk.d.ts +1 -0
  280. package/lib/types/components/webchatcontainerstateful/interfaces/IAdaptiveCardStyles.d.ts +4 -0
  281. package/lib/types/components/webchatcontainerstateful/interfaces/IBotMagicCodeConfig.d.ts +4 -0
  282. package/lib/types/components/webchatcontainerstateful/interfaces/IRenderingMiddlewareProps.d.ts +4 -1
  283. package/lib/types/components/webchatcontainerstateful/interfaces/IWebChatContainerStatefulProps.d.ts +4 -0
  284. package/lib/types/components/webchatcontainerstateful/webchatcontroller/BotMagicCodeStore.d.ts +3 -0
  285. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityStatusMiddleware.d.ts +1 -1
  286. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/cardActionMiddleware.d.ts +2 -0
  287. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/cardActionMiddleware.spec.d.ts +1 -0
  288. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultReceivedMessageAnchorStyles.d.ts +2 -0
  289. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultSystemMessageBoxStyles.d.ts +3 -0
  290. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultUserMessageBoxStyles.d.ts +3 -0
  291. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/messageTimestampMiddleware.d.ts +5 -0
  292. package/lib/types/contexts/common/ConversationState.d.ts +3 -2
  293. package/lib/types/contexts/common/ILiveChatWidgetContext.d.ts +4 -2
  294. package/lib/types/contexts/common/LiveChatWidgetActionType.d.ts +26 -22
  295. package/lib/types/contexts/common/LiveChatWidgetContextInitialState.d.ts +1 -2
  296. package/package.json +7 -9
@@ -1,15 +1,11 @@
1
1
  import { ChatAdapterStore } from "../contexts/ChatAdapterStore";
2
2
  import { useContext } from "react";
3
-
4
3
  const useChatAdapterStore = () => {
5
4
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6
5
  const adapter = useContext(ChatAdapterStore);
7
-
8
6
  if (!adapter) {
9
7
  throw new Error("This hook can only be used on component that is descendants of <ChatAdapterStore.Provider>");
10
8
  }
11
-
12
9
  return adapter;
13
10
  };
14
-
15
11
  export default useChatAdapterStore;
@@ -1,14 +1,10 @@
1
1
  import { useContext } from "react";
2
2
  import { ChatContextStore } from "../contexts/ChatContextStore";
3
-
4
3
  const useChatContextStore = () => {
5
4
  const context = useContext(ChatContextStore);
6
-
7
5
  if (!context) {
8
6
  throw new Error("This hook can only be used on component that is descendants of <ChatContextStore.Provider>");
9
7
  }
10
-
11
8
  return context;
12
9
  };
13
-
14
10
  export default useChatContextStore;
@@ -1,14 +1,10 @@
1
1
  import { ChatSDKStore } from "../contexts/ChatSDKStore";
2
2
  import { useContext } from "react";
3
-
4
3
  const useChatSDKStore = () => {
5
4
  const sdk = useContext(ChatSDKStore);
6
-
7
5
  if (!sdk) {
8
6
  throw new Error("This hook is not called on component that is descendants of <ChatSDKStore.Provider>, or ChatSDK is not passed into LiveChatWidget component.");
9
7
  }
10
-
11
8
  return sdk;
12
9
  };
13
-
14
10
  export default useChatSDKStore;
@@ -2,36 +2,26 @@ 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;
9
-
10
8
  const isActivityMessage = (activity === null || activity === void 0 ? void 0 : activity.type) === Constants.message;
11
- const isNotHistoryMessage = isActivityMessage && !(activity !== null && activity !== void 0 && (_activity$channelData = activity.channelData) !== null && _activity$channelData !== void 0 && (_activity$channelData2 = _activity$channelData.tags) !== null && _activity$channelData2 !== void 0 && _activity$channelData2.includes(Constants.historyMessageTag)) && !(activity !== null && activity !== void 0 && (_activity$channelData3 = activity.channelData) !== null && _activity$channelData3 !== void 0 && _activity$channelData3.fromList);
12
-
13
- if (isNotHistoryMessage) {
14
- raiseMessageEvent(activity);
15
- }
9
+ const isHistoryMessage = isActivityMessage && ((activity === null || activity === void 0 ? void 0 : (_activity$channelData = activity.channelData) === null || _activity$channelData === void 0 ? void 0 : (_activity$channelData2 = _activity$channelData.tags) === null || _activity$channelData2 === void 0 ? void 0 : _activity$channelData2.includes(Constants.historyMessageTag)) || (activity === null || activity === void 0 ? void 0 : (_activity$channelData3 = activity.channelData) === null || _activity$channelData3 === void 0 ? void 0 : _activity$channelData3.fromList));
10
+ raiseMessageEvent(activity, isHistoryMessage);
16
11
  };
17
-
18
- const raiseMessageEvent = activity => {
12
+ const raiseMessageEvent = (activity, isHistoryMessage) => {
19
13
  if ((activity === null || activity === void 0 ? void 0 : activity.type) === Constants.message) {
20
- var _TelemetryManager$Int, _activity$from;
21
-
14
+ var _text, _text2, _activity$channelData4, _activity$from;
22
15
  const payload = {
16
+ // To identify hidden contents vs empty content
23
17
  // 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,
18
+ 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
19
  type: activity === null || activity === void 0 ? void 0 : activity.type,
27
20
  timestamp: activity === null || activity === void 0 ? void 0 : activity.timestamp,
28
- chatId: chatId,
29
21
  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,
22
+ tags: activity === null || activity === void 0 ? void 0 : (_activity$channelData4 = activity.channelData) === null || _activity$channelData4 === void 0 ? void 0 : _activity$channelData4.tags,
32
23
  messageType: ""
33
24
  };
34
-
35
25
  if ((activity === null || activity === void 0 ? void 0 : (_activity$from = activity.from) === null || _activity$from === void 0 ? void 0 : _activity$from.role) === Constants.userMessageTag) {
36
26
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
37
27
  payload.messageType = Constants.userMessageTag;
@@ -45,40 +35,37 @@ export const createOnNewAdapterActivityHandler = (chatId, userId) => {
45
35
  Description: "New message sent"
46
36
  });
47
37
  } else {
48
- var _activity$channelData4, _activity$channelData5;
49
-
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)) {
38
+ var _activity$channelData5, _activity$channelData6;
39
+ 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
40
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
52
41
  payload.messageType = Constants.systemMessageTag;
53
42
  } else {
54
- var _activity$channelData6, _activity$channelData7, _activity$channelData8;
55
-
43
+ var _activity$channelData7, _activity$channelData8, _activity$channelData9;
44
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
45
+ const messageHasNoText = !(activity !== null && activity !== void 0 && activity.text);
46
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
47
+ 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;
56
48
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
57
- const messageHasNoText = !(activity !== null && activity !== void 0 && activity.text); // eslint-disable-next-line @typescript-eslint/no-explicit-any
58
-
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
60
-
61
49
  const messageHasNoAttachments = !(activity !== null && activity !== void 0 && activity.attachments) || (activity === null || activity === void 0 ? void 0 : activity.attachments.length) === 0;
62
-
63
50
  if (messageHasNoTags && messageHasNoText && messageHasNoAttachments) {
64
51
  return;
65
52
  }
66
-
67
53
  payload.messageType = Constants.userMessageTag;
68
54
  }
69
-
70
55
  const newMessageReceivedEvent = {
71
- eventName: BroadcastEvent.NewMessageReceived,
56
+ eventName: isHistoryMessage ? BroadcastEvent.HistoryMessageReceived : BroadcastEvent.NewMessageReceived,
72
57
  payload: payload
73
58
  };
74
59
  BroadcastService.postMessage(newMessageReceivedEvent);
75
- TelemetryHelper.logActionEvent(LogLevel.INFO, {
76
- Event: TelemetryEvent.MessageReceived,
77
- Description: "New message received"
78
- });
60
+ if (!isHistoryMessage) {
61
+ TelemetryHelper.logActionEvent(LogLevel.INFO, {
62
+ Event: TelemetryEvent.MessageReceived,
63
+ Description: "New message received",
64
+ Data: payload
65
+ });
66
+ }
79
67
  }
80
68
  }
81
69
  };
82
-
83
70
  return onNewAdapterActivityHandler;
84
71
  };
@@ -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;
@@ -70,6 +75,9 @@ export declare class Constants {
70
75
  static readonly OpenLinkIconCssClass = "webchat__markdown__external-link-icon";
71
76
  static readonly internetConnectionTestUrl = "https://ocsdk-prod.azureedge.net/public/connecttest.txt";
72
77
  static readonly internetConnectionTestUrlText = "Omnichannel Connect Test";
78
+ static readonly ChatWidgetStateChangedPrefix = "ChatWidgetStateChanged";
79
+ static readonly PostChatLoadingDurationInMs = 2000;
80
+ static readonly BrowserUnloadConfirmationMessage = "Do you want to leave chat?";
73
81
  }
74
82
  export declare const Regex: {
75
83
  new (): {};
@@ -6,9 +6,9 @@ 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
  */
13
- removeData?: (key: string) => void;
13
+ removeData: (key: string, type: string) => void;
14
14
  }
@@ -0,0 +1,4 @@
1
+ export declare class defaultCacheManager {
2
+ static InternalCache: any;
3
+ }
4
+ export declare const registerBroadcastServiceForLocalStorage: (orgid: string, widgetId: string, widgetInstanceId: string) => void;
@@ -0,0 +1,2 @@
1
+ import { IContextDataStore } from "../../interfaces/IContextDataStore";
2
+ export declare const defaultClientDataStoreProvider: () => IContextDataStore;
@@ -0,0 +1,6 @@
1
+ export declare const defaultInitializeInMemoryDataStore: (widgetId: string) => void;
2
+ export declare const inMemoryDataStore: () => {
3
+ getData: (key: string) => any;
4
+ setData: (key: any, data: any) => void;
5
+ removeData: (key: string) => void;
6
+ };
@@ -19,18 +19,30 @@ export declare enum LogLevel {
19
19
  }
20
20
  export declare enum BroadcastEvent {
21
21
  LoadPostChatSurvey = "LoadPostChatSurvey",
22
- EndChat = "ChatEnded",
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
32
  NewMessageReceived = "NewMessageReceived",
33
+ HistoryMessageReceived = "HistoryMessageReceived",
31
34
  RedirectPageRequest = "RedirectPageRequest",
35
+ StartChat = "StartChat",
32
36
  StartChatSkippingChatButtonRendering = "StartChatSkippingChatButtonRendering",
33
- StartUnauthenticatedReconnectChat = "StartUnauthenticatedReconnectChat"
37
+ StartUnauthenticatedReconnectChat = "StartUnauthenticatedReconnectChat",
38
+ InitiateEndChat = "InitiateEndChat",
39
+ SetCustomContext = "SetCustomContext",
40
+ ChatRetrievedFromCache = "ChatRetrievedFromCache",
41
+ MaximizeChat = "MaximizeChat",
42
+ ChatInitiated = "ChatInitiated",
43
+ CloseChat = "CloseChat",
44
+ InitiateEndChatOnBrowserUnload = "InitiateEndChatOnBrowserUnload",
45
+ ClosePopoutWindow = "ClosePopoutWindow"
34
46
  }
35
47
  export declare enum TelemetryEvent {
36
48
  CallAdded = "CallAdded",
@@ -68,6 +80,8 @@ export declare enum TelemetryEvent {
68
80
  PostChatContextCallSucceed = "PostChatContextCallSucceed",
69
81
  PostChatContextCallFailed = "PostChatContextCallFailed",
70
82
  ParseAdaptiveCardFailed = "ParseAdaptiveCardFailed",
83
+ ClientDataStoreProviderFailed = "ClientDataStoreProviderFailed",
84
+ InMemoryDataStoreFailed = "InMemoryDataStoreFailed",
71
85
  WebChatLoaded = "WebChatLoaded",
72
86
  LCWChatButtonClicked = "LCWChatButtonClicked",
73
87
  LCWChatButtonShow = "LCWChatButtonShow",
@@ -79,8 +93,9 @@ export declare enum TelemetryEvent {
79
93
  PrechatSubmitted = "PrechatSubmitted",
80
94
  StartChatSDKCall = "StartChatCall",
81
95
  StartChatEventRecevied = "StartChatEventReceived",
82
- EndChatSDKCall = "EndChatCall",
96
+ EndChatSDKCall = "EndChatSDKCall",
83
97
  EndChatEventReceived = "EndChatEventReceived",
98
+ WindowClosed = "WindowClosed",
84
99
  OnNewMessageFailed = "OnNewMessageFailed",
85
100
  OnNewMessageAudioNotificationFailed = "OnNewMessageAudioNotificationFailed",
86
101
  DownloadTranscriptResponseNullOrUndefined = "DownloadTranscriptResponseNullOrUndefined",
@@ -105,6 +120,12 @@ export declare enum TelemetryEvent {
105
120
  EmailTranscriptButtonClicked = "EmailTranscriptButtonClicked",
106
121
  EmailTranscriptCancelButtonClicked = "EmailTranscriptCancelButtonClicked",
107
122
  AudioToggleButtonClicked = "AudioToggleButtonClicked",
123
+ SuppressBotMagicCodeSucceeded = "SuppressBotMagicCodeSucceeded",
124
+ SuppressBotMagicCodeFailed = "SuppressBotMagicCodeFailed",
125
+ GetConversationDetailsException = "GetConversationDetailsException",
126
+ BrowserUnloadEventStarted = "BrowserUnloadEventStarted",
127
+ GetAuthTokenCalled = "GetAuthTokenCalled",
128
+ ReceivedNullOrEmptyToken = "ReceivedNullOrEmptyToken",
108
129
  ProcessingHTMLTextMiddlewareFailed = "ProcessingHTMLTextMiddlewareFailed",
109
130
  ProcessingSanitizationMiddlewareFailed = "ProcessingSanitizationMiddlewareFailed",
110
131
  FormatTagsMiddlewareJSONStringifyFailed = "FormatTagsMiddlewareJSONStringifyFailed",
@@ -129,11 +150,15 @@ export declare enum TelemetryEvent {
129
150
  ReconnectChatStartNewConversation = "ReconnectChatStartNewConversation",
130
151
  ReconnectChatMinimize = "ReconnectChatMinimize",
131
152
  MessageSent = "MessageSent",
132
- MessageReceived = "MessageReceived"
153
+ MessageReceived = "MessageReceived",
154
+ CustomContextReceived = "CustomContextReceived",
155
+ NetworkDisconnected = "NetworkDisconnected",
156
+ NetworkReconnected = "NetworkReconnected"
133
157
  }
134
158
  export interface TelemetryInput {
135
159
  scenarioType: ScenarioType;
136
160
  payload: TelemetryData;
161
+ telemetryInfo?: any;
137
162
  }
138
163
  export declare class TelemetryConstants {
139
164
  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;
@@ -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
  }
@@ -18,7 +18,13 @@ export declare const extractPreChatSurveyResponseValues: (preChatSurvey: string,
18
18
  value: string;
19
19
  }[]) => {};
20
20
  export declare const isNullOrUndefined: (obj: any) => boolean;
21
- export declare const isNullOrEmptyString: (s: string) => boolean;
21
+ export declare const isNullOrEmptyString: (s: string | null) => boolean;
22
22
  export declare const newGuid: () => string;
23
23
  export declare const createTimer: () => ITimer;
24
24
  export declare const getDomain: (hostValue: any) => string;
25
+ export declare const getWidgetCacheId: (orgId: string, widgetId: string, widgetInstanceId: string) => string;
26
+ export declare const getWidgetEndChatEventName: (orgId: string, widgetId: string, widgetInstanceId: string) => string;
27
+ export declare const getStateFromCache: (orgId: string, widgetId: string, widgetInstanceId: string) => any;
28
+ export declare const isUndefinedOrEmpty: (object: any) => boolean;
29
+ export declare const addDelayInMs: (ms: number) => Promise<void>;
30
+ export declare const getBroadcastChannelName: (widgetId: string, widgetInstanceId: string) => string;
@@ -15,6 +15,7 @@ export interface IHeaderStatefulParams {
15
15
  * @param adapter : The chat adapter for the live chat session
16
16
  * @param skipEndChatSDK : If set to true endchat will skip chatSDK endChat call
17
17
  * @param skipCloseChat : If set to true endchat will skip closing the live chat instance
18
+ * @param postMessageToOtherTab : If set to true endchat will send a message to other tabs(multi-tabs)
18
19
  */
19
- endChat: (adapter: any, skipEndChatSDK?: boolean, skipCloseChat?: boolean) => Promise<void>;
20
+ endChat: (adapter: any, skipEndChatSDK?: boolean, skipCloseChat?: boolean, postMessageToOtherTab?: boolean) => Promise<void>;
20
21
  }
@@ -0,0 +1,14 @@
1
+ export declare class ActivityStreamHandler {
2
+ static restoreDeferred: any;
3
+ static restorePromise: Promise<any>;
4
+ /**
5
+ * Use of a deferred pattern, to hold the execution of the activity.
6
+ *
7
+ * */
8
+ static cork(): void;
9
+ /**
10
+ * Resolve the promise, releasing it to continue with the execution of the activity.
11
+ *
12
+ * */
13
+ static uncork(): void;
14
+ }
@@ -0,0 +1,5 @@
1
+ import { IActivitySubscriber } from "./IActivitySubscriber";
2
+ export declare class DefaultActivitySubscriber implements IActivitySubscriber {
3
+ observer: any;
4
+ next(activity: any): Promise<boolean>;
5
+ }
@@ -0,0 +1,6 @@
1
+ export interface IActivitySubscriber {
2
+ observer: any;
3
+ next(activity: any): Promise<any>;
4
+ applicable?(activity: any): boolean;
5
+ apply?(activity: any): Promise<any>;
6
+ }
@@ -0,0 +1,7 @@
1
+ import { IActivitySubscriber } from "./IActivitySubscriber";
2
+ export declare class PauseActivitySubscriber implements IActivitySubscriber {
3
+ observer: any;
4
+ apply(activity: any): Promise<void>;
5
+ applicable(activity: any): boolean;
6
+ next(activity: any): Promise<any>;
7
+ }
@@ -0,0 +1,7 @@
1
+ export declare class ChatAdapterShim {
2
+ chatAdapter: any;
3
+ activityObserver: any;
4
+ private subscribers;
5
+ constructor(chatAdapter: any);
6
+ addSubscriber(subscriber: any): void;
7
+ }
@@ -0,0 +1,9 @@
1
+ export declare class Deferred<T> {
2
+ private _promise;
3
+ private _resolve;
4
+ private _reject;
5
+ constructor();
6
+ resolve: (value?: any | PromiseLike<T>) => void;
7
+ reject: (value?: any | PromiseLike<T>) => void;
8
+ get promise(): Promise<T>;
9
+ }
@@ -0,0 +1,5 @@
1
+ import ChatConfig from "@microsoft/omnichannel-chat-sdk/lib/core/ChatConfig";
2
+ declare const getAuthClientFunction: (chatConfig: ChatConfig | undefined) => string | undefined;
3
+ declare const handleAuthentication: (chatSDK: any, chatConfig: ChatConfig | undefined, getAuthToken: ((authClientFunction?: string | undefined) => Promise<string | null>) | undefined) => Promise<boolean>;
4
+ declare const removeAuthTokenProvider: (chatSDK: any) => void;
5
+ export { getAuthClientFunction, handleAuthentication, removeAuthTokenProvider };
@@ -3,5 +3,5 @@ import { ILiveChatWidgetAction } from "../../../contexts/common/ILiveChatWidgetA
3
3
  import { ILiveChatWidgetProps } from "../interfaces/ILiveChatWidgetProps";
4
4
  import { ILiveChatWidgetContext } from "../../../contexts/common/ILiveChatWidgetContext";
5
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) => 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
7
  export { prepareEndChat, endChat };
@@ -1,10 +1,11 @@
1
1
  import "regenerator-runtime/runtime";
2
+ import ChatConfig from "@microsoft/omnichannel-chat-sdk/lib/core/ChatConfig";
2
3
  import { Dispatch } from "react";
3
4
  import { ILiveChatWidgetAction } from "../../../contexts/common/ILiveChatWidgetAction";
4
5
  import { ILiveChatWidgetProps } from "../interfaces/ILiveChatWidgetProps";
5
- declare const getChatReconnectContext: (chatSDK: any, reconnectId?: string | undefined) => Promise<any>;
6
+ declare const getChatReconnectContext: (chatSDK: any, chatConfig: ChatConfig | undefined, getAuthToken: ((authClientFunction?: string | undefined) => Promise<string | null>) | undefined, isReconnectEnabled?: boolean | undefined, reconnectId?: string | undefined) => Promise<any>;
6
7
  declare const getReconnectIdForAuthenticatedChat: (props: ILiveChatWidgetProps, chatSDK: any) => Promise<string | undefined>;
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>;
8
+ declare const handleUnauthenticatedReconnectChat: (chatSDK: any, chatConfig: ChatConfig | undefined, getAuthToken: ((authClientFunction?: string | undefined) => Promise<string | null>) | undefined, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any, isReconnectEnabled: boolean | undefined, reconnectId: string, initStartChat: any, redirectInSameWindow: boolean | undefined) => Promise<void>;
9
+ declare const startUnauthenticatedReconnectChat: (chatSDK: any, chatConfig: ChatConfig | undefined, getAuthToken: ((authClientFunction?: string | undefined) => Promise<string | null>) | undefined, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any, isReconnectEnabled: boolean | undefined, reconnectId: string, initStartChat: any) => Promise<void>;
10
+ declare const handleRedirectUnauthenticatedReconnectChat: (chatSDK: any, chatConfig: ChatConfig | undefined, getAuthToken: ((authClientFunction?: string | undefined) => Promise<string | null>) | undefined, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any, initStartChat: any, isReconnectEnabled: boolean | undefined, reconnectId: string, redirectInSameWindow: boolean | undefined) => Promise<void>;
10
11
  export { getChatReconnectContext, getReconnectIdForAuthenticatedChat, handleUnauthenticatedReconnectChat, startUnauthenticatedReconnectChat, handleRedirectUnauthenticatedReconnectChat };
@@ -0,0 +1 @@
1
+ export declare function shareObservable(observable: any): any;
@@ -1,7 +1,9 @@
1
+ import ChatConfig from "@microsoft/omnichannel-chat-sdk/lib/core/ChatConfig";
1
2
  import { Dispatch } from "react";
2
3
  import { ILiveChatWidgetAction } from "../../../contexts/common/ILiveChatWidgetAction";
3
4
  import { ILiveChatWidgetContext } from "../../../contexts/common/ILiveChatWidgetContext";
4
5
  import { ILiveChatWidgetProps } from "../interfaces/ILiveChatWidgetProps";
5
6
  declare const prepareStartChat: (props: ILiveChatWidgetProps, chatSDK: any, state: ILiveChatWidgetContext, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any) => Promise<void>;
6
- declare const initStartChat: (chatSDK: any, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any, params?: any, persistedState?: any) => Promise<void>;
7
- export { prepareStartChat, initStartChat };
7
+ declare const setPreChatAndInitiateChat: (chatSDK: any, chatConfig: ChatConfig | undefined, getAuthToken: ((authClientFunction?: string | undefined) => Promise<string | null>) | undefined, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any, isProactiveChat?: boolean | undefined, proactiveChatEnablePrechatState?: boolean | undefined) => Promise<void>;
8
+ declare const initStartChat: (chatSDK: any, chatConfig: ChatConfig | undefined, getAuthToken: ((authClientFunction?: string | undefined) => Promise<string | null>) | undefined, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any, params?: any, persistedState?: any) => Promise<void>;
9
+ export { prepareStartChat, initStartChat, setPreChatAndInitiateChat };
@@ -14,4 +14,5 @@ export interface ILiveChatWidgetControlProps {
14
14
  hideReconnectChatPane?: boolean;
15
15
  hideWebChatContainer?: boolean;
16
16
  skipChatButtonRendering?: boolean;
17
+ widgetInstanceId?: string | undefined;
17
18
  }
@@ -12,7 +12,6 @@ import { ILiveChatWidgetControlProps } from "./ILiveChatWidgetControlProps";
12
12
  import { ILiveChatWidgetStyleProps } from "./ILiveChatWidgetStyleProps";
13
13
  import { ILoadingPaneProps } from "@microsoft/omnichannel-chat-components/lib/types/components/loadingpane/interfaces/ILoadingPaneProps";
14
14
  import { IOOOHPaneProps } from "@microsoft/omnichannel-chat-components/lib/types/components/outofofficehourspane/interfaces/IOOOHPaneProps";
15
- import { IPostChatSurveyPaneProps } from "@microsoft/omnichannel-chat-components/lib/types/components/postchatsurveypane/interfaces/IPostChatSurveyPaneProps";
16
15
  import { IPreChatSurveyPaneProps } from "@microsoft/omnichannel-chat-components/lib/types/components/prechatsurveypane/interfaces/IPreChatSurveyPaneProps";
17
16
  import { IProactiveChatPaneStatefulProps } from "../../proactivechatpanestateful/interfaces/IProactiveChatPaneStatefulProps";
18
17
  import { IReconnectChatPaneStatefulProps } from "../../reconnectchatpanestateful/interfaces/IReconnectChatPaneStatefulProps";
@@ -21,6 +20,7 @@ import { IWebChatContainerStatefulProps } from "../../webchatcontainerstateful/i
21
20
  import { OmnichannelChatSDK } from "@microsoft/omnichannel-chat-sdk";
22
21
  import { ILiveChatWidgetContext } from "../../../contexts/common/ILiveChatWidgetContext";
23
22
  import { IContextDataStore } from "../../../common/interfaces/IContextDataStore";
23
+ import { IPostChatSurveyPaneStatefulProps } from "../../postchatsurveypanestateful/interfaces/IPostChatSurveyPaneStatefulProps";
24
24
  export interface ILiveChatWidgetProps {
25
25
  audioNotificationProps?: IAudioNotificationProps;
26
26
  callingContainerProps?: ICallingContainerProps;
@@ -40,13 +40,14 @@ export interface ILiveChatWidgetProps {
40
40
  outOfOfficeHeaderProps?: IHeaderProps;
41
41
  outOfOfficeHoursPaneProps?: IOOOHPaneProps;
42
42
  postChatLoadingPaneProps?: ILoadingPaneProps;
43
- postChatSurveyPaneProps?: IPostChatSurveyPaneProps;
43
+ postChatSurveyPaneProps?: IPostChatSurveyPaneStatefulProps;
44
44
  preChatSurveyPaneProps?: IPreChatSurveyPaneProps;
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;
52
+ getAuthToken?: (authClientFunction?: string) => Promise<string | null>;
52
53
  }
@@ -1,3 +1,3 @@
1
- import { IPostChatSurveyPaneProps } from "@microsoft/omnichannel-chat-components/lib/types/components/postchatsurveypane/interfaces/IPostChatSurveyPaneProps";
2
- export declare const PostChatSurveyPaneStateful: (props: IPostChatSurveyPaneProps) => JSX.Element;
1
+ import { IPostChatSurveyPaneStatefulProps } from "./interfaces/IPostChatSurveyPaneStatefulProps";
2
+ export declare const PostChatSurveyPaneStateful: (props: IPostChatSurveyPaneStatefulProps) => JSX.Element;
3
3
  export default PostChatSurveyPaneStateful;
@@ -0,0 +1,4 @@
1
+ import { IPostChatSurveyPaneProps } from "@microsoft/omnichannel-chat-components/lib/types/components/postchatsurveypane/interfaces/IPostChatSurveyPaneProps";
2
+ export interface IPostChatSurveyPaneStatefulProps extends IPostChatSurveyPaneProps {
3
+ isCustomerVoiceSurveyCompact?: boolean;
4
+ }
@@ -1,6 +1,5 @@
1
1
  import { IReconnectChatPaneProps } from "@microsoft/omnichannel-chat-components/lib/types/components/reconnectchatpane/interfaces/IReconnectChatPaneProps";
2
2
  export interface IReconnectChatPaneStatefulProps extends IReconnectChatPaneProps {
3
- authClientFunction?: string;
4
3
  isReconnectEnabled?: boolean;
5
4
  reconnectId?: string;
6
5
  redirectInSameWindow?: boolean;
@@ -0,0 +1,2 @@
1
+ import { IAdaptiveCardStyles } from "../../interfaces/IAdaptiveCardStyles";
2
+ export declare const defaultAdaptiveCardStyles: IAdaptiveCardStyles;
@@ -1,6 +1,7 @@
1
1
  import MockAdapter from "./mockadapter";
2
2
  export declare class MockChatSDK {
3
3
  protected sleep: (ms: any) => Promise<unknown>;
4
+ isMockModeOn: boolean;
4
5
  startChat(): Promise<void>;
5
6
  endChat(): null;
6
7
  getChatToken(): null;
@@ -0,0 +1,4 @@
1
+ export interface IAdaptiveCardStyles {
2
+ background?: string;
3
+ color?: string;
4
+ }