@microsoft/omnichannel-chat-widget 2.0.1-main.b1649f1 → 2.0.1-main.bc685f2
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 +55 -0
- package/lib/cjs/common/telemetry/TelemetryConstants.js +10 -0
- package/lib/cjs/common/telemetry/TelemetryHelper.js +8 -0
- package/lib/cjs/components/livechatwidget/LiveChatWidget.js +2 -0
- package/lib/cjs/components/livechatwidget/common/reconnectChatHelper.js +29 -1
- package/lib/cjs/components/livechatwidget/common/recoveryEligibilityTelemetry.js +11 -1
- package/lib/cjs/components/livechatwidget/common/startChat.js +15 -7
- package/lib/cjs/components/livechatwidget/common/updateSessionDataForTelemetry.js +34 -5
- package/lib/cjs/components/livechatwidget/common/useChatTokenRenewal.js +252 -0
- package/lib/cjs/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +5 -17
- package/lib/esm/common/telemetry/TelemetryConstants.js +10 -0
- package/lib/esm/common/telemetry/TelemetryHelper.js +8 -0
- package/lib/esm/components/livechatwidget/LiveChatWidget.js +3 -1
- package/lib/esm/components/livechatwidget/common/reconnectChatHelper.js +28 -1
- package/lib/esm/components/livechatwidget/common/recoveryEligibilityTelemetry.js +11 -1
- package/lib/esm/components/livechatwidget/common/startChat.js +15 -7
- package/lib/esm/components/livechatwidget/common/updateSessionDataForTelemetry.js +34 -5
- package/lib/esm/components/livechatwidget/common/useChatTokenRenewal.js +245 -0
- package/lib/esm/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +6 -18
- package/lib/types/common/telemetry/TelemetryConstants.d.ts +5 -0
- package/lib/types/common/telemetry/TelemetryHelper.d.ts +6 -0
- package/lib/types/common/telemetry/definitions/Contracts.d.ts +6 -0
- package/lib/types/common/telemetry/definitions/Payload.d.ts +6 -0
- package/lib/types/components/livechatwidget/common/reconnectChatHelper.d.ts +6 -1
- package/lib/types/components/livechatwidget/common/startChat.d.ts +5 -1
- package/lib/types/components/livechatwidget/common/useChatTokenRenewal.d.ts +5 -0
- package/package.json +2 -2
|
@@ -6,7 +6,12 @@ import { ILiveChatWidgetAction } from "../../../contexts/common/ILiveChatWidgetA
|
|
|
6
6
|
import { ILiveChatWidgetContext } from "../../../contexts/common/ILiveChatWidgetContext";
|
|
7
7
|
import { ILiveChatWidgetProps } from "../interfaces/ILiveChatWidgetProps";
|
|
8
8
|
declare const handleChatReconnect: (facadeChatSDK: FacadeChatSDK, props: ILiveChatWidgetProps, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any, initStartChat: any, state: ILiveChatWidgetContext) => Promise<boolean>;
|
|
9
|
+
/**
|
|
10
|
+
* Returns true when chat reconnect took over the start: it started the chat itself or showed the reconnect pane.
|
|
11
|
+
* In that case the caller must not start another chat.
|
|
12
|
+
*/
|
|
13
|
+
declare const isReconnectTriggered: (facadeChatSDK: FacadeChatSDK, props: ILiveChatWidgetProps, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any, initStartChat: any, state: ILiveChatWidgetContext) => Promise<boolean>;
|
|
9
14
|
declare const getChatReconnectContext: (facadeChatSDK: FacadeChatSDK, chatConfig: ChatConfig, props: any, isAuthenticatedChat: boolean, dispatch: Dispatch<ILiveChatWidgetAction>) => Promise<import("@microsoft/omnichannel-chat-sdk/lib/core/ChatReconnectContext").default | undefined>;
|
|
10
15
|
declare const isReconnectEnabled: (chatConfig?: ChatConfig) => boolean;
|
|
11
16
|
declare const isPersistentEnabled: (chatConfig?: ChatConfig) => boolean;
|
|
12
|
-
export { handleChatReconnect, isReconnectEnabled, isPersistentEnabled, getChatReconnectContext };
|
|
17
|
+
export { handleChatReconnect, isReconnectTriggered, isReconnectEnabled, isPersistentEnabled, getChatReconnectContext };
|
|
@@ -6,6 +6,10 @@ import { ILiveChatWidgetProps } from "../interfaces/ILiveChatWidgetProps";
|
|
|
6
6
|
import StartChatOptionalParams from "@microsoft/omnichannel-chat-sdk/lib/core/StartChatOptionalParams";
|
|
7
7
|
declare const prepareStartChat: (props: ILiveChatWidgetProps, facadeChatSDK: FacadeChatSDK, state: ILiveChatWidgetContext, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any) => Promise<void>;
|
|
8
8
|
declare const setPreChatAndInitiateChat: (facadeChatSDK: FacadeChatSDK, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any, isProactiveChat?: boolean | false, proactiveChatEnablePrechatState?: boolean | false, state?: ILiveChatWidgetContext, props?: ILiveChatWidgetProps) => Promise<void>;
|
|
9
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Resolves to `true` when the chat reached Active, and `false` when it failed or the call was dropped.
|
|
11
|
+
* It resolves before React renders Active, so callers must use this value rather than reading the conversation state.
|
|
12
|
+
*/
|
|
13
|
+
declare const initStartChat: (facadeChatSDK: FacadeChatSDK, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any, state: ILiveChatWidgetContext | undefined, props?: ILiveChatWidgetProps, params?: StartChatOptionalParams, persistedState?: any) => Promise<boolean>;
|
|
10
14
|
declare const checkIfConversationStillValid: (facadeChatSDK: FacadeChatSDK, dispatch: Dispatch<ILiveChatWidgetAction>, state: ILiveChatWidgetContext) => Promise<boolean>;
|
|
11
15
|
export { prepareStartChat, initStartChat, setPreChatAndInitiateChat, checkIfConversationStillValid };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Dispatch } from "react";
|
|
2
|
+
import { FacadeChatSDK } from "../../../common/facades/FacadeChatSDK";
|
|
3
|
+
import { ILiveChatWidgetAction } from "../../../contexts/common/ILiveChatWidgetAction";
|
|
4
|
+
import { ILiveChatWidgetContext } from "../../../contexts/common/ILiveChatWidgetContext";
|
|
5
|
+
export declare const useChatTokenRenewal: (facade: FacadeChatSDK | undefined, state: ILiveChatWidgetContext, dispatch: Dispatch<ILiveChatWidgetAction>, widgetCacheId: string) => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microsoft/omnichannel-chat-widget",
|
|
3
|
-
"version": "2.0.1-main.
|
|
3
|
+
"version": "2.0.1-main.bc685f2",
|
|
4
4
|
"description": "Microsoft Omnichannel Chat Widget",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"types": "lib/types/index.d.ts",
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
"@azure/core-tracing": "^1.2.0",
|
|
94
94
|
"@microsoft/applicationinsights-web": "^3.3.6",
|
|
95
95
|
"@microsoft/omnichannel-chat-components": "1.2.0",
|
|
96
|
-
"@microsoft/omnichannel-chat-sdk": "2.0.2-main.
|
|
96
|
+
"@microsoft/omnichannel-chat-sdk": "2.0.2-main.355218f",
|
|
97
97
|
"@opentelemetry/api": "^1.9.0",
|
|
98
98
|
"abort-controller": "^3",
|
|
99
99
|
"botframework-webchat": "4.18.1-hotfix.20260308.b15b405",
|