@microsoft/omnichannel-chat-sdk 1.11.6-main.b982edb → 1.11.7-main.14ece7b

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 (33) hide show
  1. package/lib/OmnichannelChatSDK.d.ts +22 -1
  2. package/lib/OmnichannelChatSDK.js +320 -219
  3. package/lib/OmnichannelChatSDK.js.map +1 -1
  4. package/lib/config/settings.d.ts +3 -2
  5. package/lib/config/settings.js +4 -2
  6. package/lib/config/settings.js.map +1 -1
  7. package/lib/core/ChatSDKError.d.ts +3 -1
  8. package/lib/core/ChatSDKError.js +2 -0
  9. package/lib/core/ChatSDKError.js.map +1 -1
  10. package/lib/core/GetPersistentChatHistoryOptionalParams.d.ts +10 -0
  11. package/lib/core/GetPersistentChatHistoryOptionalParams.js +3 -0
  12. package/lib/core/GetPersistentChatHistoryOptionalParams.js.map +1 -0
  13. package/lib/core/messaging/OmnichannelMessage.d.ts +6 -0
  14. package/lib/index.d.ts +2 -2
  15. package/lib/index.js.map +1 -1
  16. package/lib/telemetry/TelemetryEvent.d.ts +2 -1
  17. package/lib/telemetry/TelemetryEvent.js +1 -0
  18. package/lib/telemetry/TelemetryEvent.js.map +1 -1
  19. package/lib/tsconfig.tsbuildinfo +1 -1
  20. package/lib/utils/createOcSDKConfiguration.d.ts +2 -2
  21. package/lib/utils/createOcSDKConfiguration.js +16 -2
  22. package/lib/utils/createOcSDKConfiguration.js.map +1 -1
  23. package/lib/utils/createOmnichannelMessage.js +9 -0
  24. package/lib/utils/createOmnichannelMessage.js.map +1 -1
  25. package/lib/utils/exceptionThrowers.d.ts +6 -0
  26. package/lib/utils/exceptionThrowers.js +8 -2
  27. package/lib/utils/exceptionThrowers.js.map +1 -1
  28. package/lib/utils/setOcUserAgent.js +2 -1
  29. package/lib/utils/setOcUserAgent.js.map +1 -1
  30. package/lib/utils/version.d.ts +9 -0
  31. package/lib/utils/version.js +28 -0
  32. package/lib/utils/version.js.map +1 -0
  33. package/package.json +3 -3
@@ -1,6 +1,6 @@
1
1
  import ACSClient from "./core/messaging/ACSClient";
2
2
  import { VoiceVideoCallingOptionalParams } from "./types/config";
3
- import { ChatAdapter, GetAgentAvailabilityResponse, GetCurrentLiveChatContextResponse, GetLiveChatTranscriptResponse, GetMessagesResponse, GetPreChatSurveyResponse, GetVoiceVideoCallingResponse, MaskingRules, UploadFileAttachmentResponse } from "./types/response";
3
+ import { ChatAdapter, GetAgentAvailabilityResponse, GetCurrentLiveChatContextResponse, GetLiveChatTranscriptResponse, GetMessagesResponse, GetPersistentChatHistoryResponse, GetPreChatSurveyResponse, GetVoiceVideoCallingResponse, MaskingRules, UploadFileAttachmentResponse } from "./types/response";
4
4
  import { ParticipantsRemovedEvent } from '@azure/communication-signaling';
5
5
  import ChatAdapterOptionalParams from "./core/messaging/ChatAdapterOptionalParams";
6
6
  import ChatConfig from "./core/ChatConfig";
@@ -21,6 +21,7 @@ import GetChatTokenOptionalParams from "./core/GetChatTokenOptionalParams";
21
21
  import GetConversationDetailsOptionalParams from "./core/GetConversationDetailsOptionalParams";
22
22
  import GetLiveChatConfigOptionalParams from "./core/GetLiveChatConfigOptionalParams";
23
23
  import GetLiveChatTranscriptOptionalParams from "./core/GetLiveChatTranscriptOptionalParams";
24
+ import GetPersistentChatHistoryOptionalParams from "./core/GetPersistentChatHistoryOptionalParams";
24
25
  import IChatToken from "./external/IC3Adapter/IChatToken";
25
26
  import IFileInfo from "@microsoft/omnichannel-ic3core/lib/interfaces/IFileInfo";
26
27
  import IFileMetadata from "@microsoft/omnichannel-ic3core/lib/model/IFileMetadata";
@@ -47,6 +48,8 @@ declare class OmnichannelChatSDK {
47
48
  localeId: string;
48
49
  requestId: string;
49
50
  sessionId: string | null;
51
+ private chatOperationInProgress;
52
+ private pendingOperations;
50
53
  private unqServicesOrgUrl;
51
54
  private coreServicesOrgUrl;
52
55
  private dynamicsLocationCode;
@@ -81,7 +84,17 @@ declare class OmnichannelChatSDK {
81
84
  private debugAMS;
82
85
  private debugACS;
83
86
  private detailedDebugEnabled;
87
+ private regexCompiledForDataMasking;
84
88
  constructor(omnichannelConfig: OmnichannelConfig, chatSDKConfig?: ChatSDKConfig);
89
+ /**
90
+ * Executes an operation with mutual exclusion to prevent race conditions
91
+ * between startChat and endChat operations
92
+ */
93
+ private executeWithLock;
94
+ /**
95
+ * Processes the next pending operation in the queue
96
+ */
97
+ private processNextOperation;
85
98
  /**
86
99
  *
87
100
  * @param flag Flag to enable/disable debug log telemetry, will be applied to all components
@@ -114,8 +127,10 @@ declare class OmnichannelChatSDK {
114
127
  private getChatReconnectContextWithReconnectId;
115
128
  getChatReconnectContext(optionalParams?: ChatReconnectOptionalParams): Promise<ChatReconnectContext>;
116
129
  startChat(optionalParams?: StartChatOptionalParams): Promise<void>;
130
+ private internalStartChat;
117
131
  private closeChat;
118
132
  endChat(endChatOptionalParams?: EndChatOptionalParams): Promise<void>;
133
+ private internalEndChat;
119
134
  getCurrentLiveChatContext(): Promise<GetCurrentLiveChatContextResponse>;
120
135
  getConversationDetails(optionalParams?: GetConversationDetailsOptionalParams): Promise<LiveWorkItemDetails>;
121
136
  /**
@@ -151,6 +166,7 @@ declare class OmnichannelChatSDK {
151
166
  private getIC3Client;
152
167
  private setPrechatConfigurations;
153
168
  private setDataMaskingConfiguration;
169
+ private compileDataMaskingRegex;
154
170
  private setAuthSettingConfig;
155
171
  private setPersistentChatConfiguration;
156
172
  private setLocaleIdConfiguration;
@@ -173,5 +189,10 @@ declare class OmnichannelChatSDK {
173
189
  * @private
174
190
  */
175
191
  private handleConversationJoinFailure;
192
+ /**
193
+ * Get persistent chat history for authenticated users.
194
+ * @param getPersistentChatHistoryOptionalParams Optional parameters for persistent chat history retrieval.
195
+ */
196
+ getPersistentChatHistory(getPersistentChatHistoryOptionalParams?: GetPersistentChatHistoryOptionalParams): Promise<GetPersistentChatHistoryResponse | undefined>;
176
197
  }
177
198
  export default OmnichannelChatSDK;