stream-chat 9.54.3 → 9.55.0

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.
@@ -12082,7 +12082,18 @@ var StableWSConnection = class {
12082
12082
  this._log("_reconnect() - Destroying current WS connection");
12083
12083
  this._destroyCurrentWSConnection();
12084
12084
  if (options.refreshToken) {
12085
- await this.client.tokenManager.loadToken();
12085
+ try {
12086
+ await this.client.tokenManager.loadToken();
12087
+ } catch (error) {
12088
+ this.isHealthy = false;
12089
+ this.consecutiveFailures += 1;
12090
+ this._log("_reconnect() - Failed to refresh the token", { error }, "warn");
12091
+ if (!this.isDisconnected) {
12092
+ this._log("_reconnect() - Going to try to reload token and reconnect");
12093
+ this._reconnect({ refreshToken: true });
12094
+ }
12095
+ return;
12096
+ }
12086
12097
  if (this.isConnecting || this.isHealthy) {
12087
12098
  this._log("_reconnect() - Abort (4) since already connecting or healthy");
12088
12099
  return;
@@ -15497,7 +15508,7 @@ var StreamChat = class _StreamChat {
15497
15508
  return this.userAgent;
15498
15509
  }
15499
15510
  if (!this.cachedUserAgent) {
15500
- const version = "9.54.3";
15511
+ const version = "9.55.0";
15501
15512
  const { name: sdkName, version: sdkVersion } = this.sdkIdentifier ?? {};
15502
15513
  const { name: appName, version: appVersion } = this.appIdentifier ?? {};
15503
15514
  const { os, model: deviceModel } = this.deviceIdentifier ?? {};
@@ -18127,9 +18138,9 @@ var StreamChat = class _StreamChat {
18127
18138
  "Invalid delete user options. user must be one of [soft hard pruning]"
18128
18139
  );
18129
18140
  }
18130
- if (typeof options.conversations !== "undefined" && !["soft", "hard"].includes(options.conversations)) {
18141
+ if (typeof options.conversations !== "undefined" && !["soft", "hard", "keep"].includes(options.conversations)) {
18131
18142
  throw new Error(
18132
- "Invalid delete user options. conversations must be one of [soft hard]"
18143
+ "Invalid delete user options. conversations must be one of [soft hard keep]"
18133
18144
  );
18134
18145
  }
18135
18146
  if (typeof options.messages !== "undefined" && !["soft", "hard", "pruning"].includes(options.messages)) {