@microsoft/omnichannel-chat-widget 1.7.3-main.c8bb80a → 1.7.3-main.efad9b9

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 (72) hide show
  1. package/lib/cjs/common/telemetry/TelemetryConstants.js +1 -0
  2. package/lib/cjs/components/livechatwidget/LiveChatWidget.js +6 -1
  3. package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/BotAuthActivitySubscriber.js +15 -6
  4. package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/HiddenAdaptiveCardActivitySubscriber.js +77 -0
  5. package/lib/cjs/components/livechatwidget/common/createAdapter.js +15 -2
  6. package/lib/cjs/components/livechatwidget/common/createMarkdown.js +2 -2
  7. package/lib/cjs/components/livechatwidget/common/getMockChatSDKIfApplicable.js +26 -0
  8. package/lib/cjs/components/livechatwidget/common/helpers/markdownHelper.js +23 -0
  9. package/lib/cjs/components/livechatwidget/common/overridePropsOnMockIfApplicable.js +41 -0
  10. package/lib/cjs/components/livechatwidget/common/startChat.js +28 -27
  11. package/lib/cjs/components/livechatwidget/common/startChatErrorHandler.js +6 -6
  12. package/lib/cjs/components/livechatwidget/common/updateSessionDataForTelemetry.js +8 -3
  13. package/lib/cjs/components/livechatwidget/interfaces/IBotAuthActivitySubscriberOptionalParams.js +1 -0
  14. package/lib/cjs/components/livechatwidget/interfaces/IMockProps.js +7 -0
  15. package/lib/cjs/components/webchatcontainerstateful/common/DemoChatAdapter.js +87 -0
  16. package/lib/cjs/components/webchatcontainerstateful/common/DemoChatSDK.js +17 -0
  17. package/lib/cjs/components/webchatcontainerstateful/common/DesignerChatAdapter.js +41 -0
  18. package/lib/cjs/components/webchatcontainerstateful/common/DesignerChatSDK.js +17 -0
  19. package/lib/cjs/components/webchatcontainerstateful/common/MockBotCardCommandType.js +14 -0
  20. package/lib/cjs/components/webchatcontainerstateful/common/MockBotCommand.js +19 -0
  21. package/lib/cjs/components/webchatcontainerstateful/common/mockchatsdk.js +3 -0
  22. package/lib/cjs/components/webchatcontainerstateful/common/utils/attachmentActivityUtils.js +71 -0
  23. package/lib/cjs/components/webchatcontainerstateful/common/utils/chatAdapterUtils.js +90 -0
  24. package/lib/cjs/components/webchatcontainerstateful/interfaces/IBotAuthConfig.js +1 -0
  25. package/lib/esm/common/telemetry/TelemetryConstants.js +1 -0
  26. package/lib/esm/components/livechatwidget/LiveChatWidget.js +6 -1
  27. package/lib/esm/components/livechatwidget/common/ActivitySubscriber/BotAuthActivitySubscriber.js +15 -6
  28. package/lib/esm/components/livechatwidget/common/ActivitySubscriber/HiddenAdaptiveCardActivitySubscriber.js +70 -0
  29. package/lib/esm/components/livechatwidget/common/createAdapter.js +14 -2
  30. package/lib/esm/components/livechatwidget/common/createMarkdown.js +2 -2
  31. package/lib/esm/components/livechatwidget/common/getMockChatSDKIfApplicable.js +20 -0
  32. package/lib/esm/components/livechatwidget/common/helpers/markdownHelper.js +15 -0
  33. package/lib/esm/components/livechatwidget/common/overridePropsOnMockIfApplicable.js +34 -0
  34. package/lib/esm/components/livechatwidget/common/startChat.js +28 -27
  35. package/lib/esm/components/livechatwidget/common/startChatErrorHandler.js +7 -7
  36. package/lib/esm/components/livechatwidget/common/updateSessionDataForTelemetry.js +7 -2
  37. package/lib/esm/components/livechatwidget/interfaces/IBotAuthActivitySubscriberOptionalParams.js +1 -0
  38. package/lib/esm/components/livechatwidget/interfaces/IMockProps.js +6 -0
  39. package/lib/esm/components/webchatcontainerstateful/common/DemoChatAdapter.js +79 -0
  40. package/lib/esm/components/webchatcontainerstateful/common/DemoChatSDK.js +10 -0
  41. package/lib/esm/components/webchatcontainerstateful/common/DesignerChatAdapter.js +33 -0
  42. package/lib/esm/components/webchatcontainerstateful/common/DesignerChatSDK.js +10 -0
  43. package/lib/esm/components/webchatcontainerstateful/common/MockBotCardCommandType.js +7 -0
  44. package/lib/esm/components/webchatcontainerstateful/common/MockBotCommand.js +12 -0
  45. package/lib/esm/components/webchatcontainerstateful/common/mockchatsdk.js +3 -0
  46. package/lib/esm/components/webchatcontainerstateful/common/utils/attachmentActivityUtils.js +61 -0
  47. package/lib/esm/components/webchatcontainerstateful/common/utils/chatAdapterUtils.js +77 -0
  48. package/lib/esm/components/webchatcontainerstateful/interfaces/IBotAuthConfig.js +1 -0
  49. package/lib/types/common/telemetry/TelemetryConstants.d.ts +2 -1
  50. package/lib/types/components/livechatwidget/common/ActivitySubscriber/BotAuthActivitySubscriber.d.ts +4 -1
  51. package/lib/types/components/livechatwidget/common/ActivitySubscriber/HiddenAdaptiveCardActivitySubscriber.d.ts +7 -0
  52. package/lib/types/components/livechatwidget/common/createAdapter.d.ts +2 -1
  53. package/lib/types/components/livechatwidget/common/getMockChatSDKIfApplicable.d.ts +1 -0
  54. package/lib/types/components/livechatwidget/common/helpers/markdownHelper.d.ts +2 -0
  55. package/lib/types/components/livechatwidget/common/overridePropsOnMockIfApplicable.d.ts +3 -0
  56. package/lib/types/components/livechatwidget/common/updateSessionDataForTelemetry.d.ts +1 -1
  57. package/lib/types/components/livechatwidget/interfaces/IBotAuthActivitySubscriberOptionalParams.d.ts +4 -0
  58. package/lib/types/components/livechatwidget/interfaces/ILiveChatWidgetProps.d.ts +2 -0
  59. package/lib/types/components/livechatwidget/interfaces/IMockProps.d.ts +8 -0
  60. package/lib/types/components/webchatcontainerstateful/common/DemoChatAdapter.d.ts +10 -0
  61. package/lib/types/components/webchatcontainerstateful/common/DemoChatSDK.d.ts +6 -0
  62. package/lib/types/components/webchatcontainerstateful/common/DesignerChatAdapter.d.ts +8 -0
  63. package/lib/types/components/webchatcontainerstateful/common/DesignerChatSDK.d.ts +6 -0
  64. package/lib/types/components/webchatcontainerstateful/common/MockBotCardCommandType.d.ts +6 -0
  65. package/lib/types/components/webchatcontainerstateful/common/MockBotCommand.d.ts +11 -0
  66. package/lib/types/components/webchatcontainerstateful/common/mockadapter.d.ts +2 -1
  67. package/lib/types/components/webchatcontainerstateful/common/mockchatsdk.d.ts +6 -0
  68. package/lib/types/components/webchatcontainerstateful/common/utils/attachmentActivityUtils.d.ts +9 -0
  69. package/lib/types/components/webchatcontainerstateful/common/utils/chatAdapterUtils.d.ts +9 -0
  70. package/lib/types/components/webchatcontainerstateful/interfaces/IBotAuthConfig.d.ts +4 -0
  71. package/lib/types/components/webchatcontainerstateful/interfaces/IWebChatContainerStatefulProps.d.ts +2 -0
  72. package/package.json +2 -2
@@ -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
- private activityObserver?;
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;
@@ -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;
@@ -0,0 +1,4 @@
1
+ export interface IBotAuthConfig {
2
+ fetchBotAuthConfigRetries?: number;
3
+ fetchBotAuthConfigRetryInterval?: number;
4
+ }
@@ -5,6 +5,7 @@ import { IStyle } from "@fluentui/react";
5
5
  import { IWebChatProps } from "./IWebChatProps";
6
6
  import { StyleOptions } from "botframework-webchat-api";
7
7
  import { IAdaptiveCardStyles } from "./IAdaptiveCardStyles";
8
+ import { IBotAuthConfig } from "./IBotAuthConfig";
8
9
  export interface IWebChatContainerStatefulProps {
9
10
  containerStyles?: IStyle;
10
11
  disableNewLineMarkdownSupport?: boolean;
@@ -16,6 +17,7 @@ export interface IWebChatContainerStatefulProps {
16
17
  renderingMiddlewareProps?: IRenderingMiddlewareProps;
17
18
  localizedTexts?: ILiveChatWidgetLocalizedTexts;
18
19
  botMagicCode?: IBotMagicCodeConfig;
20
+ botAuthConfig?: IBotAuthConfig;
19
21
  hyperlinkTextOverride?: boolean;
20
22
  adaptiveCardStyles?: IAdaptiveCardStyles;
21
23
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microsoft/omnichannel-chat-widget",
3
- "version": "1.7.3-main.c8bb80a",
3
+ "version": "1.7.3-main.efad9b9",
4
4
  "description": "Microsoft Omnichannel Chat Widget",
5
5
  "main": "lib/cjs/index.js",
6
6
  "types": "lib/types/index.d.ts",
@@ -75,7 +75,7 @@
75
75
  },
76
76
  "dependencies": {
77
77
  "@microsoft/omnichannel-chat-components": "1.1.5",
78
- "@microsoft/omnichannel-chat-sdk": "^1.9.6",
78
+ "@microsoft/omnichannel-chat-sdk": "^1.9.10",
79
79
  "abort-controller-es5": "^2.0.1",
80
80
  "dompurify": "^2.5.4",
81
81
  "markdown-it": "^12.3.2",