bruce-models 5.7.7 → 5.7.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.
@@ -2953,8 +2953,9 @@
2953
2953
  if (!api) {
2954
2954
  api = exports.ENVIRONMENT.Api().GetBruceApi();
2955
2955
  }
2956
- if (typeof attrKey != "string") {
2957
- attrKey = exports.PathUtils.Wrap(attrKey);
2956
+ let attrKeyStr = null;
2957
+ if (attrKey && typeof attrKey != "string") {
2958
+ attrKeyStr = exports.PathUtils.Wrap(attrKey);
2958
2959
  }
2959
2960
  // If we have more than 100 Entity IDs we'll have to split the request to avoid a URL that is too long.
2960
2961
  const MAX_IDS = 100;
@@ -2976,7 +2977,7 @@
2976
2977
  for (const splitEntityId of splitEntityIds) {
2977
2978
  reqs.push(GetList({
2978
2979
  entityIds: splitEntityId,
2979
- attrKey: attrKey,
2980
+ attrKey: attrKeyStr,
2980
2981
  dateTimeFrom: dateTimeFrom,
2981
2982
  dateTimeTo: dateTimeTo,
2982
2983
  api: api,
@@ -2998,7 +2999,7 @@
2998
2999
  limitPerEntity: limitPerEntity
2999
3000
  };
3000
3001
  }
3001
- const cacheKey = GetListCacheKey(entityIds, attrKey, dateTimeFrom, dateTimeTo);
3002
+ const cacheKey = GetListCacheKey(entityIds, attrKeyStr, dateTimeFrom, dateTimeTo);
3002
3003
  const cached = api.GetCacheItem(cacheKey, req);
3003
3004
  if (cached === null || cached === void 0 ? void 0 : cached.found) {
3004
3005
  return cached.data;
@@ -3007,7 +3008,9 @@
3007
3008
  for (const entityId of entityIds) {
3008
3009
  urlParams.append("entityId", entityId);
3009
3010
  }
3010
- urlParams.append("attrKey", attrKey);
3011
+ if (attrKeyStr) {
3012
+ urlParams.append("attrKey", attrKeyStr);
3013
+ }
3011
3014
  urlParams.append("dateTimeFrom", dateTimeFrom);
3012
3015
  urlParams.append("dateTimeTo", dateTimeTo);
3013
3016
  const prom = api.GET(`v1/entity/historicData?${urlParams.toString()}`, exports.Api.PrepReqParams(req));
@@ -15016,7 +15019,7 @@
15016
15019
  })(exports.Scenario || (exports.Scenario = {}));
15017
15020
 
15018
15021
  // This is updated with the package.json version on build.
15019
- const VERSION = "5.7.7";
15022
+ const VERSION = "5.7.9";
15020
15023
 
15021
15024
  exports.VERSION = VERSION;
15022
15025
  exports.AbstractApi = AbstractApi;