@r2wa-org/eden 0.0.57 → 0.0.60

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.
Files changed (62) hide show
  1. package/dist/src/admin/admin/dto.schemas.d.ts +8 -0
  2. package/dist/src/admin/admin/errors/index.d.ts +1 -0
  3. package/dist/src/admin/admin/errors/locales/zh.d.ts +1 -0
  4. package/dist/src/admin/admin/router.d.ts +31 -0
  5. package/dist/src/admin/admin/service.d.ts +3 -0
  6. package/dist/src/admin/index.d.ts +158 -34
  7. package/dist/src/asset/user/dto.schemas.d.ts +9 -83
  8. package/dist/src/asset/user/router.d.ts +60 -66
  9. package/dist/src/asset/user/service.d.ts +41 -41
  10. package/dist/src/asset-convert-product/admin/dto.schemas.d.ts +44 -12
  11. package/dist/src/asset-convert-product/admin/router.d.ts +83 -23
  12. package/dist/src/asset-convert-product/admin/service.d.ts +73 -17
  13. package/dist/src/asset-convert-product/db.schemas.d.ts +76 -8
  14. package/dist/src/asset-convert-product/errors/index.d.ts +4 -0
  15. package/dist/src/asset-convert-product/errors/locales/zh.d.ts +4 -0
  16. package/dist/src/asset-convert-product/internal/service.d.ts +4 -3
  17. package/dist/src/asset-convert-product/schema.d.ts +41 -6
  18. package/dist/src/asset-convert-product/user/dto.schemas.d.ts +264 -14
  19. package/dist/src/asset-convert-product/user/router.d.ts +10 -8
  20. package/dist/src/asset-convert-product/user/service.d.ts +9 -5
  21. package/dist/src/asset-price/errors/index.d.ts +1 -0
  22. package/dist/src/asset-price/errors/locales/zh.d.ts +1 -0
  23. package/dist/src/asset-price/user/dto.schemas.d.ts +7 -3
  24. package/dist/src/asset-price/user/router.d.ts +43 -2
  25. package/dist/src/asset-price/user/service.d.ts +13 -1
  26. package/dist/src/index.d.ts +701 -291
  27. package/dist/src/ledger-account/admin/router.d.ts +1 -1
  28. package/dist/src/ledger-account/user/dto.schemas.d.ts +44 -193
  29. package/dist/src/ledger-account/user/router.d.ts +104 -42
  30. package/dist/src/ledger-account/user/service.d.ts +90 -40
  31. package/dist/src/ledger-account-import/admin/dto.schemas.d.ts +6 -6
  32. package/dist/src/ledger-account-import/admin/router.d.ts +9 -9
  33. package/dist/src/ledger-account-import/admin/service.d.ts +7 -7
  34. package/dist/src/ledger-account-import/db.schemas.d.ts +4 -4
  35. package/dist/src/ledger-account-import/schema.d.ts +2 -2
  36. package/dist/src/ledger-account-type/user/router.d.ts +48 -0
  37. package/dist/src/ledger-account-type/user/service.d.ts +25 -0
  38. package/dist/src/portfolio/index.d.ts +2 -0
  39. package/dist/src/portfolio/internal/index.d.ts +1 -0
  40. package/dist/src/portfolio/internal/service.d.ts +5 -0
  41. package/dist/src/portfolio/user/dto.schemas.d.ts +352 -0
  42. package/dist/src/portfolio/user/index.d.ts +3 -0
  43. package/dist/src/portfolio/user/router.d.ts +659 -0
  44. package/dist/src/portfolio/user/service.d.ts +143 -0
  45. package/dist/src/wallet/user/dto.schemas.d.ts +4 -66
  46. package/dist/src/wallet/user/router.d.ts +1 -62
  47. package/dist/src/wallet/user/service.d.ts +3 -39
  48. package/dist/src/welfare-cycle/admin/dto.schemas.d.ts +95 -2
  49. package/dist/src/welfare-cycle/admin/router.d.ts +34 -1
  50. package/dist/src/welfare-cycle/admin/service.d.ts +26 -1
  51. package/dist/src/welfare-cycle/db.schemas.d.ts +174 -4
  52. package/dist/src/welfare-cycle/errors/index.d.ts +6 -0
  53. package/dist/src/welfare-cycle/errors/locales/zh.d.ts +6 -0
  54. package/dist/src/welfare-cycle/internal/service.d.ts +41 -3
  55. package/dist/src/welfare-cycle/schema.d.ts +92 -3
  56. package/dist/src/welfare-cycle/user/dto.schemas.d.ts +106 -6
  57. package/dist/src/welfare-cycle/user/router.d.ts +14 -5
  58. package/dist/src/welfare-cycle/user/service.d.ts +14 -3
  59. package/dist/src/withdraw/user/dto.schemas.d.ts +599 -0
  60. package/dist/src/withdraw/user/router.d.ts +73 -0
  61. package/dist/src/withdraw/user/service.d.ts +2 -1
  62. package/package.json +1 -1
@@ -13,8 +13,10 @@ export declare abstract class BaseAssetConvertProductService {
13
13
  productCategoryKey: "gold" | "gov_bond" | "real_estate" | "corporate_credit";
14
14
  targetAssetId: string;
15
15
  payAssetId: string;
16
- defaultReceiveAccountTypeId: string;
16
+ payAccountTypeId: string;
17
+ receiveAccountTypeId: string;
17
18
  minPayAmount: string;
19
+ settlementMode: "available" | "locked";
18
20
  }>;
19
21
  protected static assertProductActive(product: typeof assetConvertProduct.$inferSelect): void;
20
22
  protected static ensureProductPayAmount(productMinPayAmount: string, payAmount: Decimal): void;
@@ -31,7 +33,7 @@ export declare abstract class BaseAssetConvertProductService {
31
33
  source: string;
32
34
  effectiveAt: Date;
33
35
  }>;
34
- protected static getPayAccountForUser(tx: TransactionTx, userId: string, sourcePayAccountId: string, payAssetId: string): Promise<{
36
+ protected static getPayAccountForUser(tx: TransactionTx, userId: string, payAssetId: string, payAccountTypeId: string): Promise<{
35
37
  id: string;
36
38
  createdAt: Date;
37
39
  updatedAt: Date;
@@ -57,7 +59,6 @@ export declare abstract class BaseAssetConvertProductService {
57
59
  }>;
58
60
  protected static assertIdempotentPayload(existing: typeof assetConvertOrder.$inferSelect, input: {
59
61
  productId: string;
60
- sourcePayAccountId: string;
61
62
  payAmount: string;
62
63
  idempotencyKey: string;
63
64
  }): void;
@@ -16,7 +16,7 @@ export declare const assetConvertSettlementModeEnum: import("drizzle-orm/pg-core
16
16
  /**
17
17
  * 兑换订单状态
18
18
  */
19
- export declare const assetConvertOrderStatusEnum: import("drizzle-orm/pg-core").PgEnum<["created", "completed", "failed"]>;
19
+ export declare const assetConvertOrderStatusEnum: import("drizzle-orm/pg-core").PgEnum<["created", "completed"]>;
20
20
  /**
21
21
  * 资产兑换产品表
22
22
  * 定义可兑换资产、支付资产及到账策略
@@ -161,8 +161,25 @@ export declare const assetConvertProduct: import("drizzle-orm/pg-core").PgTableW
161
161
  identity: undefined;
162
162
  generated: undefined;
163
163
  }, {}, {}>;
164
- defaultReceiveAccountTypeId: import("drizzle-orm/pg-core").PgColumn<{
165
- name: "default_receive_account_type_id";
164
+ payAccountTypeId: import("drizzle-orm/pg-core").PgColumn<{
165
+ name: "pay_account_type_id";
166
+ tableName: "asset_convert_product";
167
+ dataType: "string";
168
+ columnType: "PgUUID";
169
+ data: string;
170
+ driverParam: string;
171
+ notNull: true;
172
+ hasDefault: false;
173
+ isPrimaryKey: false;
174
+ isAutoincrement: false;
175
+ hasRuntimeDefault: false;
176
+ enumValues: undefined;
177
+ baseColumn: never;
178
+ identity: undefined;
179
+ generated: undefined;
180
+ }, {}, {}>;
181
+ receiveAccountTypeId: import("drizzle-orm/pg-core").PgColumn<{
182
+ name: "receive_account_type_id";
166
183
  tableName: "asset_convert_product";
167
184
  dataType: "string";
168
185
  columnType: "PgUUID";
@@ -195,6 +212,23 @@ export declare const assetConvertProduct: import("drizzle-orm/pg-core").PgTableW
195
212
  identity: undefined;
196
213
  generated: undefined;
197
214
  }, {}, {}>;
215
+ settlementMode: import("drizzle-orm/pg-core").PgColumn<{
216
+ name: "settlement_mode";
217
+ tableName: "asset_convert_product";
218
+ dataType: "string";
219
+ columnType: "PgEnumColumn";
220
+ data: "available" | "locked";
221
+ driverParam: string;
222
+ notNull: true;
223
+ hasDefault: false;
224
+ isPrimaryKey: false;
225
+ isAutoincrement: false;
226
+ hasRuntimeDefault: false;
227
+ enumValues: ["locked", "available"];
228
+ baseColumn: never;
229
+ identity: undefined;
230
+ generated: undefined;
231
+ }, {}, {}>;
198
232
  status: import("drizzle-orm/pg-core").PgColumn<{
199
233
  name: "status";
200
234
  tableName: "asset_convert_product";
@@ -517,14 +551,14 @@ export declare const assetConvertOrder: import("drizzle-orm/pg-core").PgTableWit
517
551
  tableName: "asset_convert_order";
518
552
  dataType: "string";
519
553
  columnType: "PgEnumColumn";
520
- data: "created" | "completed" | "failed";
554
+ data: "created" | "completed";
521
555
  driverParam: string;
522
556
  notNull: true;
523
557
  hasDefault: true;
524
558
  isPrimaryKey: false;
525
559
  isAutoincrement: false;
526
560
  hasRuntimeDefault: false;
527
- enumValues: ["created", "completed", "failed"];
561
+ enumValues: ["created", "completed"];
528
562
  baseColumn: never;
529
563
  identity: undefined;
530
564
  generated: undefined;
@@ -603,7 +637,8 @@ export declare const assetConvertOrder: import("drizzle-orm/pg-core").PgTableWit
603
637
  export declare const assetConvertProductRelations: import("drizzle-orm").Relations<"asset_convert_product", {
604
638
  targetAsset: import("drizzle-orm").One<"asset", true>;
605
639
  payAsset: import("drizzle-orm").One<"asset", true>;
606
- defaultReceiveAccountType: import("drizzle-orm").One<"ledger_account_type", true>;
640
+ payAccountType: import("drizzle-orm").One<"ledger_account_type", true>;
641
+ receiveAccountType: import("drizzle-orm").One<"ledger_account_type", true>;
607
642
  orders: import("drizzle-orm").Many<"asset_convert_order">;
608
643
  }>;
609
644
  export declare const assetConvertOrderRelations: import("drizzle-orm").Relations<"asset_convert_order", {
@@ -1,10 +1,4 @@
1
1
  export declare const assetConvertProductListQuerySchema: import("@sinclair/typebox").TObject<{
2
- status: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TEnum<{
3
- active: "active";
4
- draft: "draft";
5
- paused: "paused";
6
- ended: "ended";
7
- }>>;
8
2
  productCategoryKey: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TEnum<{
9
3
  gold: "gold";
10
4
  gov_bond: "gov_bond";
@@ -17,6 +11,230 @@ export declare const assetConvertProductListQuerySchema: import("@sinclair/typeb
17
11
  pageIndex: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
18
12
  }>;
19
13
  export type AssetConvertProductListQueryType = typeof assetConvertProductListQuerySchema.static;
14
+ export declare const assetConvertProductResponseSchema: import("drizzle-typebox").BuildSchema<"select", {
15
+ createdAt: import("drizzle-orm/pg-core").PgColumn<{
16
+ name: "created_at";
17
+ tableName: "asset_convert_product";
18
+ dataType: "date";
19
+ columnType: "PgTimestamp";
20
+ data: Date;
21
+ driverParam: string;
22
+ notNull: true;
23
+ hasDefault: true;
24
+ isPrimaryKey: false;
25
+ isAutoincrement: false;
26
+ hasRuntimeDefault: false;
27
+ enumValues: undefined;
28
+ baseColumn: never;
29
+ identity: undefined;
30
+ generated: undefined;
31
+ }, {}, {}>;
32
+ updatedAt: import("drizzle-orm/pg-core").PgColumn<{
33
+ name: "updated_at";
34
+ tableName: "asset_convert_product";
35
+ dataType: "date";
36
+ columnType: "PgTimestamp";
37
+ data: Date;
38
+ driverParam: string;
39
+ notNull: true;
40
+ hasDefault: true;
41
+ isPrimaryKey: false;
42
+ isAutoincrement: false;
43
+ hasRuntimeDefault: false;
44
+ enumValues: undefined;
45
+ baseColumn: never;
46
+ identity: undefined;
47
+ generated: undefined;
48
+ }, {}, {}>;
49
+ id: import("drizzle-orm/pg-core").PgColumn<{
50
+ name: "id";
51
+ tableName: "asset_convert_product";
52
+ dataType: "string";
53
+ columnType: "PgUUID";
54
+ data: string;
55
+ driverParam: string;
56
+ notNull: true;
57
+ hasDefault: true;
58
+ isPrimaryKey: true;
59
+ isAutoincrement: false;
60
+ hasRuntimeDefault: false;
61
+ enumValues: undefined;
62
+ baseColumn: never;
63
+ identity: undefined;
64
+ generated: undefined;
65
+ }, {}, {}>;
66
+ name: import("drizzle-orm/pg-core").PgColumn<{
67
+ name: "name";
68
+ tableName: "asset_convert_product";
69
+ dataType: "string";
70
+ columnType: "PgText";
71
+ data: string;
72
+ driverParam: string;
73
+ notNull: true;
74
+ hasDefault: false;
75
+ isPrimaryKey: false;
76
+ isAutoincrement: false;
77
+ hasRuntimeDefault: false;
78
+ enumValues: [string, ...string[]];
79
+ baseColumn: never;
80
+ identity: undefined;
81
+ generated: undefined;
82
+ }, {}, {}>;
83
+ description: import("drizzle-orm/pg-core").PgColumn<{
84
+ name: "description";
85
+ tableName: "asset_convert_product";
86
+ dataType: "string";
87
+ columnType: "PgText";
88
+ data: string;
89
+ driverParam: string;
90
+ notNull: false;
91
+ hasDefault: false;
92
+ isPrimaryKey: false;
93
+ isAutoincrement: false;
94
+ hasRuntimeDefault: false;
95
+ enumValues: [string, ...string[]];
96
+ baseColumn: never;
97
+ identity: undefined;
98
+ generated: undefined;
99
+ }, {}, {}>;
100
+ productCategoryKey: import("drizzle-orm/pg-core").PgColumn<{
101
+ name: "product_category_key";
102
+ tableName: "asset_convert_product";
103
+ dataType: "string";
104
+ columnType: "PgEnumColumn";
105
+ data: "gold" | "gov_bond" | "real_estate" | "corporate_credit";
106
+ driverParam: string;
107
+ notNull: true;
108
+ hasDefault: false;
109
+ isPrimaryKey: false;
110
+ isAutoincrement: false;
111
+ hasRuntimeDefault: false;
112
+ enumValues: ["gold", "gov_bond", "real_estate", "corporate_credit"];
113
+ baseColumn: never;
114
+ identity: undefined;
115
+ generated: undefined;
116
+ }, {}, {}>;
117
+ targetAssetId: import("drizzle-orm/pg-core").PgColumn<{
118
+ name: "target_asset_id";
119
+ tableName: "asset_convert_product";
120
+ dataType: "string";
121
+ columnType: "PgUUID";
122
+ data: string;
123
+ driverParam: string;
124
+ notNull: true;
125
+ hasDefault: false;
126
+ isPrimaryKey: false;
127
+ isAutoincrement: false;
128
+ hasRuntimeDefault: false;
129
+ enumValues: undefined;
130
+ baseColumn: never;
131
+ identity: undefined;
132
+ generated: undefined;
133
+ }, {}, {}>;
134
+ payAssetId: import("drizzle-orm/pg-core").PgColumn<{
135
+ name: "pay_asset_id";
136
+ tableName: "asset_convert_product";
137
+ dataType: "string";
138
+ columnType: "PgUUID";
139
+ data: string;
140
+ driverParam: string;
141
+ notNull: true;
142
+ hasDefault: false;
143
+ isPrimaryKey: false;
144
+ isAutoincrement: false;
145
+ hasRuntimeDefault: false;
146
+ enumValues: undefined;
147
+ baseColumn: never;
148
+ identity: undefined;
149
+ generated: undefined;
150
+ }, {}, {}>;
151
+ payAccountTypeId: import("drizzle-orm/pg-core").PgColumn<{
152
+ name: "pay_account_type_id";
153
+ tableName: "asset_convert_product";
154
+ dataType: "string";
155
+ columnType: "PgUUID";
156
+ data: string;
157
+ driverParam: string;
158
+ notNull: true;
159
+ hasDefault: false;
160
+ isPrimaryKey: false;
161
+ isAutoincrement: false;
162
+ hasRuntimeDefault: false;
163
+ enumValues: undefined;
164
+ baseColumn: never;
165
+ identity: undefined;
166
+ generated: undefined;
167
+ }, {}, {}>;
168
+ receiveAccountTypeId: import("drizzle-orm/pg-core").PgColumn<{
169
+ name: "receive_account_type_id";
170
+ tableName: "asset_convert_product";
171
+ dataType: "string";
172
+ columnType: "PgUUID";
173
+ data: string;
174
+ driverParam: string;
175
+ notNull: true;
176
+ hasDefault: false;
177
+ isPrimaryKey: false;
178
+ isAutoincrement: false;
179
+ hasRuntimeDefault: false;
180
+ enumValues: undefined;
181
+ baseColumn: never;
182
+ identity: undefined;
183
+ generated: undefined;
184
+ }, {}, {}>;
185
+ minPayAmount: import("drizzle-orm/pg-core").PgColumn<{
186
+ name: "min_pay_amount";
187
+ tableName: "asset_convert_product";
188
+ dataType: "string";
189
+ columnType: "PgNumeric";
190
+ data: string;
191
+ driverParam: string;
192
+ notNull: true;
193
+ hasDefault: false;
194
+ isPrimaryKey: false;
195
+ isAutoincrement: false;
196
+ hasRuntimeDefault: false;
197
+ enumValues: undefined;
198
+ baseColumn: never;
199
+ identity: undefined;
200
+ generated: undefined;
201
+ }, {}, {}>;
202
+ settlementMode: import("drizzle-orm/pg-core").PgColumn<{
203
+ name: "settlement_mode";
204
+ tableName: "asset_convert_product";
205
+ dataType: "string";
206
+ columnType: "PgEnumColumn";
207
+ data: "available" | "locked";
208
+ driverParam: string;
209
+ notNull: true;
210
+ hasDefault: false;
211
+ isPrimaryKey: false;
212
+ isAutoincrement: false;
213
+ hasRuntimeDefault: false;
214
+ enumValues: ["locked", "available"];
215
+ baseColumn: never;
216
+ identity: undefined;
217
+ generated: undefined;
218
+ }, {}, {}>;
219
+ status: import("drizzle-orm/pg-core").PgColumn<{
220
+ name: "status";
221
+ tableName: "asset_convert_product";
222
+ dataType: "string";
223
+ columnType: "PgEnumColumn";
224
+ data: "active" | "draft" | "paused" | "ended";
225
+ driverParam: string;
226
+ notNull: true;
227
+ hasDefault: true;
228
+ isPrimaryKey: false;
229
+ isAutoincrement: false;
230
+ hasRuntimeDefault: false;
231
+ enumValues: ["draft", "active", "paused", "ended"];
232
+ baseColumn: never;
233
+ identity: undefined;
234
+ generated: undefined;
235
+ }, {}, {}>;
236
+ }, undefined>;
237
+ export type AssetConvertProductResponseType = typeof assetConvertProductResponseSchema.static;
20
238
  export declare const assetConvertProductListResponseSchema: import("@sinclair/typebox").TObject<{
21
239
  data: import("@sinclair/typebox").TArray<import("drizzle-typebox").BuildSchema<"select", {
22
240
  createdAt: import("drizzle-orm/pg-core").PgColumn<{
@@ -155,8 +373,25 @@ export declare const assetConvertProductListResponseSchema: import("@sinclair/ty
155
373
  identity: undefined;
156
374
  generated: undefined;
157
375
  }, {}, {}>;
158
- defaultReceiveAccountTypeId: import("drizzle-orm/pg-core").PgColumn<{
159
- name: "default_receive_account_type_id";
376
+ payAccountTypeId: import("drizzle-orm/pg-core").PgColumn<{
377
+ name: "pay_account_type_id";
378
+ tableName: "asset_convert_product";
379
+ dataType: "string";
380
+ columnType: "PgUUID";
381
+ data: string;
382
+ driverParam: string;
383
+ notNull: true;
384
+ hasDefault: false;
385
+ isPrimaryKey: false;
386
+ isAutoincrement: false;
387
+ hasRuntimeDefault: false;
388
+ enumValues: undefined;
389
+ baseColumn: never;
390
+ identity: undefined;
391
+ generated: undefined;
392
+ }, {}, {}>;
393
+ receiveAccountTypeId: import("drizzle-orm/pg-core").PgColumn<{
394
+ name: "receive_account_type_id";
160
395
  tableName: "asset_convert_product";
161
396
  dataType: "string";
162
397
  columnType: "PgUUID";
@@ -189,6 +424,23 @@ export declare const assetConvertProductListResponseSchema: import("@sinclair/ty
189
424
  identity: undefined;
190
425
  generated: undefined;
191
426
  }, {}, {}>;
427
+ settlementMode: import("drizzle-orm/pg-core").PgColumn<{
428
+ name: "settlement_mode";
429
+ tableName: "asset_convert_product";
430
+ dataType: "string";
431
+ columnType: "PgEnumColumn";
432
+ data: "available" | "locked";
433
+ driverParam: string;
434
+ notNull: true;
435
+ hasDefault: false;
436
+ isPrimaryKey: false;
437
+ isAutoincrement: false;
438
+ hasRuntimeDefault: false;
439
+ enumValues: ["locked", "available"];
440
+ baseColumn: never;
441
+ identity: undefined;
442
+ generated: undefined;
443
+ }, {}, {}>;
192
444
  status: import("drizzle-orm/pg-core").PgColumn<{
193
445
  name: "status";
194
446
  tableName: "asset_convert_product";
@@ -218,7 +470,6 @@ export declare const assetConvertProductListResponseSchema: import("@sinclair/ty
218
470
  export type AssetConvertProductListResponseType = typeof assetConvertProductListResponseSchema.static;
219
471
  export declare const assetConvertOrderCreateSchema: import("@sinclair/typebox").TObject<{
220
472
  productId: import("@sinclair/typebox").TString;
221
- sourcePayAccountId: import("@sinclair/typebox").TString;
222
473
  payAmount: import("@sinclair/typebox").TString;
223
474
  idempotencyKey: import("@sinclair/typebox").TString;
224
475
  }>;
@@ -518,14 +769,14 @@ export declare const assetConvertOrderResponseSchema: import("drizzle-typebox").
518
769
  tableName: "asset_convert_order";
519
770
  dataType: "string";
520
771
  columnType: "PgEnumColumn";
521
- data: "created" | "completed" | "failed";
772
+ data: "created" | "completed";
522
773
  driverParam: string;
523
774
  notNull: true;
524
775
  hasDefault: true;
525
776
  isPrimaryKey: false;
526
777
  isAutoincrement: false;
527
778
  hasRuntimeDefault: false;
528
- enumValues: ["created", "completed", "failed"];
779
+ enumValues: ["created", "completed"];
529
780
  baseColumn: never;
530
781
  identity: undefined;
531
782
  generated: undefined;
@@ -604,7 +855,6 @@ export declare const assetConvertOrderListQuerySchema: import("@sinclair/typebox
604
855
  status: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TEnum<{
605
856
  created: "created";
606
857
  completed: "completed";
607
- failed: "failed";
608
858
  }>>;
609
859
  limit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
610
860
  offset: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
@@ -908,14 +1158,14 @@ export declare const assetConvertOrderListResponseSchema: import("@sinclair/type
908
1158
  tableName: "asset_convert_order";
909
1159
  dataType: "string";
910
1160
  columnType: "PgEnumColumn";
911
- data: "created" | "completed" | "failed";
1161
+ data: "created" | "completed";
912
1162
  driverParam: string;
913
1163
  notNull: true;
914
1164
  hasDefault: true;
915
1165
  isPrimaryKey: false;
916
1166
  isAutoincrement: false;
917
1167
  hasRuntimeDefault: false;
918
- enumValues: ["created", "completed", "failed"];
1168
+ enumValues: ["created", "completed"];
919
1169
  baseColumn: never;
920
1170
  identity: undefined;
921
1171
  generated: undefined;
@@ -386,7 +386,6 @@ export declare const assetConvertProductRouter: Elysia<"/asset_convert_product",
386
386
  body: {};
387
387
  params: {};
388
388
  query: {
389
- status?: "active" | "draft" | "paused" | "ended" | undefined;
390
389
  productCategoryKey?: "gold" | "gov_bond" | "real_estate" | "corporate_credit" | undefined;
391
390
  limit?: number | undefined;
392
391
  offset?: number | undefined;
@@ -406,8 +405,10 @@ export declare const assetConvertProductRouter: Elysia<"/asset_convert_product",
406
405
  productCategoryKey: "gold" | "gov_bond" | "real_estate" | "corporate_credit";
407
406
  targetAssetId: string;
408
407
  payAssetId: string;
409
- defaultReceiveAccountTypeId: string;
408
+ payAccountTypeId: string;
409
+ receiveAccountTypeId: string;
410
410
  minPayAmount: string;
411
+ settlementMode: "available" | "locked";
411
412
  }[];
412
413
  pagination: {
413
414
  total: number;
@@ -453,8 +454,10 @@ export declare const assetConvertProductRouter: Elysia<"/asset_convert_product",
453
454
  productCategoryKey: "gold" | "gov_bond" | "real_estate" | "corporate_credit";
454
455
  targetAssetId: string;
455
456
  payAssetId: string;
456
- defaultReceiveAccountTypeId: string;
457
+ payAccountTypeId: string;
458
+ receiveAccountTypeId: string;
457
459
  minPayAmount: string;
460
+ settlementMode: "available" | "locked";
458
461
  };
459
462
  422: {
460
463
  type: "validation";
@@ -479,7 +482,6 @@ export declare const assetConvertProductRouter: Elysia<"/asset_convert_product",
479
482
  idempotencyKey: string;
480
483
  productId: string;
481
484
  payAmount: string;
482
- sourcePayAccountId: string;
483
485
  };
484
486
  params: {};
485
487
  query: {};
@@ -490,7 +492,7 @@ export declare const assetConvertProductRouter: Elysia<"/asset_convert_product",
490
492
  createdAt: Date;
491
493
  updatedAt: Date;
492
494
  userId: string;
493
- status: "created" | "completed" | "failed";
495
+ status: "created" | "completed";
494
496
  idempotencyKey: string;
495
497
  orderNo: string;
496
498
  productId: string;
@@ -530,7 +532,7 @@ export declare const assetConvertProductRouter: Elysia<"/asset_convert_product",
530
532
  body: {};
531
533
  params: {};
532
534
  query: {
533
- status?: "created" | "completed" | "failed" | undefined;
535
+ status?: "created" | "completed" | undefined;
534
536
  limit?: number | undefined;
535
537
  offset?: number | undefined;
536
538
  pageSize?: number | undefined;
@@ -544,7 +546,7 @@ export declare const assetConvertProductRouter: Elysia<"/asset_convert_product",
544
546
  createdAt: Date;
545
547
  updatedAt: Date;
546
548
  userId: string;
547
- status: "created" | "completed" | "failed";
549
+ status: "created" | "completed";
548
550
  idempotencyKey: string;
549
551
  orderNo: string;
550
552
  productId: string;
@@ -602,7 +604,7 @@ export declare const assetConvertProductRouter: Elysia<"/asset_convert_product",
602
604
  createdAt: Date;
603
605
  updatedAt: Date;
604
606
  userId: string;
605
- status: "created" | "completed" | "failed";
607
+ status: "created" | "completed";
606
608
  idempotencyKey: string;
607
609
  orderNo: string;
608
610
  productId: string;
@@ -12,8 +12,10 @@ export declare abstract class UserAssetConvertProductService extends BaseAssetCo
12
12
  productCategoryKey: "gold" | "gov_bond" | "real_estate" | "corporate_credit";
13
13
  targetAssetId: string;
14
14
  payAssetId: string;
15
- defaultReceiveAccountTypeId: string;
15
+ payAccountTypeId: string;
16
+ receiveAccountTypeId: string;
16
17
  minPayAmount: string;
18
+ settlementMode: "available" | "locked";
17
19
  }[];
18
20
  pagination: {
19
21
  pageSize: number;
@@ -33,15 +35,17 @@ export declare abstract class UserAssetConvertProductService extends BaseAssetCo
33
35
  productCategoryKey: "gold" | "gov_bond" | "real_estate" | "corporate_credit";
34
36
  targetAssetId: string;
35
37
  payAssetId: string;
36
- defaultReceiveAccountTypeId: string;
38
+ payAccountTypeId: string;
39
+ receiveAccountTypeId: string;
37
40
  minPayAmount: string;
41
+ settlementMode: "available" | "locked";
38
42
  }>;
39
43
  static createOrder(userId: string, input: AssetConvertOrderCreateInputType): Promise<{
40
44
  id: string;
41
45
  createdAt: Date;
42
46
  updatedAt: Date;
43
47
  userId: string;
44
- status: "created" | "completed" | "failed";
48
+ status: "created" | "completed";
45
49
  idempotencyKey: string;
46
50
  orderNo: string;
47
51
  productId: string;
@@ -66,7 +70,7 @@ export declare abstract class UserAssetConvertProductService extends BaseAssetCo
66
70
  createdAt: Date;
67
71
  updatedAt: Date;
68
72
  userId: string;
69
- status: "created" | "completed" | "failed";
73
+ status: "created" | "completed";
70
74
  idempotencyKey: string;
71
75
  orderNo: string;
72
76
  productId: string;
@@ -98,7 +102,7 @@ export declare abstract class UserAssetConvertProductService extends BaseAssetCo
98
102
  createdAt: Date;
99
103
  updatedAt: Date;
100
104
  userId: string;
101
- status: "created" | "completed" | "failed";
105
+ status: "created" | "completed";
102
106
  idempotencyKey: string;
103
107
  orderNo: string;
104
108
  productId: string;
@@ -6,6 +6,7 @@ export declare const AssetPriceErrorCodes: {
6
6
  readonly ASSET_PRICE_PAIR_INVALID: "ASSET_PRICE_PAIR_INVALID";
7
7
  readonly ASSET_PRICE_VALUE_INVALID: "ASSET_PRICE_VALUE_INVALID";
8
8
  readonly ASSET_PRICE_TIME_RANGE_INVALID: "ASSET_PRICE_TIME_RANGE_INVALID";
9
+ readonly ASSET_PRICE_TIME_WINDOW_EXCEEDED: "ASSET_PRICE_TIME_WINDOW_EXCEEDED";
9
10
  readonly ASSET_PRICE_POINT_ALREADY_EXISTS: "ASSET_PRICE_POINT_ALREADY_EXISTS";
10
11
  readonly ASSET_PRICE_NOT_FOUND: "ASSET_PRICE_NOT_FOUND";
11
12
  readonly ASSET_PRICE_CREATE_FAILED: "ASSET_PRICE_CREATE_FAILED";
@@ -5,6 +5,7 @@ export declare const zh: {
5
5
  ASSET_PRICE_PAIR_INVALID: string;
6
6
  ASSET_PRICE_VALUE_INVALID: string;
7
7
  ASSET_PRICE_TIME_RANGE_INVALID: string;
8
+ ASSET_PRICE_TIME_WINDOW_EXCEEDED: string;
8
9
  ASSET_PRICE_POINT_ALREADY_EXISTS: string;
9
10
  ASSET_PRICE_NOT_FOUND: string;
10
11
  ASSET_PRICE_CREATE_FAILED: string;
@@ -179,11 +179,11 @@ export declare const assetPriceUserResponseSchema: import("drizzle-typebox").Bui
179
179
  export type AssetPriceUserResponseType = typeof assetPriceUserResponseSchema.static;
180
180
  export declare const assetPriceUserListQuerySchema: import("@sinclair/typebox").TObject<{
181
181
  limit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
182
- offset: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
183
182
  pageSize: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
183
+ offset: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
184
184
  pageIndex: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
185
- baseAsset: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
186
- quoteAsset: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
185
+ baseAsset: import("@sinclair/typebox").TString;
186
+ quoteAsset: import("@sinclair/typebox").TString;
187
187
  source: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
188
188
  startDate: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TDate>;
189
189
  endDate: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TDate>;
@@ -194,6 +194,10 @@ export declare const assetPriceUserLatestParamsSchema: import("@sinclair/typebox
194
194
  quoteAsset: import("@sinclair/typebox").TString;
195
195
  }>;
196
196
  export type AssetPriceUserLatestParamsType = typeof assetPriceUserLatestParamsSchema.static;
197
+ export declare const assetPriceUserLatestCnyParamsSchema: import("@sinclair/typebox").TObject<{
198
+ baseAsset: import("@sinclair/typebox").TString;
199
+ }>;
200
+ export type AssetPriceUserLatestCnyParamsType = typeof assetPriceUserLatestCnyParamsSchema.static;
197
201
  export declare const assetPriceUserListResponseSchema: import("@sinclair/typebox").TObject<{
198
202
  data: import("@sinclair/typebox").TArray<import("drizzle-typebox").BuildSchema<"select", {
199
203
  createdAt: import("drizzle-orm/pg-core").PgColumn<{