bruce-models 5.4.0 → 5.4.3

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.
@@ -745,7 +745,8 @@
745
745
  url += ".host/";
746
746
  break;
747
747
  default:
748
- throw ("Specified Environment is not valid. SuppliedEnv=" + env);
748
+ console.warn("Supplied environment does not match default options. You will need to set the base url manually. SuppliedEnv=" + env);
749
+ return;
749
750
  }
750
751
  this.baseUrl = url;
751
752
  }
@@ -851,6 +852,9 @@
851
852
  this.loadCancelled = false;
852
853
  // Indicates if loading the regional configuration was already called.
853
854
  this.configLoadAttempted = false;
855
+ // Indicates if the init process has finished loading.
856
+ // While this is not resolved requests will be in a pending state.
857
+ this.loadProm = Promise.resolve();
854
858
  let { accountId, env, guardian, loadRegionalBaseUrl, loadConfig, loadWebSocket, dummy } = params;
855
859
  this.accountId = accountId;
856
860
  this.env = env !== null && env !== void 0 ? env : exports.Api.EEnv.PROD;
@@ -10982,11 +10986,11 @@
10982
10986
  */
10983
10987
  function UpdateAppSettings(params) {
10984
10988
  return __awaiter(this, void 0, void 0, function* () {
10985
- let { api, accountId: id, appId, settings: data, req: reqParams } = params;
10989
+ let { api, accountId: id, appId, settings: data, req: reqParams, override } = params;
10986
10990
  if (!api) {
10987
10991
  api = exports.ENVIRONMENT.Api().GetGuardianApi();
10988
10992
  }
10989
- const res = yield api.POST(`account/${id}/applicationSettings/${appId}`, data, reqParams);
10993
+ const res = yield api.POST(`account/${id}/applicationSettings/${appId}?Override=${override ? "true" : "false"}`, data, reqParams);
10990
10994
  api.Cache.RemoveByStartsWith(exports.Api.ECacheKey.Account + exports.Api.ECacheKey.Id + id);
10991
10995
  return {
10992
10996
  settings: res
@@ -11882,7 +11886,7 @@
11882
11886
  */
11883
11887
  function UpdateSettings(params) {
11884
11888
  return __awaiter(this, void 0, void 0, function* () {
11885
- let { api, accId, userId, appId, settings, req } = params;
11889
+ let { api, accId, userId, appId, settings, req, override } = params;
11886
11890
  if (!userId || !appId) {
11887
11891
  throw ("UserId and appId are required.");
11888
11892
  }
@@ -11895,7 +11899,7 @@
11895
11899
  ClientAccountID: accId,
11896
11900
  UserID: userId
11897
11901
  };
11898
- const prom = api.POST(`user/${userId}/application/${appId}/settings`, postBody, req);
11902
+ const prom = api.POST(`user/${userId}/application/${appId}/settings?Override=${override ? "true" : "false"}`, postBody, req);
11899
11903
  api.Cache.Remove(GetSettingsCacheKey(userId, appId));
11900
11904
  return prom;
11901
11905
  });
@@ -14460,7 +14464,7 @@
14460
14464
  })(exports.DataSource || (exports.DataSource = {}));
14461
14465
 
14462
14466
  // This is updated with the package.json version on build.
14463
- const VERSION = "5.4.0";
14467
+ const VERSION = "5.4.3";
14464
14468
 
14465
14469
  exports.VERSION = VERSION;
14466
14470
  exports.AbstractApi = AbstractApi;