bruce-models 6.6.7 → 6.6.9

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.
@@ -11016,26 +11016,40 @@
11016
11016
  if (!api) {
11017
11017
  api = exports.ENVIRONMENT.Api().GetBruceApi();
11018
11018
  }
11019
- const cache = api.GetCacheItem(GetListCacheKey(type), reqParams);
11020
- if (cache === null || cache === void 0 ? void 0 : cache.found) {
11021
- return cache.data;
11022
- }
11023
11019
  const prom = new Promise((res, rej) => __awaiter(this, void 0, void 0, function* () {
11024
11020
  try {
11021
+ const queryParams = new URLSearchParams();
11022
+ if (params.search) {
11023
+ queryParams.set("Search", params.search);
11024
+ }
11025
+ if (params.pageSize) {
11026
+ queryParams.set("PageSize", params.pageSize.toString());
11027
+ }
11028
+ if (params.pageIndex) {
11029
+ queryParams.set("PageIndex", params.pageIndex.toString());
11030
+ }
11031
+ if (params.orderBy) {
11032
+ queryParams.set("OrderBy", params.orderBy);
11033
+ }
11034
+ if (params.sortOrder) {
11035
+ queryParams.set("SortOrder", params.sortOrder);
11036
+ }
11037
+ if (type) {
11038
+ queryParams.set("type", type);
11039
+ }
11040
+ if (params.expand) {
11041
+ queryParams.set("expand", "true");
11042
+ }
11025
11043
  const data = yield api.GET("ui.view/list", exports.Api.PrepReqParams(reqParams));
11026
11044
  res({
11027
- views: data.Items
11045
+ views: data.Items,
11046
+ totalCount: data.TotalCount
11028
11047
  });
11029
11048
  }
11030
11049
  catch (e) {
11031
11050
  rej(e);
11032
11051
  }
11033
11052
  }));
11034
- api.SetCacheItem({
11035
- key: GetListCacheKey(type),
11036
- value: prom,
11037
- req: reqParams
11038
- });
11039
11053
  return prom;
11040
11054
  });
11041
11055
  }
@@ -11055,7 +11069,6 @@
11055
11069
  }
11056
11070
  yield api.DELETE(`ui.view/${viewId}`, exports.Api.PrepReqParams(reqParams));
11057
11071
  api.Cache.Remove(GetCacheKey(viewId));
11058
- api.Cache.RemoveByStartsWith(GetListCacheKey());
11059
11072
  });
11060
11073
  }
11061
11074
  ProjectView.Delete = Delete;
@@ -11092,7 +11105,6 @@
11092
11105
  data = yield api.PUT(`ui.view/${data.ID}`, data, exports.Api.PrepReqParams(reqParams));
11093
11106
  }
11094
11107
  api.Cache.Remove(GetCacheKey(data.ID));
11095
- api.Cache.RemoveByStartsWith(GetListCacheKey());
11096
11108
  return {
11097
11109
  view: data
11098
11110
  };
@@ -11113,23 +11125,6 @@
11113
11125
  return `${exports.Api.ECacheKey.ProjectView}${exports.Api.ECacheKey.Id}${viewId}`;
11114
11126
  }
11115
11127
  ProjectView.GetCacheKey = GetCacheKey;
11116
- /**
11117
- * Returns cache identifier for a list of project views.
11118
- * Example: {
11119
- * const api: BruceApi.Api = ...;
11120
- * const key = GetListCacheKey();
11121
- * api.Cache.Remove(key);
11122
- * }
11123
- * @param type optional filter for the type of project view.
11124
- * @returns
11125
- */
11126
- function GetListCacheKey(type) {
11127
- if (type) {
11128
- return `${exports.Api.ECacheKey.ProjectView}${exports.Api.ECacheKey.ListId}${type}`;
11129
- }
11130
- return `${exports.Api.ECacheKey.ProjectView}${exports.Api.ECacheKey.ListId}`;
11131
- }
11132
- ProjectView.GetListCacheKey = GetListCacheKey;
11133
11128
  })(exports.ProjectView || (exports.ProjectView = {}));
11134
11129
 
11135
11130
  function getTemplateSettings(apiGetter, reqParams) {
@@ -16127,7 +16122,7 @@
16127
16122
  })(exports.Tracking || (exports.Tracking = {}));
16128
16123
 
16129
16124
  // This is updated with the package.json version on build.
16130
- const VERSION = "6.6.7";
16125
+ const VERSION = "6.6.9";
16131
16126
 
16132
16127
  exports.VERSION = VERSION;
16133
16128
  exports.AbstractApi = AbstractApi;