bruce-models 3.8.9 → 3.9.1

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.
@@ -3002,7 +3002,7 @@
3002
3002
  */
3003
3003
  function Get(params) {
3004
3004
  return __awaiter(this, void 0, void 0, function* () {
3005
- let { api, entityId, req: reqParams, expandLocation, expandRelations, entityTypeId, historicFrom, historicKey, historicTo } = params;
3005
+ let { api, entityId, req: reqParams, expandLocation, expandRelations, entityTypeId, historicFrom, historicKey, historicTo, historicPoint } = params;
3006
3006
  if (!entityId) {
3007
3007
  throw ("Entity ID is required.");
3008
3008
  }
@@ -3016,7 +3016,8 @@
3016
3016
  expandRelations,
3017
3017
  historicFrom,
3018
3018
  historicKey,
3019
- historicTo
3019
+ historicTo,
3020
+ historicPoint
3020
3021
  });
3021
3022
  const cache = api.GetCacheItem(key, reqParams);
3022
3023
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
@@ -3034,6 +3035,18 @@
3034
3035
  if (entityTypeId) {
3035
3036
  urlParams.append("BruceEntityType", entityTypeId);
3036
3037
  }
3038
+ if (historicKey) {
3039
+ urlParams.set("historicKey", historicKey);
3040
+ }
3041
+ if (historicFrom) {
3042
+ urlParams.set("historicFrom", historicFrom);
3043
+ }
3044
+ if (historicTo) {
3045
+ urlParams.set("historicTo", historicTo);
3046
+ }
3047
+ if (historicPoint) {
3048
+ urlParams.set("historicPoint", historicPoint);
3049
+ }
3037
3050
  const data = yield api.GET(`entity/${entityId}?${urlParams.toString()}`, exports.Api.PrepReqParams(reqParams));
3038
3051
  res({
3039
3052
  entity: data
@@ -3387,7 +3400,7 @@
3387
3400
  function GetList(params) {
3388
3401
  var _a;
3389
3402
  return __awaiter(this, void 0, void 0, function* () {
3390
- let { api, filter, req: reqParams, viaCdn, viaCdnCacheToken, analysis, expandRelations, historicFrom, historicKey, historicTo } = params;
3403
+ let { api, filter, req: reqParams, viaCdn, viaCdnCacheToken, analysis, expandRelations, historicFrom, historicKey, historicTo, historicPoint } = params;
3391
3404
  if (!api) {
3392
3405
  api = exports.ENVIRONMENT.Api().GetBruceApi();
3393
3406
  }
@@ -3426,7 +3439,8 @@
3426
3439
  PageSize: filter.pageSize,
3427
3440
  historicKey: historicKey,
3428
3441
  historicFrom: historicFrom,
3429
- historicTo: historicTo
3442
+ historicTo: historicTo,
3443
+ historicPoint: historicPoint
3430
3444
  };
3431
3445
  let totalCount;
3432
3446
  let entities = [];
@@ -3476,6 +3490,9 @@
3476
3490
  if (historicTo) {
3477
3491
  urlParams.set("historicTo", historicTo);
3478
3492
  }
3493
+ if (historicPoint) {
3494
+ urlParams.set("historicPoint", historicPoint);
3495
+ }
3479
3496
  const urlStr = url.toString() + "?" + urlParams.toString();
3480
3497
  const data = yield api.get(urlStr, exports.Api.PrepReqParams(reqParams));
3481
3498
  if (!analysis) {
@@ -3653,7 +3670,7 @@
3653
3670
  * @returns
3654
3671
  */
3655
3672
  function GetCacheKey(params) {
3656
- let { entityId, entityTypeId, expandLocation, expandRelations, historicFrom, historicKey, historicTo } = params;
3673
+ let { entityId, entityTypeId, expandLocation, expandRelations, historicFrom, historicKey, historicTo, historicPoint } = params;
3657
3674
  if (!entityTypeId) {
3658
3675
  entityTypeId = "";
3659
3676
  }
@@ -3666,9 +3683,12 @@
3666
3683
  if (!historicTo) {
3667
3684
  historicTo = "";
3668
3685
  }
3686
+ if (!historicPoint) {
3687
+ historicPoint = "";
3688
+ }
3669
3689
  let key = `${exports.Api.ECacheKey.Entity}${exports.Api.ECacheKey.Id}${entityId}${String(entityTypeId)}`;
3670
3690
  key += `${String(Boolean(expandLocation))}${String(Boolean(expandRelations))}`;
3671
- key += `${exports.Api.ECacheKey.EntityHistoricData}${exports.Api.ECacheKey.Id}${historicKey}${historicFrom}${historicTo}`;
3691
+ key += `${exports.Api.ECacheKey.EntityHistoricData}${exports.Api.ECacheKey.Id}${historicKey}-${historicFrom}-${historicTo}-${historicPoint}`;
3672
3692
  return key;
3673
3693
  }
3674
3694
  Entity.GetCacheKey = GetCacheKey;
@@ -11138,7 +11158,7 @@
11138
11158
  })(exports.DataSource || (exports.DataSource = {}));
11139
11159
 
11140
11160
  // This is updated with the package.json version on build.
11141
- const VERSION = "3.8.9";
11161
+ const VERSION = "3.9.1";
11142
11162
 
11143
11163
  exports.VERSION = VERSION;
11144
11164
  exports.AbstractApi = AbstractApi;