bruce-models 6.6.0 → 6.6.2

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.
@@ -9888,15 +9888,22 @@
9888
9888
  */
9889
9889
  function GetList(params) {
9890
9890
  return __awaiter(this, void 0, void 0, function* () {
9891
- let { api, req: reqParams, assertLocation, expandSettings, type, pageIndex, pageSize, search } = params;
9891
+ let { api, req: reqParams, assertLocation, expandSettings, type, pageIndex, pageSize, search, orderBy, sortOrder, tilesetIds } = params;
9892
9892
  if (!api) {
9893
9893
  api = exports.ENVIRONMENT.Api().GetBruceApi();
9894
9894
  }
9895
- const cache = pageSize ? null : api.GetCacheItem(GetListCacheKey({
9896
- assertLocation: assertLocation,
9897
- expandSettings: expandSettings,
9898
- type: type
9899
- }), reqParams);
9895
+ let cacheKey = null;
9896
+ if (!(tilesetIds === null || tilesetIds === void 0 ? void 0 : tilesetIds.length) && !pageSize) {
9897
+ cacheKey = GetListCacheKey({
9898
+ assertLocation: assertLocation,
9899
+ expandSettings: expandSettings,
9900
+ type: type,
9901
+ orderBy: orderBy,
9902
+ sortOrder: sortOrder,
9903
+ search: search
9904
+ });
9905
+ }
9906
+ const cache = cacheKey ? api.GetCacheItem(cacheKey, reqParams) : null;
9900
9907
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
9901
9908
  return cache.data;
9902
9909
  }
@@ -9921,6 +9928,15 @@
9921
9928
  if (pageIndex != null) {
9922
9929
  urlParams.append("PageIndex", String(pageIndex));
9923
9930
  }
9931
+ if (orderBy) {
9932
+ urlParams.append("OrderBy", orderBy);
9933
+ }
9934
+ if (sortOrder) {
9935
+ urlParams.append("SortOrder", sortOrder);
9936
+ }
9937
+ if (tilesetIds === null || tilesetIds === void 0 ? void 0 : tilesetIds.length) {
9938
+ urlParams.append("ID", tilesetIds.join(","));
9939
+ }
9924
9940
  const data = yield api.GET("tileset/getList?" + urlParams.toString(), reqParams);
9925
9941
  // Convert legacy records.
9926
9942
  // Commented out because it spams :)
@@ -9941,13 +9957,9 @@
9941
9957
  rej(e);
9942
9958
  }
9943
9959
  }));
9944
- if (!pageSize) {
9960
+ if (cacheKey) {
9945
9961
  api.SetCacheItem({
9946
- key: GetListCacheKey({
9947
- assertLocation: assertLocation,
9948
- expandSettings: expandSettings,
9949
- type: type
9950
- }),
9962
+ key: cacheKey,
9951
9963
  value: req,
9952
9964
  req: reqParams
9953
9965
  });
@@ -10513,14 +10525,20 @@
10513
10525
  if (!params) {
10514
10526
  params = {};
10515
10527
  }
10516
- let { expandSettings, assertLocation, type } = params;
10528
+ let { expandSettings, assertLocation, type, orderBy, search, sortOrder } = params;
10517
10529
  if (expandSettings == null) {
10518
10530
  expandSettings = false;
10519
10531
  }
10520
10532
  if (assertLocation == null) {
10521
10533
  assertLocation = false;
10522
10534
  }
10523
- return exports.Api.ECacheKey.Tileset + String(expandSettings) + String(assertLocation) + (type ? type : "");
10535
+ if (!search) {
10536
+ search = "";
10537
+ }
10538
+ if (!orderBy) {
10539
+ orderBy = "";
10540
+ }
10541
+ return exports.Api.ECacheKey.Tileset + String(expandSettings) + String(assertLocation) + (type ? type : "") + String(orderBy) + String(sortOrder) + exports.Api.ECacheKey.Id + search;
10524
10542
  }
10525
10543
  Tileset.GetListCacheKey = GetListCacheKey;
10526
10544
  })(exports.Tileset || (exports.Tileset = {}));
@@ -16060,7 +16078,7 @@
16060
16078
  })(exports.Tracking || (exports.Tracking = {}));
16061
16079
 
16062
16080
  // This is updated with the package.json version on build.
16063
- const VERSION = "6.6.0";
16081
+ const VERSION = "6.6.2";
16064
16082
 
16065
16083
  exports.VERSION = VERSION;
16066
16084
  exports.AbstractApi = AbstractApi;