bruce-models 3.2.1 → 3.2.3

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.
@@ -2442,17 +2442,21 @@
2442
2442
  */
2443
2443
  function GetList(params) {
2444
2444
  return __awaiter(this, void 0, void 0, function* () {
2445
- let { api, req: reqParams } = params;
2445
+ let { api, req: reqParams, parentTypeId } = params;
2446
2446
  if (!api) {
2447
2447
  api = exports.ENVIRONMENT.Api().GetBruceApi();
2448
2448
  }
2449
- const cache = yield api.GetCacheItem(GetListCacheKey(), reqParams);
2449
+ const cache = parentTypeId ? null : yield api.GetCacheItem(GetListCacheKey(), reqParams);
2450
2450
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
2451
2451
  return cache.data;
2452
2452
  }
2453
2453
  const req = new Promise((res, rej) => __awaiter(this, void 0, void 0, function* () {
2454
2454
  try {
2455
- const data = yield api.GET("entitytypes", exports.Api.PrepReqParams(reqParams));
2455
+ const urlParams = new URLSearchParams();
2456
+ if (parentTypeId) {
2457
+ urlParams.append("parentEntityTypeID", parentTypeId);
2458
+ }
2459
+ const data = yield api.GET("entitytypes?" + urlParams.toString(), exports.Api.PrepReqParams(reqParams));
2456
2460
  res({
2457
2461
  entityTypes: data.Items
2458
2462
  });
@@ -2461,12 +2465,14 @@
2461
2465
  rej(e);
2462
2466
  }
2463
2467
  }));
2464
- yield api.SetCacheItem({
2465
- key: GetListCacheKey(),
2466
- value: req,
2467
- req: reqParams,
2468
- duration: 60 * 5 // 5 minutes.
2469
- });
2468
+ if (!parentTypeId) {
2469
+ yield api.SetCacheItem({
2470
+ key: GetListCacheKey(),
2471
+ value: req,
2472
+ req: reqParams,
2473
+ duration: 60 * 5 // 5 minutes.
2474
+ });
2475
+ }
2470
2476
  return req;
2471
2477
  });
2472
2478
  }
@@ -10221,7 +10227,7 @@
10221
10227
  DataSource.GetList = GetList;
10222
10228
  })(exports.DataSource || (exports.DataSource = {}));
10223
10229
 
10224
- const VERSION = "3.2.1";
10230
+ const VERSION = "3.2.3";
10225
10231
 
10226
10232
  exports.VERSION = VERSION;
10227
10233
  exports.AbstractApi = AbstractApi;