@r2wa-org/eden 0.0.99 → 0.0.100
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 +807 -12
- 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 +294 -0
- package/dist/check-in/admin/reward.router.d.ts +1192 -0
- package/dist/check-in/admin/reward.service.d.ts +479 -0
- package/dist/check-in/admin/router.d.ts +745 -0
- package/dist/check-in/errors/index.d.ts +9 -0
- package/dist/check-in/errors/locales/zh.d.ts +9 -0
- package/dist/check-in/index.d.ts +5 -0
- package/dist/check-in/internal/reward-config.service.d.ts +66 -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/content-video/user/router.d.ts +13 -1
- package/dist/db/schemas.d.ts +1 -0
- package/dist/index.d.ts +823 -12
- package/dist/lock-activity/admin/dto.schemas.d.ts +16 -0
- package/dist/lock-activity/admin/router.d.ts +56 -0
- 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 +17 -13
- package/dist/lock-activity/user/service.d.ts +39 -3
- package/dist/referral/admin/router.d.ts +13 -1
- package/package.json +1 -1
|
@@ -10,6 +10,15 @@ export declare const CheckInErrorCodes: {
|
|
|
10
10
|
readonly CHECK_IN_TIMEZONE_CHANGE_TOO_FREQUENT: 'CHECK_IN_TIMEZONE_CHANGE_TOO_FREQUENT';
|
|
11
11
|
/** 时区切换申请尚未生效 */
|
|
12
12
|
readonly CHECK_IN_TIMEZONE_CHANGE_PENDING_EXISTS: 'CHECK_IN_TIMEZONE_CHANGE_PENDING_EXISTS';
|
|
13
|
+
readonly CHECK_IN_REWARD_PLAN_NOT_FOUND: 'CHECK_IN_REWARD_PLAN_NOT_FOUND';
|
|
14
|
+
readonly CHECK_IN_REWARD_RULE_NOT_FOUND: 'CHECK_IN_REWARD_RULE_NOT_FOUND';
|
|
15
|
+
readonly CHECK_IN_REWARD_RULE_ALREADY_EXISTS: 'CHECK_IN_REWARD_RULE_ALREADY_EXISTS';
|
|
16
|
+
readonly CHECK_IN_REWARD_AMOUNT_INVALID: 'CHECK_IN_REWARD_AMOUNT_INVALID';
|
|
17
|
+
readonly CHECK_IN_REWARD_THRESHOLD_DAYS_INVALID: 'CHECK_IN_REWARD_THRESHOLD_DAYS_INVALID';
|
|
18
|
+
readonly CHECK_IN_REWARD_ASSET_NOT_FOUND: 'CHECK_IN_REWARD_ASSET_NOT_FOUND';
|
|
19
|
+
readonly CHECK_IN_REWARD_ASSET_INACTIVE: 'CHECK_IN_REWARD_ASSET_INACTIVE';
|
|
20
|
+
readonly CHECK_IN_REWARD_ACCOUNT_TYPE_NOT_FOUND: 'CHECK_IN_REWARD_ACCOUNT_TYPE_NOT_FOUND';
|
|
21
|
+
readonly CHECK_IN_REWARD_ACCOUNT_TYPE_INACTIVE: 'CHECK_IN_REWARD_ACCOUNT_TYPE_INACTIVE';
|
|
13
22
|
};
|
|
14
23
|
type CheckInErrorCodesType = typeof CheckInErrorCodes;
|
|
15
24
|
export type CheckInErrorCode = keyof CheckInErrorCodesType;
|
|
@@ -4,6 +4,15 @@ export declare const zh: {
|
|
|
4
4
|
CHECK_IN_TIMEZONE_INVALID: string;
|
|
5
5
|
CHECK_IN_TIMEZONE_CHANGE_TOO_FREQUENT: string;
|
|
6
6
|
CHECK_IN_TIMEZONE_CHANGE_PENDING_EXISTS: string;
|
|
7
|
+
CHECK_IN_REWARD_PLAN_NOT_FOUND: string;
|
|
8
|
+
CHECK_IN_REWARD_RULE_NOT_FOUND: string;
|
|
9
|
+
CHECK_IN_REWARD_RULE_ALREADY_EXISTS: string;
|
|
10
|
+
CHECK_IN_REWARD_AMOUNT_INVALID: string;
|
|
11
|
+
CHECK_IN_REWARD_THRESHOLD_DAYS_INVALID: string;
|
|
12
|
+
CHECK_IN_REWARD_ASSET_NOT_FOUND: string;
|
|
13
|
+
CHECK_IN_REWARD_ASSET_INACTIVE: string;
|
|
14
|
+
CHECK_IN_REWARD_ACCOUNT_TYPE_NOT_FOUND: string;
|
|
15
|
+
CHECK_IN_REWARD_ACCOUNT_TYPE_INACTIVE: string;
|
|
7
16
|
};
|
|
8
17
|
type ZHType = typeof zh;
|
|
9
18
|
declare module '../../../error/messages' {
|
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,66 @@
|
|
|
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 assertRuleUnique(tx: TransactionTx, input: {
|
|
61
|
+
planId: string;
|
|
62
|
+
ruleType: typeof checkInRewardRule.$inferSelect.ruleType;
|
|
63
|
+
thresholdDays: number;
|
|
64
|
+
excludeRuleId?: string;
|
|
65
|
+
}): Promise<void>;
|
|
66
|
+
}
|
|
@@ -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', 'list'];
|
|
6
|
+
readonly 'checkIn:rewardRule': readonly ['create', 'read', 'update', 'delete', 'list'];
|
|
5
7
|
};
|
|
6
8
|
export type CheckInPermission = keyof typeof checkInPermissions;
|