bruce-models 0.4.9 → 0.5.0
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 -4
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +14 -4
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/entity/entity-relation.js +8 -4
- package/dist/lib/entity/entity-relation.js.map +1 -1
- package/dist/lib/user/user.js +6 -0
- package/dist/lib/user/user.js.map +1 -1
- package/dist/types/entity/entity-relation.d.ts +1 -1
- package/dist/types/user/user.d.ts +2 -2
- package/package.json +1 -1
package/dist/bruce-models.es5.js
CHANGED
|
@@ -2673,8 +2673,12 @@ var EntityRelation;
|
|
|
2673
2673
|
return Api.ECacheKey.Relation + Api.ECacheKey.Entity + Api.ECacheKey.Id + entityId;
|
|
2674
2674
|
}
|
|
2675
2675
|
EntityRelation.GetEntityCacheKey = GetEntityCacheKey;
|
|
2676
|
-
function GetListCacheKey(params) {
|
|
2677
|
-
return Api.ECacheKey.Relation + Api.ECacheKey.RelationType +
|
|
2676
|
+
function GetListCacheKey(entityId, params) {
|
|
2677
|
+
return Api.ECacheKey.Relation + Api.ECacheKey.RelationType +
|
|
2678
|
+
Api.ECacheKey.Id + params.typeId +
|
|
2679
|
+
Api.ECacheKey.Id + params.oneWayOnly +
|
|
2680
|
+
Api.ECacheKey.Id + params.loadEntityData +
|
|
2681
|
+
Api.ECacheKey.Entity + Api.ECacheKey.Id + entityId;
|
|
2678
2682
|
}
|
|
2679
2683
|
EntityRelation.GetListCacheKey = GetListCacheKey;
|
|
2680
2684
|
function Create(api, data) {
|
|
@@ -2739,7 +2743,7 @@ var EntityRelation;
|
|
|
2739
2743
|
throw ("Entity ID is required.");
|
|
2740
2744
|
}
|
|
2741
2745
|
params = __assign({ typeId: "", oneWayOnly: false, loadEntityData: false }, params);
|
|
2742
|
-
cacheData = api.Cache.Get(GetListCacheKey(params));
|
|
2746
|
+
cacheData = api.Cache.Get(GetListCacheKey(entityId, params));
|
|
2743
2747
|
if (cacheData) {
|
|
2744
2748
|
return [2 /*return*/, cacheData];
|
|
2745
2749
|
}
|
|
@@ -2767,7 +2771,7 @@ var EntityRelation;
|
|
|
2767
2771
|
}
|
|
2768
2772
|
});
|
|
2769
2773
|
}); });
|
|
2770
|
-
api.Cache.Set(GetListCacheKey(params), req);
|
|
2774
|
+
api.Cache.Set(GetListCacheKey(entityId, params), req);
|
|
2771
2775
|
return [2 /*return*/, req];
|
|
2772
2776
|
});
|
|
2773
2777
|
});
|
|
@@ -5351,10 +5355,16 @@ var UserGroup;
|
|
|
5351
5355
|
var User;
|
|
5352
5356
|
(function (User) {
|
|
5353
5357
|
function GetCacheKey(userId, accountId) {
|
|
5358
|
+
if (!accountId) {
|
|
5359
|
+
accountId = "";
|
|
5360
|
+
}
|
|
5354
5361
|
return Api.ECacheKey.User + Api.ECacheKey.Id + userId + Api.ECacheKey.Id + accountId;
|
|
5355
5362
|
}
|
|
5356
5363
|
User.GetCacheKey = GetCacheKey;
|
|
5357
5364
|
function GetEmailCacheKey(email, accountId) {
|
|
5365
|
+
if (!accountId) {
|
|
5366
|
+
accountId = "";
|
|
5367
|
+
}
|
|
5358
5368
|
return Api.ECacheKey.User + Api.ECacheKey.UserEmail + email + Api.ECacheKey.Id + accountId;
|
|
5359
5369
|
}
|
|
5360
5370
|
User.GetEmailCacheKey = GetEmailCacheKey;
|