bruce-models 6.1.2 → 6.1.4

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.
@@ -6852,26 +6852,22 @@
6852
6852
  if (!api) {
6853
6853
  api = exports.ENVIRONMENT.Api().GetBruceApi();
6854
6854
  }
6855
- const cache = api.GetCacheItem(GetCacheKey(id), reqParams);
6856
- if (cache === null || cache === void 0 ? void 0 : cache.found) {
6857
- return cache.data;
6858
- }
6859
6855
  const req = new Promise((res, rej) => __awaiter(this, void 0, void 0, function* () {
6860
6856
  try {
6861
- const data = yield api.GET(`lodCategory/${id}`, exports.Api.PrepReqParams(reqParams));
6857
+ // No singular?
6858
+ const data = yield GetList({
6859
+ api,
6860
+ req: reqParams
6861
+ });
6862
+ const category = data.categories.find((c) => c.Key.toLowerCase() === id.toLowerCase());
6862
6863
  res({
6863
- category: data
6864
+ category: category
6864
6865
  });
6865
6866
  }
6866
6867
  catch (e) {
6867
6868
  rej(e);
6868
6869
  }
6869
6870
  }));
6870
- api.SetCacheItem({
6871
- key: GetCacheKey(id),
6872
- value: req,
6873
- req: reqParams
6874
- });
6875
6871
  return req;
6876
6872
  });
6877
6873
  }
@@ -6890,7 +6886,6 @@
6890
6886
  api = exports.ENVIRONMENT.Api().GetBruceApi();
6891
6887
  }
6892
6888
  yield api.DELETE(`lodCategory/${id}`, exports.Api.PrepReqParams(reqParams));
6893
- api.Cache.Remove(GetCacheKey(id));
6894
6889
  api.Cache.Remove(GetListCacheKey());
6895
6890
  });
6896
6891
  }
@@ -6910,7 +6905,6 @@
6910
6905
  api = exports.ENVIRONMENT.Api().GetBruceApi();
6911
6906
  }
6912
6907
  const res = yield api.POST(`lodCategory/${data.Key}`, data, exports.Api.PrepReqParams(reqParams));
6913
- api.Cache.Remove(GetCacheKey(data.Key));
6914
6908
  api.Cache.Remove(GetListCacheKey());
6915
6909
  return {
6916
6910
  category: res
@@ -6918,20 +6912,6 @@
6918
6912
  });
6919
6913
  }
6920
6914
  EntityLodCategory.Update = Update;
6921
- /**
6922
- * Returns cache identifier for an entity lod category record.
6923
- * Example: {
6924
- * const api: BruceApi.Api = ...;
6925
- * const key = GetCacheKey("abc");
6926
- * api.Cache.Remove(key);
6927
- * }
6928
- * @param id
6929
- * @returns
6930
- */
6931
- function GetCacheKey(id) {
6932
- return exports.Api.ECacheKey.LodCategory + exports.Api.ECacheKey.Id + id;
6933
- }
6934
- EntityLodCategory.GetCacheKey = GetCacheKey;
6935
6915
  /**
6936
6916
  * Returns cache identifier for a list of entity lod categories.
6937
6917
  * Example: {
@@ -15561,7 +15541,7 @@
15561
15541
  })(exports.Tracking || (exports.Tracking = {}));
15562
15542
 
15563
15543
  // This is updated with the package.json version on build.
15564
- const VERSION = "6.1.2";
15544
+ const VERSION = "6.1.4";
15565
15545
 
15566
15546
  exports.VERSION = VERSION;
15567
15547
  exports.AbstractApi = AbstractApi;