bruce-models 4.1.6 → 4.1.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.
@@ -11398,17 +11398,18 @@ var AccountFeatures;
11398
11398
  EFeature["EntityLexicalSearch"] = "Feature_Entity_Lexical_Search";
11399
11399
  })(EFeature = AccountFeatures.EFeature || (AccountFeatures.EFeature = {}));
11400
11400
  /**
11401
- * Gets account features corresponding to an account ID.
11401
+ * Gets account features corresponding to the API instance's account.
11402
11402
  * @param params
11403
11403
  * @returns
11404
11404
  */
11405
11405
  function Get(params) {
11406
11406
  return __awaiter(this, void 0, void 0, function* () {
11407
- let { api, accountId: id, req: reqParams } = params;
11407
+ let { api, req: reqParams } = params;
11408
11408
  if (!api) {
11409
11409
  api = ENVIRONMENT.Api().GetBruceApi();
11410
11410
  }
11411
- const cache = yield api.GetCacheItem(GetCacheKey(id), reqParams);
11411
+ const accountId = api.AccountId;
11412
+ const cache = yield api.GetCacheItem(GetCacheKey(accountId), reqParams);
11412
11413
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
11413
11414
  return cache.data;
11414
11415
  }
@@ -11425,7 +11426,7 @@ var AccountFeatures;
11425
11426
  }
11426
11427
  }));
11427
11428
  api.SetCacheItem({
11428
- key: GetCacheKey(id),
11429
+ key: GetCacheKey(accountId),
11429
11430
  value: prom,
11430
11431
  req: reqParams
11431
11432
  });
@@ -11435,10 +11436,11 @@ var AccountFeatures;
11435
11436
  AccountFeatures.Get = Get;
11436
11437
  function Update(params) {
11437
11438
  return __awaiter(this, void 0, void 0, function* () {
11438
- let { api, accountId: id, features, req: reqParams } = params;
11439
+ let { api, features, req: reqParams } = params;
11439
11440
  if (!api) {
11440
11441
  api = ENVIRONMENT.Api().GetBruceApi();
11441
11442
  }
11443
+ const accountId = api.AccountId;
11442
11444
  const prom = new Promise((res, rej) => __awaiter(this, void 0, void 0, function* () {
11443
11445
  try {
11444
11446
  const data = yield api.POST("features", {
@@ -11453,7 +11455,7 @@ var AccountFeatures;
11453
11455
  rej(e);
11454
11456
  }
11455
11457
  }));
11456
- api.Cache.Remove(GetCacheKey(id));
11458
+ api.Cache.Remove(GetCacheKey(accountId));
11457
11459
  return prom;
11458
11460
  });
11459
11461
  }
@@ -13114,7 +13116,7 @@ var DataSource;
13114
13116
  })(DataSource || (DataSource = {}));
13115
13117
 
13116
13118
  // This is updated with the package.json version on build.
13117
- const VERSION = "4.1.6";
13119
+ const VERSION = "4.1.7";
13118
13120
 
13119
13121
  export { VERSION, AnnDocument, CustomForm, AbstractApi, Api, BruceApi, GlobalApi, GuardianApi, ApiGetters, Calculator, Bounds, BruceEvent, CacheControl, Camera, Cartes, Carto, Color, DelayQueue, Geometry, UTC, BruceVariable, LRUCache, EntityAttachmentType, EntityAttachment, EntityComment, EntityLink, EntityLod, EntityLodCategory, EntityRelationType, EntityRelation, EntitySource, EntityTag, EntityType, Entity, EntityCoords, EntityTypeVisualSettings, EntityAttribute, EntityHistoricData, Comment, ClientFile, ProgramKey, ZoomControl, MenuItem, ProjectViewBookmark, ProjectView, ProjectViewLegacyTile, ProjectViewTile, ProjectViewLegacy, ProjectViewLegacyBookmark, PendingAction, MessageBroker, HostingLocation, Style, Tileset, Permission, Session, UserGroup, User, Account, AccountInvite, AccountFeatures, AccountLimits, EncryptUtils, MathUtils, ObjectUtils, PathUtils, UrlUtils, DataLab, ImportCad, ImportCsv, ImportJson, ImportKml, ImportedFile, Markup, Uploader, Plugin, ENVIRONMENT, DataSource };
13120
13122
  //# sourceMappingURL=bruce-models.es5.js.map