bruce-models 6.7.6 → 6.7.7
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/bruce-models.es5.js +17 -10
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +17 -10
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/api/bruce-api.js +16 -9
- package/dist/lib/api/bruce-api.js.map +1 -1
- package/dist/lib/bruce-models.js +1 -1
- package/dist/types/api/bruce-api.d.ts +5 -1
- package/dist/types/bruce-models.d.ts +1 -1
- package/package.json +1 -1
package/dist/bruce-models.umd.js
CHANGED
|
@@ -976,7 +976,7 @@
|
|
|
976
976
|
// Indicates if the init process has finished loading.
|
|
977
977
|
// While this is not resolved requests will be in a pending state.
|
|
978
978
|
this.loadProm = Promise.resolve();
|
|
979
|
-
let { accountId, env, guardian, loadRegionalBaseUrl, loadConfig, loadWebSocket, dummy } = params;
|
|
979
|
+
let { accountId, env, guardian, loadRegionalBaseUrl, loadConfig, loadWebSocket, dummy, account } = params;
|
|
980
980
|
this.accountId = accountId;
|
|
981
981
|
this.env = env !== null && env !== void 0 ? env : exports.Api.EEnv.PROD;
|
|
982
982
|
if (!dummy) {
|
|
@@ -988,16 +988,20 @@
|
|
|
988
988
|
// Mark it as attempted right away because we don't want any external calls while it gets to that async point.
|
|
989
989
|
this.configLoadAttempted = true;
|
|
990
990
|
}
|
|
991
|
-
this.loadProm = this.init(guardian, loadConfig, loadWebSocket);
|
|
991
|
+
this.loadProm = this.init(guardian, loadConfig, loadWebSocket, account);
|
|
992
992
|
}
|
|
993
993
|
}
|
|
994
994
|
/**
|
|
995
995
|
* Loads regional base url and sets up message broker.
|
|
996
996
|
* @param guardian Required for loading regional base url.
|
|
997
997
|
* @param loadConfig
|
|
998
|
+
* @param loadWebSocket
|
|
999
|
+
* @param account
|
|
998
1000
|
* @returns
|
|
999
1001
|
*/
|
|
1000
|
-
init(guardian, loadConfig, loadWebSocket
|
|
1002
|
+
init(guardian, loadConfig, loadWebSocket,
|
|
1003
|
+
// Preloaded account to save doing an API call.
|
|
1004
|
+
account) {
|
|
1001
1005
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1002
1006
|
if (!this.accountId) {
|
|
1003
1007
|
throw ("accountId is required.");
|
|
@@ -1011,7 +1015,8 @@
|
|
|
1011
1015
|
guardian: guardian,
|
|
1012
1016
|
// We marked it as attempted to load outside this method to fight any external calls.
|
|
1013
1017
|
// So we'll force load it now.
|
|
1014
|
-
forceLoad: true
|
|
1018
|
+
forceLoad: true,
|
|
1019
|
+
account: account
|
|
1015
1020
|
});
|
|
1016
1021
|
}
|
|
1017
1022
|
// Get the version.
|
|
@@ -1066,7 +1071,7 @@
|
|
|
1066
1071
|
*/
|
|
1067
1072
|
LoadConfig(params) {
|
|
1068
1073
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1069
|
-
let { guardian, forceLoad } = (params !== null && params !== void 0 ? params : {});
|
|
1074
|
+
let { guardian, forceLoad, account } = (params !== null && params !== void 0 ? params : {});
|
|
1070
1075
|
if (this.configLoadAttempted && forceLoad != true) {
|
|
1071
1076
|
return;
|
|
1072
1077
|
}
|
|
@@ -1077,10 +1082,12 @@
|
|
|
1077
1082
|
env: this.env
|
|
1078
1083
|
});
|
|
1079
1084
|
}
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1085
|
+
if (!account) {
|
|
1086
|
+
account = (yield exports.Account.GetBySubdomain({
|
|
1087
|
+
subdomain: this.accountId,
|
|
1088
|
+
api: guardian
|
|
1089
|
+
})).account;
|
|
1090
|
+
}
|
|
1084
1091
|
if (!this.loadCancelled) {
|
|
1085
1092
|
// Set the calculated base url.
|
|
1086
1093
|
// If this is not available then this is considered a critical failure.
|
|
@@ -16137,7 +16144,7 @@
|
|
|
16137
16144
|
})(exports.Tracking || (exports.Tracking = {}));
|
|
16138
16145
|
|
|
16139
16146
|
// This is updated with the package.json version on build.
|
|
16140
|
-
const VERSION = "6.7.
|
|
16147
|
+
const VERSION = "6.7.7";
|
|
16141
16148
|
|
|
16142
16149
|
exports.VERSION = VERSION;
|
|
16143
16150
|
exports.AbstractApi = AbstractApi;
|