@microsoft/omnichannel-chat-sdk 2.0.1-main.b9e3cb3 → 2.0.2-main.07ad838

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 CHANGED
@@ -117,6 +117,7 @@ _**Known issue:**_ Versions earlier than 1.11.6 can start duplicate conversation
117
117
 
118
118
  | Version | Docs | Release Date | End of Support | Deprecated |
119
119
  | -- | -- | -- | -- | -- |
120
+ | 2.0.2 | [Release Notes](https://github.com/microsoft/omnichannel-chat-sdk/releases/tag/v2.0.2) | Oct 20th 2026 | Oct 20th 2027 | |
120
121
  | 2.0.1 | [Release Notes](https://github.com/microsoft/omnichannel-chat-sdk/releases/tag/v2.0.1) | Oct 1st 2026 | Oct 1st 2027 | |
121
122
  | 2.0.0 | [Migration Guide](docs/MIGRATION_2.0.md) / [Release Notes](https://github.com/microsoft/omnichannel-chat-sdk/releases/tag/v2.0.0) | Aug 13th 2026 | Aug 13th 2027 | |
122
123
  | 1.11.8 | [Release Notes](https://github.com/microsoft/omnichannel-chat-sdk/releases/tag/v1.11.8) | Feb 2nd 2026 | Feb 2nd 2027 | |
@@ -57,6 +57,7 @@ declare class OmnichannelChatSDK {
57
57
  private coreServicesOrgUrl;
58
58
  private dynamicsLocationCode;
59
59
  private chatToken;
60
+ private chatTokenUnauthorizedRecovery;
60
61
  private liveChatConfig;
61
62
  private widgetSnippetBaseUrl;
62
63
  private liveChatVersion;
@@ -77,6 +78,7 @@ declare class OmnichannelChatSDK {
77
78
  private isPersistentChat;
78
79
  private isChatReconnect;
79
80
  private reconnectId;
81
+ private endedChatSessionKey;
80
82
  private refreshTokenTimer;
81
83
  private AMSClientLoadCurrentState;
82
84
  private isMaskingDisabled;
@@ -165,6 +167,30 @@ declare class OmnichannelChatSDK {
165
167
  getLiveChatConfig(optionalParams?: GetLiveChatConfigOptionalParams): Promise<ChatConfig>;
166
168
  getChatToken(cached?: boolean, optionalParams?: GetChatTokenOptionalParams): Promise<IChatToken>;
167
169
  setChatToken(chatToken: FetchChatTokenResponse): void;
170
+ /**
171
+ * Creates the ACS token refresher used to renew the chat token before it expires. Returns undefined, which keeps
172
+ * the existing behavior, unless renewal is enabled in the chat config, not disabled in the SDK config and
173
+ * supported by the installed OCSDK. The refresher never throws and falls back to the current token on failure.
174
+ */
175
+ private createChatTokenRefresher;
176
+ /**
177
+ * Gives the renewed chat token to the attachment client, which keeps the token it was initialized with and uses
178
+ * it for every upload and download. Runs in the background and never throws: on failure, attachments keep using
179
+ * the previous token as they did before renewal existed.
180
+ */
181
+ private refreshAttachmentClientToken;
182
+ /**
183
+ * Creates the recovery for chat requests that fail with 401 while the chat token has not
184
+ * expired. Returns null, which keeps the existing behavior, unless chat token renewal is enabled and recovery is
185
+ * not disabled in the SDK config.
186
+ */
187
+ private createChatTokenUnauthorizedRecovery;
188
+ /**
189
+ * Returns the token of the authenticated user to renew the chat token with, refreshed from the auth token
190
+ * provider when possible because the token used to start the chat may have expired. Returns undefined for
191
+ * unauthenticated chats.
192
+ */
193
+ private getAuthenticatedUserTokenForChatTokenRenewal;
168
194
  getCallingToken(): Promise<string>;
169
195
  private recordMessages;
170
196
  getMessages(): Promise<GetMessagesResponse>;
@@ -208,6 +234,15 @@ declare class OmnichannelChatSDK {
208
234
  downloadFileAttachment(fileMetadata: FileMetadata | IFileMetadata): Promise<Blob>;
209
235
  emailLiveChatTranscript(body: ChatTranscriptBody, optionalParams?: EmailLiveChatTranscriptOptionaParams): Promise<void>;
210
236
  getLiveChatTranscript(optionalParams?: GetLiveChatTranscriptOptionalParams): Promise<GetLiveChatTranscriptResponse>;
237
+ /**
238
+ * Returns the ended chat's session key when the call targets that chat, or null.
239
+ */
240
+ private getEndedChatSessionKey;
241
+ /**
242
+ * Sends the session key on one OCSDK request without leaving it on the shared client. OCSDK copies the
243
+ * key into the request headers before its first await, so the previous key is restored before the HTTP wait.
244
+ */
245
+ private withRequestSessionKey;
211
246
  createChatAdapter(optionalParams?: ChatAdapterOptionalParams): Promise<ChatAdapter>;
212
247
  isVoiceVideoCallingEnabled(): boolean;
213
248
  getVoiceVideoCalling(voiceVideoCallingOptionalParams?: VoiceVideoCallingOptionalParams): Promise<GetVoiceVideoCallingResponse>;