@r2wa-org/eden 0.0.99 → 0.0.101
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/admin/index.d.ts +706 -12
- package/dist/asset-convert-product/admin/router.d.ts +1 -13
- package/dist/auth/better-auth.d.ts +13 -1
- package/dist/auth/permissions.d.ts +11 -1
- package/dist/auth/roles.d.ts +30 -0
- package/dist/bank-account/admin/router.d.ts +1 -13
- package/dist/check-in/admin/reward.dto.schemas.d.ts +179 -0
- package/dist/check-in/admin/reward.router.d.ts +1091 -0
- package/dist/check-in/admin/reward.service.d.ts +430 -0
- package/dist/check-in/admin/router.d.ts +644 -0
- package/dist/check-in/errors/index.d.ts +10 -0
- package/dist/check-in/errors/locales/zh.d.ts +10 -0
- package/dist/check-in/index.d.ts +5 -0
- package/dist/check-in/internal/reward-config.service.d.ts +97 -0
- package/dist/check-in/permissions.d.ts +2 -0
- package/dist/check-in/reward.db.schemas.d.ts +896 -0
- package/dist/check-in/reward.schema.d.ts +477 -0
- package/dist/content-video/admin/dto.schemas.d.ts +14 -14
- package/dist/content-video/admin/router.d.ts +12 -12
- package/dist/content-video/admin/service.d.ts +1 -0
- package/dist/db/schemas.d.ts +1 -0
- package/dist/index.d.ts +722 -12
- package/dist/lock-activity/admin/dto.schemas.d.ts +16 -0
- package/dist/lock-activity/admin/router.d.ts +69 -1
- package/dist/lock-activity/admin/service.d.ts +134 -8
- package/dist/lock-activity/db.schemas.d.ts +34 -0
- package/dist/lock-activity/internal/service.d.ts +41 -0
- package/dist/lock-activity/schema.d.ts +18 -0
- package/dist/lock-activity/shared.dto.schemas.d.ts +7 -0
- package/dist/lock-activity/user/dto.schemas.d.ts +24 -0
- package/dist/lock-activity/user/router.d.ts +16 -0
- package/dist/lock-activity/user/service.d.ts +39 -3
- package/dist/news/admin/router.d.ts +13 -1
- package/package.json +1 -1
package/dist/check-in/index.d.ts
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
export * from './admin/service';
|
|
2
|
+
export * from './admin/reward.service';
|
|
3
|
+
export * from './admin/reward.dto.schemas';
|
|
4
|
+
export { checkInRewardPlanAdminRouter } from './admin/reward.router';
|
|
2
5
|
export * from './db.schemas';
|
|
6
|
+
export * from './reward.db.schemas';
|
|
7
|
+
export * from './reward.schema';
|
|
3
8
|
export * from './internal/service';
|
|
4
9
|
export * from './permissions';
|
|
5
10
|
export * from './schema';
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import type { TransactionTx } from '../../db/transaction';
|
|
2
|
+
import { CheckInErrorCodes } from '../errors';
|
|
3
|
+
import { checkInRewardRule } from '../reward.schema';
|
|
4
|
+
export declare abstract class InternalCheckInRewardConfigService {
|
|
5
|
+
static assertPositiveAmount(value: string, invalidCode: typeof CheckInErrorCodes.CHECK_IN_REWARD_AMOUNT_INVALID): string;
|
|
6
|
+
static assertPositiveThresholdDays(thresholdDays: number): void;
|
|
7
|
+
static ensureRewardAssetValid(tx: TransactionTx, rewardAssetId: string): Promise<{
|
|
8
|
+
category: "CRYPTO" | "FIAT" | "POINT" | "RWA";
|
|
9
|
+
code: string;
|
|
10
|
+
createdAt: Date;
|
|
11
|
+
iconUrl: string;
|
|
12
|
+
id: string;
|
|
13
|
+
isActive: boolean;
|
|
14
|
+
name: string;
|
|
15
|
+
precision: number;
|
|
16
|
+
symbol: string | null;
|
|
17
|
+
typeId: string | null;
|
|
18
|
+
updatedAt: Date;
|
|
19
|
+
}>;
|
|
20
|
+
static ensurePayoutAccountTypeValid(tx: TransactionTx, accountTypeId: string): Promise<{
|
|
21
|
+
allowDeposit: boolean;
|
|
22
|
+
allowInternalReceiveTransfer: boolean;
|
|
23
|
+
allowInternalTransfer: boolean;
|
|
24
|
+
allowTransaction: boolean;
|
|
25
|
+
allowTransfer: boolean;
|
|
26
|
+
allowWithdraw: boolean;
|
|
27
|
+
createdAt: Date;
|
|
28
|
+
description: string | null;
|
|
29
|
+
expiryDays: number | null;
|
|
30
|
+
hasExpiry: boolean;
|
|
31
|
+
id: string;
|
|
32
|
+
internalTransferRatio: string;
|
|
33
|
+
isActive: boolean;
|
|
34
|
+
key: string;
|
|
35
|
+
maxInternalTransferAmount: string;
|
|
36
|
+
maxTransferAmount: string;
|
|
37
|
+
maxWithdrawAmount: string;
|
|
38
|
+
minInternalTransferAmount: string;
|
|
39
|
+
minTransferAmount: string;
|
|
40
|
+
minWithdrawAmount: string;
|
|
41
|
+
name: string;
|
|
42
|
+
sortOrder: number;
|
|
43
|
+
updatedAt: Date;
|
|
44
|
+
}>;
|
|
45
|
+
static ensurePlanExists(tx: TransactionTx, planId: string): Promise<{
|
|
46
|
+
checkInType: "app" | "meeting";
|
|
47
|
+
createdAt: Date;
|
|
48
|
+
createdBy: string;
|
|
49
|
+
dailyPayoutAccountTypeId: string;
|
|
50
|
+
dailyRewardAmount: string;
|
|
51
|
+
dailyRewardCategory: string;
|
|
52
|
+
id: string;
|
|
53
|
+
isEnabled: boolean;
|
|
54
|
+
name: string;
|
|
55
|
+
rewardAssetId: string;
|
|
56
|
+
sortOrder: number;
|
|
57
|
+
updatedAt: Date;
|
|
58
|
+
updatedBy: string | null;
|
|
59
|
+
}>;
|
|
60
|
+
static findSingletonPlan(tx: TransactionTx): Promise<{
|
|
61
|
+
checkInType: "app" | "meeting";
|
|
62
|
+
createdAt: Date;
|
|
63
|
+
createdBy: string;
|
|
64
|
+
dailyPayoutAccountTypeId: string;
|
|
65
|
+
dailyRewardAmount: string;
|
|
66
|
+
dailyRewardCategory: string;
|
|
67
|
+
id: string;
|
|
68
|
+
isEnabled: boolean;
|
|
69
|
+
name: string;
|
|
70
|
+
rewardAssetId: string;
|
|
71
|
+
sortOrder: number;
|
|
72
|
+
updatedAt: Date;
|
|
73
|
+
updatedBy: string | null;
|
|
74
|
+
} | undefined>;
|
|
75
|
+
static ensureSingletonPlan(tx: TransactionTx): Promise<{
|
|
76
|
+
checkInType: "app" | "meeting";
|
|
77
|
+
createdAt: Date;
|
|
78
|
+
createdBy: string;
|
|
79
|
+
dailyPayoutAccountTypeId: string;
|
|
80
|
+
dailyRewardAmount: string;
|
|
81
|
+
dailyRewardCategory: string;
|
|
82
|
+
id: string;
|
|
83
|
+
isEnabled: boolean;
|
|
84
|
+
name: string;
|
|
85
|
+
rewardAssetId: string;
|
|
86
|
+
sortOrder: number;
|
|
87
|
+
updatedAt: Date;
|
|
88
|
+
updatedBy: string | null;
|
|
89
|
+
}>;
|
|
90
|
+
static assertNoSingletonPlan(tx: TransactionTx): Promise<void>;
|
|
91
|
+
static assertRuleUnique(tx: TransactionTx, input: {
|
|
92
|
+
planId: string;
|
|
93
|
+
ruleType: typeof checkInRewardRule.$inferSelect.ruleType;
|
|
94
|
+
thresholdDays: number;
|
|
95
|
+
excludeRuleId?: string;
|
|
96
|
+
}): Promise<void>;
|
|
97
|
+
}
|
|
@@ -2,5 +2,7 @@
|
|
|
2
2
|
export declare const checkInPermissions: {
|
|
3
3
|
readonly 'checkIn:checkIn': readonly ['create', 'read', 'list'];
|
|
4
4
|
readonly 'checkIn:admin': readonly ['read', 'list'];
|
|
5
|
+
readonly 'checkIn:rewardPlan': readonly ['create', 'read', 'update', 'delete'];
|
|
6
|
+
readonly 'checkIn:rewardRule': readonly ['create', 'read', 'update', 'delete', 'list'];
|
|
5
7
|
};
|
|
6
8
|
export type CheckInPermission = keyof typeof checkInPermissions;
|