bruce-models 6.7.8 → 6.7.9
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 +24 -34
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +24 -34
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/account/account-limits.js +9 -29
- package/dist/lib/account/account-limits.js.map +1 -1
- package/dist/lib/api/bruce-api.js +5 -3
- package/dist/lib/api/bruce-api.js.map +1 -1
- package/dist/lib/bruce-models.js +1 -1
- package/dist/lib/environment.js +9 -1
- package/dist/lib/environment.js.map +1 -1
- package/dist/types/account/account-limits.d.ts +0 -5
- package/dist/types/bruce-models.d.ts +1 -1
- package/dist/types/environment.d.ts +1 -0
- package/package.json +1 -1
package/dist/bruce-models.umd.js
CHANGED
|
@@ -1083,9 +1083,11 @@
|
|
|
1083
1083
|
});
|
|
1084
1084
|
}
|
|
1085
1085
|
if (!account) {
|
|
1086
|
-
account = (yield exports.Account.
|
|
1087
|
-
|
|
1088
|
-
api: guardian
|
|
1086
|
+
account = (yield exports.Account.Get({
|
|
1087
|
+
accountId: this.accountId,
|
|
1088
|
+
api: guardian,
|
|
1089
|
+
appId: exports.ENVIRONMENT.PARAMS.appId,
|
|
1090
|
+
expand: ["limit"]
|
|
1089
1091
|
})).account;
|
|
1090
1092
|
}
|
|
1091
1093
|
if (!this.loadCancelled) {
|
|
@@ -1778,7 +1780,9 @@
|
|
|
1778
1780
|
// Default environment.
|
|
1779
1781
|
env: exports.Api.EEnv.PROD,
|
|
1780
1782
|
// Default session ID.
|
|
1781
|
-
sessionId: ENVIRONMENT.GetPageLoadSessionId()
|
|
1783
|
+
sessionId: ENVIRONMENT.GetPageLoadSessionId(),
|
|
1784
|
+
// Default app ID to use when loading account data.
|
|
1785
|
+
appId: null
|
|
1782
1786
|
};
|
|
1783
1787
|
// Subscribe to get notified when someone calls Reset.
|
|
1784
1788
|
// If you are manually updating params, call OnParamsChange.Trigger() to notify others.
|
|
@@ -1811,6 +1815,12 @@
|
|
|
1811
1815
|
if (ENVIRONMENT.IS_SELF_MANAGED) {
|
|
1812
1816
|
throw ("Self managed mode ON. You are getting this error because you didn't pass an Api instance to a function.");
|
|
1813
1817
|
}
|
|
1818
|
+
if (params.appId) {
|
|
1819
|
+
ENVIRONMENT.PARAMS.appId = params.appId;
|
|
1820
|
+
}
|
|
1821
|
+
if (params.env) {
|
|
1822
|
+
ENVIRONMENT.PARAMS.env = params.env;
|
|
1823
|
+
}
|
|
1814
1824
|
if (_getters) {
|
|
1815
1825
|
_getters.ClearCache();
|
|
1816
1826
|
if (params.accountId) {
|
|
@@ -13975,28 +13985,16 @@
|
|
|
13975
13985
|
api = exports.ENVIRONMENT.Api().GetGuardianApi();
|
|
13976
13986
|
}
|
|
13977
13987
|
req = exports.Api.PrepReqParams(req);
|
|
13978
|
-
const
|
|
13979
|
-
|
|
13980
|
-
|
|
13981
|
-
|
|
13982
|
-
|
|
13983
|
-
try {
|
|
13984
|
-
const data = yield api.GET(`account/${accountId}?WithLimits=true`);
|
|
13985
|
-
const limits = data.Limits ? data.Limits : {};
|
|
13986
|
-
res({
|
|
13987
|
-
limits: limits
|
|
13988
|
-
});
|
|
13989
|
-
}
|
|
13990
|
-
catch (e) {
|
|
13991
|
-
rej(e);
|
|
13992
|
-
}
|
|
13993
|
-
}));
|
|
13994
|
-
api.SetCacheItem({
|
|
13995
|
-
key: GetLimitsCacheKey(accountId),
|
|
13996
|
-
value: prom,
|
|
13997
|
-
req: req
|
|
13988
|
+
const { account } = yield exports.Account.Get({
|
|
13989
|
+
accountId: accountId,
|
|
13990
|
+
api: api,
|
|
13991
|
+
expand: ["limit"],
|
|
13992
|
+
appId: exports.ENVIRONMENT.PARAMS.appId
|
|
13998
13993
|
});
|
|
13999
|
-
|
|
13994
|
+
const limits = account["Limits"] || {};
|
|
13995
|
+
return {
|
|
13996
|
+
limits: limits
|
|
13997
|
+
};
|
|
14000
13998
|
});
|
|
14001
13999
|
}
|
|
14002
14000
|
AccountLimits.GetLimits = GetLimits;
|
|
@@ -14586,14 +14584,6 @@
|
|
|
14586
14584
|
}
|
|
14587
14585
|
Assert.GetDenyPublicAccess = GetDenyPublicAccess;
|
|
14588
14586
|
})(Assert = AccountLimits.Assert || (AccountLimits.Assert = {}));
|
|
14589
|
-
/**
|
|
14590
|
-
* Cache key for requesting account limits for a specific account.
|
|
14591
|
-
* @param accountId
|
|
14592
|
-
*/
|
|
14593
|
-
function GetLimitsCacheKey(accountId) {
|
|
14594
|
-
return exports.Api.ECacheKey.AccountLimits + exports.Api.ECacheKey.Id + accountId;
|
|
14595
|
-
}
|
|
14596
|
-
AccountLimits.GetLimitsCacheKey = GetLimitsCacheKey;
|
|
14597
14587
|
})(exports.AccountLimits || (exports.AccountLimits = {}));
|
|
14598
14588
|
|
|
14599
14589
|
(function (AccountTemplate) {
|
|
@@ -16162,7 +16152,7 @@
|
|
|
16162
16152
|
})(exports.Tracking || (exports.Tracking = {}));
|
|
16163
16153
|
|
|
16164
16154
|
// This is updated with the package.json version on build.
|
|
16165
|
-
const VERSION = "6.7.
|
|
16155
|
+
const VERSION = "6.7.9";
|
|
16166
16156
|
|
|
16167
16157
|
exports.VERSION = VERSION;
|
|
16168
16158
|
exports.AbstractApi = AbstractApi;
|