bruce-models 2.4.3 → 2.4.5

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.
@@ -4085,7 +4085,7 @@
4085
4085
  cacheId: `BRUCE_API_${params === null || params === void 0 ? void 0 : params.env}_${params === null || params === void 0 ? void 0 : params.accountId}_`
4086
4086
  });
4087
4087
  this.loadCancelled = false;
4088
- let { accountId, env, guardian, loadRegionalBaseUrl, loadConfig } = params;
4088
+ let { accountId, env, guardian, loadRegionalBaseUrl, loadConfig, loadWebSocket } = params;
4089
4089
  this.accountId = accountId;
4090
4090
  this.env = env !== null && env !== void 0 ? env : exports.Api.EEnv.PROD;
4091
4091
  if (loadRegionalBaseUrl) {
@@ -4096,7 +4096,7 @@
4096
4096
  env: this.env
4097
4097
  });
4098
4098
  }
4099
- this.loadProm = this.init(guardian, loadConfig);
4099
+ this.loadProm = this.init(guardian, loadConfig, loadWebSocket);
4100
4100
  }
4101
4101
  /**
4102
4102
  * Loads regional base url and sets up message broker.
@@ -4104,7 +4104,7 @@
4104
4104
  * @param loadConfig
4105
4105
  * @returns
4106
4106
  */
4107
- init(guardian, loadConfig) {
4107
+ init(guardian, loadConfig, loadWebSocket) {
4108
4108
  var _a, _b, _c;
4109
4109
  return __awaiter(this, void 0, void 0, function* () {
4110
4110
  if (!this.accountId) {
@@ -4189,11 +4189,13 @@
4189
4189
  console.error(e);
4190
4190
  }
4191
4191
  }
4192
- try {
4193
- this.messageBroker = new exports.MessageBroker.WebSocketBroker(this.baseUrl, this.env);
4194
- }
4195
- catch (e) {
4196
- console.warn("BruceApi: Failed to create message broker.", e);
4192
+ if (loadWebSocket != false) {
4193
+ try {
4194
+ this.messageBroker = new exports.MessageBroker.WebSocketBroker(this.baseUrl, this.env);
4195
+ }
4196
+ catch (e) {
4197
+ console.warn("BruceApi: Failed to create message broker.", e);
4198
+ }
4197
4199
  }
4198
4200
  });
4199
4201
  }