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.
@@ -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
  }
@@ -4521,6 +4523,9 @@
4521
4523
  return this.sessionId;
4522
4524
  }
4523
4525
  GetBruceApi(params) {
4526
+ if (!params) {
4527
+ params = {};
4528
+ }
4524
4529
  let { accountId, env } = params;
4525
4530
  accountId = accountId ? accountId : this.accountId;
4526
4531
  env = env ? env : this.env;
@@ -4549,6 +4554,9 @@
4549
4554
  * @returns
4550
4555
  */
4551
4556
  GetIdmApi(params) {
4557
+ if (!params) {
4558
+ params = {};
4559
+ }
4552
4560
  let { env } = params;
4553
4561
  env = env ? env : this.env;
4554
4562
  const key = `${env}`;
@@ -4577,6 +4585,9 @@
4577
4585
  * @returns
4578
4586
  */
4579
4587
  GetCamApi(params) {
4588
+ if (!params) {
4589
+ params = {};
4590
+ }
4580
4591
  let { env } = params;
4581
4592
  env = env ? env : this.env;
4582
4593
  const key = `${env}`;
@@ -4601,6 +4612,9 @@
4601
4612
  };
4602
4613
  }
4603
4614
  GetGlobalApi(params) {
4615
+ if (!params) {
4616
+ params = {};
4617
+ }
4604
4618
  let { env } = params;
4605
4619
  env = env ? env : this.env;
4606
4620
  const key = `${env}`;
@@ -4621,6 +4635,9 @@
4621
4635
  };
4622
4636
  }
4623
4637
  GetGuardianApi(params) {
4638
+ if (!params) {
4639
+ params = {};
4640
+ }
4624
4641
  let { env } = params;
4625
4642
  env = env ? env : this.env;
4626
4643
  const key = `${env}`;