@microsoft/omnichannel-chat-sdk 1.9.7-main.9019907 → 1.9.7-main.b4583a2

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 (198) hide show
  1. package/lib/OmnichannelChatSDK.d.ts +128 -128
  2. package/lib/OmnichannelChatSDK.js +2609 -2609
  3. package/lib/api/createVoiceVideoCalling.d.ts +53 -53
  4. package/lib/api/createVoiceVideoCalling.js +462 -462
  5. package/lib/config/ocSDKConfiguration.d.ts +7 -7
  6. package/lib/config/ocSDKConfiguration.js +9 -9
  7. package/lib/config/settings.d.ts +6 -6
  8. package/lib/config/settings.js +13 -13
  9. package/lib/core/AuthSettings.d.ts +5 -5
  10. package/lib/core/AuthSettings.js +2 -2
  11. package/lib/core/AxiosErrorCodes.d.ts +4 -4
  12. package/lib/core/AxiosErrorCodes.js +7 -7
  13. package/lib/core/CallingOptionsOptionSetNumber.d.ts +6 -6
  14. package/lib/core/CallingOptionsOptionSetNumber.js +9 -9
  15. package/lib/core/ChatConfig.d.ts +10 -10
  16. package/lib/core/ChatConfig.js +2 -2
  17. package/lib/core/ChatReconnectContext.d.ts +4 -4
  18. package/lib/core/ChatReconnectContext.js +2 -2
  19. package/lib/core/ChatReconnectOptionalParams.d.ts +3 -3
  20. package/lib/core/ChatReconnectOptionalParams.js +2 -2
  21. package/lib/core/ChatSDKConfig.d.ts +38 -38
  22. package/lib/core/ChatSDKConfig.js +2 -2
  23. package/lib/core/ChatSDKError.d.ts +64 -64
  24. package/lib/core/ChatSDKError.js +73 -73
  25. package/lib/core/ChatSDKExceptionDetails.d.ts +13 -13
  26. package/lib/core/ChatSDKExceptionDetails.js +2 -2
  27. package/lib/core/ChatTranscriptBody.d.ts +5 -5
  28. package/lib/core/ChatTranscriptBody.js +2 -2
  29. package/lib/core/ConversationMode.d.ts +5 -5
  30. package/lib/core/ConversationMode.js +8 -8
  31. package/lib/core/EmailLiveChatTranscriptOptionalParams.d.ts +4 -4
  32. package/lib/core/EmailLiveChatTranscriptOptionalParams.js +2 -2
  33. package/lib/core/GetAgentAvailabilityOptionalParams.d.ts +13 -13
  34. package/lib/core/GetAgentAvailabilityOptionalParams.js +2 -2
  35. package/lib/core/GetChatTokenOptionalParams.d.ts +3 -3
  36. package/lib/core/GetChatTokenOptionalParams.js +2 -2
  37. package/lib/core/GetConversationDetailsOptionalParams.d.ts +4 -4
  38. package/lib/core/GetConversationDetailsOptionalParams.js +2 -2
  39. package/lib/core/GetLiveChatConfigOptionalParams.d.ts +5 -5
  40. package/lib/core/GetLiveChatConfigOptionalParams.js +2 -2
  41. package/lib/core/GetLiveChatTranscriptOptionalParams.d.ts +4 -4
  42. package/lib/core/GetLiveChatTranscriptOptionalParams.js +2 -2
  43. package/lib/core/InitializeOptionalParams.d.ts +6 -6
  44. package/lib/core/InitializeOptionalParams.js +2 -2
  45. package/lib/core/LiveChatContext.d.ts +14 -14
  46. package/lib/core/LiveChatContext.js +2 -2
  47. package/lib/core/LiveChatVersion.d.ts +5 -5
  48. package/lib/core/LiveChatVersion.js +8 -8
  49. package/lib/core/LiveWorkItemDetails.d.ts +8 -8
  50. package/lib/core/LiveWorkItemDetails.js +2 -2
  51. package/lib/core/LiveWorkItemState.d.ts +8 -8
  52. package/lib/core/LiveWorkItemState.js +11 -11
  53. package/lib/core/OmnichannelConfig.d.ts +5 -5
  54. package/lib/core/OmnichannelConfig.js +2 -2
  55. package/lib/core/OmnichannelErrorCodes.d.ts +4 -4
  56. package/lib/core/OmnichannelErrorCodes.js +7 -7
  57. package/lib/core/PostChatContext.d.ts +8 -8
  58. package/lib/core/PostChatContext.js +2 -2
  59. package/lib/core/SetAuthTokenProviderOptionalParams.d.ts +3 -3
  60. package/lib/core/SetAuthTokenProviderOptionalParams.js +2 -2
  61. package/lib/core/StartChatOptionalParams.d.ts +18 -18
  62. package/lib/core/StartChatOptionalParams.js +2 -2
  63. package/lib/core/messaging/ACSChatMessageType.d.ts +7 -7
  64. package/lib/core/messaging/ACSChatMessageType.js +10 -10
  65. package/lib/core/messaging/ACSClient.d.ts +45 -45
  66. package/lib/core/messaging/ACSClient.js +612 -612
  67. package/lib/core/messaging/ACSClientConfig.d.ts +5 -5
  68. package/lib/core/messaging/ACSClientConfig.js +2 -2
  69. package/lib/core/messaging/ACSParticipantDisplayName.d.ts +6 -6
  70. package/lib/core/messaging/ACSParticipantDisplayName.js +9 -9
  71. package/lib/core/messaging/ACSSessionInfo.d.ts +5 -5
  72. package/lib/core/messaging/ACSSessionInfo.js +2 -2
  73. package/lib/core/messaging/ChatAdapterConfig.d.ts +8 -8
  74. package/lib/core/messaging/ChatAdapterConfig.js +2 -2
  75. package/lib/core/messaging/ChatAdapterOptionalParams.d.ts +24 -24
  76. package/lib/core/messaging/ChatAdapterOptionalParams.js +2 -2
  77. package/lib/core/messaging/ChatAdapterProtocols.d.ts +6 -6
  78. package/lib/core/messaging/ChatAdapterProtocols.js +10 -10
  79. package/lib/core/messaging/ChatSDKMessage.d.ts +6 -6
  80. package/lib/core/messaging/ChatSDKMessage.js +2 -2
  81. package/lib/core/messaging/IC3Config.d.ts +4 -4
  82. package/lib/core/messaging/IC3Config.js +2 -2
  83. package/lib/core/messaging/MessageTags.d.ts +3 -3
  84. package/lib/core/messaging/MessageTags.js +6 -6
  85. package/lib/core/messaging/OmnichannelMessage.d.ts +64 -64
  86. package/lib/core/messaging/OmnichannelMessage.js +51 -51
  87. package/lib/core/messaging/OnNewMessageOptionalParams.d.ts +3 -3
  88. package/lib/core/messaging/OnNewMessageOptionalParams.js +2 -2
  89. package/lib/external/ACSAdapter/AMSFileManager.d.ts +76 -76
  90. package/lib/external/ACSAdapter/AMSFileManager.js +394 -394
  91. package/lib/external/ACSAdapter/AMSFileScanner.d.ts +36 -36
  92. package/lib/external/ACSAdapter/AMSFileScanner.js +275 -275
  93. package/lib/external/ACSAdapter/activityUtils.d.ts +9 -9
  94. package/lib/external/ACSAdapter/activityUtils.js +79 -79
  95. package/lib/external/ACSAdapter/createChannelDataEgressMiddleware.d.ts +5 -5
  96. package/lib/external/ACSAdapter/createChannelDataEgressMiddleware.js +33 -33
  97. package/lib/external/ACSAdapter/createFileScanIngressMiddleware.d.ts +2 -2
  98. package/lib/external/ACSAdapter/createFileScanIngressMiddleware.js +95 -95
  99. package/lib/external/ACSAdapter/createFormatEgressTagsMiddleware.d.ts +2 -2
  100. package/lib/external/ACSAdapter/createFormatEgressTagsMiddleware.js +30 -30
  101. package/lib/external/ACSAdapter/createFormatIngressTagsMiddleware.d.ts +2 -2
  102. package/lib/external/ACSAdapter/createFormatIngressTagsMiddleware.js +24 -24
  103. package/lib/external/CallingSDK/ICallingSDKLogData.d.ts +7 -7
  104. package/lib/external/CallingSDK/ICallingSDKLogData.js +2 -2
  105. package/lib/external/IC3Adapter/IChatToken.d.ts +11 -11
  106. package/lib/external/IC3Adapter/IChatToken.js +3 -3
  107. package/lib/external/IC3Adapter/IIC3AdapterOptions.d.ts +22 -22
  108. package/lib/external/IC3Adapter/IIC3AdapterOptions.js +2 -2
  109. package/lib/external/IC3Adapter/INotification.d.ts +6 -6
  110. package/lib/external/IC3Adapter/INotification.js +2 -2
  111. package/lib/external/IC3Adapter/Notification.d.ts +7 -7
  112. package/lib/external/IC3Adapter/Notification.js +14 -14
  113. package/lib/external/IC3Client/IIC3SDKLogData.d.ts +9 -9
  114. package/lib/external/IC3Client/IIC3SDKLogData.js +2 -2
  115. package/lib/external/OCSDK/IOCSDKLogData.d.ts +14 -14
  116. package/lib/external/OCSDK/IOCSDKLogData.js +2 -2
  117. package/lib/index.d.ts +25 -25
  118. package/lib/index.js +34 -34
  119. package/lib/telemetry/AriaTelemetry.d.ts +40 -40
  120. package/lib/telemetry/AriaTelemetry.js +539 -539
  121. package/lib/telemetry/EUDomainNames.d.ts +2 -2
  122. package/lib/telemetry/EUDomainNames.js +16 -16
  123. package/lib/telemetry/EventMarker.d.ts +3 -3
  124. package/lib/telemetry/EventMarker.js +12 -12
  125. package/lib/telemetry/GCCDomainPatterns.d.ts +2 -2
  126. package/lib/telemetry/GCCDomainPatterns.js +7 -7
  127. package/lib/telemetry/LogLevel.d.ts +8 -8
  128. package/lib/telemetry/LogLevel.js +11 -11
  129. package/lib/telemetry/ScenarioMarker.d.ts +21 -21
  130. package/lib/telemetry/ScenarioMarker.js +82 -82
  131. package/lib/telemetry/ScenarioType.d.ts +11 -11
  132. package/lib/telemetry/ScenarioType.js +14 -14
  133. package/lib/telemetry/StopWatch.d.ts +6 -6
  134. package/lib/telemetry/StopWatch.js +14 -14
  135. package/lib/telemetry/TelemetryEvent.d.ts +46 -46
  136. package/lib/telemetry/TelemetryEvent.js +49 -49
  137. package/lib/telemetry/retrieveCollectorUri.d.ts +2 -2
  138. package/lib/telemetry/retrieveCollectorUri.js +25 -25
  139. package/lib/tsconfig.tsbuildinfo +1914 -1966
  140. package/lib/utils/AMSClientLoadStates.d.ts +6 -6
  141. package/lib/utils/AMSClientLoadStates.js +11 -11
  142. package/lib/utils/CoreServicesUtils.d.ts +7 -7
  143. package/lib/utils/CoreServicesUtils.js +39 -39
  144. package/lib/utils/WebUtils.d.ts +10 -10
  145. package/lib/utils/WebUtils.js +128 -128
  146. package/lib/utils/chatAdapterCreators.d.ts +20 -20
  147. package/lib/utils/chatAdapterCreators.js +208 -208
  148. package/lib/utils/createOcSDKConfiguration.d.ts +4 -4
  149. package/lib/utils/createOcSDKConfiguration.js +22 -22
  150. package/lib/utils/createOmnichannelMessage.d.ts +11 -11
  151. package/lib/utils/createOmnichannelMessage.js +77 -77
  152. package/lib/utils/createTelemetry.d.ts +3 -3
  153. package/lib/utils/createTelemetry.js +9 -9
  154. package/lib/utils/exceptionSuppressors.d.ts +29 -29
  155. package/lib/utils/exceptionSuppressors.js +49 -49
  156. package/lib/utils/exceptionThrowers.d.ts +119 -119
  157. package/lib/utils/exceptionThrowers.js +137 -137
  158. package/lib/utils/internalUtils.d.ts +4 -4
  159. package/lib/utils/internalUtils.js +16 -16
  160. package/lib/utils/libraries.d.ts +12 -12
  161. package/lib/utils/libraries.js +34 -34
  162. package/lib/utils/locale.d.ts +4 -4
  163. package/lib/utils/locale.js +60 -60
  164. package/lib/utils/location.d.ts +7 -7
  165. package/lib/utils/location.js +95 -95
  166. package/lib/utils/loggerUtils.d.ts +15 -15
  167. package/lib/utils/loggerUtils.js +55 -55
  168. package/lib/utils/loggers.d.ts +111 -111
  169. package/lib/utils/loggers.js +501 -501
  170. package/lib/utils/parsers.d.ts +6 -6
  171. package/lib/utils/parsers.js +10 -10
  172. package/lib/utils/platform.d.ts +9 -9
  173. package/lib/utils/platform.js +11 -11
  174. package/lib/utils/setOcUserAgent.d.ts +2 -2
  175. package/lib/utils/setOcUserAgent.js +21 -21
  176. package/lib/utils/sleep.d.ts +2 -2
  177. package/lib/utils/sleep.js +4 -4
  178. package/lib/utils/urlResolvers.d.ts +10 -10
  179. package/lib/utils/urlResolvers.js +64 -64
  180. package/lib/utils/utilities.d.ts +5 -5
  181. package/lib/utils/utilities.js +36 -36
  182. package/lib/validators/OmnichannelConfigValidator.d.ts +3 -3
  183. package/lib/validators/OmnichannelConfigValidator.js +28 -28
  184. package/lib/validators/SDKConfigValidators.d.ts +5 -5
  185. package/lib/validators/SDKConfigValidators.js +48 -48
  186. package/package.json +1 -1
  187. package/lib/utils/fillMobilePlatformData.d.ts +0 -2
  188. package/lib/utils/fillMobilePlatformData.js +0 -44
  189. package/lib/utils/fillMobilePlatformData.js.map +0 -1
  190. package/lib/utils/fillPlatformData.browser.d.ts +0 -2
  191. package/lib/utils/fillPlatformData.browser.js +0 -8
  192. package/lib/utils/fillPlatformData.browser.js.map +0 -1
  193. package/lib/utils/fillPlatformData.d.ts +0 -2
  194. package/lib/utils/fillPlatformData.js +0 -8
  195. package/lib/utils/fillPlatformData.js.map +0 -1
  196. package/lib/utils/fillWebPlatformData.d.ts +0 -2
  197. package/lib/utils/fillWebPlatformData.js +0 -21
  198. package/lib/utils/fillWebPlatformData.js.map +0 -1
@@ -1,5 +1,5 @@
1
- export default interface ACSClientConfig {
2
- token: string;
3
- environmentUrl: string;
4
- tokenRefresher?: () => Promise<string>;
5
- }
1
+ export default interface ACSClientConfig {
2
+ token: string;
3
+ environmentUrl: string;
4
+ tokenRefresher?: () => Promise<string>;
5
+ }
@@ -1,3 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  //# sourceMappingURL=ACSClientConfig.js.map
@@ -1,6 +1,6 @@
1
- declare enum ACSParticipantDisplayName {
2
- Customer = "Customer",
3
- Agent = "__agent__",
4
- System = "__system__"
5
- }
6
- export default ACSParticipantDisplayName;
1
+ declare enum ACSParticipantDisplayName {
2
+ Customer = "Customer",
3
+ Agent = "__agent__",
4
+ System = "__system__"
5
+ }
6
+ export default ACSParticipantDisplayName;
@@ -1,10 +1,10 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var ACSParticipantDisplayName;
4
- (function (ACSParticipantDisplayName) {
5
- ACSParticipantDisplayName["Customer"] = "Customer";
6
- ACSParticipantDisplayName["Agent"] = "__agent__";
7
- ACSParticipantDisplayName["System"] = "__system__";
8
- })(ACSParticipantDisplayName || (ACSParticipantDisplayName = {}));
9
- exports.default = ACSParticipantDisplayName;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var ACSParticipantDisplayName;
4
+ (function (ACSParticipantDisplayName) {
5
+ ACSParticipantDisplayName["Customer"] = "Customer";
6
+ ACSParticipantDisplayName["Agent"] = "__agent__";
7
+ ACSParticipantDisplayName["System"] = "__system__";
8
+ })(ACSParticipantDisplayName || (ACSParticipantDisplayName = {}));
9
+ exports.default = ACSParticipantDisplayName;
10
10
  //# sourceMappingURL=ACSParticipantDisplayName.js.map
@@ -1,5 +1,5 @@
1
- export default interface ACSSessionInfo {
2
- id: string;
3
- threadId: string;
4
- pollingInterval: number;
5
- }
1
+ export default interface ACSSessionInfo {
2
+ id: string;
3
+ threadId: string;
4
+ pollingInterval: number;
5
+ }
@@ -1,3 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  //# sourceMappingURL=ACSSessionInfo.js.map
@@ -1,8 +1,8 @@
1
- export default interface ChatAdapterConfig {
2
- webChatIC3AdapterVersion?: string;
3
- webChatIC3AdapterCDNUrl?: string;
4
- webChatACSAdapterVersion?: string;
5
- webChatACSAdapterCDNUrl?: string;
6
- webChatDirectLineVersion?: string;
7
- webChatDirectLineCDNUrl?: string;
8
- }
1
+ export default interface ChatAdapterConfig {
2
+ webChatIC3AdapterVersion?: string;
3
+ webChatIC3AdapterCDNUrl?: string;
4
+ webChatACSAdapterVersion?: string;
5
+ webChatACSAdapterCDNUrl?: string;
6
+ webChatDirectLineVersion?: string;
7
+ webChatDirectLineCDNUrl?: string;
8
+ }
@@ -1,3 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  //# sourceMappingURL=ChatAdapterConfig.js.map
@@ -1,24 +1,24 @@
1
- interface ChatAdapterOptionalParams {
2
- protocol?: string;
3
- IC3Adapter?: {
4
- options?: {
5
- [key: string]: any;
6
- };
7
- };
8
- ACSAdapter?: {
9
- fileScan?: {
10
- disabled?: boolean;
11
- pollingInterval?: number;
12
- scanStatusRetrievalDelay?: number;
13
- };
14
- options?: {
15
- [key: string]: any;
16
- };
17
- };
18
- DirectLine?: {
19
- options?: {
20
- [key: string]: any;
21
- };
22
- };
23
- }
24
- export default ChatAdapterOptionalParams;
1
+ interface ChatAdapterOptionalParams {
2
+ protocol?: string;
3
+ IC3Adapter?: {
4
+ options?: {
5
+ [key: string]: any;
6
+ };
7
+ };
8
+ ACSAdapter?: {
9
+ fileScan?: {
10
+ disabled?: boolean;
11
+ pollingInterval?: number;
12
+ scanStatusRetrievalDelay?: number;
13
+ };
14
+ options?: {
15
+ [key: string]: any;
16
+ };
17
+ };
18
+ DirectLine?: {
19
+ options?: {
20
+ [key: string]: any;
21
+ };
22
+ };
23
+ }
24
+ export default ChatAdapterOptionalParams;
@@ -1,3 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  //# sourceMappingURL=ChatAdapterOptionalParams.js.map
@@ -1,6 +1,6 @@
1
- declare const _default: {
2
- IC3: string;
3
- DirectLine: string;
4
- ACS: string;
5
- };
6
- export default _default;
1
+ declare const _default: {
2
+ IC3: string;
3
+ DirectLine: string;
4
+ ACS: string;
5
+ };
6
+ export default _default;
@@ -1,11 +1,11 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var IC3 = 'IC3';
4
- var DirectLine = 'DirectLine';
5
- var ACS = 'ACS';
6
- exports.default = {
7
- IC3: IC3,
8
- DirectLine: DirectLine,
9
- ACS: ACS
10
- };
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var IC3 = 'IC3';
4
+ var DirectLine = 'DirectLine';
5
+ var ACS = 'ACS';
6
+ exports.default = {
7
+ IC3: IC3,
8
+ DirectLine: DirectLine,
9
+ ACS: ACS
10
+ };
11
11
  //# sourceMappingURL=ChatAdapterProtocols.js.map
@@ -1,6 +1,6 @@
1
- export default interface ChatSDKMessage {
2
- content: string;
3
- tags?: string[];
4
- timestamp?: Date;
5
- metadata?: any;
6
- }
1
+ export default interface ChatSDKMessage {
2
+ content: string;
3
+ tags?: string[];
4
+ timestamp?: Date;
5
+ metadata?: any;
6
+ }
@@ -1,3 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  //# sourceMappingURL=ChatSDKMessage.js.map
@@ -1,4 +1,4 @@
1
- export default interface IC3Config {
2
- ic3ClientVersion?: string;
3
- ic3ClientCDNUrl?: string;
4
- }
1
+ export default interface IC3Config {
2
+ ic3ClientVersion?: string;
3
+ ic3ClientCDNUrl?: string;
4
+ }
@@ -1,3 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  //# sourceMappingURL=IC3Config.js.map
@@ -1,3 +1,3 @@
1
- export declare const channelIdTag = "ChannelId-lcw";
2
- export declare const customerMessageTag = "FromCustomer";
3
- export declare const defaultMessageTags: string[];
1
+ export declare const channelIdTag = "ChannelId-lcw";
2
+ export declare const customerMessageTag = "FromCustomer";
3
+ export declare const defaultMessageTags: string[];
@@ -1,7 +1,7 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.defaultMessageTags = exports.customerMessageTag = exports.channelIdTag = void 0;
4
- exports.channelIdTag = 'ChannelId-lcw'; // Tag for PVA bot to return proper response for live chat channel
5
- exports.customerMessageTag = 'FromCustomer'; // Tag to support transcript analytics feature
6
- exports.defaultMessageTags = [exports.channelIdTag, exports.customerMessageTag];
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.defaultMessageTags = exports.customerMessageTag = exports.channelIdTag = void 0;
4
+ exports.channelIdTag = 'ChannelId-lcw'; // Tag for PVA bot to return proper response for live chat channel
5
+ exports.customerMessageTag = 'FromCustomer'; // Tag to support transcript analytics feature
6
+ exports.defaultMessageTags = [exports.channelIdTag, exports.customerMessageTag];
7
7
  //# sourceMappingURL=MessageTags.js.map
@@ -1,64 +1,64 @@
1
- import LiveChatVersion from "../LiveChatVersion";
2
- export declare class MessageContentType {
3
- static readonly RichText = "RichText";
4
- static readonly Text = "Text";
5
- }
6
- export declare class DeliveryMode {
7
- static readonly Bridged = "bridged";
8
- static readonly Unbridged = "unbridged";
9
- }
10
- export declare class MessageType {
11
- static readonly UserMessage = "UserMessage";
12
- static readonly SwiftCard = "SwiftCard";
13
- static readonly Typing = "Control/Typing";
14
- static readonly ClearTyping = "Control/ClearTyping";
15
- static readonly LiveState = "Control/LiveState";
16
- }
17
- export declare enum PersonType {
18
- Unknown = 0,
19
- User = 1,
20
- Bot = 2
21
- }
22
- export interface IPerson {
23
- displayName: string;
24
- id: string;
25
- type: PersonType;
26
- }
27
- export interface IMessageProperties {
28
- [id: string]: string;
29
- }
30
- export declare enum FileSharingProtocolType {
31
- AmsBasedFileSharing = 0
32
- }
33
- export interface IFileMetadata {
34
- id: string;
35
- name: string;
36
- type: string;
37
- size: number;
38
- url: string;
39
- fileSharingProtocolType?: FileSharingProtocolType;
40
- }
41
- export declare class ResourceType {
42
- static readonly NewMessage = "NewMessage";
43
- static readonly MessageUpdate = "MessageUpdate";
44
- static readonly UserPresence = "UserPresence";
45
- static readonly ConversationUpdate = "ConversationUpdate";
46
- static readonly ThreadUpdate = "ThreadUpdate";
47
- }
48
- interface OmnichannelMessage {
49
- id: string;
50
- liveChatVersion: LiveChatVersion;
51
- clientmessageid?: string;
52
- messageid?: string;
53
- content: string;
54
- contentType: string;
55
- deliveryMode: DeliveryMode | undefined;
56
- messageType: MessageType;
57
- sender: IPerson;
58
- timestamp: Date;
59
- properties?: IMessageProperties;
60
- tags?: string[];
61
- fileMetadata?: IFileMetadata;
62
- resourceType?: ResourceType;
63
- }
64
- export default OmnichannelMessage;
1
+ import LiveChatVersion from "../LiveChatVersion";
2
+ export declare class MessageContentType {
3
+ static readonly RichText = "RichText";
4
+ static readonly Text = "Text";
5
+ }
6
+ export declare class DeliveryMode {
7
+ static readonly Bridged = "bridged";
8
+ static readonly Unbridged = "unbridged";
9
+ }
10
+ export declare class MessageType {
11
+ static readonly UserMessage = "UserMessage";
12
+ static readonly SwiftCard = "SwiftCard";
13
+ static readonly Typing = "Control/Typing";
14
+ static readonly ClearTyping = "Control/ClearTyping";
15
+ static readonly LiveState = "Control/LiveState";
16
+ }
17
+ export declare enum PersonType {
18
+ Unknown = 0,
19
+ User = 1,
20
+ Bot = 2
21
+ }
22
+ export interface IPerson {
23
+ displayName: string;
24
+ id: string;
25
+ type: PersonType;
26
+ }
27
+ export interface IMessageProperties {
28
+ [id: string]: string;
29
+ }
30
+ export declare enum FileSharingProtocolType {
31
+ AmsBasedFileSharing = 0
32
+ }
33
+ export interface IFileMetadata {
34
+ id: string;
35
+ name: string;
36
+ type: string;
37
+ size: number;
38
+ url: string;
39
+ fileSharingProtocolType?: FileSharingProtocolType;
40
+ }
41
+ export declare class ResourceType {
42
+ static readonly NewMessage = "NewMessage";
43
+ static readonly MessageUpdate = "MessageUpdate";
44
+ static readonly UserPresence = "UserPresence";
45
+ static readonly ConversationUpdate = "ConversationUpdate";
46
+ static readonly ThreadUpdate = "ThreadUpdate";
47
+ }
48
+ interface OmnichannelMessage {
49
+ id: string;
50
+ liveChatVersion: LiveChatVersion;
51
+ clientmessageid?: string;
52
+ messageid?: string;
53
+ content: string;
54
+ contentType: string;
55
+ deliveryMode: DeliveryMode | undefined;
56
+ messageType: MessageType;
57
+ sender: IPerson;
58
+ timestamp: Date;
59
+ properties?: IMessageProperties;
60
+ tags?: string[];
61
+ fileMetadata?: IFileMetadata;
62
+ resourceType?: ResourceType;
63
+ }
64
+ export default OmnichannelMessage;
@@ -1,52 +1,52 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ResourceType = exports.FileSharingProtocolType = exports.PersonType = exports.MessageType = exports.DeliveryMode = exports.MessageContentType = void 0;
4
- var MessageContentType = /** @class */ (function () {
5
- function MessageContentType() {
6
- }
7
- MessageContentType.RichText = "RichText";
8
- MessageContentType.Text = "Text";
9
- return MessageContentType;
10
- }());
11
- exports.MessageContentType = MessageContentType;
12
- var DeliveryMode = /** @class */ (function () {
13
- function DeliveryMode() {
14
- }
15
- DeliveryMode.Bridged = "bridged";
16
- DeliveryMode.Unbridged = "unbridged";
17
- return DeliveryMode;
18
- }());
19
- exports.DeliveryMode = DeliveryMode;
20
- var MessageType = /** @class */ (function () {
21
- function MessageType() {
22
- }
23
- MessageType.UserMessage = "UserMessage";
24
- MessageType.SwiftCard = "SwiftCard";
25
- MessageType.Typing = "Control/Typing";
26
- MessageType.ClearTyping = "Control/ClearTyping";
27
- MessageType.LiveState = "Control/LiveState";
28
- return MessageType;
29
- }());
30
- exports.MessageType = MessageType;
31
- var PersonType;
32
- (function (PersonType) {
33
- PersonType[PersonType["Unknown"] = 0] = "Unknown";
34
- PersonType[PersonType["User"] = 1] = "User";
35
- PersonType[PersonType["Bot"] = 2] = "Bot";
36
- })(PersonType = exports.PersonType || (exports.PersonType = {}));
37
- var FileSharingProtocolType;
38
- (function (FileSharingProtocolType) {
39
- FileSharingProtocolType[FileSharingProtocolType["AmsBasedFileSharing"] = 0] = "AmsBasedFileSharing";
40
- })(FileSharingProtocolType = exports.FileSharingProtocolType || (exports.FileSharingProtocolType = {}));
41
- var ResourceType = /** @class */ (function () {
42
- function ResourceType() {
43
- }
44
- ResourceType.NewMessage = "NewMessage";
45
- ResourceType.MessageUpdate = "MessageUpdate";
46
- ResourceType.UserPresence = "UserPresence";
47
- ResourceType.ConversationUpdate = "ConversationUpdate";
48
- ResourceType.ThreadUpdate = "ThreadUpdate";
49
- return ResourceType;
50
- }());
51
- exports.ResourceType = ResourceType;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ResourceType = exports.FileSharingProtocolType = exports.PersonType = exports.MessageType = exports.DeliveryMode = exports.MessageContentType = void 0;
4
+ var MessageContentType = /** @class */ (function () {
5
+ function MessageContentType() {
6
+ }
7
+ MessageContentType.RichText = "RichText";
8
+ MessageContentType.Text = "Text";
9
+ return MessageContentType;
10
+ }());
11
+ exports.MessageContentType = MessageContentType;
12
+ var DeliveryMode = /** @class */ (function () {
13
+ function DeliveryMode() {
14
+ }
15
+ DeliveryMode.Bridged = "bridged";
16
+ DeliveryMode.Unbridged = "unbridged";
17
+ return DeliveryMode;
18
+ }());
19
+ exports.DeliveryMode = DeliveryMode;
20
+ var MessageType = /** @class */ (function () {
21
+ function MessageType() {
22
+ }
23
+ MessageType.UserMessage = "UserMessage";
24
+ MessageType.SwiftCard = "SwiftCard";
25
+ MessageType.Typing = "Control/Typing";
26
+ MessageType.ClearTyping = "Control/ClearTyping";
27
+ MessageType.LiveState = "Control/LiveState";
28
+ return MessageType;
29
+ }());
30
+ exports.MessageType = MessageType;
31
+ var PersonType;
32
+ (function (PersonType) {
33
+ PersonType[PersonType["Unknown"] = 0] = "Unknown";
34
+ PersonType[PersonType["User"] = 1] = "User";
35
+ PersonType[PersonType["Bot"] = 2] = "Bot";
36
+ })(PersonType = exports.PersonType || (exports.PersonType = {}));
37
+ var FileSharingProtocolType;
38
+ (function (FileSharingProtocolType) {
39
+ FileSharingProtocolType[FileSharingProtocolType["AmsBasedFileSharing"] = 0] = "AmsBasedFileSharing";
40
+ })(FileSharingProtocolType = exports.FileSharingProtocolType || (exports.FileSharingProtocolType = {}));
41
+ var ResourceType = /** @class */ (function () {
42
+ function ResourceType() {
43
+ }
44
+ ResourceType.NewMessage = "NewMessage";
45
+ ResourceType.MessageUpdate = "MessageUpdate";
46
+ ResourceType.UserPresence = "UserPresence";
47
+ ResourceType.ConversationUpdate = "ConversationUpdate";
48
+ ResourceType.ThreadUpdate = "ThreadUpdate";
49
+ return ResourceType;
50
+ }());
51
+ exports.ResourceType = ResourceType;
52
52
  //# sourceMappingURL=OmnichannelMessage.js.map
@@ -1,3 +1,3 @@
1
- export default interface OnNewMessageOptionalParams {
2
- rehydrate: boolean;
3
- }
1
+ export default interface OnNewMessageOptionalParams {
2
+ rehydrate: boolean;
3
+ }
@@ -1,3 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  //# sourceMappingURL=OnNewMessageOptionalParams.js.map
@@ -1,76 +1,76 @@
1
- import FramedClient from "@microsoft/omnichannel-amsclient/lib/FramedClient";
2
- import { ACSAdapterLogger } from "../../utils/loggers";
3
- declare type FileMetadata = Record<string, string>;
4
- declare enum FilePermission {
5
- READ = 0,
6
- WRITE = 1
7
- }
8
- interface IUploadedFile {
9
- fileId: string;
10
- metadata?: FileMetadata;
11
- }
12
- interface IAttachment {
13
- name: string;
14
- contentType: string;
15
- contentUrl: string;
16
- thumbnailUrl?: string;
17
- }
18
- interface IFileUploadRequest extends IAttachment {
19
- permissions?: PermissionsOptions;
20
- }
21
- interface PermissionsOptions {
22
- users: string[];
23
- permission: FilePermission;
24
- }
25
- interface AmsReferenceContent {
26
- uniqueId: string;
27
- }
28
- interface BotAttachment {
29
- name: string;
30
- contentType: string;
31
- content: AmsReferenceContent;
32
- }
33
- export declare enum AMSViewScanStatus {
34
- PASSED = "passed",
35
- MALWARE = "malware",
36
- INPROGRESS = "in progress"
37
- }
38
- declare class AMSFileManager {
39
- private logger;
40
- private amsClient;
41
- private options;
42
- private supportedImagesMimeTypes;
43
- private omnichannelChatToken;
44
- fileScanner: any;
45
- constructor(amsClient: FramedClient, logger?: ACSAdapterLogger | null, options?: any);
46
- uploadFiles(files: IFileUploadRequest[]): Promise<IUploadedFile[]>;
47
- downloadFiles(files: IUploadedFile[]): Promise<File[]>;
48
- updatePermissions(): Promise<void>;
49
- getFileIds(metadata?: Record<string, string>): string[] | undefined;
50
- /**
51
- * Creates property for the reference of the attachments to be sent to ACS as metadata after successful upload.
52
- *
53
- * @param fileIds List of fileIds
54
- * @returns
55
- */
56
- createFileIdProperty(fileIds: string[]): Record<string, string> | undefined;
57
- getFileMetadata(metadata?: Record<string, string>): FileMetadata[] | undefined;
58
- /**
59
- *
60
- * Creates property for the metadata of the attachments to be sent to ACS as metadata after successful upload.
61
- *
62
- * @param metadata List of file metadata
63
- * @returns
64
- */
65
- createFileMetadataProperty(metadata: FileMetadata[]): Record<string, string> | undefined;
66
- /**
67
- * Creates content to be sent to ACS after successful upload.
68
- *
69
- * @param metadata List of file metadata
70
- * @returns
71
- */
72
- createBotAttachment(metadata: Record<string, string>): BotAttachment | null;
73
- private uploadFileToAMS;
74
- private downloadFileFromAMS;
75
- }
76
- export default AMSFileManager;
1
+ import FramedClient from "@microsoft/omnichannel-amsclient/lib/FramedClient";
2
+ import { ACSAdapterLogger } from "../../utils/loggers";
3
+ declare type FileMetadata = Record<string, string>;
4
+ declare enum FilePermission {
5
+ READ = 0,
6
+ WRITE = 1
7
+ }
8
+ interface IUploadedFile {
9
+ fileId: string;
10
+ metadata?: FileMetadata;
11
+ }
12
+ interface IAttachment {
13
+ name: string;
14
+ contentType: string;
15
+ contentUrl: string;
16
+ thumbnailUrl?: string;
17
+ }
18
+ interface IFileUploadRequest extends IAttachment {
19
+ permissions?: PermissionsOptions;
20
+ }
21
+ interface PermissionsOptions {
22
+ users: string[];
23
+ permission: FilePermission;
24
+ }
25
+ interface AmsReferenceContent {
26
+ uniqueId: string;
27
+ }
28
+ interface BotAttachment {
29
+ name: string;
30
+ contentType: string;
31
+ content: AmsReferenceContent;
32
+ }
33
+ export declare enum AMSViewScanStatus {
34
+ PASSED = "passed",
35
+ MALWARE = "malware",
36
+ INPROGRESS = "in progress"
37
+ }
38
+ declare class AMSFileManager {
39
+ private logger;
40
+ private amsClient;
41
+ private options;
42
+ private supportedImagesMimeTypes;
43
+ private omnichannelChatToken;
44
+ fileScanner: any;
45
+ constructor(amsClient: FramedClient, logger?: ACSAdapterLogger | null, options?: any);
46
+ uploadFiles(files: IFileUploadRequest[]): Promise<IUploadedFile[]>;
47
+ downloadFiles(files: IUploadedFile[]): Promise<File[]>;
48
+ updatePermissions(): Promise<void>;
49
+ getFileIds(metadata?: Record<string, string>): string[] | undefined;
50
+ /**
51
+ * Creates property for the reference of the attachments to be sent to ACS as metadata after successful upload.
52
+ *
53
+ * @param fileIds List of fileIds
54
+ * @returns
55
+ */
56
+ createFileIdProperty(fileIds: string[]): Record<string, string> | undefined;
57
+ getFileMetadata(metadata?: Record<string, string>): FileMetadata[] | undefined;
58
+ /**
59
+ *
60
+ * Creates property for the metadata of the attachments to be sent to ACS as metadata after successful upload.
61
+ *
62
+ * @param metadata List of file metadata
63
+ * @returns
64
+ */
65
+ createFileMetadataProperty(metadata: FileMetadata[]): Record<string, string> | undefined;
66
+ /**
67
+ * Creates content to be sent to ACS after successful upload.
68
+ *
69
+ * @param metadata List of file metadata
70
+ * @returns
71
+ */
72
+ createBotAttachment(metadata: Record<string, string>): BotAttachment | null;
73
+ private uploadFileToAMS;
74
+ private downloadFileFromAMS;
75
+ }
76
+ export default AMSFileManager;