@hautechai/sdk 2.0.0 → 2.1.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/index.d.mts CHANGED
@@ -6841,6 +6841,9 @@ interface Config {
6841
6841
  baseUrl: string;
6842
6842
  baseWsUrl: string;
6843
6843
  authToken: () => string | Promise<string>;
6844
+ wsConfig?: {
6845
+ transports?: ('polling' | 'websocket' | 'webtransport')[];
6846
+ };
6844
6847
  }
6845
6848
 
6846
6849
  interface BaseWsEvent<T> {
package/dist/index.d.ts CHANGED
@@ -6841,6 +6841,9 @@ interface Config {
6841
6841
  baseUrl: string;
6842
6842
  baseWsUrl: string;
6843
6843
  authToken: () => string | Promise<string>;
6844
+ wsConfig?: {
6845
+ transports?: ('polling' | 'websocket' | 'webtransport')[];
6846
+ };
6844
6847
  }
6845
6848
 
6846
6849
  interface BaseWsEvent<T> {
package/dist/index.js CHANGED
@@ -14219,6 +14219,7 @@ var WsClient = class {
14219
14219
  getSocket() {
14220
14220
  if (!this.socket) {
14221
14221
  this.socket = (0, import_socket.io)(this.config.baseWsUrl, {
14222
+ transports: this.config.wsConfig?.transports || ["websocket"],
14222
14223
  auth: (cb) => {
14223
14224
  Promise.resolve(this.config.authToken()).then((token) => {
14224
14225
  cb({