bruce-models 5.9.4 → 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.
@@ -1734,21 +1734,26 @@
1734
1734
  */
1735
1735
  function Get(params) {
1736
1736
  return __awaiter(this, void 0, void 0, function* () {
1737
- let { api, assemblyId, req: reqParams } = params;
1737
+ let { api, assemblyId, req: reqParams, expand } = params;
1738
1738
  if (!api) {
1739
1739
  api = exports.ENVIRONMENT.Api().GetBruceApi();
1740
1740
  }
1741
+ if (expand == null) {
1742
+ expand = true;
1743
+ }
1741
1744
  if (!assemblyId) {
1742
1745
  throw ("Assembly ID is required.");
1743
1746
  }
1744
- const key = GetCacheKey(assemblyId);
1747
+ const key = GetCacheKey(assemblyId, expand);
1745
1748
  const cache = api.GetCacheItem(key, reqParams);
1746
1749
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
1747
1750
  return cache.data;
1748
1751
  }
1749
1752
  const prom = new Promise((res, rej) => __awaiter(this, void 0, void 0, function* () {
1750
1753
  try {
1751
- const data = yield api.GET(`v3/assembly/${assemblyId}`, exports.Api.PrepReqParams(reqParams));
1754
+ let url = `v3/assembly/${assemblyId}`;
1755
+ url += "?Expand=" + (expand ? "true" : "false");
1756
+ const data = yield api.GET(url, exports.Api.PrepReqParams(reqParams));
1752
1757
  res({
1753
1758
  assembly: data
1754
1759
  });
@@ -1835,7 +1840,7 @@
1835
1840
  }
1836
1841
  const url = `v3/assembly/${data.ID}`;
1837
1842
  const res = yield api.POST(url, data, exports.Api.PrepReqParams(reqParams));
1838
- api.Cache.Remove(GetCacheKey(data.ID));
1843
+ api.Cache.RemoveByStartsWith(exports.Api.ECacheKey.Assembly + exports.Api.ECacheKey.Id + data.ID);
1839
1844
  return {
1840
1845
  assembly: res
1841
1846
  };
@@ -1856,7 +1861,7 @@
1856
1861
  api = exports.ENVIRONMENT.Api().GetBruceApi();
1857
1862
  }
1858
1863
  yield api.DELETE(`v3/assembly/${assemblyId}`, exports.Api.PrepReqParams(reqParams));
1859
- api.Cache.Remove(GetCacheKey(assemblyId));
1864
+ api.Cache.RemoveByStartsWith(exports.Api.ECacheKey.Assembly + exports.Api.ECacheKey.Id + assemblyId);
1860
1865
  });
1861
1866
  }
1862
1867
  Assembly.Delete = Delete;
@@ -1912,8 +1917,8 @@
1912
1917
  * @param assemblyId
1913
1918
  * @returns
1914
1919
  */
1915
- function GetCacheKey(assemblyId) {
1916
- return `${exports.Api.ECacheKey.Assembly}${exports.Api.ECacheKey.Id}${assemblyId}`;
1920
+ function GetCacheKey(assemblyId, expand) {
1921
+ return `${exports.Api.ECacheKey.Assembly}${exports.Api.ECacheKey.Id}${assemblyId}${String(Boolean(expand))}`;
1917
1922
  }
1918
1923
  Assembly.GetCacheKey = GetCacheKey;
1919
1924
  })(exports.Assembly || (exports.Assembly = {}));
@@ -15307,7 +15312,7 @@
15307
15312
  })(exports.Scenario || (exports.Scenario = {}));
15308
15313
 
15309
15314
  // This is updated with the package.json version on build.
15310
- const VERSION = "5.9.4";
15315
+ const VERSION = "5.9.6";
15311
15316
 
15312
15317
  exports.VERSION = VERSION;
15313
15318
  exports.AbstractApi = AbstractApi;