bruce-models 2.4.4 → 2.4.6

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.
@@ -4108,7 +4108,7 @@ var BruceApi;
4108
4108
  cacheId: `BRUCE_API_${params === null || params === void 0 ? void 0 : params.env}_${params === null || params === void 0 ? void 0 : params.accountId}_`
4109
4109
  });
4110
4110
  this.loadCancelled = false;
4111
- let { accountId, env, guardian, loadRegionalBaseUrl, loadConfig } = params;
4111
+ let { accountId, env, guardian, loadRegionalBaseUrl, loadConfig, loadWebSocket } = params;
4112
4112
  this.accountId = accountId;
4113
4113
  this.env = env !== null && env !== void 0 ? env : Api.EEnv.PROD;
4114
4114
  if (loadRegionalBaseUrl) {
@@ -4119,7 +4119,7 @@ var BruceApi;
4119
4119
  env: this.env
4120
4120
  });
4121
4121
  }
4122
- this.loadProm = this.init(guardian, loadConfig);
4122
+ this.loadProm = this.init(guardian, loadConfig, loadWebSocket);
4123
4123
  }
4124
4124
  /**
4125
4125
  * Loads regional base url and sets up message broker.
@@ -4127,7 +4127,7 @@ var BruceApi;
4127
4127
  * @param loadConfig
4128
4128
  * @returns
4129
4129
  */
4130
- init(guardian, loadConfig) {
4130
+ init(guardian, loadConfig, loadWebSocket) {
4131
4131
  var _a, _b, _c;
4132
4132
  return __awaiter(this, void 0, void 0, function* () {
4133
4133
  if (!this.accountId) {
@@ -4212,11 +4212,13 @@ var BruceApi;
4212
4212
  console.error(e);
4213
4213
  }
4214
4214
  }
4215
- try {
4216
- this.messageBroker = new MessageBroker.WebSocketBroker(this.baseUrl, this.env);
4217
- }
4218
- catch (e) {
4219
- console.warn("BruceApi: Failed to create message broker.", e);
4215
+ if (loadWebSocket != false) {
4216
+ try {
4217
+ this.messageBroker = new MessageBroker.WebSocketBroker(this.baseUrl, this.env);
4218
+ }
4219
+ catch (e) {
4220
+ console.warn("BruceApi: Failed to create message broker.", e);
4221
+ }
4220
4222
  }
4221
4223
  });
4222
4224
  }
@@ -4555,6 +4557,9 @@ class ApiGetters {
4555
4557
  return this.sessionId;
4556
4558
  }
4557
4559
  GetBruceApi(params) {
4560
+ if (!params) {
4561
+ params = {};
4562
+ }
4558
4563
  let { accountId, env } = params;
4559
4564
  accountId = accountId ? accountId : this.accountId;
4560
4565
  env = env ? env : this.env;
@@ -4583,6 +4588,9 @@ class ApiGetters {
4583
4588
  * @returns
4584
4589
  */
4585
4590
  GetIdmApi(params) {
4591
+ if (!params) {
4592
+ params = {};
4593
+ }
4586
4594
  let { env } = params;
4587
4595
  env = env ? env : this.env;
4588
4596
  const key = `${env}`;
@@ -4611,6 +4619,9 @@ class ApiGetters {
4611
4619
  * @returns
4612
4620
  */
4613
4621
  GetCamApi(params) {
4622
+ if (!params) {
4623
+ params = {};
4624
+ }
4614
4625
  let { env } = params;
4615
4626
  env = env ? env : this.env;
4616
4627
  const key = `${env}`;
@@ -4635,6 +4646,9 @@ class ApiGetters {
4635
4646
  };
4636
4647
  }
4637
4648
  GetGlobalApi(params) {
4649
+ if (!params) {
4650
+ params = {};
4651
+ }
4638
4652
  let { env } = params;
4639
4653
  env = env ? env : this.env;
4640
4654
  const key = `${env}`;
@@ -4655,6 +4669,9 @@ class ApiGetters {
4655
4669
  };
4656
4670
  }
4657
4671
  GetGuardianApi(params) {
4672
+ if (!params) {
4673
+ params = {};
4674
+ }
4658
4675
  let { env } = params;
4659
4676
  env = env ? env : this.env;
4660
4677
  const key = `${env}`;