@r2wa-org/eden 0.0.51 → 0.0.54
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/src/admin/index.d.ts +1863 -589
- package/dist/src/asset-convert-product/admin/dto.schemas.d.ts +658 -0
- package/dist/src/asset-convert-product/admin/router.d.ts +803 -0
- package/dist/src/asset-convert-product/admin/service.d.ts +125 -0
- package/dist/src/asset-convert-product/db.schemas.d.ts +1134 -0
- package/dist/src/asset-convert-product/errors/index.d.ts +19 -0
- package/dist/src/asset-convert-product/errors/locales/zh.d.ts +18 -0
- package/dist/src/asset-convert-product/index.d.ts +8 -0
- package/dist/src/asset-convert-product/internal/service.d.ts +66 -0
- package/dist/src/asset-convert-product/permissions.d.ts +5 -0
- package/dist/src/asset-convert-product/schema.d.ts +619 -0
- package/dist/src/asset-convert-product/user/dto.schemas.d.ts +1000 -0
- package/dist/src/asset-convert-product/user/router.d.ts +683 -0
- package/dist/src/asset-convert-product/user/service.d.ts +120 -0
- package/dist/src/auth/better-auth.d.ts +59 -3
- package/dist/src/auth/permissions.d.ts +41 -1
- package/dist/src/auth/roles.d.ts +120 -0
- package/dist/src/cron/index.d.ts +13 -1
- package/dist/src/db/schemas.d.ts +4 -0
- package/dist/src/deposit/admin/dto.schemas.d.ts +6 -6
- package/dist/src/deposit/user/dto.schemas.d.ts +6 -6
- package/dist/src/file-storage/admin/dto.schemas.d.ts +6 -6
- package/dist/src/index.d.ts +2811 -845
- package/dist/src/ledger/admin/dto.schemas.d.ts +8 -8
- package/dist/src/ledger/admin/router.d.ts +2 -2
- package/dist/src/ledger/admin/service.d.ts +2 -2
- package/dist/src/ledger/db.schemas.d.ts +8 -8
- package/dist/src/ledger/internal/service.d.ts +2 -2
- package/dist/src/ledger/schema.d.ts +6 -6
- package/dist/src/ledger/user/dto.schemas.d.ts +8 -8
- package/dist/src/ledger/user/router.d.ts +2 -2
- package/dist/src/ledger/user/service.d.ts +2 -2
- package/dist/src/ledger-account-import/admin/dto.schemas.d.ts +6 -6
- package/dist/src/ledger-account-import/admin/router.d.ts +9 -9
- package/dist/src/ledger-account-import/admin/service.d.ts +7 -7
- package/dist/src/ledger-account-import/db.schemas.d.ts +4 -4
- package/dist/src/ledger-account-import/schema.d.ts +2 -2
- package/dist/src/ledger-account-transfer/user/router.d.ts +1 -1
- package/dist/src/market-data/admin/dto.schemas.d.ts +291 -0
- package/dist/src/market-data/admin/router.d.ts +609 -0
- package/dist/src/market-data/admin/service.d.ts +52 -0
- package/dist/src/market-data/cron.d.ts +57 -0
- package/dist/src/market-data/db.schemas.d.ts +516 -0
- package/dist/src/market-data/errors/index.d.ts +12 -0
- package/dist/src/market-data/errors/locales/zh.d.ts +11 -0
- package/dist/src/market-data/index.d.ts +8 -0
- package/dist/src/market-data/internal/service.d.ts +77 -0
- package/dist/src/market-data/permissions.d.ts +6 -0
- package/dist/src/market-data/schema.d.ts +270 -0
- package/dist/src/market-data/user/dto.schemas.d.ts +289 -0
- package/dist/src/market-data/user/router.d.ts +521 -0
- package/dist/src/market-data/user/service.d.ts +30 -0
- package/dist/src/market-pricing/admin/dto.schemas.d.ts +322 -0
- package/dist/src/market-pricing/admin/router.d.ts +835 -0
- package/dist/src/market-pricing/admin/service.d.ts +129 -0
- package/dist/src/market-pricing/cron.d.ts +57 -0
- package/dist/src/market-pricing/db.schemas.d.ts +828 -0
- package/dist/src/market-pricing/errors/index.d.ts +14 -0
- package/dist/src/market-pricing/errors/locales/zh.d.ts +13 -0
- package/dist/src/market-pricing/internal/service.d.ts +35 -0
- package/dist/src/market-pricing/permissions.d.ts +4 -0
- package/dist/src/market-pricing/schema.d.ts +434 -0
- package/dist/src/news/admin/dto.schemas.d.ts +6 -6
- package/dist/src/news/user/dto.schemas.d.ts +12 -12
- package/dist/src/notification/admin/dto.schemas.d.ts +8 -8
- package/dist/src/notification/user/dto.schemas.d.ts +8 -8
- package/dist/src/trade-market/admin/dto.schemas.d.ts +762 -0
- package/dist/src/trade-market/admin/router.d.ts +851 -0
- package/dist/src/trade-market/admin/service.d.ts +158 -0
- package/dist/src/trade-market/db.schemas.d.ts +1338 -0
- package/dist/src/trade-market/errors/index.d.ts +22 -0
- package/dist/src/trade-market/errors/locales/zh.d.ts +21 -0
- package/dist/src/trade-market/index.d.ts +8 -0
- package/dist/src/trade-market/internal/service.d.ts +239 -0
- package/dist/src/trade-market/permissions.d.ts +5 -0
- package/dist/src/trade-market/schema.d.ts +708 -0
- package/dist/src/trade-market/user/dto.schemas.d.ts +1394 -0
- package/dist/src/trade-market/user/router.d.ts +754 -0
- package/dist/src/trade-market/user/service.d.ts +147 -0
- package/dist/src/transfer/user/router.d.ts +1 -1
- package/dist/src/user-kyc/admin/dto.schemas.d.ts +1 -1
- package/dist/src/wallet/admin/dto.schemas.d.ts +3 -3
- package/dist/src/wallet/user/dto.schemas.d.ts +2 -2
- package/dist/src/welfare-cycle/admin/dto.schemas.d.ts +7 -7
- package/dist/src/welfare-cycle/admin/router.d.ts +4 -4
- package/dist/src/welfare-cycle/admin/service.d.ts +2 -2
- package/dist/src/welfare-cycle/cron.d.ts +58 -0
- package/dist/src/welfare-cycle/db.schemas.d.ts +4 -4
- package/dist/src/welfare-cycle/internal/service.d.ts +2 -2
- package/dist/src/welfare-cycle/schema.d.ts +2 -2
- package/dist/src/welfare-cycle/user/dto.schemas.d.ts +3 -3
- package/dist/src/welfare-cycle/user/router.d.ts +3 -3
- package/dist/src/welfare-cycle/user/service.d.ts +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import type { TradeMarketListQueryType, TradeMarketOrderCreateInputType, TradeMarketOrderListQueryType } from "./dto.schemas";
|
|
2
|
+
declare abstract class BaseTradeMarketService {
|
|
3
|
+
protected static validateUserId(userId: string): void;
|
|
4
|
+
}
|
|
5
|
+
export declare abstract class UserTradeMarketService extends BaseTradeMarketService {
|
|
6
|
+
static listMarkets(query?: TradeMarketListQueryType): Promise<{
|
|
7
|
+
items: {
|
|
8
|
+
id: string;
|
|
9
|
+
name: string;
|
|
10
|
+
createdAt: Date;
|
|
11
|
+
updatedAt: Date;
|
|
12
|
+
status: "active" | "draft" | "paused" | "ended";
|
|
13
|
+
baseAssetId: string;
|
|
14
|
+
quoteAssetId: string;
|
|
15
|
+
pricingSource: string;
|
|
16
|
+
systemBaseAccountId: string;
|
|
17
|
+
systemQuoteAccountId: string;
|
|
18
|
+
isBuyEnabled: boolean;
|
|
19
|
+
isSellEnabled: boolean;
|
|
20
|
+
minBaseAmount: string;
|
|
21
|
+
maxBaseAmount: string | null;
|
|
22
|
+
dailyUserBuyBaseLimit: string | null;
|
|
23
|
+
dailyUserSellBaseLimit: string | null;
|
|
24
|
+
maxSlippageBps: string;
|
|
25
|
+
}[];
|
|
26
|
+
total: number;
|
|
27
|
+
}>;
|
|
28
|
+
static getMarket(marketId: string): Promise<{
|
|
29
|
+
id: string;
|
|
30
|
+
name: string;
|
|
31
|
+
createdAt: Date;
|
|
32
|
+
updatedAt: Date;
|
|
33
|
+
status: "active" | "draft" | "paused" | "ended";
|
|
34
|
+
baseAssetId: string;
|
|
35
|
+
quoteAssetId: string;
|
|
36
|
+
pricingSource: string;
|
|
37
|
+
systemBaseAccountId: string;
|
|
38
|
+
systemQuoteAccountId: string;
|
|
39
|
+
isBuyEnabled: boolean;
|
|
40
|
+
isSellEnabled: boolean;
|
|
41
|
+
minBaseAmount: string;
|
|
42
|
+
maxBaseAmount: string | null;
|
|
43
|
+
dailyUserBuyBaseLimit: string | null;
|
|
44
|
+
dailyUserSellBaseLimit: string | null;
|
|
45
|
+
maxSlippageBps: string;
|
|
46
|
+
}>;
|
|
47
|
+
static marketBuy(userId: string, input: TradeMarketOrderCreateInputType): Promise<{
|
|
48
|
+
id: string;
|
|
49
|
+
createdAt: Date;
|
|
50
|
+
updatedAt: Date;
|
|
51
|
+
userId: string;
|
|
52
|
+
status: "created" | "completed" | "failed";
|
|
53
|
+
idempotencyKey: string;
|
|
54
|
+
orderNo: string;
|
|
55
|
+
priceSnapshot: string;
|
|
56
|
+
priceEffectiveAtSnapshot: Date;
|
|
57
|
+
failureCode: string | null;
|
|
58
|
+
failureReason: string | null;
|
|
59
|
+
marketId: string;
|
|
60
|
+
side: "buy" | "sell";
|
|
61
|
+
baseAmount: string;
|
|
62
|
+
quoteAmount: string;
|
|
63
|
+
pricingSourceSnapshot: string;
|
|
64
|
+
userBaseAccountId: string;
|
|
65
|
+
userQuoteAccountId: string;
|
|
66
|
+
systemBaseAccountIdSnapshot: string;
|
|
67
|
+
systemQuoteAccountIdSnapshot: string;
|
|
68
|
+
userDebitLedgerEntryId: string | null;
|
|
69
|
+
userCreditLedgerEntryId: string | null;
|
|
70
|
+
}>;
|
|
71
|
+
static marketSell(userId: string, input: TradeMarketOrderCreateInputType): Promise<{
|
|
72
|
+
id: string;
|
|
73
|
+
createdAt: Date;
|
|
74
|
+
updatedAt: Date;
|
|
75
|
+
userId: string;
|
|
76
|
+
status: "created" | "completed" | "failed";
|
|
77
|
+
idempotencyKey: string;
|
|
78
|
+
orderNo: string;
|
|
79
|
+
priceSnapshot: string;
|
|
80
|
+
priceEffectiveAtSnapshot: Date;
|
|
81
|
+
failureCode: string | null;
|
|
82
|
+
failureReason: string | null;
|
|
83
|
+
marketId: string;
|
|
84
|
+
side: "buy" | "sell";
|
|
85
|
+
baseAmount: string;
|
|
86
|
+
quoteAmount: string;
|
|
87
|
+
pricingSourceSnapshot: string;
|
|
88
|
+
userBaseAccountId: string;
|
|
89
|
+
userQuoteAccountId: string;
|
|
90
|
+
systemBaseAccountIdSnapshot: string;
|
|
91
|
+
systemQuoteAccountIdSnapshot: string;
|
|
92
|
+
userDebitLedgerEntryId: string | null;
|
|
93
|
+
userCreditLedgerEntryId: string | null;
|
|
94
|
+
}>;
|
|
95
|
+
static listOrders(userId: string, query?: TradeMarketOrderListQueryType): Promise<{
|
|
96
|
+
items: {
|
|
97
|
+
id: string;
|
|
98
|
+
createdAt: Date;
|
|
99
|
+
updatedAt: Date;
|
|
100
|
+
userId: string;
|
|
101
|
+
status: "created" | "completed" | "failed";
|
|
102
|
+
idempotencyKey: string;
|
|
103
|
+
orderNo: string;
|
|
104
|
+
priceSnapshot: string;
|
|
105
|
+
priceEffectiveAtSnapshot: Date;
|
|
106
|
+
failureCode: string | null;
|
|
107
|
+
failureReason: string | null;
|
|
108
|
+
marketId: string;
|
|
109
|
+
side: "buy" | "sell";
|
|
110
|
+
baseAmount: string;
|
|
111
|
+
quoteAmount: string;
|
|
112
|
+
pricingSourceSnapshot: string;
|
|
113
|
+
userBaseAccountId: string;
|
|
114
|
+
userQuoteAccountId: string;
|
|
115
|
+
systemBaseAccountIdSnapshot: string;
|
|
116
|
+
systemQuoteAccountIdSnapshot: string;
|
|
117
|
+
userDebitLedgerEntryId: string | null;
|
|
118
|
+
userCreditLedgerEntryId: string | null;
|
|
119
|
+
}[];
|
|
120
|
+
total: number;
|
|
121
|
+
}>;
|
|
122
|
+
static getOrder(userId: string, orderId: string): Promise<{
|
|
123
|
+
id: string;
|
|
124
|
+
createdAt: Date;
|
|
125
|
+
updatedAt: Date;
|
|
126
|
+
userId: string;
|
|
127
|
+
status: "created" | "completed" | "failed";
|
|
128
|
+
idempotencyKey: string;
|
|
129
|
+
orderNo: string;
|
|
130
|
+
priceSnapshot: string;
|
|
131
|
+
priceEffectiveAtSnapshot: Date;
|
|
132
|
+
failureCode: string | null;
|
|
133
|
+
failureReason: string | null;
|
|
134
|
+
marketId: string;
|
|
135
|
+
side: "buy" | "sell";
|
|
136
|
+
baseAmount: string;
|
|
137
|
+
quoteAmount: string;
|
|
138
|
+
pricingSourceSnapshot: string;
|
|
139
|
+
userBaseAccountId: string;
|
|
140
|
+
userQuoteAccountId: string;
|
|
141
|
+
systemBaseAccountIdSnapshot: string;
|
|
142
|
+
systemQuoteAccountIdSnapshot: string;
|
|
143
|
+
userDebitLedgerEntryId: string | null;
|
|
144
|
+
userCreditLedgerEntryId: string | null;
|
|
145
|
+
}>;
|
|
146
|
+
}
|
|
147
|
+
export {};
|
|
@@ -446,8 +446,8 @@ export declare const transferRouter: Elysia<"/transfer", {
|
|
|
446
446
|
id: string;
|
|
447
447
|
assetId: string | null;
|
|
448
448
|
amount: string;
|
|
449
|
-
ledgerEntryId: string;
|
|
450
449
|
orderNo: string;
|
|
450
|
+
ledgerEntryId: string;
|
|
451
451
|
targetAccountId: string | null;
|
|
452
452
|
sourceAccountId: string | null;
|
|
453
453
|
sourceUserId: string;
|
|
@@ -3,13 +3,13 @@ export declare const kycMethodIdParamsSchema: import("@sinclair/typebox").TObjec
|
|
|
3
3
|
}>;
|
|
4
4
|
export type KycMethodIdParamsSchemaType = typeof kycMethodIdParamsSchema.static;
|
|
5
5
|
export declare const kycMethodAdminListQuerySchema: import("@sinclair/typebox").TObject<{
|
|
6
|
-
userId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
7
6
|
status: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TEnum<{
|
|
8
7
|
unverified: "unverified";
|
|
9
8
|
pending: "pending";
|
|
10
9
|
approved: "approved";
|
|
11
10
|
rejected: "rejected";
|
|
12
11
|
}>>;
|
|
12
|
+
userId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
13
13
|
method: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TEnum<{
|
|
14
14
|
passport: "passport";
|
|
15
15
|
id_card: "id_card";
|
|
@@ -3,8 +3,8 @@ export declare const walletAdminResponseSchema: import("@sinclair/typebox").TObj
|
|
|
3
3
|
updatedAt: import("@sinclair/typebox").TDate;
|
|
4
4
|
id: import("@sinclair/typebox").TString;
|
|
5
5
|
name: import("@sinclair/typebox").TString;
|
|
6
|
-
isActive: import("@sinclair/typebox").TBoolean;
|
|
7
6
|
userId: import("@sinclair/typebox").TString;
|
|
7
|
+
isActive: import("@sinclair/typebox").TBoolean;
|
|
8
8
|
walletTypeId: import("@sinclair/typebox").TString;
|
|
9
9
|
isPrimary: import("@sinclair/typebox").TBoolean;
|
|
10
10
|
walletType: import("drizzle-typebox").BuildSchema<"select", {
|
|
@@ -148,8 +148,8 @@ export declare const walletAdminResponseSchema: import("@sinclair/typebox").TObj
|
|
|
148
148
|
}>;
|
|
149
149
|
export type WalletAdminResponseType = typeof walletAdminResponseSchema.static;
|
|
150
150
|
export declare const walletAdminListQuerySchema: import("@sinclair/typebox").TObject<{
|
|
151
|
-
isActive: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
152
151
|
userId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
152
|
+
isActive: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
153
153
|
walletTypeKey: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
154
154
|
limit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
155
155
|
offset: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
@@ -163,8 +163,8 @@ export declare const walletAdminListResponseSchema: import("@sinclair/typebox").
|
|
|
163
163
|
updatedAt: import("@sinclair/typebox").TDate;
|
|
164
164
|
id: import("@sinclair/typebox").TString;
|
|
165
165
|
name: import("@sinclair/typebox").TString;
|
|
166
|
-
isActive: import("@sinclair/typebox").TBoolean;
|
|
167
166
|
userId: import("@sinclair/typebox").TString;
|
|
167
|
+
isActive: import("@sinclair/typebox").TBoolean;
|
|
168
168
|
walletTypeId: import("@sinclair/typebox").TString;
|
|
169
169
|
isPrimary: import("@sinclair/typebox").TBoolean;
|
|
170
170
|
walletType: import("drizzle-typebox").BuildSchema<"select", {
|
|
@@ -3,8 +3,8 @@ export declare const walletResponseSchema: import("@sinclair/typebox").TObject<{
|
|
|
3
3
|
updatedAt: import("@sinclair/typebox").TDate;
|
|
4
4
|
id: import("@sinclair/typebox").TString;
|
|
5
5
|
name: import("@sinclair/typebox").TString;
|
|
6
|
-
isActive: import("@sinclair/typebox").TBoolean;
|
|
7
6
|
userId: import("@sinclair/typebox").TString;
|
|
7
|
+
isActive: import("@sinclair/typebox").TBoolean;
|
|
8
8
|
walletTypeId: import("@sinclair/typebox").TString;
|
|
9
9
|
isPrimary: import("@sinclair/typebox").TBoolean;
|
|
10
10
|
walletType: import("drizzle-typebox").BuildSchema<"select", {
|
|
@@ -162,8 +162,8 @@ export declare const walletListResponseSchema: import("@sinclair/typebox").TObje
|
|
|
162
162
|
updatedAt: import("@sinclair/typebox").TDate;
|
|
163
163
|
id: import("@sinclair/typebox").TString;
|
|
164
164
|
name: import("@sinclair/typebox").TString;
|
|
165
|
-
isActive: import("@sinclair/typebox").TBoolean;
|
|
166
165
|
userId: import("@sinclair/typebox").TString;
|
|
166
|
+
isActive: import("@sinclair/typebox").TBoolean;
|
|
167
167
|
walletTypeId: import("@sinclair/typebox").TString;
|
|
168
168
|
isPrimary: import("@sinclair/typebox").TBoolean;
|
|
169
169
|
walletType: import("drizzle-typebox").BuildSchema<"select", {
|
|
@@ -356,7 +356,6 @@ export declare const welfareCyclePlanListResponseSchema: import("@sinclair/typeb
|
|
|
356
356
|
}>;
|
|
357
357
|
}>;
|
|
358
358
|
export declare const welfareCycleSubscriptionListQuerySchema: import("@sinclair/typebox").TObject<{
|
|
359
|
-
userId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
360
359
|
status: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TEnum<{
|
|
361
360
|
active: "active";
|
|
362
361
|
pending: "pending";
|
|
@@ -364,6 +363,7 @@ export declare const welfareCycleSubscriptionListQuerySchema: import("@sinclair/
|
|
|
364
363
|
matured: "matured";
|
|
365
364
|
settled: "settled";
|
|
366
365
|
}>>;
|
|
366
|
+
userId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
367
367
|
planId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
368
368
|
limit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
369
369
|
offset: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
@@ -791,12 +791,12 @@ export declare const welfareCycleSubscriptionListResponseSchema: import("@sincla
|
|
|
791
791
|
}>;
|
|
792
792
|
}>;
|
|
793
793
|
export declare const welfareCycleDailyPayoutListQuerySchema: import("@sinclair/typebox").TObject<{
|
|
794
|
-
userId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
795
794
|
status: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TEnum<{
|
|
796
795
|
pending: "pending";
|
|
797
|
-
failed: "failed";
|
|
798
796
|
completed: "completed";
|
|
797
|
+
failed: "failed";
|
|
799
798
|
}>>;
|
|
799
|
+
userId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
800
800
|
planId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
801
801
|
limit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
802
802
|
offset: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
@@ -947,7 +947,7 @@ export declare const welfareCycleDailyPayoutListResponseSchema: import("@sinclai
|
|
|
947
947
|
tableName: "welfare_cycle_daily_payout";
|
|
948
948
|
dataType: "string";
|
|
949
949
|
columnType: "PgEnumColumn";
|
|
950
|
-
data: "pending" | "
|
|
950
|
+
data: "pending" | "completed" | "failed";
|
|
951
951
|
driverParam: string;
|
|
952
952
|
notNull: true;
|
|
953
953
|
hasDefault: true;
|
|
@@ -1003,12 +1003,12 @@ export declare const welfareCycleDailyPayoutListResponseSchema: import("@sinclai
|
|
|
1003
1003
|
}>;
|
|
1004
1004
|
}>;
|
|
1005
1005
|
export declare const welfareCycleMaturitySettlementListQuerySchema: import("@sinclair/typebox").TObject<{
|
|
1006
|
-
userId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
1007
1006
|
status: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TEnum<{
|
|
1008
1007
|
pending: "pending";
|
|
1009
|
-
failed: "failed";
|
|
1010
1008
|
completed: "completed";
|
|
1009
|
+
failed: "failed";
|
|
1011
1010
|
}>>;
|
|
1011
|
+
userId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
1012
1012
|
planId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
1013
1013
|
limit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
1014
1014
|
offset: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
@@ -1176,7 +1176,7 @@ export declare const welfareCycleMaturitySettlementListResponseSchema: import("@
|
|
|
1176
1176
|
tableName: "welfare_cycle_maturity_settlement";
|
|
1177
1177
|
dataType: "string";
|
|
1178
1178
|
columnType: "PgEnumColumn";
|
|
1179
|
-
data: "pending" | "
|
|
1179
|
+
data: "pending" | "completed" | "failed";
|
|
1180
1180
|
driverParam: string;
|
|
1181
1181
|
notNull: true;
|
|
1182
1182
|
hasDefault: true;
|
|
@@ -779,7 +779,7 @@ export declare const welfareCycleAdminRouter: Elysia<"/welfare_cycle", {
|
|
|
779
779
|
params: {};
|
|
780
780
|
query: {
|
|
781
781
|
userId?: string | undefined;
|
|
782
|
-
status?: "pending" | "
|
|
782
|
+
status?: "pending" | "completed" | "failed" | undefined;
|
|
783
783
|
planId?: string | undefined;
|
|
784
784
|
limit?: number | undefined;
|
|
785
785
|
offset?: number | undefined;
|
|
@@ -794,7 +794,7 @@ export declare const welfareCycleAdminRouter: Elysia<"/welfare_cycle", {
|
|
|
794
794
|
createdAt: Date;
|
|
795
795
|
updatedAt: Date;
|
|
796
796
|
userId: string;
|
|
797
|
-
status: "pending" | "
|
|
797
|
+
status: "pending" | "completed" | "failed";
|
|
798
798
|
amount: string;
|
|
799
799
|
idempotencyKey: string;
|
|
800
800
|
ledgerEntryId: string | null;
|
|
@@ -833,7 +833,7 @@ export declare const welfareCycleAdminRouter: Elysia<"/welfare_cycle", {
|
|
|
833
833
|
params: {};
|
|
834
834
|
query: {
|
|
835
835
|
userId?: string | undefined;
|
|
836
|
-
status?: "pending" | "
|
|
836
|
+
status?: "pending" | "completed" | "failed" | undefined;
|
|
837
837
|
planId?: string | undefined;
|
|
838
838
|
limit?: number | undefined;
|
|
839
839
|
offset?: number | undefined;
|
|
@@ -848,7 +848,7 @@ export declare const welfareCycleAdminRouter: Elysia<"/welfare_cycle", {
|
|
|
848
848
|
createdAt: Date;
|
|
849
849
|
updatedAt: Date;
|
|
850
850
|
userId: string;
|
|
851
|
-
status: "pending" | "
|
|
851
|
+
status: "pending" | "completed" | "failed";
|
|
852
852
|
idempotencyKey: string;
|
|
853
853
|
planId: string;
|
|
854
854
|
subscriptionId: string;
|
|
@@ -166,7 +166,7 @@ export declare abstract class AdminWelfareCycleService extends BaseWelfareCycleS
|
|
|
166
166
|
createdAt: Date;
|
|
167
167
|
updatedAt: Date;
|
|
168
168
|
userId: string;
|
|
169
|
-
status: "pending" | "
|
|
169
|
+
status: "pending" | "completed" | "failed";
|
|
170
170
|
amount: string;
|
|
171
171
|
idempotencyKey: string;
|
|
172
172
|
ledgerEntryId: string | null;
|
|
@@ -188,7 +188,7 @@ export declare abstract class AdminWelfareCycleService extends BaseWelfareCycleS
|
|
|
188
188
|
createdAt: Date;
|
|
189
189
|
updatedAt: Date;
|
|
190
190
|
userId: string;
|
|
191
|
-
status: "pending" | "
|
|
191
|
+
status: "pending" | "completed" | "failed";
|
|
192
192
|
idempotencyKey: string;
|
|
193
193
|
planId: string;
|
|
194
194
|
subscriptionId: string;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { Elysia } from "elysia";
|
|
2
|
+
/**
|
|
3
|
+
* 福利周期定时任务
|
|
4
|
+
* - 每日收益发放:每 30 分钟扫描一次到期可派息持仓
|
|
5
|
+
* - 到期结算:每 10 分钟扫描一次已到期持仓
|
|
6
|
+
*/
|
|
7
|
+
export declare const welfareCycleCronJobs: Elysia<"", {
|
|
8
|
+
decorator: {};
|
|
9
|
+
store: {
|
|
10
|
+
cron: Record<`${string}-welfare-cycle-daily-payout`, import("croner").Cron> & Record<`${string}-welfare-cycle-maturity-settlement`, import("croner").Cron>;
|
|
11
|
+
};
|
|
12
|
+
derive: {};
|
|
13
|
+
resolve: {};
|
|
14
|
+
}, {
|
|
15
|
+
typebox: {};
|
|
16
|
+
error: {};
|
|
17
|
+
} & {
|
|
18
|
+
typebox: {};
|
|
19
|
+
error: {};
|
|
20
|
+
}, {
|
|
21
|
+
schema: {};
|
|
22
|
+
standaloneSchema: {};
|
|
23
|
+
macro: {};
|
|
24
|
+
macroFn: {};
|
|
25
|
+
parser: {};
|
|
26
|
+
response: {};
|
|
27
|
+
} & {
|
|
28
|
+
schema: {};
|
|
29
|
+
standaloneSchema: {};
|
|
30
|
+
macro: {};
|
|
31
|
+
macroFn: {};
|
|
32
|
+
parser: {};
|
|
33
|
+
response: {};
|
|
34
|
+
}, {}, {
|
|
35
|
+
derive: {};
|
|
36
|
+
resolve: {};
|
|
37
|
+
schema: {};
|
|
38
|
+
standaloneSchema: {};
|
|
39
|
+
response: {};
|
|
40
|
+
} & {
|
|
41
|
+
derive: {};
|
|
42
|
+
resolve: {};
|
|
43
|
+
schema: {};
|
|
44
|
+
standaloneSchema: {};
|
|
45
|
+
response: {};
|
|
46
|
+
}, {
|
|
47
|
+
derive: {};
|
|
48
|
+
resolve: {};
|
|
49
|
+
schema: {};
|
|
50
|
+
standaloneSchema: {};
|
|
51
|
+
response: {};
|
|
52
|
+
} & {
|
|
53
|
+
derive: {};
|
|
54
|
+
resolve: {};
|
|
55
|
+
schema: {};
|
|
56
|
+
standaloneSchema: {};
|
|
57
|
+
response: {};
|
|
58
|
+
}>;
|
|
@@ -1546,7 +1546,7 @@ export declare const welfareCycleDailyPayoutSelectSchema: import("drizzle-typebo
|
|
|
1546
1546
|
tableName: "welfare_cycle_daily_payout";
|
|
1547
1547
|
dataType: "string";
|
|
1548
1548
|
columnType: "PgEnumColumn";
|
|
1549
|
-
data: "pending" | "
|
|
1549
|
+
data: "pending" | "completed" | "failed";
|
|
1550
1550
|
driverParam: string;
|
|
1551
1551
|
notNull: true;
|
|
1552
1552
|
hasDefault: true;
|
|
@@ -1736,7 +1736,7 @@ export declare const welfareCycleDailyPayoutInsertSchema: import("drizzle-typebo
|
|
|
1736
1736
|
tableName: "welfare_cycle_daily_payout";
|
|
1737
1737
|
dataType: "string";
|
|
1738
1738
|
columnType: "PgEnumColumn";
|
|
1739
|
-
data: "pending" | "
|
|
1739
|
+
data: "pending" | "completed" | "failed";
|
|
1740
1740
|
driverParam: string;
|
|
1741
1741
|
notNull: true;
|
|
1742
1742
|
hasDefault: true;
|
|
@@ -1943,7 +1943,7 @@ export declare const welfareCycleMaturitySettlementSelectSchema: import("drizzle
|
|
|
1943
1943
|
tableName: "welfare_cycle_maturity_settlement";
|
|
1944
1944
|
dataType: "string";
|
|
1945
1945
|
columnType: "PgEnumColumn";
|
|
1946
|
-
data: "pending" | "
|
|
1946
|
+
data: "pending" | "completed" | "failed";
|
|
1947
1947
|
driverParam: string;
|
|
1948
1948
|
notNull: true;
|
|
1949
1949
|
hasDefault: true;
|
|
@@ -2167,7 +2167,7 @@ export declare const welfareCycleMaturitySettlementInsertSchema: import("drizzle
|
|
|
2167
2167
|
tableName: "welfare_cycle_maturity_settlement";
|
|
2168
2168
|
dataType: "string";
|
|
2169
2169
|
columnType: "PgEnumColumn";
|
|
2170
|
-
data: "pending" | "
|
|
2170
|
+
data: "pending" | "completed" | "failed";
|
|
2171
2171
|
driverParam: string;
|
|
2172
2172
|
notNull: true;
|
|
2173
2173
|
hasDefault: true;
|
|
@@ -92,7 +92,7 @@ export declare abstract class InternalWelfareCycleService extends BaseWelfareCyc
|
|
|
92
92
|
createdAt: Date;
|
|
93
93
|
updatedAt: Date;
|
|
94
94
|
userId: string;
|
|
95
|
-
status: "pending" | "
|
|
95
|
+
status: "pending" | "completed" | "failed";
|
|
96
96
|
amount: string;
|
|
97
97
|
idempotencyKey: string;
|
|
98
98
|
ledgerEntryId: string | null;
|
|
@@ -105,7 +105,7 @@ export declare abstract class InternalWelfareCycleService extends BaseWelfareCyc
|
|
|
105
105
|
createdAt: Date;
|
|
106
106
|
updatedAt: Date;
|
|
107
107
|
userId: string;
|
|
108
|
-
status: "pending" | "
|
|
108
|
+
status: "pending" | "completed" | "failed";
|
|
109
109
|
idempotencyKey: string;
|
|
110
110
|
planId: string;
|
|
111
111
|
subscriptionId: string;
|
|
@@ -872,7 +872,7 @@ export declare const welfareCycleDailyPayout: import("drizzle-orm/pg-core").PgTa
|
|
|
872
872
|
tableName: "welfare_cycle_daily_payout";
|
|
873
873
|
dataType: "string";
|
|
874
874
|
columnType: "PgEnumColumn";
|
|
875
|
-
data: "pending" | "
|
|
875
|
+
data: "pending" | "completed" | "failed";
|
|
876
876
|
driverParam: string;
|
|
877
877
|
notNull: true;
|
|
878
878
|
hasDefault: true;
|
|
@@ -1087,7 +1087,7 @@ export declare const welfareCycleMaturitySettlement: import("drizzle-orm/pg-core
|
|
|
1087
1087
|
tableName: "welfare_cycle_maturity_settlement";
|
|
1088
1088
|
dataType: "string";
|
|
1089
1089
|
columnType: "PgEnumColumn";
|
|
1090
|
-
data: "pending" | "
|
|
1090
|
+
data: "pending" | "completed" | "failed";
|
|
1091
1091
|
driverParam: string;
|
|
1092
1092
|
notNull: true;
|
|
1093
1093
|
hasDefault: true;
|
|
@@ -1169,8 +1169,8 @@ export type WelfareCycleSubscriptionListResponseType = typeof welfareCycleSubscr
|
|
|
1169
1169
|
export declare const welfareCycleDailyPayoutListQuerySchema: import("@sinclair/typebox").TObject<{
|
|
1170
1170
|
status: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TEnum<{
|
|
1171
1171
|
pending: "pending";
|
|
1172
|
-
failed: "failed";
|
|
1173
1172
|
completed: "completed";
|
|
1173
|
+
failed: "failed";
|
|
1174
1174
|
}>>;
|
|
1175
1175
|
limit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
1176
1176
|
offset: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
@@ -1321,7 +1321,7 @@ export declare const welfareCycleDailyPayoutListResponseSchema: import("@sinclai
|
|
|
1321
1321
|
tableName: "welfare_cycle_daily_payout";
|
|
1322
1322
|
dataType: "string";
|
|
1323
1323
|
columnType: "PgEnumColumn";
|
|
1324
|
-
data: "pending" | "
|
|
1324
|
+
data: "pending" | "completed" | "failed";
|
|
1325
1325
|
driverParam: string;
|
|
1326
1326
|
notNull: true;
|
|
1327
1327
|
hasDefault: true;
|
|
@@ -1536,7 +1536,7 @@ export declare const welfareCycleMaturitySettlementResponseSchema: import("drizz
|
|
|
1536
1536
|
tableName: "welfare_cycle_maturity_settlement";
|
|
1537
1537
|
dataType: "string";
|
|
1538
1538
|
columnType: "PgEnumColumn";
|
|
1539
|
-
data: "pending" | "
|
|
1539
|
+
data: "pending" | "completed" | "failed";
|
|
1540
1540
|
driverParam: string;
|
|
1541
1541
|
notNull: true;
|
|
1542
1542
|
hasDefault: true;
|
|
@@ -666,7 +666,7 @@ export declare const welfareCycleRouter: Elysia<"/welfare_cycle", {
|
|
|
666
666
|
id: string;
|
|
667
667
|
};
|
|
668
668
|
query: {
|
|
669
|
-
status?: "pending" | "
|
|
669
|
+
status?: "pending" | "completed" | "failed" | undefined;
|
|
670
670
|
limit?: number | undefined;
|
|
671
671
|
offset?: number | undefined;
|
|
672
672
|
pageSize?: number | undefined;
|
|
@@ -680,7 +680,7 @@ export declare const welfareCycleRouter: Elysia<"/welfare_cycle", {
|
|
|
680
680
|
createdAt: Date;
|
|
681
681
|
updatedAt: Date;
|
|
682
682
|
userId: string;
|
|
683
|
-
status: "pending" | "
|
|
683
|
+
status: "pending" | "completed" | "failed";
|
|
684
684
|
amount: string;
|
|
685
685
|
idempotencyKey: string;
|
|
686
686
|
ledgerEntryId: string | null;
|
|
@@ -730,7 +730,7 @@ export declare const welfareCycleRouter: Elysia<"/welfare_cycle", {
|
|
|
730
730
|
createdAt: Date;
|
|
731
731
|
updatedAt: Date;
|
|
732
732
|
userId: string;
|
|
733
|
-
status: "pending" | "
|
|
733
|
+
status: "pending" | "completed" | "failed";
|
|
734
734
|
idempotencyKey: string;
|
|
735
735
|
planId: string;
|
|
736
736
|
subscriptionId: string;
|
|
@@ -141,7 +141,7 @@ export declare abstract class UserWelfareCycleService extends BaseWelfareCycleSe
|
|
|
141
141
|
createdAt: Date;
|
|
142
142
|
updatedAt: Date;
|
|
143
143
|
userId: string;
|
|
144
|
-
status: "pending" | "
|
|
144
|
+
status: "pending" | "completed" | "failed";
|
|
145
145
|
amount: string;
|
|
146
146
|
idempotencyKey: string;
|
|
147
147
|
ledgerEntryId: string | null;
|
|
@@ -162,7 +162,7 @@ export declare abstract class UserWelfareCycleService extends BaseWelfareCycleSe
|
|
|
162
162
|
createdAt: Date;
|
|
163
163
|
updatedAt: Date;
|
|
164
164
|
userId: string;
|
|
165
|
-
status: "pending" | "
|
|
165
|
+
status: "pending" | "completed" | "failed";
|
|
166
166
|
idempotencyKey: string;
|
|
167
167
|
planId: string;
|
|
168
168
|
subscriptionId: string;
|