bruce-models 6.7.8 → 6.8.0

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.
@@ -1092,9 +1092,11 @@ var BruceApi;
1092
1092
  });
1093
1093
  }
1094
1094
  if (!account) {
1095
- account = (yield Account.GetBySubdomain({
1096
- subdomain: this.accountId,
1097
- api: guardian
1095
+ account = (yield Account.Get({
1096
+ accountId: this.accountId,
1097
+ api: guardian,
1098
+ appId: ENVIRONMENT.PARAMS.appId,
1099
+ expand: ["limit"]
1098
1100
  })).account;
1099
1101
  }
1100
1102
  if (!this.loadCancelled) {
@@ -1794,7 +1796,9 @@ var ENVIRONMENT;
1794
1796
  // Default environment.
1795
1797
  env: Api.EEnv.PROD,
1796
1798
  // Default session ID.
1797
- sessionId: ENVIRONMENT.GetPageLoadSessionId()
1799
+ sessionId: ENVIRONMENT.GetPageLoadSessionId(),
1800
+ // Default app ID to use when loading account data.
1801
+ appId: null
1798
1802
  };
1799
1803
  // Subscribe to get notified when someone calls Reset.
1800
1804
  // If you are manually updating params, call OnParamsChange.Trigger() to notify others.
@@ -1827,6 +1831,12 @@ var ENVIRONMENT;
1827
1831
  if (ENVIRONMENT.IS_SELF_MANAGED) {
1828
1832
  throw ("Self managed mode ON. You are getting this error because you didn't pass an Api instance to a function.");
1829
1833
  }
1834
+ if (params.appId) {
1835
+ ENVIRONMENT.PARAMS.appId = params.appId;
1836
+ }
1837
+ if (params.env) {
1838
+ ENVIRONMENT.PARAMS.env = params.env;
1839
+ }
1830
1840
  if (_getters) {
1831
1841
  _getters.ClearCache();
1832
1842
  if (params.accountId) {
@@ -8223,6 +8233,9 @@ var EntityCoords;
8223
8233
  "SRID": "EPSG:" + epsg,
8224
8234
  "Entity.ID": entityId
8225
8235
  }
8236
+ },
8237
+ "transform": {
8238
+ "scale": params.scale || 1
8226
8239
  }
8227
8240
  },
8228
8241
  "test": params.test
@@ -14238,28 +14251,16 @@ var AccountLimits;
14238
14251
  api = ENVIRONMENT.Api().GetGuardianApi();
14239
14252
  }
14240
14253
  req = Api.PrepReqParams(req);
14241
- const cacheData = api.GetCacheItem(GetLimitsCacheKey(accountId));
14242
- if (cacheData === null || cacheData === void 0 ? void 0 : cacheData.found) {
14243
- return cacheData.data;
14244
- }
14245
- const prom = new Promise((res, rej) => __awaiter(this, void 0, void 0, function* () {
14246
- try {
14247
- const data = yield api.GET(`account/${accountId}?WithLimits=true`);
14248
- const limits = data.Limits ? data.Limits : {};
14249
- res({
14250
- limits: limits
14251
- });
14252
- }
14253
- catch (e) {
14254
- rej(e);
14255
- }
14256
- }));
14257
- api.SetCacheItem({
14258
- key: GetLimitsCacheKey(accountId),
14259
- value: prom,
14260
- req: req
14254
+ const { account } = yield Account.Get({
14255
+ accountId: accountId,
14256
+ api: api,
14257
+ expand: ["limit"],
14258
+ appId: ENVIRONMENT.PARAMS.appId
14261
14259
  });
14262
- return prom;
14260
+ const limits = account["Limits"] || {};
14261
+ return {
14262
+ limits: limits
14263
+ };
14263
14264
  });
14264
14265
  }
14265
14266
  AccountLimits$$1.GetLimits = GetLimits;
@@ -14849,14 +14850,6 @@ var AccountLimits;
14849
14850
  }
14850
14851
  Assert.GetDenyPublicAccess = GetDenyPublicAccess;
14851
14852
  })(Assert = AccountLimits$$1.Assert || (AccountLimits$$1.Assert = {}));
14852
- /**
14853
- * Cache key for requesting account limits for a specific account.
14854
- * @param accountId
14855
- */
14856
- function GetLimitsCacheKey(accountId) {
14857
- return Api.ECacheKey.AccountLimits + Api.ECacheKey.Id + accountId;
14858
- }
14859
- AccountLimits$$1.GetLimitsCacheKey = GetLimitsCacheKey;
14860
14853
  })(AccountLimits || (AccountLimits = {}));
14861
14854
 
14862
14855
  /**
@@ -16477,7 +16470,7 @@ var Tracking;
16477
16470
  })(Tracking || (Tracking = {}));
16478
16471
 
16479
16472
  // This is updated with the package.json version on build.
16480
- const VERSION = "6.7.8";
16473
+ const VERSION = "6.8.0";
16481
16474
 
16482
16475
  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 };
16483
16476
  //# sourceMappingURL=bruce-models.es5.js.map