@beincom/constants
Version:
Beincom shared constant definitions
56 lines (55 loc) • 1.95 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.SharedGroupCacheKey = void 0;
var cache_keys_1 = require("../cache-keys");
var SharedGroupCacheKey = /** @class */ (function () {
function SharedGroupCacheKey() {
}
SharedGroupCacheKey.groupById = function (groupId) {
return [SharedGroupCacheKey.PREFIX, SharedGroupCacheKey.hashTag, 'shared_group', groupId].join(':');
};
SharedGroupCacheKey.joinedGroupsOfUser = function (userId) {
return [
SharedGroupCacheKey.PREFIX,
SharedGroupCacheKey.hashTag,
cache_keys_1.CACHE_KEYS.JOINED_GROUPS,
userId,
].join(':');
};
SharedGroupCacheKey.communityPermissionsOfUser = function (userId) {
return [
SharedGroupCacheKey.PREFIX,
SharedGroupCacheKey.hashTag,
cache_keys_1.CACHE_KEYS.COMMUNITY_PERMISSION,
userId,
].join(':');
};
SharedGroupCacheKey.groupPermissionsOfUser = function (userId) {
return [
SharedGroupCacheKey.PREFIX,
SharedGroupCacheKey.hashTag,
cache_keys_1.CACHE_KEYS.GROUP_PERMISSION,
userId,
].join(':');
};
SharedGroupCacheKey.showingBadgeOfUser = function (userId) {
return [
SharedGroupCacheKey.PREFIX,
SharedGroupCacheKey.hashTag,
cache_keys_1.CACHE_KEYS.SHOWING_BADGES,
userId,
].join(':');
};
SharedGroupCacheKey.bannedTargetsOfUser = function (userId) {
return [
SharedGroupCacheKey.PREFIX,
SharedGroupCacheKey.hashTag,
cache_keys_1.CACHE_KEYS.BANNED_TARGETS_OF_USER,
userId,
].join(':');
};
SharedGroupCacheKey.PREFIX = 'group';
SharedGroupCacheKey.hashTag = '{1}';
return SharedGroupCacheKey;
}());
exports.SharedGroupCacheKey = SharedGroupCacheKey;