bruce-models 5.1.6 → 5.1.8
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.
- package/dist/bruce-models.es5.js +14 -7
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +14 -7
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/bruce-models.js +1 -1
- package/dist/lib/entity/entity-historic-data.js +13 -6
- package/dist/lib/entity/entity-historic-data.js.map +1 -1
- package/dist/lib/markup/markup.js.map +1 -1
- package/dist/types/bruce-models.d.ts +1 -1
- package/dist/types/entity/entity-historic-data.d.ts +3 -2
- package/dist/types/markup/markup.d.ts +2 -0
- package/package.json +1 -1
package/dist/bruce-models.umd.js
CHANGED
|
@@ -2984,9 +2984,9 @@
|
|
|
2984
2984
|
*/
|
|
2985
2985
|
function GetStats(params) {
|
|
2986
2986
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2987
|
-
let { entityIds, api, req } = params;
|
|
2988
|
-
// Save time and just return a none response if no entity IDs are provided.
|
|
2989
|
-
if (!(entityIds === null || entityIds === void 0 ? void 0 : entityIds.length)) {
|
|
2987
|
+
let { entityIds, entityTypeId, api, req } = params;
|
|
2988
|
+
// Save time and just return a none response if no entity IDs or type ID are provided.
|
|
2989
|
+
if (!(entityIds === null || entityIds === void 0 ? void 0 : entityIds.length) && !entityTypeId) {
|
|
2990
2990
|
return {
|
|
2991
2991
|
stats: []
|
|
2992
2992
|
};
|
|
@@ -2995,13 +2995,14 @@
|
|
|
2995
2995
|
api = exports.ENVIRONMENT.Api().GetBruceApi();
|
|
2996
2996
|
}
|
|
2997
2997
|
req = exports.Api.PrepReqParams(req);
|
|
2998
|
-
const cacheKey = GetStatsCacheKey(entityIds);
|
|
2998
|
+
const cacheKey = GetStatsCacheKey(entityIds, entityTypeId);
|
|
2999
2999
|
const cached = api.GetCacheItem(cacheKey, req);
|
|
3000
3000
|
if (cached === null || cached === void 0 ? void 0 : cached.found) {
|
|
3001
3001
|
return cached.data;
|
|
3002
3002
|
}
|
|
3003
3003
|
const prom = yield api.POST("v1/entity/historicData/stats", {
|
|
3004
|
-
entityIds: entityIds
|
|
3004
|
+
entityIds: entityIds,
|
|
3005
|
+
entityTypeId: entityTypeId
|
|
3005
3006
|
}, req);
|
|
3006
3007
|
api.SetCacheItem({
|
|
3007
3008
|
key: cacheKey,
|
|
@@ -3091,7 +3092,13 @@
|
|
|
3091
3092
|
return exports.Api.ECacheKey.EntityHistoricDataRec + exports.Api.ECacheKey.Id + entityIds.join(",") + exports.Api.ECacheKey.Id + attrKey + exports.Api.ECacheKey.Id + dateTimeFrom + exports.Api.ECacheKey.Id + dateTimeTo;
|
|
3092
3093
|
}
|
|
3093
3094
|
EntityHistoricData.GetListCacheKey = GetListCacheKey;
|
|
3094
|
-
function GetStatsCacheKey(entityIds) {
|
|
3095
|
+
function GetStatsCacheKey(entityIds, typeId) {
|
|
3096
|
+
if (!(entityIds === null || entityIds === void 0 ? void 0 : entityIds.length)) {
|
|
3097
|
+
entityIds = [];
|
|
3098
|
+
}
|
|
3099
|
+
if (!typeId) {
|
|
3100
|
+
typeId = "";
|
|
3101
|
+
}
|
|
3095
3102
|
return exports.Api.ECacheKey.EntityHistoricDataStats + exports.Api.ECacheKey.Id + entityIds.join(",");
|
|
3096
3103
|
}
|
|
3097
3104
|
EntityHistoricData.GetStatsCacheKey = GetStatsCacheKey;
|
|
@@ -14219,7 +14226,7 @@
|
|
|
14219
14226
|
})(exports.DataSource || (exports.DataSource = {}));
|
|
14220
14227
|
|
|
14221
14228
|
// This is updated with the package.json version on build.
|
|
14222
|
-
const VERSION = "5.1.
|
|
14229
|
+
const VERSION = "5.1.8";
|
|
14223
14230
|
|
|
14224
14231
|
exports.VERSION = VERSION;
|
|
14225
14232
|
exports.AbstractApi = AbstractApi;
|