@microsoft/omnichannel-chat-widget 0.1.0-main.edd8c2a → 0.1.0-main.f514612
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +259 -0
- package/lib/cjs/assets/Audios.js +8 -0
- package/lib/cjs/assets/Icons.js +28 -0
- package/lib/cjs/common/Constants.js +54 -4
- package/lib/cjs/common/contextDataStore/DataStoreManager.js +14 -0
- package/lib/cjs/{assets/assets.d.js → common/interfaces/IContextDataStore.js} +0 -0
- package/lib/cjs/common/storage/default/defaultCacheManager.js +34 -0
- package/lib/cjs/common/storage/default/defaultClientDataStoreProvider.js +114 -0
- package/lib/cjs/common/storage/default/defaultInMemoryDataStore.js +86 -0
- package/lib/cjs/common/telemetry/TelemetryConstants.js +67 -4
- package/lib/cjs/common/telemetry/TelemetryHelper.js +22 -4
- package/lib/cjs/common/telemetry/TelemetryManager.js +28 -9
- package/lib/cjs/common/telemetry/defaultConfigs/defaultAriaConfig.js +3 -3
- package/lib/cjs/common/telemetry/defaultConfigs/defaultTelemetryConfiguration.js +4 -1
- package/lib/cjs/common/telemetry/loggers/ariaTelemetryLogger.js +48 -15
- package/lib/cjs/common/telemetry/loggers/consoleLogger.js +9 -5
- package/lib/cjs/common/utils.js +89 -2
- package/lib/cjs/components/callingcontainerstateful/CallingContainerStateful.js +14 -0
- package/lib/cjs/components/chatbuttonstateful/ChatButtonStateful.js +20 -4
- package/lib/cjs/components/confirmationpanestateful/ConfirmationPaneStateful.js +7 -54
- package/lib/cjs/components/emailtranscriptpanestateful/EmailTranscriptPaneStateful.js +2 -2
- package/lib/cjs/components/footerstateful/FooterStateful.js +5 -13
- package/lib/cjs/components/footerstateful/downloadtranscriptstateful/DownloadTranscriptStateful.js +11 -2
- package/lib/cjs/components/headerstateful/HeaderStateful.js +14 -10
- package/lib/cjs/components/livechatwidget/common/ActivityStreamHandler.js +44 -0
- package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/DefaultActivitySubscriber.js +23 -0
- package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/IActivitySubscriber.js +1 -0
- package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/PauseActivitySubscriber.js +39 -0
- package/lib/cjs/components/livechatwidget/common/ChatAdapterShim.js +70 -0
- package/lib/cjs/components/livechatwidget/common/Deferred.js +42 -0
- package/lib/cjs/components/livechatwidget/common/authHelper.js +65 -0
- package/lib/cjs/components/livechatwidget/common/createAdapter.js +13 -1
- package/lib/cjs/components/livechatwidget/common/createFooter.js +7 -16
- package/lib/cjs/components/livechatwidget/common/createInternetConnectionChangeHandler.js +12 -0
- package/lib/cjs/components/livechatwidget/common/createMarkdown.js +32 -32
- package/lib/cjs/components/livechatwidget/common/defaultProps/dummyDefaultProps.js +46 -26
- package/lib/cjs/components/livechatwidget/common/disposeTelemetryLoggers.js +14 -0
- package/lib/cjs/components/livechatwidget/common/endChat.js +142 -43
- package/lib/cjs/components/livechatwidget/common/initCallingSdk.js +5 -0
- package/lib/cjs/components/livechatwidget/common/initWebChatComposer.js +51 -10
- package/lib/cjs/components/livechatwidget/common/reconnectChatHelper.js +144 -39
- package/lib/cjs/components/livechatwidget/common/registerTelemetryLoggers.js +11 -7
- package/lib/cjs/components/livechatwidget/common/setPostChatContextAndLoadSurvey.js +22 -24
- package/lib/cjs/components/livechatwidget/common/shareObservable.js +45 -0
- package/lib/cjs/components/livechatwidget/common/startChat.js +207 -41
- package/lib/cjs/components/livechatwidget/common/startProactiveChat.js +3 -3
- package/lib/cjs/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +324 -71
- package/lib/cjs/components/loadingpanestateful/LoadingPaneStateful.js +1 -1
- package/lib/cjs/components/ooohpanestateful/OOOHPaneStateful.js +8 -0
- package/lib/cjs/components/postchatloadingpanestateful/PostChatLoadingPaneStateful.js +8 -0
- package/lib/cjs/components/prechatsurveypanestateful/PreChatSurveyPaneStateful.js +22 -10
- package/lib/cjs/components/proactivechatpanestateful/ProactiveChatPaneStateful.js +27 -5
- package/lib/cjs/components/proactivechatpanestateful/interfaces/IProactiveChatNotificationConfig.js +1 -0
- package/lib/cjs/components/webchatcontainerstateful/WebChatContainerStateful.js +96 -2
- package/lib/cjs/components/webchatcontainerstateful/common/defaultProps/defaultWebChatContainerStatefulProps.js +4 -1
- package/lib/cjs/components/webchatcontainerstateful/common/defaultStyles/defaultAdaptiveCardStyles.js +11 -0
- package/lib/cjs/components/webchatcontainerstateful/common/mockchatsdk.js +6 -0
- package/lib/cjs/components/webchatcontainerstateful/common/utils/FileAttachmentIconManager.js +51 -73
- package/lib/cjs/components/webchatcontainerstateful/interfaces/IAdaptiveCardStyles.js +1 -0
- package/lib/cjs/components/webchatcontainerstateful/interfaces/IBotMagicCodeConfig.js +1 -0
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/BotMagicCodeStore.js +14 -0
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityMiddleware.js +25 -48
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityStatusMiddleware.js +2 -1
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachmentMiddleware.js +3 -1
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/cardActionMiddleware.js +52 -0
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/cardActionMiddleware.spec.js +98 -0
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultReceivedMessageAnchorStyles.js +10 -0
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/messageTimestampMiddleware.js +117 -0
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/conversationEndMiddleware.js +6 -6
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/webchattelemetry/WebChatLogger.js +45 -0
- package/lib/cjs/contexts/common/ConversationState.js +4 -2
- package/lib/cjs/contexts/common/LiveChatWidgetActionType.js +13 -7
- package/lib/cjs/contexts/common/LiveChatWidgetContextInitialState.js +20 -5
- package/lib/cjs/contexts/createReducer.js +44 -10
- package/lib/cjs/controller/componentController.js +5 -5
- package/lib/cjs/plugins/newMessageEventHandler.js +99 -0
- package/lib/esm/assets/Audios.js +1 -0
- package/lib/esm/assets/Icons.js +11 -0
- package/lib/esm/common/Constants.js +50 -3
- package/lib/esm/common/contextDataStore/DataStoreManager.js +5 -0
- package/lib/esm/common/interfaces/IContextDataStore.js +1 -0
- package/lib/esm/common/storage/default/defaultCacheManager.js +19 -0
- package/lib/esm/common/storage/default/defaultClientDataStoreProvider.js +102 -0
- package/lib/esm/common/storage/default/defaultInMemoryDataStore.js +71 -0
- package/lib/esm/common/telemetry/TelemetryConstants.js +63 -3
- package/lib/esm/common/telemetry/TelemetryHelper.js +22 -5
- package/lib/esm/common/telemetry/TelemetryManager.js +22 -9
- package/lib/esm/common/telemetry/defaultConfigs/defaultAriaConfig.js +3 -3
- package/lib/esm/common/telemetry/defaultConfigs/defaultTelemetryConfiguration.js +4 -1
- package/lib/esm/common/telemetry/loggers/ariaTelemetryLogger.js +50 -15
- package/lib/esm/common/telemetry/loggers/consoleLogger.js +9 -5
- package/lib/esm/common/utils.js +64 -1
- package/lib/esm/components/callingcontainerstateful/CallingContainerStateful.js +14 -0
- package/lib/esm/components/chatbuttonstateful/ChatButtonStateful.js +22 -7
- package/lib/esm/components/confirmationpanestateful/ConfirmationPaneStateful.js +7 -50
- package/lib/esm/components/emailtranscriptpanestateful/EmailTranscriptPaneStateful.js +2 -2
- package/lib/esm/components/footerstateful/FooterStateful.js +5 -13
- package/lib/esm/components/footerstateful/downloadtranscriptstateful/DownloadTranscriptStateful.js +9 -3
- package/lib/esm/components/headerstateful/HeaderStateful.js +15 -11
- package/lib/esm/components/livechatwidget/common/ActivityStreamHandler.js +34 -0
- package/lib/esm/components/livechatwidget/common/ActivitySubscriber/DefaultActivitySubscriber.js +14 -0
- package/lib/esm/components/livechatwidget/common/ActivitySubscriber/IActivitySubscriber.js +1 -0
- package/lib/esm/components/livechatwidget/common/ActivitySubscriber/PauseActivitySubscriber.js +29 -0
- package/lib/esm/components/livechatwidget/common/ChatAdapterShim.js +59 -0
- package/lib/esm/components/livechatwidget/common/Deferred.js +33 -0
- package/lib/esm/components/livechatwidget/common/authHelper.js +50 -0
- package/lib/esm/components/livechatwidget/common/createAdapter.js +12 -2
- package/lib/esm/components/livechatwidget/common/createFooter.js +4 -15
- package/lib/esm/components/livechatwidget/common/createInternetConnectionChangeHandler.js +8 -0
- package/lib/esm/components/livechatwidget/common/createMarkdown.js +32 -31
- package/lib/esm/components/livechatwidget/common/defaultProps/dummyDefaultProps.js +44 -27
- package/lib/esm/components/livechatwidget/common/disposeTelemetryLoggers.js +4 -0
- package/lib/esm/components/livechatwidget/common/endChat.js +139 -42
- package/lib/esm/components/livechatwidget/common/initCallingSdk.js +3 -0
- package/lib/esm/components/livechatwidget/common/initWebChatComposer.js +45 -11
- package/lib/esm/components/livechatwidget/common/reconnectChatHelper.js +134 -41
- package/lib/esm/components/livechatwidget/common/registerTelemetryLoggers.js +10 -3
- package/lib/esm/components/livechatwidget/common/setPostChatContextAndLoadSurvey.js +19 -22
- package/lib/esm/components/livechatwidget/common/shareObservable.js +38 -0
- package/lib/esm/components/livechatwidget/common/startChat.js +195 -39
- package/lib/esm/components/livechatwidget/common/startProactiveChat.js +5 -5
- package/lib/esm/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +307 -76
- package/lib/esm/components/loadingpanestateful/LoadingPaneStateful.js +1 -1
- package/lib/esm/components/ooohpanestateful/OOOHPaneStateful.js +6 -0
- package/lib/esm/components/postchatloadingpanestateful/PostChatLoadingPaneStateful.js +6 -0
- package/lib/esm/components/prechatsurveypanestateful/PreChatSurveyPaneStateful.js +22 -10
- package/lib/esm/components/proactivechatpanestateful/ProactiveChatPaneStateful.js +26 -6
- package/lib/esm/components/proactivechatpanestateful/interfaces/IProactiveChatNotificationConfig.js +1 -0
- package/lib/esm/components/webchatcontainerstateful/WebChatContainerStateful.js +86 -2
- package/lib/esm/components/webchatcontainerstateful/common/defaultProps/defaultWebChatContainerStatefulProps.js +3 -1
- package/lib/esm/components/webchatcontainerstateful/common/defaultStyles/defaultAdaptiveCardStyles.js +4 -0
- package/lib/esm/components/webchatcontainerstateful/common/mockchatsdk.js +6 -0
- package/lib/esm/components/webchatcontainerstateful/common/utils/FileAttachmentIconManager.js +2 -12
- package/lib/esm/components/webchatcontainerstateful/interfaces/IAdaptiveCardStyles.js +1 -0
- package/lib/esm/components/webchatcontainerstateful/interfaces/IBotMagicCodeConfig.js +1 -0
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/BotMagicCodeStore.js +5 -0
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityMiddleware.js +23 -46
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityStatusMiddleware.js +2 -1
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachmentMiddleware.js +2 -1
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/cardActionMiddleware.js +41 -0
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/cardActionMiddleware.spec.js +94 -0
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultReceivedMessageAnchorStyles.js +3 -0
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/messageTimestampMiddleware.js +107 -0
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/conversationEndMiddleware.js +6 -6
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/webchattelemetry/WebChatLogger.js +32 -0
- package/lib/esm/contexts/common/ConversationState.js +4 -2
- package/lib/esm/contexts/common/LiveChatWidgetActionType.js +13 -7
- package/lib/esm/contexts/common/LiveChatWidgetContextInitialState.js +18 -5
- package/lib/esm/contexts/createReducer.js +44 -9
- package/lib/esm/controller/componentController.js +5 -5
- package/lib/esm/plugins/newMessageEventHandler.js +82 -0
- package/lib/types/assets/Audios.d.ts +1 -0
- package/lib/types/assets/Icons.d.ts +11 -0
- package/lib/types/common/Constants.d.ts +27 -1
- package/lib/types/common/contextDataStore/DataStoreManager.d.ts +4 -0
- package/lib/types/common/interfaces/IContextDataStore.d.ts +14 -0
- package/lib/types/common/storage/default/defaultCacheManager.d.ts +4 -0
- package/lib/types/common/storage/default/defaultClientDataStoreProvider.d.ts +2 -0
- package/lib/types/common/storage/default/defaultInMemoryDataStore.d.ts +6 -0
- package/lib/types/common/telemetry/TelemetryConstants.d.ts +49 -2
- package/lib/types/common/telemetry/TelemetryHelper.d.ts +2 -0
- package/lib/types/common/telemetry/TelemetryManager.d.ts +1 -0
- package/lib/types/common/telemetry/definitions/Contracts.d.ts +3 -0
- package/lib/types/common/telemetry/definitions/Payload.d.ts +15 -9
- package/lib/types/common/telemetry/interfaces/IChatSDKLogger.d.ts +1 -0
- package/lib/types/common/telemetry/interfaces/IInternalTelemetryData.d.ts +2 -0
- package/lib/types/common/telemetry/interfaces/ITelemetryConfig.d.ts +12 -0
- package/lib/types/common/utils.d.ts +8 -1
- package/lib/types/components/confirmationpanestateful/interfaces/IConfirmationPaneStatefulParams.d.ts +5 -2
- package/lib/types/components/footerstateful/audionotificationstateful/interfaces/IAudioNotificationStatefulParams.d.ts +0 -1
- package/lib/types/components/headerstateful/interfaces/IHeaderStatefulParams.d.ts +5 -1
- package/lib/types/components/livechatwidget/common/ActivityStreamHandler.d.ts +14 -0
- package/lib/types/components/livechatwidget/common/ActivitySubscriber/DefaultActivitySubscriber.d.ts +5 -0
- package/lib/types/components/livechatwidget/common/ActivitySubscriber/IActivitySubscriber.d.ts +6 -0
- package/lib/types/components/livechatwidget/common/ActivitySubscriber/PauseActivitySubscriber.d.ts +7 -0
- package/lib/types/components/livechatwidget/common/ChatAdapterShim.d.ts +7 -0
- package/lib/types/components/livechatwidget/common/Deferred.d.ts +9 -0
- package/lib/types/components/livechatwidget/common/authHelper.d.ts +5 -0
- package/lib/types/components/livechatwidget/common/disposeTelemetryLoggers.d.ts +1 -0
- package/lib/types/components/livechatwidget/common/endChat.d.ts +4 -1
- package/lib/types/components/livechatwidget/common/reconnectChatHelper.d.ts +6 -2
- package/lib/types/components/livechatwidget/common/setPostChatContextAndLoadSurvey.d.ts +1 -1
- package/lib/types/components/livechatwidget/common/shareObservable.d.ts +1 -0
- package/lib/types/components/livechatwidget/common/startChat.d.ts +4 -2
- package/lib/types/components/livechatwidget/common/startProactiveChat.d.ts +2 -1
- package/lib/types/components/livechatwidget/interfaces/ILiveChatWidgetComponentOverrides.d.ts +1 -0
- package/lib/types/components/livechatwidget/interfaces/ILiveChatWidgetControlProps.d.ts +1 -0
- package/lib/types/components/livechatwidget/interfaces/ILiveChatWidgetProps.d.ts +4 -1
- package/lib/types/components/prechatsurveypanestateful/interfaces/IPreChatSurveyPaneStatefulParams.d.ts +1 -1
- package/lib/types/components/proactivechatpanestateful/interfaces/IProactiveChatNotificationConfig.d.ts +3 -0
- package/lib/types/components/reconnectchatpanestateful/interfaces/IReconnectChatPaneStatefulProps.d.ts +1 -1
- package/lib/types/components/webchatcontainerstateful/common/defaultStyles/defaultAdaptiveCardStyles.d.ts +2 -0
- package/lib/types/components/webchatcontainerstateful/common/mockchatsdk.d.ts +2 -0
- package/lib/types/components/webchatcontainerstateful/common/utils/FileAttachmentIconManager.d.ts +1 -1
- package/lib/types/components/webchatcontainerstateful/interfaces/IAdaptiveCardStyles.d.ts +4 -0
- package/lib/types/components/webchatcontainerstateful/interfaces/IBotMagicCodeConfig.d.ts +4 -0
- package/lib/types/components/webchatcontainerstateful/interfaces/IRenderingMiddlewareProps.d.ts +2 -1
- package/lib/types/components/webchatcontainerstateful/interfaces/IWebChatContainerStatefulProps.d.ts +4 -0
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/BotMagicCodeStore.d.ts +3 -0
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityMiddleware.d.ts +0 -1
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityStatusMiddleware.d.ts +1 -1
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/cardActionMiddleware.d.ts +2 -0
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/cardActionMiddleware.spec.d.ts +1 -0
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultReceivedMessageAnchorStyles.d.ts +2 -0
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/messageTimestampMiddleware.d.ts +5 -0
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/webchattelemetry/WebChatLogger.d.ts +1 -0
- package/lib/types/contexts/common/ConversationState.d.ts +4 -2
- package/lib/types/contexts/common/ILiveChatWidgetContext.d.ts +5 -1
- package/lib/types/contexts/common/LiveChatWidgetActionType.d.ts +14 -8
- package/lib/types/contexts/common/LiveChatWidgetContextInitialState.d.ts +1 -2
- package/lib/types/plugins/newMessageEventHandler.d.ts +2 -0
- package/package.json +13 -12
- package/lib/cjs/assets/audios/newMessageNotification.mp3 +0 -0
- package/lib/cjs/assets/icons/archiveIcon.svg +0 -3
- package/lib/cjs/assets/icons/audioIcon.svg +0 -6
- package/lib/cjs/assets/icons/blankIcon.svg +0 -6
- package/lib/cjs/assets/icons/excelIcon.svg +0 -6
- package/lib/cjs/assets/icons/imageIcon.svg +0 -6
- package/lib/cjs/assets/icons/oneNoteIcon.svg +0 -6
- package/lib/cjs/assets/icons/pdfIcon.svg +0 -6
- package/lib/cjs/assets/icons/powerpointIcon.svg +0 -6
- package/lib/cjs/assets/icons/videoIcon.svg +0 -6
- package/lib/cjs/assets/icons/visioIcon.svg +0 -6
- package/lib/cjs/assets/icons/wordIcon.svg +0 -6
- package/lib/esm/assets/assets.d.js +0 -0
- package/lib/esm/assets/audios/newMessageNotification.mp3 +0 -0
- package/lib/esm/assets/icons/archiveIcon.svg +0 -3
- package/lib/esm/assets/icons/audioIcon.svg +0 -6
- package/lib/esm/assets/icons/blankIcon.svg +0 -6
- package/lib/esm/assets/icons/excelIcon.svg +0 -6
- package/lib/esm/assets/icons/imageIcon.svg +0 -6
- package/lib/esm/assets/icons/oneNoteIcon.svg +0 -6
- package/lib/esm/assets/icons/pdfIcon.svg +0 -6
- package/lib/esm/assets/icons/powerpointIcon.svg +0 -6
- package/lib/esm/assets/icons/videoIcon.svg +0 -6
- package/lib/esm/assets/icons/visioIcon.svg +0 -6
- package/lib/esm/assets/icons/wordIcon.svg +0 -6
|
@@ -17,6 +17,32 @@ export declare enum LogLevel {
|
|
|
17
17
|
WARN = "WARN",
|
|
18
18
|
ERROR = "ERROR"
|
|
19
19
|
}
|
|
20
|
+
export declare enum BroadcastEvent {
|
|
21
|
+
LoadPostChatSurvey = "LoadPostChatSurvey",
|
|
22
|
+
ChatEnded = "ChatEnded",
|
|
23
|
+
NewMessageNotification = "NewMessageNotification",
|
|
24
|
+
UnreadMessageCount = "UnreadMessageCount",
|
|
25
|
+
StartProactiveChat = "StartProactiveChat",
|
|
26
|
+
ProactiveChatStartChat = "ProactiveChatStartChat",
|
|
27
|
+
ProactiveChatStartPopoutChat = "ProactiveChatStartPopoutChat",
|
|
28
|
+
ProactiveChatIsInPopoutMode = "ProactiveChatIsInPopoutMode",
|
|
29
|
+
ResetProactiveChatParams = "ResetProactiveChatParams",
|
|
30
|
+
InvalidAdaptiveCardFormat = "InvalidAdaptiveCardFormat",
|
|
31
|
+
NewMessageSent = "NewMessageSent",
|
|
32
|
+
NewMessageReceived = "NewMessageReceived",
|
|
33
|
+
RedirectPageRequest = "RedirectPageRequest",
|
|
34
|
+
StartChat = "StartChat",
|
|
35
|
+
StartChatSkippingChatButtonRendering = "StartChatSkippingChatButtonRendering",
|
|
36
|
+
StartUnauthenticatedReconnectChat = "StartUnauthenticatedReconnectChat",
|
|
37
|
+
InitiateEndChat = "InitiateEndChat",
|
|
38
|
+
SetCustomContext = "SetCustomContext",
|
|
39
|
+
ChatRetrievedFromCache = "ChatRetrievedFromCache",
|
|
40
|
+
MaximizeChat = "MaximizeChat",
|
|
41
|
+
ChatInitiated = "ChatInitiated",
|
|
42
|
+
CloseChat = "CloseChat",
|
|
43
|
+
InitiateEndChatOnBrowserUnload = "InitiateEndChatOnBrowserUnload",
|
|
44
|
+
ClosePopoutWindow = "ClosePopoutWindow"
|
|
45
|
+
}
|
|
20
46
|
export declare enum TelemetryEvent {
|
|
21
47
|
CallAdded = "CallAdded",
|
|
22
48
|
LocalVideoStreamAdded = "LocalVideoStreamAdded",
|
|
@@ -53,6 +79,8 @@ export declare enum TelemetryEvent {
|
|
|
53
79
|
PostChatContextCallSucceed = "PostChatContextCallSucceed",
|
|
54
80
|
PostChatContextCallFailed = "PostChatContextCallFailed",
|
|
55
81
|
ParseAdaptiveCardFailed = "ParseAdaptiveCardFailed",
|
|
82
|
+
ClientDataStoreProviderFailed = "ClientDataStoreProviderFailed",
|
|
83
|
+
InMemoryDataStoreFailed = "InMemoryDataStoreFailed",
|
|
56
84
|
WebChatLoaded = "WebChatLoaded",
|
|
57
85
|
LCWChatButtonClicked = "LCWChatButtonClicked",
|
|
58
86
|
LCWChatButtonShow = "LCWChatButtonShow",
|
|
@@ -63,7 +91,10 @@ export declare enum TelemetryEvent {
|
|
|
63
91
|
PrechatSurveyLoaded = "PrechatSurveyLoaded",
|
|
64
92
|
PrechatSubmitted = "PrechatSubmitted",
|
|
65
93
|
StartChatSDKCall = "StartChatCall",
|
|
66
|
-
|
|
94
|
+
StartChatEventRecevied = "StartChatEventReceived",
|
|
95
|
+
EndChatSDKCall = "EndChatSDKCall",
|
|
96
|
+
EndChatEventReceived = "EndChatEventReceived",
|
|
97
|
+
WindowClosed = "WindowClosed",
|
|
67
98
|
OnNewMessageFailed = "OnNewMessageFailed",
|
|
68
99
|
OnNewMessageAudioNotificationFailed = "OnNewMessageAudioNotificationFailed",
|
|
69
100
|
DownloadTranscriptResponseNullOrUndefined = "DownloadTranscriptResponseNullOrUndefined",
|
|
@@ -77,6 +108,7 @@ export declare enum TelemetryEvent {
|
|
|
77
108
|
LoadingPaneLoaded = "LoadingPaneLoaded",
|
|
78
109
|
EmailTranscriptLoaded = "EmailTranscriptLoaded",
|
|
79
110
|
OutOfOfficePaneLoaded = "OutOfOfficePaneLoaded",
|
|
111
|
+
PostChatSurveyLoadingPaneLoaded = "PostChatSurveyLoadingPaneLoaded",
|
|
80
112
|
PostChatSurveyLoaded = "PostChatSurveyLoaded",
|
|
81
113
|
ConfirmationPaneLoaded = "ConfirmationPaneLoaded",
|
|
82
114
|
ProactiveChatPaneLoaded = "ProactiveChatPaneLoaded",
|
|
@@ -87,6 +119,12 @@ export declare enum TelemetryEvent {
|
|
|
87
119
|
EmailTranscriptButtonClicked = "EmailTranscriptButtonClicked",
|
|
88
120
|
EmailTranscriptCancelButtonClicked = "EmailTranscriptCancelButtonClicked",
|
|
89
121
|
AudioToggleButtonClicked = "AudioToggleButtonClicked",
|
|
122
|
+
SuppressBotMagicCodeSucceeded = "SuppressBotMagicCodeSucceeded",
|
|
123
|
+
SuppressBotMagicCodeFailed = "SuppressBotMagicCodeFailed",
|
|
124
|
+
GetConversationDetailsException = "GetConversationDetailsException",
|
|
125
|
+
BrowserUnloadEventStarted = "BrowserUnloadEventStarted",
|
|
126
|
+
GetAuthTokenCalled = "GetAuthTokenCalled",
|
|
127
|
+
ReceivedNullOrEmptyToken = "ReceivedNullOrEmptyToken",
|
|
90
128
|
ProcessingHTMLTextMiddlewareFailed = "ProcessingHTMLTextMiddlewareFailed",
|
|
91
129
|
ProcessingSanitizationMiddlewareFailed = "ProcessingSanitizationMiddlewareFailed",
|
|
92
130
|
FormatTagsMiddlewareJSONStringifyFailed = "FormatTagsMiddlewareJSONStringifyFailed",
|
|
@@ -98,7 +136,10 @@ export declare enum TelemetryEvent {
|
|
|
98
136
|
InvalidConfiguration = "InvalidConfiguration",
|
|
99
137
|
SendTypingIndicatorSucceeded = "SendTypingIndicatorSucceeded",
|
|
100
138
|
SendTypingIndicatorFailed = "SendTypingIndicatorFailed",
|
|
139
|
+
WebChatEvent = "WebChatEvent",
|
|
101
140
|
PreChatSurveyStartChatMethodFailed = "PreChatSurveyStartChatMethodFailed",
|
|
141
|
+
ChatAlreadyTriggered = "ChatAlreadyTriggered",
|
|
142
|
+
StartProactiveChatEventReceived = "StartProactiveChatEventReceived",
|
|
102
143
|
StartProactiveChatMethodFailed = "StartProactiveChatMethodFailed",
|
|
103
144
|
ProactiveChatAccepted = "ProactiveChatAccepted",
|
|
104
145
|
ProactiveChatRejected = "ProactiveChatRejected",
|
|
@@ -106,11 +147,17 @@ export declare enum TelemetryEvent {
|
|
|
106
147
|
ProactiveChatClosed = "ProactiveChatClosed",
|
|
107
148
|
ReconnectChatContinueConversation = "ReconnectChatContinueConversation",
|
|
108
149
|
ReconnectChatStartNewConversation = "ReconnectChatStartNewConversation",
|
|
109
|
-
ReconnectChatMinimize = "ReconnectChatMinimize"
|
|
150
|
+
ReconnectChatMinimize = "ReconnectChatMinimize",
|
|
151
|
+
MessageSent = "MessageSent",
|
|
152
|
+
MessageReceived = "MessageReceived",
|
|
153
|
+
CustomContextReceived = "CustomContextReceived",
|
|
154
|
+
NetworkDisconnected = "NetworkDisconnected",
|
|
155
|
+
NetworkReconnected = "NetworkReconnected"
|
|
110
156
|
}
|
|
111
157
|
export interface TelemetryInput {
|
|
112
158
|
scenarioType: ScenarioType;
|
|
113
159
|
payload: TelemetryData;
|
|
160
|
+
telemetryInfo?: any;
|
|
114
161
|
}
|
|
115
162
|
export declare class TelemetryConstants {
|
|
116
163
|
private static map;
|
|
@@ -11,6 +11,7 @@ export interface TelemetryEventWrapper {
|
|
|
11
11
|
Description?: string;
|
|
12
12
|
ExceptionDetails?: any;
|
|
13
13
|
ElapsedTimeInMilliseconds?: number;
|
|
14
|
+
Data?: any;
|
|
14
15
|
}
|
|
15
16
|
export declare class TelemetryHelper {
|
|
16
17
|
static callId: string;
|
|
@@ -35,4 +36,5 @@ export declare class TelemetryHelper {
|
|
|
35
36
|
static logActionEvent: (logLevel: LogLevel, payload: TelemetryEventWrapper) => void;
|
|
36
37
|
static logSDKEvent: (logLevel: LogLevel, payload: TelemetryEventWrapper) => void;
|
|
37
38
|
static logConfigDataEvent: (logLevel: LogLevel, payload: TelemetryEventWrapper) => void;
|
|
39
|
+
static logWebChatEvent: (logLevel: LogLevel, payload: TelemetryEventWrapper) => void;
|
|
38
40
|
}
|
|
@@ -24,6 +24,9 @@ export interface LoadContract extends BaseContract {
|
|
|
24
24
|
WidgetState?: string;
|
|
25
25
|
ChatState?: string;
|
|
26
26
|
ChatType?: string;
|
|
27
|
+
OCChatSDKVersion: string;
|
|
28
|
+
OCChatWidgetVersion: string;
|
|
29
|
+
OCChatComponentsVersion: string;
|
|
27
30
|
}
|
|
28
31
|
export interface ActionsContract extends BaseContract {
|
|
29
32
|
Event?: string;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
export interface
|
|
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;
|
|
@@ -16,19 +19,22 @@ export interface LoadTelemetryData {
|
|
|
16
19
|
ChatState?: string;
|
|
17
20
|
ChatType?: string;
|
|
18
21
|
ExceptionDetails?: object;
|
|
22
|
+
OCChatSDKVersion?: string;
|
|
23
|
+
OCChatWidgetVersion?: string;
|
|
24
|
+
OCChatComponentsVersion?: string;
|
|
19
25
|
}
|
|
20
|
-
export interface MessageProcessingErrorData {
|
|
26
|
+
export interface MessageProcessingErrorData extends BaseTelemetryData {
|
|
21
27
|
Event: string;
|
|
22
28
|
ExceptionDetails: object;
|
|
23
29
|
}
|
|
24
|
-
export interface OCChatSDKTelemetryData {
|
|
30
|
+
export interface OCChatSDKTelemetryData extends BaseTelemetryData {
|
|
25
31
|
RequestId: string;
|
|
26
32
|
Event?: string;
|
|
27
33
|
ElapsedTimeInMilliseconds?: number;
|
|
28
34
|
TransactionId: string;
|
|
29
35
|
ExceptionDetails?: object;
|
|
30
36
|
}
|
|
31
|
-
export interface IC3ClientTelemetryData {
|
|
37
|
+
export interface IC3ClientTelemetryData extends BaseTelemetryData {
|
|
32
38
|
SubscriptionId?: string;
|
|
33
39
|
EndpointUrl?: string;
|
|
34
40
|
EndpointId?: string;
|
|
@@ -39,7 +45,7 @@ export interface IC3ClientTelemetryData {
|
|
|
39
45
|
ShouldBubbleToHost?: boolean;
|
|
40
46
|
Description?: string;
|
|
41
47
|
}
|
|
42
|
-
export interface WebChatTelemetryData {
|
|
48
|
+
export interface WebChatTelemetryData extends BaseTelemetryData {
|
|
43
49
|
data?: any;
|
|
44
50
|
dimensions?: any;
|
|
45
51
|
duration?: number;
|
|
@@ -50,7 +56,7 @@ export interface WebChatTelemetryData {
|
|
|
50
56
|
name?: string;
|
|
51
57
|
type?: string;
|
|
52
58
|
}
|
|
53
|
-
export interface ACSAdapterTelemetryData {
|
|
59
|
+
export interface ACSAdapterTelemetryData extends BaseTelemetryData {
|
|
54
60
|
Description?: string;
|
|
55
61
|
ACSUserId?: string;
|
|
56
62
|
ChatThreadId?: string;
|
|
@@ -60,14 +66,14 @@ export interface ACSAdapterTelemetryData {
|
|
|
60
66
|
ErrorCode?: string;
|
|
61
67
|
ExceptionDetails?: any;
|
|
62
68
|
}
|
|
63
|
-
export interface ActionTelemetryData {
|
|
69
|
+
export interface ActionTelemetryData extends BaseTelemetryData {
|
|
64
70
|
Event?: string;
|
|
65
71
|
ElapsedTimeInMilliseconds?: number;
|
|
66
72
|
ActionType?: string;
|
|
67
73
|
ExceptionDetails?: object;
|
|
68
74
|
Description?: string;
|
|
69
75
|
}
|
|
70
|
-
export interface CallingTelemetryData {
|
|
76
|
+
export interface CallingTelemetryData extends BaseTelemetryData {
|
|
71
77
|
CallId?: string;
|
|
72
78
|
Event?: string;
|
|
73
79
|
ElapsedTimeInMilliseconds?: number;
|
|
@@ -29,4 +29,16 @@ export interface ITelemetryConfig {
|
|
|
29
29
|
* custom loggers list
|
|
30
30
|
*/
|
|
31
31
|
telemetryLoggers?: IChatSDKLogger[];
|
|
32
|
+
/**
|
|
33
|
+
* Omnichannel chat widget version
|
|
34
|
+
*/
|
|
35
|
+
chatWidgetVersion: string;
|
|
36
|
+
/**
|
|
37
|
+
* Omnichannel chat components version
|
|
38
|
+
*/
|
|
39
|
+
chatComponentVersion: string;
|
|
40
|
+
/**
|
|
41
|
+
* Omnichannel Chat SDK Version
|
|
42
|
+
*/
|
|
43
|
+
OCChatSDKVersion: string;
|
|
32
44
|
}
|
|
@@ -18,6 +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
|
+
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;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ILiveChatWidgetContext } from "../../../contexts/common/ILiveChatWidgetContext";
|
|
1
2
|
import { IConfirmationPaneStatefulProps } from "./IConfirmationPaneStatefulProps";
|
|
2
3
|
export interface IConfirmationPaneStatefulParams extends IConfirmationPaneStatefulProps {
|
|
3
4
|
/**
|
|
@@ -5,7 +6,9 @@ export interface IConfirmationPaneStatefulParams extends IConfirmationPaneStatef
|
|
|
5
6
|
*/
|
|
6
7
|
setPostChatContext: () => Promise<void>;
|
|
7
8
|
/**
|
|
8
|
-
*
|
|
9
|
+
* prepareEndChat: Internal Prop injected for checking PostChat contexts and trigerring end of chat
|
|
10
|
+
* @param adapter : The chat adapter for the live chat session
|
|
11
|
+
* @param state : The chat state where the conversation is currently in
|
|
9
12
|
*/
|
|
10
|
-
|
|
13
|
+
prepareEndChat: (adapter: any, state: ILiveChatWidgetContext) => Promise<void>;
|
|
11
14
|
}
|
|
@@ -12,6 +12,10 @@ export interface IHeaderStatefulParams {
|
|
|
12
12
|
outOfOfficeHeaderProps?: IHeaderProps;
|
|
13
13
|
/**
|
|
14
14
|
* endChat: Internal Prop injected for triggering end of a chat using chatSDK
|
|
15
|
+
* @param adapter : The chat adapter for the live chat session
|
|
16
|
+
* @param skipEndChatSDK : If set to true endchat will skip chatSDK endChat call
|
|
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)
|
|
15
19
|
*/
|
|
16
|
-
endChat: (adapter: any) => Promise<void>;
|
|
20
|
+
endChat: (adapter: any, skipEndChatSDK?: boolean, skipCloseChat?: boolean, postMessageToOtherTab?: boolean) => Promise<void>;
|
|
17
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
|
+
}
|
package/lib/types/components/livechatwidget/common/ActivitySubscriber/PauseActivitySubscriber.d.ts
ADDED
|
@@ -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,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 };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const disposeTelemetryLoggers: () => void;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { Dispatch } from "react";
|
|
2
2
|
import { ILiveChatWidgetAction } from "../../../contexts/common/ILiveChatWidgetAction";
|
|
3
3
|
import { ILiveChatWidgetProps } from "../interfaces/ILiveChatWidgetProps";
|
|
4
|
-
|
|
4
|
+
import { ILiveChatWidgetContext } from "../../../contexts/common/ILiveChatWidgetContext";
|
|
5
|
+
declare const prepareEndChat: (props: ILiveChatWidgetProps, chatSDK: any, setAdapter: any, setWebChatStyles: any, dispatch: Dispatch<ILiveChatWidgetAction>, adapter: any, state: ILiveChatWidgetContext) => Promise<void>;
|
|
6
|
+
declare const endChat: (props: ILiveChatWidgetProps, chatSDK: any, setAdapter: any, setWebChatStyles: any, dispatch: Dispatch<ILiveChatWidgetAction>, adapter: any, skipEndChatSDK?: boolean | undefined, skipCloseChat?: boolean | undefined, postMessageToOtherTab?: boolean | undefined) => Promise<void>;
|
|
7
|
+
export { prepareEndChat, endChat };
|
|
@@ -1,7 +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";
|
|
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>;
|
|
5
7
|
declare const getReconnectIdForAuthenticatedChat: (props: ILiveChatWidgetProps, chatSDK: any) => Promise<string | undefined>;
|
|
6
|
-
declare const handleUnauthenticatedReconnectChat: (dispatch: Dispatch<ILiveChatWidgetAction>, reconnectId: string, initStartChat: any) => Promise<void>;
|
|
7
|
-
|
|
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>;
|
|
11
|
+
export { getChatReconnectContext, getReconnectIdForAuthenticatedChat, handleUnauthenticatedReconnectChat, startUnauthenticatedReconnectChat, handleRedirectUnauthenticatedReconnectChat };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { Dispatch } from "react";
|
|
2
2
|
import { ILiveChatWidgetAction } from "../../../contexts/common/ILiveChatWidgetAction";
|
|
3
|
-
export declare const setPostChatContextAndLoadSurvey: (chatSDK: any, dispatch: Dispatch<ILiveChatWidgetAction>,
|
|
3
|
+
export declare const setPostChatContextAndLoadSurvey: (chatSDK: any, dispatch: Dispatch<ILiveChatWidgetAction>, persistedChat?: boolean | undefined) => Promise<void>;
|
|
@@ -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
|
|
7
|
-
|
|
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 };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { Dispatch } from "react";
|
|
2
2
|
import { ILiveChatWidgetAction } from "../../../contexts/common/ILiveChatWidgetAction";
|
|
3
|
-
|
|
3
|
+
import { IProactiveChatNotificationConfig } from "../../proactivechatpanestateful/interfaces/IProactiveChatNotificationConfig";
|
|
4
|
+
export declare const startProactiveChat: (dispatch: Dispatch<ILiveChatWidgetAction>, notificationConfig?: IProactiveChatNotificationConfig | undefined, enablePreChat?: boolean | undefined, inNewWindow?: boolean | undefined) => void;
|
package/lib/types/components/livechatwidget/interfaces/ILiveChatWidgetComponentOverrides.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export interface ILiveChatWidgetComponentOverrides {
|
|
|
9
9
|
outOfOfficeHoursPane?: ReactNode | string;
|
|
10
10
|
postChatLoadingPane?: ReactNode | string;
|
|
11
11
|
postChatSurveyPane?: ReactNode | string;
|
|
12
|
+
preChatSurveyPane?: ReactNode | string;
|
|
12
13
|
proactiveChatPane?: ReactNode | string;
|
|
13
14
|
reconnectChatPane?: ReactNode | string;
|
|
14
15
|
webChatContainer?: ReactNode | string;
|
|
@@ -20,6 +20,7 @@ import { ITelemetryConfig } from "../../../common/telemetry/interfaces/ITelemetr
|
|
|
20
20
|
import { IWebChatContainerStatefulProps } from "../../webchatcontainerstateful/interfaces/IWebChatContainerStatefulProps";
|
|
21
21
|
import { OmnichannelChatSDK } from "@microsoft/omnichannel-chat-sdk";
|
|
22
22
|
import { ILiveChatWidgetContext } from "../../../contexts/common/ILiveChatWidgetContext";
|
|
23
|
+
import { IContextDataStore } from "../../../common/interfaces/IContextDataStore";
|
|
23
24
|
export interface ILiveChatWidgetProps {
|
|
24
25
|
audioNotificationProps?: IAudioNotificationProps;
|
|
25
26
|
callingContainerProps?: ICallingContainerProps;
|
|
@@ -44,7 +45,9 @@ export interface ILiveChatWidgetProps {
|
|
|
44
45
|
proactiveChatPaneProps?: IProactiveChatPaneStatefulProps;
|
|
45
46
|
reconnectChatPaneProps?: IReconnectChatPaneStatefulProps;
|
|
46
47
|
styleProps?: ILiveChatWidgetStyleProps;
|
|
47
|
-
telemetryConfig
|
|
48
|
+
telemetryConfig: ITelemetryConfig;
|
|
48
49
|
webChatContainerProps?: IWebChatContainerStatefulProps;
|
|
49
50
|
liveChatContextFromCache?: ILiveChatWidgetContext;
|
|
51
|
+
contextDataStore?: IContextDataStore;
|
|
52
|
+
getAuthToken?: (authClientFunction?: string) => Promise<string | null>;
|
|
50
53
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IPreChatSurveyPaneProps } from "@microsoft/omnichannel-chat-components/lib/types/components/prechatsurveypane/interfaces/IPreChatSurveyPaneProps";
|
|
2
2
|
export interface IPreChatSurveyPaneStatefulParams {
|
|
3
3
|
surveyProps?: IPreChatSurveyPaneProps;
|
|
4
|
-
initStartChat: (params?: any) => Promise<void>;
|
|
4
|
+
initStartChat: (params?: any, persistedState?: any) => Promise<void>;
|
|
5
5
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
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;
|
|
5
|
+
redirectInSameWindow?: boolean;
|
|
6
6
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
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;
|
|
7
|
+
getChatToken(): null;
|
|
6
8
|
createChatAdapter(): MockAdapter;
|
|
7
9
|
getPreChatSurvey(parseToJson: boolean): string;
|
|
8
10
|
getConversationDetails(): {};
|
package/lib/types/components/webchatcontainerstateful/common/utils/FileAttachmentIconManager.d.ts
CHANGED
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @param extension File extension
|
|
5
5
|
*/
|
|
6
|
-
export declare const getFileAttachmentIconData: (extension: string) =>
|
|
6
|
+
export declare const getFileAttachmentIconData: (extension: string) => unknown;
|
|
7
7
|
export declare const isInlineMediaSupported: (attachmentName: string) => boolean;
|
package/lib/types/components/webchatcontainerstateful/interfaces/IRenderingMiddlewareProps.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IAttachmentProps } from "./IAttachmentProps";
|
|
2
1
|
import React from "react";
|
|
2
|
+
import { IAttachmentProps } from "./IAttachmentProps";
|
|
3
3
|
export interface IRenderingMiddlewareProps {
|
|
4
4
|
timestampDir?: "ltr" | "rtl" | "auto";
|
|
5
5
|
disableActivityMiddleware?: boolean;
|
|
@@ -28,4 +28,5 @@ export interface IRenderingMiddlewareProps {
|
|
|
28
28
|
attachmentDownloadIconStyles?: React.CSSProperties;
|
|
29
29
|
attachmentContentStyles?: React.CSSProperties;
|
|
30
30
|
attachmentSizeStyles?: React.CSSProperties;
|
|
31
|
+
receivedMessageAnchorStyles?: React.CSSProperties;
|
|
31
32
|
}
|
package/lib/types/components/webchatcontainerstateful/interfaces/IWebChatContainerStatefulProps.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import { IBotMagicCodeConfig } from "./IBotMagicCodeConfig";
|
|
1
2
|
import { ILiveChatWidgetLocalizedTexts } from "../../../contexts/common/ILiveChatWidgetLocalizedTexts";
|
|
2
3
|
import { IRenderingMiddlewareProps } from "./IRenderingMiddlewareProps";
|
|
3
4
|
import { IStyle } from "@fluentui/react";
|
|
4
5
|
import { IWebChatProps } from "./IWebChatProps";
|
|
5
6
|
import { StyleOptions } from "botframework-webchat-api";
|
|
7
|
+
import { IAdaptiveCardStyles } from "./IAdaptiveCardStyles";
|
|
6
8
|
export interface IWebChatContainerStatefulProps {
|
|
7
9
|
containerStyles?: IStyle;
|
|
8
10
|
disableNewLineMarkdownSupport?: boolean;
|
|
@@ -13,4 +15,6 @@ export interface IWebChatContainerStatefulProps {
|
|
|
13
15
|
storeMiddlewares?: any[];
|
|
14
16
|
renderingMiddlewareProps?: IRenderingMiddlewareProps;
|
|
15
17
|
localizedTexts?: ILiveChatWidgetLocalizedTexts;
|
|
18
|
+
botMagicCode?: IBotMagicCodeConfig;
|
|
19
|
+
adaptiveCardStyles?: IAdaptiveCardStyles;
|
|
16
20
|
}
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* 1. Renders system messages differently, according to Microsoft LiveChatWidget styles
|
|
6
6
|
* 2. Changes the font size of user messages
|
|
7
7
|
* 3. Decodes certain html characters that came through from chat services
|
|
8
|
-
* 4. Triggers end conversation sequence when the chat thread is deleted
|
|
9
8
|
******/
|
|
10
9
|
import React from "react";
|
|
11
10
|
export declare const createActivityMiddleware: (systemMessageStyleProps?: React.CSSProperties | undefined, userMessageStyleProps?: React.CSSProperties | undefined) => () => (next: any) => (...args: any) => any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const activityStatusMiddleware: () => (next: any) => (args: any) =>
|
|
1
|
+
export declare const activityStatusMiddleware: () => (next: any) => (args: any) => any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "@testing-library/jest-dom/extend-expect";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function createWebChatTelemetry(): (event: any) => void;
|