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.
- package/dist/cjs/index.browser.js +15 -4
- package/dist/cjs/index.browser.js.map +2 -2
- package/dist/cjs/index.node.js +15 -4
- package/dist/cjs/index.node.js.map +2 -2
- package/dist/esm/index.mjs +15 -4
- package/dist/esm/index.mjs.map +2 -2
- package/dist/types/types.d.ts +24 -1
- package/package.json +1 -1
- package/src/client.ts +2 -2
- package/src/connection.ts +15 -1
- package/src/types.ts +29 -2
package/dist/esm/index.mjs
CHANGED
|
@@ -11890,7 +11890,18 @@ var StableWSConnection = class {
|
|
|
11890
11890
|
this._log("_reconnect() - Destroying current WS connection");
|
|
11891
11891
|
this._destroyCurrentWSConnection();
|
|
11892
11892
|
if (options.refreshToken) {
|
|
11893
|
-
|
|
11893
|
+
try {
|
|
11894
|
+
await this.client.tokenManager.loadToken();
|
|
11895
|
+
} catch (error) {
|
|
11896
|
+
this.isHealthy = false;
|
|
11897
|
+
this.consecutiveFailures += 1;
|
|
11898
|
+
this._log("_reconnect() - Failed to refresh the token", { error }, "warn");
|
|
11899
|
+
if (!this.isDisconnected) {
|
|
11900
|
+
this._log("_reconnect() - Going to try to reload token and reconnect");
|
|
11901
|
+
this._reconnect({ refreshToken: true });
|
|
11902
|
+
}
|
|
11903
|
+
return;
|
|
11904
|
+
}
|
|
11894
11905
|
if (this.isConnecting || this.isHealthy) {
|
|
11895
11906
|
this._log("_reconnect() - Abort (4) since already connecting or healthy");
|
|
11896
11907
|
return;
|
|
@@ -15305,7 +15316,7 @@ var StreamChat = class _StreamChat {
|
|
|
15305
15316
|
return this.userAgent;
|
|
15306
15317
|
}
|
|
15307
15318
|
if (!this.cachedUserAgent) {
|
|
15308
|
-
const version = "9.
|
|
15319
|
+
const version = "9.55.0";
|
|
15309
15320
|
const { name: sdkName, version: sdkVersion } = this.sdkIdentifier ?? {};
|
|
15310
15321
|
const { name: appName, version: appVersion } = this.appIdentifier ?? {};
|
|
15311
15322
|
const { os, model: deviceModel } = this.deviceIdentifier ?? {};
|
|
@@ -17935,9 +17946,9 @@ var StreamChat = class _StreamChat {
|
|
|
17935
17946
|
"Invalid delete user options. user must be one of [soft hard pruning]"
|
|
17936
17947
|
);
|
|
17937
17948
|
}
|
|
17938
|
-
if (typeof options.conversations !== "undefined" && !["soft", "hard"].includes(options.conversations)) {
|
|
17949
|
+
if (typeof options.conversations !== "undefined" && !["soft", "hard", "keep"].includes(options.conversations)) {
|
|
17939
17950
|
throw new Error(
|
|
17940
|
-
"Invalid delete user options. conversations must be one of [soft hard]"
|
|
17951
|
+
"Invalid delete user options. conversations must be one of [soft hard keep]"
|
|
17941
17952
|
);
|
|
17942
17953
|
}
|
|
17943
17954
|
if (typeof options.messages !== "undefined" && !["soft", "hard", "pruning"].includes(options.messages)) {
|