UNPKG

@beincom/dto

Version:

Share dto for all projects of Beincom

88 lines (87 loc) 2.7 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SharedUserCacheKey = void 0; const constants_1 = require("@beincom/constants"); /** * @deprecated Move to @beincom/constants@5.18.1 */ class SharedUserCacheKey { static usernameById(userId) { return [ SharedUserCacheKey.PREFIX, SharedUserCacheKey.hashTag, constants_1.CACHE_KEYS.USERNAME, userId, ].join(':'); } static profileByUserName(username) { return [ SharedUserCacheKey.PREFIX, SharedUserCacheKey.hashTag, constants_1.CACHE_KEYS.USER_PROFILE, username, ].join(':'); } static allProfilesOfUser(userId) { return [ SharedUserCacheKey.PREFIX, SharedUserCacheKey.hashTag, constants_1.CACHE_KEYS.USER_PROFILES, userId, ].join(':'); } static userSettingsOfUser(userId) { return [ SharedUserCacheKey.PREFIX, SharedUserCacheKey.hashTag, constants_1.CACHE_KEYS.USER_SETTING, userId, ].join(':'); } static userOwnershipNftLinked(userId) { return [ SharedUserCacheKey.PREFIX, SharedUserCacheKey.hashTag, constants_1.CACHE_KEYS.USER_OWNERSHIP_NFT_LINKED, userId, ].join(':'); } /** * @deprecated */ static getTokenValidationHashKey(username) { return [SharedUserCacheKey.PREFIX, constants_1.CACHE_KEYS.TOKEN_VALIDATION.HASH, username].join(':'); } static getUserCronHealthCheckKey(identifier) { return [ SharedUserCacheKey.PREFIX, SharedUserCacheKey.hashTag, 'USER_CRON_JOB', identifier, ].join(':'); } static getReferralLeaderboardRankingsKey() { return [ SharedUserCacheKey.PREFIX, SharedUserCacheKey.hashTag, constants_1.CACHE_KEYS.REFERRAL_LEADERBOARD.RANKINGS, ].join(':'); } static getReferralLeaderboardUpdatedAtKey() { return [ SharedUserCacheKey.PREFIX, SharedUserCacheKey.hashTag, constants_1.CACHE_KEYS.REFERRAL_LEADERBOARD.UPDATED_AT, ].join(':'); } static getReferralLeaderboardLatestSnapshotTSKey() { return [ SharedUserCacheKey.PREFIX, SharedUserCacheKey.hashTag, constants_1.CACHE_KEYS.REFERRAL_LEADERBOARD.SNAPSHOT_TS, ].join(':'); } } SharedUserCacheKey.PREFIX = 'user'; SharedUserCacheKey.hashTag = '{1}'; exports.SharedUserCacheKey = SharedUserCacheKey;