@microsoft/omnichannel-chat-widget 1.7.3-main.c8bb80a → 1.7.3-main.fee24eb
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/lib/cjs/components/livechatwidget/LiveChatWidget.js +6 -1
- package/lib/cjs/components/livechatwidget/common/getMockChatSDKIfApplicable.js +26 -0
- package/lib/cjs/components/livechatwidget/common/overridePropsOnMockIfApplicable.js +41 -0
- package/lib/cjs/components/livechatwidget/common/startChat.js +28 -27
- package/lib/cjs/components/livechatwidget/common/startChatErrorHandler.js +6 -6
- package/lib/cjs/components/livechatwidget/common/updateSessionDataForTelemetry.js +8 -3
- package/lib/cjs/components/livechatwidget/interfaces/IMockProps.js +7 -0
- package/lib/cjs/components/webchatcontainerstateful/common/DemoChatAdapter.js +87 -0
- package/lib/cjs/components/webchatcontainerstateful/common/DemoChatSDK.js +17 -0
- package/lib/cjs/components/webchatcontainerstateful/common/DesignerChatAdapter.js +41 -0
- package/lib/cjs/components/webchatcontainerstateful/common/DesignerChatSDK.js +17 -0
- package/lib/cjs/components/webchatcontainerstateful/common/MockBotCardCommandType.js +14 -0
- package/lib/cjs/components/webchatcontainerstateful/common/MockBotCommand.js +19 -0
- package/lib/cjs/components/webchatcontainerstateful/common/mockchatsdk.js +3 -0
- package/lib/cjs/components/webchatcontainerstateful/common/utils/attachmentActivityUtils.js +71 -0
- package/lib/cjs/components/webchatcontainerstateful/common/utils/chatAdapterUtils.js +90 -0
- package/lib/esm/components/livechatwidget/LiveChatWidget.js +6 -1
- package/lib/esm/components/livechatwidget/common/getMockChatSDKIfApplicable.js +20 -0
- package/lib/esm/components/livechatwidget/common/overridePropsOnMockIfApplicable.js +34 -0
- package/lib/esm/components/livechatwidget/common/startChat.js +28 -27
- package/lib/esm/components/livechatwidget/common/startChatErrorHandler.js +7 -7
- package/lib/esm/components/livechatwidget/common/updateSessionDataForTelemetry.js +7 -2
- package/lib/esm/components/livechatwidget/interfaces/IMockProps.js +6 -0
- package/lib/esm/components/webchatcontainerstateful/common/DemoChatAdapter.js +79 -0
- package/lib/esm/components/webchatcontainerstateful/common/DemoChatSDK.js +10 -0
- package/lib/esm/components/webchatcontainerstateful/common/DesignerChatAdapter.js +33 -0
- package/lib/esm/components/webchatcontainerstateful/common/DesignerChatSDK.js +10 -0
- package/lib/esm/components/webchatcontainerstateful/common/MockBotCardCommandType.js +7 -0
- package/lib/esm/components/webchatcontainerstateful/common/MockBotCommand.js +12 -0
- package/lib/esm/components/webchatcontainerstateful/common/mockchatsdk.js +3 -0
- package/lib/esm/components/webchatcontainerstateful/common/utils/attachmentActivityUtils.js +61 -0
- package/lib/esm/components/webchatcontainerstateful/common/utils/chatAdapterUtils.js +77 -0
- package/lib/types/components/livechatwidget/common/getMockChatSDKIfApplicable.d.ts +1 -0
- package/lib/types/components/livechatwidget/common/overridePropsOnMockIfApplicable.d.ts +3 -0
- package/lib/types/components/livechatwidget/common/updateSessionDataForTelemetry.d.ts +1 -1
- package/lib/types/components/livechatwidget/interfaces/ILiveChatWidgetProps.d.ts +2 -0
- package/lib/types/components/livechatwidget/interfaces/IMockProps.d.ts +8 -0
- package/lib/types/components/webchatcontainerstateful/common/DemoChatAdapter.d.ts +10 -0
- package/lib/types/components/webchatcontainerstateful/common/DemoChatSDK.d.ts +6 -0
- package/lib/types/components/webchatcontainerstateful/common/DesignerChatAdapter.d.ts +8 -0
- package/lib/types/components/webchatcontainerstateful/common/DesignerChatSDK.d.ts +6 -0
- package/lib/types/components/webchatcontainerstateful/common/MockBotCardCommandType.d.ts +6 -0
- package/lib/types/components/webchatcontainerstateful/common/MockBotCommand.d.ts +11 -0
- package/lib/types/components/webchatcontainerstateful/common/mockadapter.d.ts +2 -1
- package/lib/types/components/webchatcontainerstateful/common/mockchatsdk.d.ts +6 -0
- package/lib/types/components/webchatcontainerstateful/common/utils/attachmentActivityUtils.d.ts +9 -0
- package/lib/types/components/webchatcontainerstateful/common/utils/chatAdapterUtils.d.ts +9 -0
- package/package.json +1 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare enum MockBotCommand {
|
|
2
|
+
Bot = "/bot",
|
|
3
|
+
Card = "/card",
|
|
4
|
+
Help = "/help",
|
|
5
|
+
SendAttachment = "send attachment",
|
|
6
|
+
SendBotMessage = "send bot message",
|
|
7
|
+
SendSystemMessage = "send system message",
|
|
8
|
+
SendTyping = "send typing",
|
|
9
|
+
System = "/system"
|
|
10
|
+
}
|
|
11
|
+
export default MockBotCommand;
|
|
@@ -3,8 +3,9 @@ import "rxjs/add/observable/of";
|
|
|
3
3
|
import { Activity, ConnectionStatus, Message } from "botframework-directlinejs";
|
|
4
4
|
import { BehaviorSubject } from "rxjs";
|
|
5
5
|
import { Observable } from "rxjs/Observable";
|
|
6
|
+
import { Subscriber } from "rxjs/Subscriber";
|
|
6
7
|
export default class MockAdapter {
|
|
7
|
-
|
|
8
|
+
activityObserver?: Subscriber<Activity>;
|
|
8
9
|
activity$: Observable<Activity>;
|
|
9
10
|
connectionStatus$: BehaviorSubject<ConnectionStatus>;
|
|
10
11
|
constructor();
|
|
@@ -8,6 +8,12 @@ export declare class MockChatSDK {
|
|
|
8
8
|
orgId: string;
|
|
9
9
|
orgUrl: string;
|
|
10
10
|
};
|
|
11
|
+
initialize(): Promise<{
|
|
12
|
+
LiveWSAndLiveChatEngJoin: {
|
|
13
|
+
msdyn_postconversationsurveyenable: string;
|
|
14
|
+
msdyn_conversationmode: string;
|
|
15
|
+
};
|
|
16
|
+
}>;
|
|
11
17
|
startChat(): Promise<void>;
|
|
12
18
|
endChat(): null;
|
|
13
19
|
getChatToken(): null;
|
package/lib/types/components/webchatcontainerstateful/common/utils/attachmentActivityUtils.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { HeroCard, Signin, Thumbnail } from "botframework-directlinejs";
|
|
2
|
+
export declare const createJpgFileAttachment: () => {
|
|
3
|
+
contentType: string;
|
|
4
|
+
name: string;
|
|
5
|
+
contentUrl: string;
|
|
6
|
+
};
|
|
7
|
+
export declare const createHeroCardAttachment: () => HeroCard;
|
|
8
|
+
export declare const createThumbnailCardAttachment: () => Thumbnail;
|
|
9
|
+
export declare const createSigninCardAttachment: () => Signin;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Activity, Attachment, Message, User } from "botframework-directlinejs";
|
|
2
|
+
import { Subscriber } from "rxjs/Subscriber";
|
|
3
|
+
export declare const customerUser: User;
|
|
4
|
+
export declare const botUser: User;
|
|
5
|
+
export declare const postEchoActivity: (activityObserver: Subscriber<Activity> | undefined, activity: Message, user: User, delay?: number) => void;
|
|
6
|
+
export declare const postBotMessageActivity: (activityObserver: Subscriber<Activity> | undefined, text: string, tags?: string, delay?: number) => void;
|
|
7
|
+
export declare const postSystemMessageActivity: (activityObserver: Subscriber<Activity> | undefined, text: string, delay?: number) => void;
|
|
8
|
+
export declare const postBotTypingActivity: (activityObserver: Subscriber<Activity> | undefined, delay?: number) => void;
|
|
9
|
+
export declare const postBotAttachmentActivity: (activityObserver: Subscriber<Activity> | undefined, attachments?: Attachment[], delay?: number) => void;
|