bruce-models 4.3.1 → 4.3.3
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 +21 -10
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +21 -10
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/bruce-models.js +1 -1
- package/dist/lib/entity/entity-type.js +16 -7
- package/dist/lib/entity/entity-type.js.map +1 -1
- package/dist/lib/entity/entity.js +2 -1
- package/dist/lib/entity/entity.js.map +1 -1
- package/dist/lib/entity-type-model/comment.js +2 -1
- package/dist/lib/entity-type-model/comment.js.map +1 -1
- package/dist/types/bruce-models.d.ts +1 -1
- package/dist/types/entity/entity-type.d.ts +3 -1
- package/package.json +1 -1
package/dist/bruce-models.umd.js
CHANGED
|
@@ -2791,7 +2791,7 @@
|
|
|
2791
2791
|
}
|
|
2792
2792
|
yield api.DELETE(`entitytype/${typeId}`, exports.Api.PrepReqParams(reqParams));
|
|
2793
2793
|
api.Cache.Remove(GetCacheKey(typeId));
|
|
2794
|
-
api.Cache.
|
|
2794
|
+
api.Cache.RemoveByStartsWith(GetListCacheKey());
|
|
2795
2795
|
});
|
|
2796
2796
|
}
|
|
2797
2797
|
EntityType.Delete = Delete;
|
|
@@ -2802,11 +2802,11 @@
|
|
|
2802
2802
|
*/
|
|
2803
2803
|
function GetList(params) {
|
|
2804
2804
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2805
|
-
let { api, req: reqParams, parentTypeId } = params;
|
|
2805
|
+
let { entityTypeIds, api, req: reqParams, parentTypeId } = params;
|
|
2806
2806
|
if (!api) {
|
|
2807
2807
|
api = exports.ENVIRONMENT.Api().GetBruceApi();
|
|
2808
2808
|
}
|
|
2809
|
-
const cache = parentTypeId ? null : yield api.GetCacheItem(GetListCacheKey(), reqParams);
|
|
2809
|
+
const cache = parentTypeId ? null : yield api.GetCacheItem(GetListCacheKey(entityTypeIds), reqParams);
|
|
2810
2810
|
if (cache === null || cache === void 0 ? void 0 : cache.found) {
|
|
2811
2811
|
return cache.data;
|
|
2812
2812
|
}
|
|
@@ -2816,6 +2816,11 @@
|
|
|
2816
2816
|
if (parentTypeId) {
|
|
2817
2817
|
urlParams.append("parentEntityTypeID", parentTypeId);
|
|
2818
2818
|
}
|
|
2819
|
+
if (entityTypeIds) {
|
|
2820
|
+
for (const id of entityTypeIds) {
|
|
2821
|
+
urlParams.append("typeId", id);
|
|
2822
|
+
}
|
|
2823
|
+
}
|
|
2819
2824
|
const data = yield api.GET("entitytypes?" + urlParams.toString(), exports.Api.PrepReqParams(reqParams));
|
|
2820
2825
|
res({
|
|
2821
2826
|
entityTypes: data.Items
|
|
@@ -2827,7 +2832,7 @@
|
|
|
2827
2832
|
}));
|
|
2828
2833
|
if (!parentTypeId) {
|
|
2829
2834
|
yield api.SetCacheItem({
|
|
2830
|
-
key: GetListCacheKey(),
|
|
2835
|
+
key: GetListCacheKey(entityTypeIds),
|
|
2831
2836
|
value: req,
|
|
2832
2837
|
req: reqParams,
|
|
2833
2838
|
duration: 60 * 5 // 5 minutes.
|
|
@@ -2859,7 +2864,7 @@
|
|
|
2859
2864
|
}
|
|
2860
2865
|
const res = yield api.POST(`entitytype/${data.ID}`, data, exports.Api.PrepReqParams(reqParams));
|
|
2861
2866
|
api.Cache.Remove(GetCacheKey(data.ID));
|
|
2862
|
-
api.Cache.
|
|
2867
|
+
api.Cache.RemoveByStartsWith(GetListCacheKey());
|
|
2863
2868
|
return {
|
|
2864
2869
|
entityType: res
|
|
2865
2870
|
};
|
|
@@ -2934,10 +2939,14 @@
|
|
|
2934
2939
|
* const key = GetListCacheKey();
|
|
2935
2940
|
* api.Cache.Remove(key);
|
|
2936
2941
|
* }
|
|
2942
|
+
* @param typeIds
|
|
2937
2943
|
* @returns
|
|
2938
2944
|
*/
|
|
2939
|
-
function GetListCacheKey() {
|
|
2940
|
-
|
|
2945
|
+
function GetListCacheKey(typeIds) {
|
|
2946
|
+
if (!typeIds) {
|
|
2947
|
+
typeIds = [];
|
|
2948
|
+
}
|
|
2949
|
+
return exports.Api.ECacheKey.EntityType + (typeIds.length ? exports.Api.ECacheKey.Id : "") + typeIds.join(",");
|
|
2941
2950
|
}
|
|
2942
2951
|
EntityType.GetListCacheKey = GetListCacheKey;
|
|
2943
2952
|
})(exports.EntityType || (exports.EntityType = {}));
|
|
@@ -3750,7 +3759,8 @@
|
|
|
3750
3759
|
const { entity: data } = yield Get({
|
|
3751
3760
|
api,
|
|
3752
3761
|
entityId,
|
|
3753
|
-
entityTypeId: typeId
|
|
3762
|
+
entityTypeId: typeId,
|
|
3763
|
+
migrated: true
|
|
3754
3764
|
});
|
|
3755
3765
|
entity = data;
|
|
3756
3766
|
}
|
|
@@ -7499,7 +7509,8 @@
|
|
|
7499
7509
|
pageIndex: filter.index == null ? 0 : filter.index,
|
|
7500
7510
|
entityTypeConditions: reqFilter,
|
|
7501
7511
|
orderBy: "lastUpdateTime"
|
|
7502
|
-
}
|
|
7512
|
+
},
|
|
7513
|
+
migrated: true
|
|
7503
7514
|
})).entities;
|
|
7504
7515
|
return {
|
|
7505
7516
|
comments: records
|
|
@@ -13073,7 +13084,7 @@
|
|
|
13073
13084
|
})(exports.DataSource || (exports.DataSource = {}));
|
|
13074
13085
|
|
|
13075
13086
|
// This is updated with the package.json version on build.
|
|
13076
|
-
const VERSION = "4.3.
|
|
13087
|
+
const VERSION = "4.3.3";
|
|
13077
13088
|
|
|
13078
13089
|
exports.VERSION = VERSION;
|
|
13079
13090
|
exports.AbstractApi = AbstractApi;
|