@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,14 @@
|
|
|
1
|
+
export * from "./locales/zh";
|
|
2
|
+
export declare const MarketPricingErrorCodes: {
|
|
3
|
+
readonly MARKET_PRICING_STRATEGY_NOT_FOUND: "MARKET_PRICING_STRATEGY_NOT_FOUND";
|
|
4
|
+
readonly MARKET_PRICING_STRATEGY_DISABLED: "MARKET_PRICING_STRATEGY_DISABLED";
|
|
5
|
+
readonly MARKET_PRICING_ASSET_NOT_FOUND: "MARKET_PRICING_ASSET_NOT_FOUND";
|
|
6
|
+
readonly MARKET_PRICING_INVALID_PRICE: "MARKET_PRICING_INVALID_PRICE";
|
|
7
|
+
readonly MARKET_PRICING_TICK_CREATE_FAILED: "MARKET_PRICING_TICK_CREATE_FAILED";
|
|
8
|
+
};
|
|
9
|
+
type MarketPricingErrorCodesType = typeof MarketPricingErrorCodes;
|
|
10
|
+
export type MarketPricingErrorCode = keyof MarketPricingErrorCodesType;
|
|
11
|
+
declare module "../../error/errorcode" {
|
|
12
|
+
interface ErrorCodeRegistry extends MarketPricingErrorCodesType {
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const zh: {
|
|
2
|
+
MARKET_PRICING_STRATEGY_NOT_FOUND: string;
|
|
3
|
+
MARKET_PRICING_STRATEGY_DISABLED: string;
|
|
4
|
+
MARKET_PRICING_ASSET_NOT_FOUND: string;
|
|
5
|
+
MARKET_PRICING_INVALID_PRICE: string;
|
|
6
|
+
MARKET_PRICING_TICK_CREATE_FAILED: string;
|
|
7
|
+
};
|
|
8
|
+
type ZHType = typeof zh;
|
|
9
|
+
declare module "../../../error/messages" {
|
|
10
|
+
interface ErrorMessageRegistry extends ZHType {
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { TransactionTx } from "../../db/transaction";
|
|
2
|
+
import { marketPricingStrategy } from "../schema";
|
|
3
|
+
export declare abstract class BaseMarketPricingService {
|
|
4
|
+
protected static normalizeMinuteBucket(date: Date): Date;
|
|
5
|
+
protected static calcNextPrice(basePrice: string, maxStepBps: string, driftBps: string, minPrice: string | null, maxPrice: string | null): string;
|
|
6
|
+
protected static ensureStrategyAssets(tx: TransactionTx, strategy: typeof marketPricingStrategy.$inferSelect): Promise<{
|
|
7
|
+
baseAssetEntity: {
|
|
8
|
+
id: string;
|
|
9
|
+
code: string;
|
|
10
|
+
};
|
|
11
|
+
quoteAssetEntity: {
|
|
12
|
+
id: string;
|
|
13
|
+
code: string;
|
|
14
|
+
};
|
|
15
|
+
}>;
|
|
16
|
+
protected static upsertStateOnSuccess(tx: TransactionTx, strategyId: string, lastRunAt: Date, lastPrice: string): Promise<void>;
|
|
17
|
+
protected static upsertStateOnFailure(tx: TransactionTx, strategyId: string, errorMessage: string): Promise<void>;
|
|
18
|
+
}
|
|
19
|
+
export declare abstract class InternalMarketPricingService extends BaseMarketPricingService {
|
|
20
|
+
static runStrategyTick(strategy: typeof marketPricingStrategy.$inferSelect, runAt?: Date): Promise<{
|
|
21
|
+
strategyId: string;
|
|
22
|
+
price: string;
|
|
23
|
+
effectiveAt: Date;
|
|
24
|
+
created: false;
|
|
25
|
+
} | {
|
|
26
|
+
strategyId: string;
|
|
27
|
+
price: string;
|
|
28
|
+
effectiveAt: Date;
|
|
29
|
+
created: true;
|
|
30
|
+
}>;
|
|
31
|
+
static runEnabledStrategies(runAt?: Date): Promise<{
|
|
32
|
+
successCount: number;
|
|
33
|
+
failedStrategyIds: string[];
|
|
34
|
+
}>;
|
|
35
|
+
}
|
|
@@ -0,0 +1,434 @@
|
|
|
1
|
+
/** 报价策略类型 */
|
|
2
|
+
export declare const marketPricingStrategyTypeEnum: import("drizzle-orm/pg-core").PgEnum<["random_walk"]>;
|
|
3
|
+
/** 报价策略 */
|
|
4
|
+
export declare const marketPricingStrategy: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
5
|
+
name: "market_pricing_strategy";
|
|
6
|
+
schema: undefined;
|
|
7
|
+
columns: {
|
|
8
|
+
createdAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
9
|
+
name: "created_at";
|
|
10
|
+
tableName: "market_pricing_strategy";
|
|
11
|
+
dataType: "date";
|
|
12
|
+
columnType: "PgTimestamp";
|
|
13
|
+
data: Date;
|
|
14
|
+
driverParam: string;
|
|
15
|
+
notNull: true;
|
|
16
|
+
hasDefault: true;
|
|
17
|
+
isPrimaryKey: false;
|
|
18
|
+
isAutoincrement: false;
|
|
19
|
+
hasRuntimeDefault: false;
|
|
20
|
+
enumValues: undefined;
|
|
21
|
+
baseColumn: never;
|
|
22
|
+
identity: undefined;
|
|
23
|
+
generated: undefined;
|
|
24
|
+
}, {}, {}>;
|
|
25
|
+
updatedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
26
|
+
name: "updated_at";
|
|
27
|
+
tableName: "market_pricing_strategy";
|
|
28
|
+
dataType: "date";
|
|
29
|
+
columnType: "PgTimestamp";
|
|
30
|
+
data: Date;
|
|
31
|
+
driverParam: string;
|
|
32
|
+
notNull: true;
|
|
33
|
+
hasDefault: true;
|
|
34
|
+
isPrimaryKey: false;
|
|
35
|
+
isAutoincrement: false;
|
|
36
|
+
hasRuntimeDefault: false;
|
|
37
|
+
enumValues: undefined;
|
|
38
|
+
baseColumn: never;
|
|
39
|
+
identity: undefined;
|
|
40
|
+
generated: undefined;
|
|
41
|
+
}, {}, {}>;
|
|
42
|
+
id: import("drizzle-orm/pg-core").PgColumn<{
|
|
43
|
+
name: "id";
|
|
44
|
+
tableName: "market_pricing_strategy";
|
|
45
|
+
dataType: "string";
|
|
46
|
+
columnType: "PgUUID";
|
|
47
|
+
data: string;
|
|
48
|
+
driverParam: string;
|
|
49
|
+
notNull: true;
|
|
50
|
+
hasDefault: true;
|
|
51
|
+
isPrimaryKey: true;
|
|
52
|
+
isAutoincrement: false;
|
|
53
|
+
hasRuntimeDefault: false;
|
|
54
|
+
enumValues: undefined;
|
|
55
|
+
baseColumn: never;
|
|
56
|
+
identity: undefined;
|
|
57
|
+
generated: undefined;
|
|
58
|
+
}, {}, {}>;
|
|
59
|
+
name: import("drizzle-orm/pg-core").PgColumn<{
|
|
60
|
+
name: "name";
|
|
61
|
+
tableName: "market_pricing_strategy";
|
|
62
|
+
dataType: "string";
|
|
63
|
+
columnType: "PgText";
|
|
64
|
+
data: string;
|
|
65
|
+
driverParam: string;
|
|
66
|
+
notNull: true;
|
|
67
|
+
hasDefault: false;
|
|
68
|
+
isPrimaryKey: false;
|
|
69
|
+
isAutoincrement: false;
|
|
70
|
+
hasRuntimeDefault: false;
|
|
71
|
+
enumValues: [string, ...string[]];
|
|
72
|
+
baseColumn: never;
|
|
73
|
+
identity: undefined;
|
|
74
|
+
generated: undefined;
|
|
75
|
+
}, {}, {}>;
|
|
76
|
+
baseAssetId: import("drizzle-orm/pg-core").PgColumn<{
|
|
77
|
+
name: "base_asset_id";
|
|
78
|
+
tableName: "market_pricing_strategy";
|
|
79
|
+
dataType: "string";
|
|
80
|
+
columnType: "PgUUID";
|
|
81
|
+
data: string;
|
|
82
|
+
driverParam: string;
|
|
83
|
+
notNull: true;
|
|
84
|
+
hasDefault: false;
|
|
85
|
+
isPrimaryKey: false;
|
|
86
|
+
isAutoincrement: false;
|
|
87
|
+
hasRuntimeDefault: false;
|
|
88
|
+
enumValues: undefined;
|
|
89
|
+
baseColumn: never;
|
|
90
|
+
identity: undefined;
|
|
91
|
+
generated: undefined;
|
|
92
|
+
}, {}, {}>;
|
|
93
|
+
quoteAssetId: import("drizzle-orm/pg-core").PgColumn<{
|
|
94
|
+
name: "quote_asset_id";
|
|
95
|
+
tableName: "market_pricing_strategy";
|
|
96
|
+
dataType: "string";
|
|
97
|
+
columnType: "PgUUID";
|
|
98
|
+
data: string;
|
|
99
|
+
driverParam: string;
|
|
100
|
+
notNull: true;
|
|
101
|
+
hasDefault: false;
|
|
102
|
+
isPrimaryKey: false;
|
|
103
|
+
isAutoincrement: false;
|
|
104
|
+
hasRuntimeDefault: false;
|
|
105
|
+
enumValues: undefined;
|
|
106
|
+
baseColumn: never;
|
|
107
|
+
identity: undefined;
|
|
108
|
+
generated: undefined;
|
|
109
|
+
}, {}, {}>;
|
|
110
|
+
strategyType: import("drizzle-orm/pg-core").PgColumn<{
|
|
111
|
+
name: "strategy_type";
|
|
112
|
+
tableName: "market_pricing_strategy";
|
|
113
|
+
dataType: "string";
|
|
114
|
+
columnType: "PgEnumColumn";
|
|
115
|
+
data: "random_walk";
|
|
116
|
+
driverParam: string;
|
|
117
|
+
notNull: true;
|
|
118
|
+
hasDefault: true;
|
|
119
|
+
isPrimaryKey: false;
|
|
120
|
+
isAutoincrement: false;
|
|
121
|
+
hasRuntimeDefault: false;
|
|
122
|
+
enumValues: ["random_walk"];
|
|
123
|
+
baseColumn: never;
|
|
124
|
+
identity: undefined;
|
|
125
|
+
generated: undefined;
|
|
126
|
+
}, {}, {}>;
|
|
127
|
+
driftBps: import("drizzle-orm/pg-core").PgColumn<{
|
|
128
|
+
name: "drift_bps";
|
|
129
|
+
tableName: "market_pricing_strategy";
|
|
130
|
+
dataType: "string";
|
|
131
|
+
columnType: "PgNumeric";
|
|
132
|
+
data: string;
|
|
133
|
+
driverParam: string;
|
|
134
|
+
notNull: true;
|
|
135
|
+
hasDefault: true;
|
|
136
|
+
isPrimaryKey: false;
|
|
137
|
+
isAutoincrement: false;
|
|
138
|
+
hasRuntimeDefault: false;
|
|
139
|
+
enumValues: undefined;
|
|
140
|
+
baseColumn: never;
|
|
141
|
+
identity: undefined;
|
|
142
|
+
generated: undefined;
|
|
143
|
+
}, {}, {}>;
|
|
144
|
+
minPrice: import("drizzle-orm/pg-core").PgColumn<{
|
|
145
|
+
name: "min_price";
|
|
146
|
+
tableName: "market_pricing_strategy";
|
|
147
|
+
dataType: "string";
|
|
148
|
+
columnType: "PgNumeric";
|
|
149
|
+
data: string;
|
|
150
|
+
driverParam: string;
|
|
151
|
+
notNull: false;
|
|
152
|
+
hasDefault: false;
|
|
153
|
+
isPrimaryKey: false;
|
|
154
|
+
isAutoincrement: false;
|
|
155
|
+
hasRuntimeDefault: false;
|
|
156
|
+
enumValues: undefined;
|
|
157
|
+
baseColumn: never;
|
|
158
|
+
identity: undefined;
|
|
159
|
+
generated: undefined;
|
|
160
|
+
}, {}, {}>;
|
|
161
|
+
maxPrice: import("drizzle-orm/pg-core").PgColumn<{
|
|
162
|
+
name: "max_price";
|
|
163
|
+
tableName: "market_pricing_strategy";
|
|
164
|
+
dataType: "string";
|
|
165
|
+
columnType: "PgNumeric";
|
|
166
|
+
data: string;
|
|
167
|
+
driverParam: string;
|
|
168
|
+
notNull: false;
|
|
169
|
+
hasDefault: false;
|
|
170
|
+
isPrimaryKey: false;
|
|
171
|
+
isAutoincrement: false;
|
|
172
|
+
hasRuntimeDefault: false;
|
|
173
|
+
enumValues: undefined;
|
|
174
|
+
baseColumn: never;
|
|
175
|
+
identity: undefined;
|
|
176
|
+
generated: undefined;
|
|
177
|
+
}, {}, {}>;
|
|
178
|
+
source: import("drizzle-orm/pg-core").PgColumn<{
|
|
179
|
+
name: "source";
|
|
180
|
+
tableName: "market_pricing_strategy";
|
|
181
|
+
dataType: "string";
|
|
182
|
+
columnType: "PgText";
|
|
183
|
+
data: string;
|
|
184
|
+
driverParam: string;
|
|
185
|
+
notNull: true;
|
|
186
|
+
hasDefault: true;
|
|
187
|
+
isPrimaryKey: false;
|
|
188
|
+
isAutoincrement: false;
|
|
189
|
+
hasRuntimeDefault: false;
|
|
190
|
+
enumValues: [string, ...string[]];
|
|
191
|
+
baseColumn: never;
|
|
192
|
+
identity: undefined;
|
|
193
|
+
generated: undefined;
|
|
194
|
+
}, {}, {}>;
|
|
195
|
+
intervalSeconds: import("drizzle-orm/pg-core").PgColumn<{
|
|
196
|
+
name: "interval_seconds";
|
|
197
|
+
tableName: "market_pricing_strategy";
|
|
198
|
+
dataType: "number";
|
|
199
|
+
columnType: "PgInteger";
|
|
200
|
+
data: number;
|
|
201
|
+
driverParam: string | number;
|
|
202
|
+
notNull: true;
|
|
203
|
+
hasDefault: true;
|
|
204
|
+
isPrimaryKey: false;
|
|
205
|
+
isAutoincrement: false;
|
|
206
|
+
hasRuntimeDefault: false;
|
|
207
|
+
enumValues: undefined;
|
|
208
|
+
baseColumn: never;
|
|
209
|
+
identity: undefined;
|
|
210
|
+
generated: undefined;
|
|
211
|
+
}, {}, {}>;
|
|
212
|
+
maxStepBps: import("drizzle-orm/pg-core").PgColumn<{
|
|
213
|
+
name: "max_step_bps";
|
|
214
|
+
tableName: "market_pricing_strategy";
|
|
215
|
+
dataType: "string";
|
|
216
|
+
columnType: "PgNumeric";
|
|
217
|
+
data: string;
|
|
218
|
+
driverParam: string;
|
|
219
|
+
notNull: true;
|
|
220
|
+
hasDefault: true;
|
|
221
|
+
isPrimaryKey: false;
|
|
222
|
+
isAutoincrement: false;
|
|
223
|
+
hasRuntimeDefault: false;
|
|
224
|
+
enumValues: undefined;
|
|
225
|
+
baseColumn: never;
|
|
226
|
+
identity: undefined;
|
|
227
|
+
generated: undefined;
|
|
228
|
+
}, {}, {}>;
|
|
229
|
+
fallbackPrice: import("drizzle-orm/pg-core").PgColumn<{
|
|
230
|
+
name: "fallback_price";
|
|
231
|
+
tableName: "market_pricing_strategy";
|
|
232
|
+
dataType: "string";
|
|
233
|
+
columnType: "PgNumeric";
|
|
234
|
+
data: string;
|
|
235
|
+
driverParam: string;
|
|
236
|
+
notNull: true;
|
|
237
|
+
hasDefault: true;
|
|
238
|
+
isPrimaryKey: false;
|
|
239
|
+
isAutoincrement: false;
|
|
240
|
+
hasRuntimeDefault: false;
|
|
241
|
+
enumValues: undefined;
|
|
242
|
+
baseColumn: never;
|
|
243
|
+
identity: undefined;
|
|
244
|
+
generated: undefined;
|
|
245
|
+
}, {}, {}>;
|
|
246
|
+
isEnabled: import("drizzle-orm/pg-core").PgColumn<{
|
|
247
|
+
name: "is_enabled";
|
|
248
|
+
tableName: "market_pricing_strategy";
|
|
249
|
+
dataType: "boolean";
|
|
250
|
+
columnType: "PgBoolean";
|
|
251
|
+
data: boolean;
|
|
252
|
+
driverParam: boolean;
|
|
253
|
+
notNull: true;
|
|
254
|
+
hasDefault: true;
|
|
255
|
+
isPrimaryKey: false;
|
|
256
|
+
isAutoincrement: false;
|
|
257
|
+
hasRuntimeDefault: false;
|
|
258
|
+
enumValues: undefined;
|
|
259
|
+
baseColumn: never;
|
|
260
|
+
identity: undefined;
|
|
261
|
+
generated: undefined;
|
|
262
|
+
}, {}, {}>;
|
|
263
|
+
};
|
|
264
|
+
dialect: "pg";
|
|
265
|
+
}>;
|
|
266
|
+
/** 报价策略运行状态 */
|
|
267
|
+
export declare const marketPricingStrategyState: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
268
|
+
name: "market_pricing_strategy_state";
|
|
269
|
+
schema: undefined;
|
|
270
|
+
columns: {
|
|
271
|
+
createdAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
272
|
+
name: "created_at";
|
|
273
|
+
tableName: "market_pricing_strategy_state";
|
|
274
|
+
dataType: "date";
|
|
275
|
+
columnType: "PgTimestamp";
|
|
276
|
+
data: Date;
|
|
277
|
+
driverParam: string;
|
|
278
|
+
notNull: true;
|
|
279
|
+
hasDefault: true;
|
|
280
|
+
isPrimaryKey: false;
|
|
281
|
+
isAutoincrement: false;
|
|
282
|
+
hasRuntimeDefault: false;
|
|
283
|
+
enumValues: undefined;
|
|
284
|
+
baseColumn: never;
|
|
285
|
+
identity: undefined;
|
|
286
|
+
generated: undefined;
|
|
287
|
+
}, {}, {}>;
|
|
288
|
+
updatedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
289
|
+
name: "updated_at";
|
|
290
|
+
tableName: "market_pricing_strategy_state";
|
|
291
|
+
dataType: "date";
|
|
292
|
+
columnType: "PgTimestamp";
|
|
293
|
+
data: Date;
|
|
294
|
+
driverParam: string;
|
|
295
|
+
notNull: true;
|
|
296
|
+
hasDefault: true;
|
|
297
|
+
isPrimaryKey: false;
|
|
298
|
+
isAutoincrement: false;
|
|
299
|
+
hasRuntimeDefault: false;
|
|
300
|
+
enumValues: undefined;
|
|
301
|
+
baseColumn: never;
|
|
302
|
+
identity: undefined;
|
|
303
|
+
generated: undefined;
|
|
304
|
+
}, {}, {}>;
|
|
305
|
+
id: import("drizzle-orm/pg-core").PgColumn<{
|
|
306
|
+
name: "id";
|
|
307
|
+
tableName: "market_pricing_strategy_state";
|
|
308
|
+
dataType: "string";
|
|
309
|
+
columnType: "PgUUID";
|
|
310
|
+
data: string;
|
|
311
|
+
driverParam: string;
|
|
312
|
+
notNull: true;
|
|
313
|
+
hasDefault: true;
|
|
314
|
+
isPrimaryKey: true;
|
|
315
|
+
isAutoincrement: false;
|
|
316
|
+
hasRuntimeDefault: false;
|
|
317
|
+
enumValues: undefined;
|
|
318
|
+
baseColumn: never;
|
|
319
|
+
identity: undefined;
|
|
320
|
+
generated: undefined;
|
|
321
|
+
}, {}, {}>;
|
|
322
|
+
strategyId: import("drizzle-orm/pg-core").PgColumn<{
|
|
323
|
+
name: "strategy_id";
|
|
324
|
+
tableName: "market_pricing_strategy_state";
|
|
325
|
+
dataType: "string";
|
|
326
|
+
columnType: "PgUUID";
|
|
327
|
+
data: string;
|
|
328
|
+
driverParam: string;
|
|
329
|
+
notNull: true;
|
|
330
|
+
hasDefault: false;
|
|
331
|
+
isPrimaryKey: false;
|
|
332
|
+
isAutoincrement: false;
|
|
333
|
+
hasRuntimeDefault: false;
|
|
334
|
+
enumValues: undefined;
|
|
335
|
+
baseColumn: never;
|
|
336
|
+
identity: undefined;
|
|
337
|
+
generated: undefined;
|
|
338
|
+
}, {}, {}>;
|
|
339
|
+
lastRunAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
340
|
+
name: "last_run_at";
|
|
341
|
+
tableName: "market_pricing_strategy_state";
|
|
342
|
+
dataType: "date";
|
|
343
|
+
columnType: "PgTimestamp";
|
|
344
|
+
data: Date;
|
|
345
|
+
driverParam: string;
|
|
346
|
+
notNull: false;
|
|
347
|
+
hasDefault: false;
|
|
348
|
+
isPrimaryKey: false;
|
|
349
|
+
isAutoincrement: false;
|
|
350
|
+
hasRuntimeDefault: false;
|
|
351
|
+
enumValues: undefined;
|
|
352
|
+
baseColumn: never;
|
|
353
|
+
identity: undefined;
|
|
354
|
+
generated: undefined;
|
|
355
|
+
}, {}, {}>;
|
|
356
|
+
lastPrice: import("drizzle-orm/pg-core").PgColumn<{
|
|
357
|
+
name: "last_price";
|
|
358
|
+
tableName: "market_pricing_strategy_state";
|
|
359
|
+
dataType: "string";
|
|
360
|
+
columnType: "PgNumeric";
|
|
361
|
+
data: string;
|
|
362
|
+
driverParam: string;
|
|
363
|
+
notNull: false;
|
|
364
|
+
hasDefault: false;
|
|
365
|
+
isPrimaryKey: false;
|
|
366
|
+
isAutoincrement: false;
|
|
367
|
+
hasRuntimeDefault: false;
|
|
368
|
+
enumValues: undefined;
|
|
369
|
+
baseColumn: never;
|
|
370
|
+
identity: undefined;
|
|
371
|
+
generated: undefined;
|
|
372
|
+
}, {}, {}>;
|
|
373
|
+
consecutiveFailures: import("drizzle-orm/pg-core").PgColumn<{
|
|
374
|
+
name: "consecutive_failures";
|
|
375
|
+
tableName: "market_pricing_strategy_state";
|
|
376
|
+
dataType: "number";
|
|
377
|
+
columnType: "PgInteger";
|
|
378
|
+
data: number;
|
|
379
|
+
driverParam: string | number;
|
|
380
|
+
notNull: true;
|
|
381
|
+
hasDefault: true;
|
|
382
|
+
isPrimaryKey: false;
|
|
383
|
+
isAutoincrement: false;
|
|
384
|
+
hasRuntimeDefault: false;
|
|
385
|
+
enumValues: undefined;
|
|
386
|
+
baseColumn: never;
|
|
387
|
+
identity: undefined;
|
|
388
|
+
generated: undefined;
|
|
389
|
+
}, {}, {}>;
|
|
390
|
+
isCircuitOpen: import("drizzle-orm/pg-core").PgColumn<{
|
|
391
|
+
name: "is_circuit_open";
|
|
392
|
+
tableName: "market_pricing_strategy_state";
|
|
393
|
+
dataType: "boolean";
|
|
394
|
+
columnType: "PgBoolean";
|
|
395
|
+
data: boolean;
|
|
396
|
+
driverParam: boolean;
|
|
397
|
+
notNull: true;
|
|
398
|
+
hasDefault: true;
|
|
399
|
+
isPrimaryKey: false;
|
|
400
|
+
isAutoincrement: false;
|
|
401
|
+
hasRuntimeDefault: false;
|
|
402
|
+
enumValues: undefined;
|
|
403
|
+
baseColumn: never;
|
|
404
|
+
identity: undefined;
|
|
405
|
+
generated: undefined;
|
|
406
|
+
}, {}, {}>;
|
|
407
|
+
lastError: import("drizzle-orm/pg-core").PgColumn<{
|
|
408
|
+
name: "last_error";
|
|
409
|
+
tableName: "market_pricing_strategy_state";
|
|
410
|
+
dataType: "string";
|
|
411
|
+
columnType: "PgText";
|
|
412
|
+
data: string;
|
|
413
|
+
driverParam: string;
|
|
414
|
+
notNull: false;
|
|
415
|
+
hasDefault: false;
|
|
416
|
+
isPrimaryKey: false;
|
|
417
|
+
isAutoincrement: false;
|
|
418
|
+
hasRuntimeDefault: false;
|
|
419
|
+
enumValues: [string, ...string[]];
|
|
420
|
+
baseColumn: never;
|
|
421
|
+
identity: undefined;
|
|
422
|
+
generated: undefined;
|
|
423
|
+
}, {}, {}>;
|
|
424
|
+
};
|
|
425
|
+
dialect: "pg";
|
|
426
|
+
}>;
|
|
427
|
+
export declare const marketPricingStrategyRelations: import("drizzle-orm").Relations<"market_pricing_strategy", {
|
|
428
|
+
baseAsset: import("drizzle-orm").One<"asset", true>;
|
|
429
|
+
quoteAsset: import("drizzle-orm").One<"asset", true>;
|
|
430
|
+
states: import("drizzle-orm").Many<"market_pricing_strategy_state">;
|
|
431
|
+
}>;
|
|
432
|
+
export declare const marketPricingStrategyStateRelations: import("drizzle-orm").Relations<"market_pricing_strategy_state", {
|
|
433
|
+
strategy: import("drizzle-orm").One<"market_pricing_strategy", true>;
|
|
434
|
+
}>;
|
|
@@ -30,14 +30,14 @@ export declare const newsListItemModel: import("@sinclair/typebox").TObject<{
|
|
|
30
30
|
createdAt: import("@sinclair/typebox").TDate;
|
|
31
31
|
updatedAt: import("@sinclair/typebox").TDate;
|
|
32
32
|
id: import("@sinclair/typebox").TString;
|
|
33
|
-
sortOrder: import("@sinclair/typebox").TInteger;
|
|
34
|
-
expiresAt: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TDate, import("@sinclair/typebox").TNull]>;
|
|
35
|
-
scope: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
36
33
|
status: import("@sinclair/typebox").TEnum<{
|
|
37
34
|
archived: "archived";
|
|
38
35
|
draft: "draft";
|
|
39
36
|
published: "published";
|
|
40
37
|
}>;
|
|
38
|
+
sortOrder: import("@sinclair/typebox").TInteger;
|
|
39
|
+
expiresAt: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TDate, import("@sinclair/typebox").TNull]>;
|
|
40
|
+
scope: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
41
41
|
createdBy: import("@sinclair/typebox").TString;
|
|
42
42
|
title: import("@sinclair/typebox").TString;
|
|
43
43
|
content: import("@sinclair/typebox").TString;
|
|
@@ -62,14 +62,14 @@ export declare const newsListResponse: import("@sinclair/typebox").TObject<{
|
|
|
62
62
|
createdAt: import("@sinclair/typebox").TDate;
|
|
63
63
|
updatedAt: import("@sinclair/typebox").TDate;
|
|
64
64
|
id: import("@sinclair/typebox").TString;
|
|
65
|
-
sortOrder: import("@sinclair/typebox").TInteger;
|
|
66
|
-
expiresAt: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TDate, import("@sinclair/typebox").TNull]>;
|
|
67
|
-
scope: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
68
65
|
status: import("@sinclair/typebox").TEnum<{
|
|
69
66
|
archived: "archived";
|
|
70
67
|
draft: "draft";
|
|
71
68
|
published: "published";
|
|
72
69
|
}>;
|
|
70
|
+
sortOrder: import("@sinclair/typebox").TInteger;
|
|
71
|
+
expiresAt: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TDate, import("@sinclair/typebox").TNull]>;
|
|
72
|
+
scope: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
73
73
|
createdBy: import("@sinclair/typebox").TString;
|
|
74
74
|
title: import("@sinclair/typebox").TString;
|
|
75
75
|
content: import("@sinclair/typebox").TString;
|
|
@@ -30,14 +30,14 @@ export declare const newsListItemModel: import("@sinclair/typebox").TObject<{
|
|
|
30
30
|
createdAt: import("@sinclair/typebox").TDate;
|
|
31
31
|
updatedAt: import("@sinclair/typebox").TDate;
|
|
32
32
|
id: import("@sinclair/typebox").TString;
|
|
33
|
-
sortOrder: import("@sinclair/typebox").TInteger;
|
|
34
|
-
expiresAt: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TDate, import("@sinclair/typebox").TNull]>;
|
|
35
|
-
scope: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
36
33
|
status: import("@sinclair/typebox").TEnum<{
|
|
37
34
|
archived: "archived";
|
|
38
35
|
draft: "draft";
|
|
39
36
|
published: "published";
|
|
40
37
|
}>;
|
|
38
|
+
sortOrder: import("@sinclair/typebox").TInteger;
|
|
39
|
+
expiresAt: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TDate, import("@sinclair/typebox").TNull]>;
|
|
40
|
+
scope: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
41
41
|
createdBy: import("@sinclair/typebox").TString;
|
|
42
42
|
title: import("@sinclair/typebox").TString;
|
|
43
43
|
content: import("@sinclair/typebox").TString;
|
|
@@ -62,14 +62,14 @@ export declare const newsListResponse: import("@sinclair/typebox").TObject<{
|
|
|
62
62
|
createdAt: import("@sinclair/typebox").TDate;
|
|
63
63
|
updatedAt: import("@sinclair/typebox").TDate;
|
|
64
64
|
id: import("@sinclair/typebox").TString;
|
|
65
|
-
sortOrder: import("@sinclair/typebox").TInteger;
|
|
66
|
-
expiresAt: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TDate, import("@sinclair/typebox").TNull]>;
|
|
67
|
-
scope: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
68
65
|
status: import("@sinclair/typebox").TEnum<{
|
|
69
66
|
archived: "archived";
|
|
70
67
|
draft: "draft";
|
|
71
68
|
published: "published";
|
|
72
69
|
}>;
|
|
70
|
+
sortOrder: import("@sinclair/typebox").TInteger;
|
|
71
|
+
expiresAt: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TDate, import("@sinclair/typebox").TNull]>;
|
|
72
|
+
scope: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
73
73
|
createdBy: import("@sinclair/typebox").TString;
|
|
74
74
|
title: import("@sinclair/typebox").TString;
|
|
75
75
|
content: import("@sinclair/typebox").TString;
|
|
@@ -115,14 +115,14 @@ export declare const newsDetailResponse: import("@sinclair/typebox").TObject<{
|
|
|
115
115
|
createdAt: import("@sinclair/typebox").TDate;
|
|
116
116
|
updatedAt: import("@sinclair/typebox").TDate;
|
|
117
117
|
id: import("@sinclair/typebox").TString;
|
|
118
|
-
sortOrder: import("@sinclair/typebox").TInteger;
|
|
119
|
-
expiresAt: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TDate, import("@sinclair/typebox").TNull]>;
|
|
120
|
-
scope: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
121
118
|
status: import("@sinclair/typebox").TEnum<{
|
|
122
119
|
archived: "archived";
|
|
123
120
|
draft: "draft";
|
|
124
121
|
published: "published";
|
|
125
122
|
}>;
|
|
123
|
+
sortOrder: import("@sinclair/typebox").TInteger;
|
|
124
|
+
expiresAt: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TDate, import("@sinclair/typebox").TNull]>;
|
|
125
|
+
scope: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
126
126
|
createdBy: import("@sinclair/typebox").TString;
|
|
127
127
|
title: import("@sinclair/typebox").TString;
|
|
128
128
|
content: import("@sinclair/typebox").TString;
|
|
@@ -151,14 +151,14 @@ export declare const pendingConfirmationsResponse: import("@sinclair/typebox").T
|
|
|
151
151
|
createdAt: import("@sinclair/typebox").TDate;
|
|
152
152
|
updatedAt: import("@sinclair/typebox").TDate;
|
|
153
153
|
id: import("@sinclair/typebox").TString;
|
|
154
|
-
sortOrder: import("@sinclair/typebox").TInteger;
|
|
155
|
-
expiresAt: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TDate, import("@sinclair/typebox").TNull]>;
|
|
156
|
-
scope: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
157
154
|
status: import("@sinclair/typebox").TEnum<{
|
|
158
155
|
archived: "archived";
|
|
159
156
|
draft: "draft";
|
|
160
157
|
published: "published";
|
|
161
158
|
}>;
|
|
159
|
+
sortOrder: import("@sinclair/typebox").TInteger;
|
|
160
|
+
expiresAt: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TDate, import("@sinclair/typebox").TNull]>;
|
|
161
|
+
scope: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
162
162
|
createdBy: import("@sinclair/typebox").TString;
|
|
163
163
|
title: import("@sinclair/typebox").TString;
|
|
164
164
|
content: import("@sinclair/typebox").TString;
|
|
@@ -2,13 +2,13 @@ export declare const notificationResponseSchema: import("@sinclair/typebox").TOb
|
|
|
2
2
|
createdAt: import("@sinclair/typebox").TDate;
|
|
3
3
|
updatedAt: import("@sinclair/typebox").TDate;
|
|
4
4
|
id: import("@sinclair/typebox").TString;
|
|
5
|
-
userId: import("@sinclair/typebox").TString;
|
|
6
5
|
status: import("@sinclair/typebox").TEnum<{
|
|
7
6
|
archived: "archived";
|
|
8
7
|
unread: "unread";
|
|
9
8
|
read: "read";
|
|
10
9
|
deleted: "deleted";
|
|
11
10
|
}>;
|
|
11
|
+
userId: import("@sinclair/typebox").TString;
|
|
12
12
|
archivedAt: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TDate, import("@sinclair/typebox").TNull]>;
|
|
13
13
|
readAt: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TDate, import("@sinclair/typebox").TNull]>;
|
|
14
14
|
notificationId: import("@sinclair/typebox").TString;
|
|
@@ -191,13 +191,13 @@ export declare const notificationListResponseSchema: import("@sinclair/typebox")
|
|
|
191
191
|
createdAt: import("@sinclair/typebox").TDate;
|
|
192
192
|
updatedAt: import("@sinclair/typebox").TDate;
|
|
193
193
|
id: import("@sinclair/typebox").TString;
|
|
194
|
-
userId: import("@sinclair/typebox").TString;
|
|
195
194
|
status: import("@sinclair/typebox").TEnum<{
|
|
196
195
|
archived: "archived";
|
|
197
196
|
unread: "unread";
|
|
198
197
|
read: "read";
|
|
199
198
|
deleted: "deleted";
|
|
200
199
|
}>;
|
|
200
|
+
userId: import("@sinclair/typebox").TString;
|
|
201
201
|
archivedAt: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TDate, import("@sinclair/typebox").TNull]>;
|
|
202
202
|
readAt: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TDate, import("@sinclair/typebox").TNull]>;
|
|
203
203
|
notificationId: import("@sinclair/typebox").TString;
|
|
@@ -404,18 +404,18 @@ export declare const notificationCreateSchema: import("@sinclair/typebox").TObje
|
|
|
404
404
|
}>;
|
|
405
405
|
export type NotificationCreateInputType = typeof notificationCreateSchema.static;
|
|
406
406
|
export declare const notificationListQuerySchema: import("@sinclair/typebox").TObject<{
|
|
407
|
-
type: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TEnum<{
|
|
408
|
-
system: "system";
|
|
409
|
-
transaction: "transaction";
|
|
410
|
-
activity: "activity";
|
|
411
|
-
security: "security";
|
|
412
|
-
}>>;
|
|
413
407
|
status: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TEnum<{
|
|
414
408
|
archived: "archived";
|
|
415
409
|
unread: "unread";
|
|
416
410
|
read: "read";
|
|
417
411
|
deleted: "deleted";
|
|
418
412
|
}>>;
|
|
413
|
+
type: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TEnum<{
|
|
414
|
+
system: "system";
|
|
415
|
+
transaction: "transaction";
|
|
416
|
+
activity: "activity";
|
|
417
|
+
security: "security";
|
|
418
|
+
}>>;
|
|
419
419
|
limit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
420
420
|
offset: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
421
421
|
pageSize: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|