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.umd.js
CHANGED
|
@@ -2602,8 +2602,12 @@
|
|
|
2602
2602
|
return exports.Api.ECacheKey.Relation + exports.Api.ECacheKey.Entity + exports.Api.ECacheKey.Id + entityId;
|
|
2603
2603
|
}
|
|
2604
2604
|
EntityRelation.GetEntityCacheKey = GetEntityCacheKey;
|
|
2605
|
-
function GetListCacheKey(params) {
|
|
2606
|
-
return exports.Api.ECacheKey.Relation + exports.Api.ECacheKey.RelationType +
|
|
2605
|
+
function GetListCacheKey(entityId, params) {
|
|
2606
|
+
return exports.Api.ECacheKey.Relation + exports.Api.ECacheKey.RelationType +
|
|
2607
|
+
exports.Api.ECacheKey.Id + params.typeId +
|
|
2608
|
+
exports.Api.ECacheKey.Id + params.oneWayOnly +
|
|
2609
|
+
exports.Api.ECacheKey.Id + params.loadEntityData +
|
|
2610
|
+
exports.Api.ECacheKey.Entity + exports.Api.ECacheKey.Id + entityId;
|
|
2607
2611
|
}
|
|
2608
2612
|
EntityRelation.GetListCacheKey = GetListCacheKey;
|
|
2609
2613
|
function Create(api, data) {
|
|
@@ -2668,7 +2672,7 @@
|
|
|
2668
2672
|
throw ("Entity ID is required.");
|
|
2669
2673
|
}
|
|
2670
2674
|
params = __assign({ typeId: "", oneWayOnly: false, loadEntityData: false }, params);
|
|
2671
|
-
cacheData = api.Cache.Get(GetListCacheKey(params));
|
|
2675
|
+
cacheData = api.Cache.Get(GetListCacheKey(entityId, params));
|
|
2672
2676
|
if (cacheData) {
|
|
2673
2677
|
return [2 /*return*/, cacheData];
|
|
2674
2678
|
}
|
|
@@ -2696,7 +2700,7 @@
|
|
|
2696
2700
|
}
|
|
2697
2701
|
});
|
|
2698
2702
|
}); });
|
|
2699
|
-
api.Cache.Set(GetListCacheKey(params), req);
|
|
2703
|
+
api.Cache.Set(GetListCacheKey(entityId, params), req);
|
|
2700
2704
|
return [2 /*return*/, req];
|
|
2701
2705
|
});
|
|
2702
2706
|
});
|
|
@@ -5156,10 +5160,16 @@
|
|
|
5156
5160
|
|
|
5157
5161
|
(function (User) {
|
|
5158
5162
|
function GetCacheKey(userId, accountId) {
|
|
5163
|
+
if (!accountId) {
|
|
5164
|
+
accountId = "";
|
|
5165
|
+
}
|
|
5159
5166
|
return exports.Api.ECacheKey.User + exports.Api.ECacheKey.Id + userId + exports.Api.ECacheKey.Id + accountId;
|
|
5160
5167
|
}
|
|
5161
5168
|
User.GetCacheKey = GetCacheKey;
|
|
5162
5169
|
function GetEmailCacheKey(email, accountId) {
|
|
5170
|
+
if (!accountId) {
|
|
5171
|
+
accountId = "";
|
|
5172
|
+
}
|
|
5163
5173
|
return exports.Api.ECacheKey.User + exports.Api.ECacheKey.UserEmail + email + exports.Api.ECacheKey.Id + accountId;
|
|
5164
5174
|
}
|
|
5165
5175
|
User.GetEmailCacheKey = GetEmailCacheKey;
|