bruce-models 5.9.5 → 5.9.6

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.
@@ -1756,21 +1756,26 @@ var Assembly;
1756
1756
  */
1757
1757
  function Get(params) {
1758
1758
  return __awaiter(this, void 0, void 0, function* () {
1759
- let { api, assemblyId, req: reqParams } = params;
1759
+ let { api, assemblyId, req: reqParams, expand } = params;
1760
1760
  if (!api) {
1761
1761
  api = ENVIRONMENT.Api().GetBruceApi();
1762
1762
  }
1763
+ if (expand == null) {
1764
+ expand = true;
1765
+ }
1763
1766
  if (!assemblyId) {
1764
1767
  throw ("Assembly ID is required.");
1765
1768
  }
1766
- const key = GetCacheKey(assemblyId);
1769
+ const key = GetCacheKey(assemblyId, expand);
1767
1770
  const cache = api.GetCacheItem(key, reqParams);
1768
1771
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
1769
1772
  return cache.data;
1770
1773
  }
1771
1774
  const prom = new Promise((res, rej) => __awaiter(this, void 0, void 0, function* () {
1772
1775
  try {
1773
- const data = yield api.GET(`v3/assembly/${assemblyId}`, Api.PrepReqParams(reqParams));
1776
+ let url = `v3/assembly/${assemblyId}`;
1777
+ url += "?Expand=" + (expand ? "true" : "false");
1778
+ const data = yield api.GET(url, Api.PrepReqParams(reqParams));
1774
1779
  res({
1775
1780
  assembly: data
1776
1781
  });
@@ -1857,7 +1862,7 @@ var Assembly;
1857
1862
  }
1858
1863
  const url = `v3/assembly/${data.ID}`;
1859
1864
  const res = yield api.POST(url, data, Api.PrepReqParams(reqParams));
1860
- api.Cache.Remove(GetCacheKey(data.ID));
1865
+ api.Cache.RemoveByStartsWith(Api.ECacheKey.Assembly + Api.ECacheKey.Id + data.ID);
1861
1866
  return {
1862
1867
  assembly: res
1863
1868
  };
@@ -1878,7 +1883,7 @@ var Assembly;
1878
1883
  api = ENVIRONMENT.Api().GetBruceApi();
1879
1884
  }
1880
1885
  yield api.DELETE(`v3/assembly/${assemblyId}`, Api.PrepReqParams(reqParams));
1881
- api.Cache.Remove(GetCacheKey(assemblyId));
1886
+ api.Cache.RemoveByStartsWith(Api.ECacheKey.Assembly + Api.ECacheKey.Id + assemblyId);
1882
1887
  });
1883
1888
  }
1884
1889
  Assembly.Delete = Delete;
@@ -1934,8 +1939,8 @@ var Assembly;
1934
1939
  * @param assemblyId
1935
1940
  * @returns
1936
1941
  */
1937
- function GetCacheKey(assemblyId) {
1938
- return `${Api.ECacheKey.Assembly}${Api.ECacheKey.Id}${assemblyId}`;
1942
+ function GetCacheKey(assemblyId, expand) {
1943
+ return `${Api.ECacheKey.Assembly}${Api.ECacheKey.Id}${assemblyId}${String(Boolean(expand))}`;
1939
1944
  }
1940
1945
  Assembly.GetCacheKey = GetCacheKey;
1941
1946
  })(Assembly || (Assembly = {}));
@@ -15616,7 +15621,7 @@ var Scenario;
15616
15621
  })(Scenario || (Scenario = {}));
15617
15622
 
15618
15623
  // This is updated with the package.json version on build.
15619
- const VERSION = "5.9.5";
15624
+ const VERSION = "5.9.6";
15620
15625
 
15621
15626
  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, 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 };
15622
15627
  //# sourceMappingURL=bruce-models.es5.js.map