bruce-models 6.7.1 → 6.7.2
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 +12 -9
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +12 -9
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/bruce-models.js +1 -1
- package/dist/lib/user/user.js +11 -8
- package/dist/lib/user/user.js.map +1 -1
- package/dist/types/bruce-models.d.ts +1 -1
- package/dist/types/user/user.d.ts +3 -1
- package/package.json +1 -1
package/dist/bruce-models.es5.js
CHANGED
|
@@ -13003,21 +13003,21 @@ var User;
|
|
|
13003
13003
|
*/
|
|
13004
13004
|
function GetSettings(params) {
|
|
13005
13005
|
return __awaiter(this, void 0, void 0, function* () {
|
|
13006
|
-
let { api, userId, appId, req } = params;
|
|
13006
|
+
let { api, userId, appId, req, accountId } = params;
|
|
13007
13007
|
if (!userId || !appId) {
|
|
13008
13008
|
throw ("UserId and appId are required.");
|
|
13009
13009
|
}
|
|
13010
13010
|
if (!api) {
|
|
13011
13011
|
api = ENVIRONMENT.Api().GetGuardianApi();
|
|
13012
13012
|
}
|
|
13013
|
-
const cacheKey = GetSettingsCacheKey(api.GetSessionId(), userId, appId);
|
|
13013
|
+
const cacheKey = GetSettingsCacheKey(api.GetSessionId(), userId, appId, accountId);
|
|
13014
13014
|
const cache = api.GetCacheItem(cacheKey, req);
|
|
13015
13015
|
if (cache === null || cache === void 0 ? void 0 : cache.found) {
|
|
13016
13016
|
return cache.data;
|
|
13017
13017
|
}
|
|
13018
13018
|
const prom = new Promise((res, rej) => __awaiter(this, void 0, void 0, function* () {
|
|
13019
13019
|
try {
|
|
13020
|
-
const data = yield api.GET(`user/${userId}/application/${appId}/settings`);
|
|
13020
|
+
const data = yield api.GET(`user/${userId}/application/${appId}/settings${accountId ? "?Account=" + accountId : ""}`);
|
|
13021
13021
|
const settings = (data === null || data === void 0 ? void 0 : data.Settings) ? data.Settings : {};
|
|
13022
13022
|
res({
|
|
13023
13023
|
settings: settings
|
|
@@ -13054,21 +13054,24 @@ var User;
|
|
|
13054
13054
|
*/
|
|
13055
13055
|
function UpdateSettings(params) {
|
|
13056
13056
|
return __awaiter(this, void 0, void 0, function* () {
|
|
13057
|
-
let { api, accId, userId, appId, settings, req, override } = params;
|
|
13057
|
+
let { api, accId, accountId, userId, appId, settings, req, override } = params;
|
|
13058
13058
|
if (!userId || !appId) {
|
|
13059
13059
|
throw ("UserId and appId are required.");
|
|
13060
13060
|
}
|
|
13061
13061
|
if (!api) {
|
|
13062
13062
|
api = ENVIRONMENT.Api().GetGuardianApi();
|
|
13063
13063
|
}
|
|
13064
|
+
if (!accountId) {
|
|
13065
|
+
accountId = accId;
|
|
13066
|
+
}
|
|
13064
13067
|
const postBody = {
|
|
13065
13068
|
Settings: settings == null ? {} : settings,
|
|
13066
13069
|
Application: appId,
|
|
13067
|
-
ClientAccountID:
|
|
13070
|
+
ClientAccountID: accountId,
|
|
13068
13071
|
UserID: userId
|
|
13069
13072
|
};
|
|
13070
13073
|
const prom = api.POST(`user/${userId}/application/${appId}/settings?Override=${override ? "true" : "false"}`, postBody, req);
|
|
13071
|
-
api.Cache.Remove(GetSettingsCacheKey(api.GetSessionId(), userId, appId));
|
|
13074
|
+
api.Cache.Remove(GetSettingsCacheKey(api.GetSessionId(), userId, appId, accountId));
|
|
13072
13075
|
return prom;
|
|
13073
13076
|
});
|
|
13074
13077
|
}
|
|
@@ -13560,11 +13563,11 @@ var User;
|
|
|
13560
13563
|
* @param appId
|
|
13561
13564
|
* @returns
|
|
13562
13565
|
*/
|
|
13563
|
-
function GetSettingsCacheKey(sessionId, userId, appId) {
|
|
13566
|
+
function GetSettingsCacheKey(sessionId, userId, appId, accountId) {
|
|
13564
13567
|
if (!sessionId) {
|
|
13565
13568
|
sessionId = "anonymous";
|
|
13566
13569
|
}
|
|
13567
|
-
return Api.ECacheKey.User + Api.ECacheKey.UserSettings + userId + Api.ECacheKey.Id + appId;
|
|
13570
|
+
return Api.ECacheKey.User + Api.ECacheKey.UserSettings + userId + Api.ECacheKey.Id + appId + (accountId ? Api.ECacheKey.Id + accountId : "");
|
|
13568
13571
|
}
|
|
13569
13572
|
User$$1.GetSettingsCacheKey = GetSettingsCacheKey;
|
|
13570
13573
|
})(User || (User = {}));
|
|
@@ -16416,7 +16419,7 @@ var Tracking;
|
|
|
16416
16419
|
})(Tracking || (Tracking = {}));
|
|
16417
16420
|
|
|
16418
16421
|
// This is updated with the package.json version on build.
|
|
16419
|
-
const VERSION = "6.7.
|
|
16422
|
+
const VERSION = "6.7.2";
|
|
16420
16423
|
|
|
16421
16424
|
export { VERSION, Assembly, AnnDocument, CustomForm, AbstractApi, Api, BruceApi, GlobalApi, GuardianApi, ApiGetters, Calculator, Bounds, BruceEvent, CacheControl, Camera, Cartes, Carto, Color, DelayQueue, Geometry, UTC, BruceVariable, LRUCache, GeoJson, EntityAttachmentType, EntityAttachment, EntityComment, EntityLink, EntityLod, EntityLodCategory, EntityRelationType, EntityRelation, EntitySource, EntityTag, EntityType, Entity, EntityCoords, EntityAttribute, EntityHistoricData, EntityTableView, Comment, ClientFile, ProgramKey, ZoomControl, MenuItem, ProjectViewBookmark, ProjectView, ProjectViewLegacyTile, ProjectViewTile, ProjectViewLegacy, ProjectViewLegacyBookmark, ProjectViewBookmarkGroup, PendingAction, MessageBroker, HostingLocation, Style, Tileset, Permission, Session, UserGroup, User, UserMfaMethod, Account, AccountInvite, AccountFeatures, AccountLimits, AccountTemplate, AccountType, EncryptUtils, MathUtils, ObjectUtils, PathUtils, UrlUtils, DataLab, DataLabGroup, ImportAssembly, ImportCad, ImportCsv, ImportJson, ImportGeoJson, ImportKml, ImportedFile, ExportBrz, ExportUsd, Markup, Uploader, Plugin, ENVIRONMENT, DataSource, Scenario, Tracking };
|
|
16422
16425
|
//# sourceMappingURL=bruce-models.es5.js.map
|