@wrcb/cb-common 1.0.611 → 1.0.619
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.
|
@@ -8,4 +8,13 @@ export declare class RedisService {
|
|
|
8
8
|
static maintenanceSettingsKey(tenant: Tenant): string;
|
|
9
9
|
static userBalanceKey(tenant: Tenant, userId: string): string;
|
|
10
10
|
static bannedViewerKey(streamerId: string, viewerId: string): string;
|
|
11
|
+
static promotionByIdKey(tenant: Tenant, promotionId: string): string;
|
|
12
|
+
static promotionsListKey(params: {
|
|
13
|
+
tenant: Tenant;
|
|
14
|
+
categoria?: string;
|
|
15
|
+
page: number;
|
|
16
|
+
limit: number;
|
|
17
|
+
isLogged: boolean;
|
|
18
|
+
}): string;
|
|
19
|
+
static promotionsCategoryPrefix(tenant: Tenant, categoria?: string): string;
|
|
11
20
|
}
|
|
@@ -26,5 +26,21 @@ class RedisService {
|
|
|
26
26
|
static bannedViewerKey(streamerId, viewerId) {
|
|
27
27
|
return `banned:${streamerId}:${viewerId}`;
|
|
28
28
|
}
|
|
29
|
+
static promotionByIdKey(tenant, promotionId) {
|
|
30
|
+
return `${tenant}:promotion:${promotionId}`;
|
|
31
|
+
}
|
|
32
|
+
static promotionsListKey(params) {
|
|
33
|
+
var _a;
|
|
34
|
+
const categoria = (_a = params.categoria) !== null && _a !== void 0 ? _a : 'all';
|
|
35
|
+
const authScope = params.isLogged ? 'logged' : 'guest';
|
|
36
|
+
return (`${params.tenant}:promotions:list:` +
|
|
37
|
+
`${categoria}:` +
|
|
38
|
+
`${authScope}:` +
|
|
39
|
+
`page:${params.page}:` +
|
|
40
|
+
`limit:${params.limit}`);
|
|
41
|
+
}
|
|
42
|
+
static promotionsCategoryPrefix(tenant, categoria) {
|
|
43
|
+
return `${tenant}:promotions:list:${categoria !== null && categoria !== void 0 ? categoria : 'all'}`;
|
|
44
|
+
}
|
|
29
45
|
}
|
|
30
46
|
exports.RedisService = RedisService;
|