@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.
- package/dist/src/admin/admin/dto.schemas.d.ts +8 -0
- package/dist/src/admin/admin/errors/index.d.ts +1 -0
- package/dist/src/admin/admin/errors/locales/zh.d.ts +1 -0
- package/dist/src/admin/admin/router.d.ts +31 -0
- package/dist/src/admin/admin/service.d.ts +3 -0
- package/dist/src/admin/index.d.ts +158 -34
- package/dist/src/asset/user/dto.schemas.d.ts +9 -83
- package/dist/src/asset/user/router.d.ts +60 -66
- package/dist/src/asset/user/service.d.ts +41 -41
- package/dist/src/asset-convert-product/admin/dto.schemas.d.ts +44 -12
- package/dist/src/asset-convert-product/admin/router.d.ts +83 -23
- package/dist/src/asset-convert-product/admin/service.d.ts +73 -17
- package/dist/src/asset-convert-product/db.schemas.d.ts +76 -8
- package/dist/src/asset-convert-product/errors/index.d.ts +4 -0
- package/dist/src/asset-convert-product/errors/locales/zh.d.ts +4 -0
- package/dist/src/asset-convert-product/internal/service.d.ts +4 -3
- package/dist/src/asset-convert-product/schema.d.ts +41 -6
- package/dist/src/asset-convert-product/user/dto.schemas.d.ts +264 -14
- package/dist/src/asset-convert-product/user/router.d.ts +10 -8
- package/dist/src/asset-convert-product/user/service.d.ts +9 -5
- package/dist/src/asset-price/errors/index.d.ts +1 -0
- package/dist/src/asset-price/errors/locales/zh.d.ts +1 -0
- package/dist/src/asset-price/user/dto.schemas.d.ts +7 -3
- package/dist/src/asset-price/user/router.d.ts +43 -2
- package/dist/src/asset-price/user/service.d.ts +13 -1
- package/dist/src/index.d.ts +701 -291
- package/dist/src/ledger-account/admin/router.d.ts +1 -1
- package/dist/src/ledger-account/user/dto.schemas.d.ts +44 -193
- package/dist/src/ledger-account/user/router.d.ts +104 -42
- package/dist/src/ledger-account/user/service.d.ts +90 -40
- 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-type/user/router.d.ts +48 -0
- package/dist/src/ledger-account-type/user/service.d.ts +25 -0
- package/dist/src/portfolio/index.d.ts +2 -0
- package/dist/src/portfolio/internal/index.d.ts +1 -0
- package/dist/src/portfolio/internal/service.d.ts +5 -0
- package/dist/src/portfolio/user/dto.schemas.d.ts +352 -0
- package/dist/src/portfolio/user/index.d.ts +3 -0
- package/dist/src/portfolio/user/router.d.ts +659 -0
- package/dist/src/portfolio/user/service.d.ts +143 -0
- package/dist/src/wallet/user/dto.schemas.d.ts +4 -66
- package/dist/src/wallet/user/router.d.ts +1 -62
- package/dist/src/wallet/user/service.d.ts +3 -39
- package/dist/src/welfare-cycle/admin/dto.schemas.d.ts +95 -2
- package/dist/src/welfare-cycle/admin/router.d.ts +34 -1
- package/dist/src/welfare-cycle/admin/service.d.ts +26 -1
- package/dist/src/welfare-cycle/db.schemas.d.ts +174 -4
- package/dist/src/welfare-cycle/errors/index.d.ts +6 -0
- package/dist/src/welfare-cycle/errors/locales/zh.d.ts +6 -0
- package/dist/src/welfare-cycle/internal/service.d.ts +41 -3
- package/dist/src/welfare-cycle/schema.d.ts +92 -3
- package/dist/src/welfare-cycle/user/dto.schemas.d.ts +106 -6
- package/dist/src/welfare-cycle/user/router.d.ts +14 -5
- package/dist/src/welfare-cycle/user/service.d.ts +14 -3
- package/dist/src/withdraw/user/dto.schemas.d.ts +599 -0
- package/dist/src/withdraw/user/router.d.ts +73 -0
- package/dist/src/withdraw/user/service.d.ts +2 -1
- package/package.json +1 -1
|
@@ -583,8 +583,8 @@ export declare const ledgerAccountAdminRouter: Elysia<"/ledger_accounts", {
|
|
|
583
583
|
response: {
|
|
584
584
|
200: {
|
|
585
585
|
totalCount: number;
|
|
586
|
-
failedCount: number;
|
|
587
586
|
successCount: number;
|
|
587
|
+
failedCount: number;
|
|
588
588
|
results: {
|
|
589
589
|
accountId?: string | undefined;
|
|
590
590
|
ledgerEntryId?: string | undefined;
|
|
@@ -184,6 +184,11 @@ export declare const ledgerAccountIdParamsSchema: import("@sinclair/typebox").TO
|
|
|
184
184
|
id: import("@sinclair/typebox").TString;
|
|
185
185
|
}>;
|
|
186
186
|
export type LedgerAccountIdParamsType = typeof ledgerAccountIdParamsSchema.static;
|
|
187
|
+
export declare const ledgerAccountByTypeAndAssetParamsSchema: import("@sinclair/typebox").TObject<{
|
|
188
|
+
accountTypeKey: import("@sinclair/typebox").TString;
|
|
189
|
+
assetCode: import("@sinclair/typebox").TString;
|
|
190
|
+
}>;
|
|
191
|
+
export type LedgerAccountByTypeAndAssetParamsType = typeof ledgerAccountByTypeAndAssetParamsSchema.static;
|
|
187
192
|
export declare const ledgerAccountResponseSchema: import("drizzle-typebox").BuildSchema<"select", {
|
|
188
193
|
createdAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
189
194
|
name: "created_at";
|
|
@@ -357,6 +362,45 @@ export declare const ledgerAccountResponseSchema: import("drizzle-typebox").Buil
|
|
|
357
362
|
}, {}, {}>;
|
|
358
363
|
}, undefined>;
|
|
359
364
|
export type LedgerAccountResponseType = typeof ledgerAccountResponseSchema.static;
|
|
365
|
+
export declare const ledgerAccountDetailResponseSchema: import("@sinclair/typebox").TObject<{
|
|
366
|
+
createdAt: import("@sinclair/typebox").TDate;
|
|
367
|
+
updatedAt: import("@sinclair/typebox").TDate;
|
|
368
|
+
id: import("@sinclair/typebox").TString;
|
|
369
|
+
userId: import("@sinclair/typebox").TString;
|
|
370
|
+
status: import("@sinclair/typebox").TEnum<{
|
|
371
|
+
active: "active";
|
|
372
|
+
frozen: "frozen";
|
|
373
|
+
disabled: "disabled";
|
|
374
|
+
}>;
|
|
375
|
+
assetId: import("@sinclair/typebox").TString;
|
|
376
|
+
ledgerAccountTypeId: import("@sinclair/typebox").TString;
|
|
377
|
+
available: import("@sinclair/typebox").TString;
|
|
378
|
+
locked: import("@sinclair/typebox").TString;
|
|
379
|
+
version: import("@sinclair/typebox").TInteger;
|
|
380
|
+
asset: import("@sinclair/typebox").TObject<{
|
|
381
|
+
symbol: import("@sinclair/typebox").TString;
|
|
382
|
+
id: import("@sinclair/typebox").TString;
|
|
383
|
+
name: import("@sinclair/typebox").TString;
|
|
384
|
+
code: import("@sinclair/typebox").TString;
|
|
385
|
+
iconUrl: import("@sinclair/typebox").TString;
|
|
386
|
+
category: import("@sinclair/typebox").TEnum<{
|
|
387
|
+
FIAT: "FIAT";
|
|
388
|
+
CRYPTO: "CRYPTO";
|
|
389
|
+
POINT: "POINT";
|
|
390
|
+
RWA: "RWA";
|
|
391
|
+
}>;
|
|
392
|
+
isActive: import("@sinclair/typebox").TBoolean;
|
|
393
|
+
precision: import("@sinclair/typebox").TInteger;
|
|
394
|
+
}>;
|
|
395
|
+
ledgerAccountType: import("@sinclair/typebox").TObject<{
|
|
396
|
+
id: import("@sinclair/typebox").TString;
|
|
397
|
+
name: import("@sinclair/typebox").TString;
|
|
398
|
+
description: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
399
|
+
key: import("@sinclair/typebox").TString;
|
|
400
|
+
isActive: import("@sinclair/typebox").TBoolean;
|
|
401
|
+
}>;
|
|
402
|
+
}>;
|
|
403
|
+
export type LedgerAccountDetailResponseType = typeof ledgerAccountDetailResponseSchema.static;
|
|
360
404
|
export declare const ledgerAccountListResponseSchema: import("@sinclair/typebox").TObject<{
|
|
361
405
|
data: import("@sinclair/typebox").TArray<import("drizzle-typebox").BuildSchema<"select", {
|
|
362
406
|
createdAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
@@ -539,196 +583,3 @@ export declare const ledgerAccountListResponseSchema: import("@sinclair/typebox"
|
|
|
539
583
|
}>;
|
|
540
584
|
}>;
|
|
541
585
|
export type LedgerAccountListResponseType = typeof ledgerAccountListResponseSchema.static;
|
|
542
|
-
export declare const ledgerAccountOverviewParamsSchema: import("@sinclair/typebox").TObject<{
|
|
543
|
-
id: import("@sinclair/typebox").TString;
|
|
544
|
-
}>;
|
|
545
|
-
export type LedgerAccountOverviewParamsType = typeof ledgerAccountOverviewParamsSchema.static;
|
|
546
|
-
export declare const ledgerAccountOverviewQuerySchema: import("@sinclair/typebox").TObject<{
|
|
547
|
-
quoteAsset: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
548
|
-
}>;
|
|
549
|
-
export type LedgerAccountOverviewQueryType = typeof ledgerAccountOverviewQuerySchema.static;
|
|
550
|
-
export declare const ledgerAccountOverviewResponseSchema: import("@sinclair/typebox").TObject<{
|
|
551
|
-
quoteAsset: import("@sinclair/typebox").TString;
|
|
552
|
-
overview: import("@sinclair/typebox").TObject<{
|
|
553
|
-
totalValuation: import("@sinclair/typebox").TString;
|
|
554
|
-
}>;
|
|
555
|
-
ledgerAccount: import("drizzle-typebox").BuildSchema<"select", {
|
|
556
|
-
createdAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
557
|
-
name: "created_at";
|
|
558
|
-
tableName: "ledger_account";
|
|
559
|
-
dataType: "date";
|
|
560
|
-
columnType: "PgTimestamp";
|
|
561
|
-
data: Date;
|
|
562
|
-
driverParam: string;
|
|
563
|
-
notNull: true;
|
|
564
|
-
hasDefault: true;
|
|
565
|
-
isPrimaryKey: false;
|
|
566
|
-
isAutoincrement: false;
|
|
567
|
-
hasRuntimeDefault: false;
|
|
568
|
-
enumValues: undefined;
|
|
569
|
-
baseColumn: never;
|
|
570
|
-
identity: undefined;
|
|
571
|
-
generated: undefined;
|
|
572
|
-
}, {}, {}>;
|
|
573
|
-
updatedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
574
|
-
name: "updated_at";
|
|
575
|
-
tableName: "ledger_account";
|
|
576
|
-
dataType: "date";
|
|
577
|
-
columnType: "PgTimestamp";
|
|
578
|
-
data: Date;
|
|
579
|
-
driverParam: string;
|
|
580
|
-
notNull: true;
|
|
581
|
-
hasDefault: true;
|
|
582
|
-
isPrimaryKey: false;
|
|
583
|
-
isAutoincrement: false;
|
|
584
|
-
hasRuntimeDefault: false;
|
|
585
|
-
enumValues: undefined;
|
|
586
|
-
baseColumn: never;
|
|
587
|
-
identity: undefined;
|
|
588
|
-
generated: undefined;
|
|
589
|
-
}, {}, {}>;
|
|
590
|
-
id: import("drizzle-orm/pg-core").PgColumn<{
|
|
591
|
-
name: "id";
|
|
592
|
-
tableName: "ledger_account";
|
|
593
|
-
dataType: "string";
|
|
594
|
-
columnType: "PgUUID";
|
|
595
|
-
data: string;
|
|
596
|
-
driverParam: string;
|
|
597
|
-
notNull: true;
|
|
598
|
-
hasDefault: true;
|
|
599
|
-
isPrimaryKey: true;
|
|
600
|
-
isAutoincrement: false;
|
|
601
|
-
hasRuntimeDefault: false;
|
|
602
|
-
enumValues: undefined;
|
|
603
|
-
baseColumn: never;
|
|
604
|
-
identity: undefined;
|
|
605
|
-
generated: undefined;
|
|
606
|
-
}, {}, {}>;
|
|
607
|
-
userId: import("drizzle-orm/pg-core").PgColumn<{
|
|
608
|
-
name: "user_id";
|
|
609
|
-
tableName: "ledger_account";
|
|
610
|
-
dataType: "string";
|
|
611
|
-
columnType: "PgText";
|
|
612
|
-
data: string;
|
|
613
|
-
driverParam: string;
|
|
614
|
-
notNull: true;
|
|
615
|
-
hasDefault: false;
|
|
616
|
-
isPrimaryKey: false;
|
|
617
|
-
isAutoincrement: false;
|
|
618
|
-
hasRuntimeDefault: false;
|
|
619
|
-
enumValues: [string, ...string[]];
|
|
620
|
-
baseColumn: never;
|
|
621
|
-
identity: undefined;
|
|
622
|
-
generated: undefined;
|
|
623
|
-
}, {}, {}>;
|
|
624
|
-
assetId: import("drizzle-orm/pg-core").PgColumn<{
|
|
625
|
-
name: "asset_id";
|
|
626
|
-
tableName: "ledger_account";
|
|
627
|
-
dataType: "string";
|
|
628
|
-
columnType: "PgUUID";
|
|
629
|
-
data: string;
|
|
630
|
-
driverParam: string;
|
|
631
|
-
notNull: true;
|
|
632
|
-
hasDefault: false;
|
|
633
|
-
isPrimaryKey: false;
|
|
634
|
-
isAutoincrement: false;
|
|
635
|
-
hasRuntimeDefault: false;
|
|
636
|
-
enumValues: undefined;
|
|
637
|
-
baseColumn: never;
|
|
638
|
-
identity: undefined;
|
|
639
|
-
generated: undefined;
|
|
640
|
-
}, {}, {}>;
|
|
641
|
-
ledgerAccountTypeId: import("drizzle-orm/pg-core").PgColumn<{
|
|
642
|
-
name: "ledger_account_type_id";
|
|
643
|
-
tableName: "ledger_account";
|
|
644
|
-
dataType: "string";
|
|
645
|
-
columnType: "PgUUID";
|
|
646
|
-
data: string;
|
|
647
|
-
driverParam: string;
|
|
648
|
-
notNull: true;
|
|
649
|
-
hasDefault: false;
|
|
650
|
-
isPrimaryKey: false;
|
|
651
|
-
isAutoincrement: false;
|
|
652
|
-
hasRuntimeDefault: false;
|
|
653
|
-
enumValues: undefined;
|
|
654
|
-
baseColumn: never;
|
|
655
|
-
identity: undefined;
|
|
656
|
-
generated: undefined;
|
|
657
|
-
}, {}, {}>;
|
|
658
|
-
available: import("drizzle-orm/pg-core").PgColumn<{
|
|
659
|
-
name: "available";
|
|
660
|
-
tableName: "ledger_account";
|
|
661
|
-
dataType: "string";
|
|
662
|
-
columnType: "PgNumeric";
|
|
663
|
-
data: string;
|
|
664
|
-
driverParam: string;
|
|
665
|
-
notNull: true;
|
|
666
|
-
hasDefault: true;
|
|
667
|
-
isPrimaryKey: false;
|
|
668
|
-
isAutoincrement: false;
|
|
669
|
-
hasRuntimeDefault: false;
|
|
670
|
-
enumValues: undefined;
|
|
671
|
-
baseColumn: never;
|
|
672
|
-
identity: undefined;
|
|
673
|
-
generated: undefined;
|
|
674
|
-
}, {}, {}>;
|
|
675
|
-
locked: import("drizzle-orm/pg-core").PgColumn<{
|
|
676
|
-
name: "locked";
|
|
677
|
-
tableName: "ledger_account";
|
|
678
|
-
dataType: "string";
|
|
679
|
-
columnType: "PgNumeric";
|
|
680
|
-
data: string;
|
|
681
|
-
driverParam: string;
|
|
682
|
-
notNull: true;
|
|
683
|
-
hasDefault: true;
|
|
684
|
-
isPrimaryKey: false;
|
|
685
|
-
isAutoincrement: false;
|
|
686
|
-
hasRuntimeDefault: false;
|
|
687
|
-
enumValues: undefined;
|
|
688
|
-
baseColumn: never;
|
|
689
|
-
identity: undefined;
|
|
690
|
-
generated: undefined;
|
|
691
|
-
}, {}, {}>;
|
|
692
|
-
version: import("drizzle-orm/pg-core").PgColumn<{
|
|
693
|
-
name: "version";
|
|
694
|
-
tableName: "ledger_account";
|
|
695
|
-
dataType: "number";
|
|
696
|
-
columnType: "PgInteger";
|
|
697
|
-
data: number;
|
|
698
|
-
driverParam: string | number;
|
|
699
|
-
notNull: true;
|
|
700
|
-
hasDefault: true;
|
|
701
|
-
isPrimaryKey: false;
|
|
702
|
-
isAutoincrement: false;
|
|
703
|
-
hasRuntimeDefault: false;
|
|
704
|
-
enumValues: undefined;
|
|
705
|
-
baseColumn: never;
|
|
706
|
-
identity: undefined;
|
|
707
|
-
generated: undefined;
|
|
708
|
-
}, {}, {}>;
|
|
709
|
-
status: import("drizzle-orm/pg-core").PgColumn<{
|
|
710
|
-
name: "status";
|
|
711
|
-
tableName: "ledger_account";
|
|
712
|
-
dataType: "string";
|
|
713
|
-
columnType: "PgEnumColumn";
|
|
714
|
-
data: "active" | "frozen" | "disabled";
|
|
715
|
-
driverParam: string;
|
|
716
|
-
notNull: true;
|
|
717
|
-
hasDefault: true;
|
|
718
|
-
isPrimaryKey: false;
|
|
719
|
-
isAutoincrement: false;
|
|
720
|
-
hasRuntimeDefault: false;
|
|
721
|
-
enumValues: ["active", "frozen", "disabled"];
|
|
722
|
-
baseColumn: never;
|
|
723
|
-
identity: undefined;
|
|
724
|
-
generated: undefined;
|
|
725
|
-
}, {}, {}>;
|
|
726
|
-
}, undefined>;
|
|
727
|
-
ledgerAccountType: import("@sinclair/typebox").TObject<{
|
|
728
|
-
id: import("@sinclair/typebox").TString;
|
|
729
|
-
key: import("@sinclair/typebox").TString;
|
|
730
|
-
name: import("@sinclair/typebox").TString;
|
|
731
|
-
description: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
732
|
-
}>;
|
|
733
|
-
}>;
|
|
734
|
-
export type LedgerAccountOverviewResponseType = typeof ledgerAccountOverviewResponseSchema.static;
|
|
@@ -381,53 +381,115 @@ export declare const ledgerAccountRouter: Elysia<"/ledger_accounts", {
|
|
|
381
381
|
ledger_accounts: {};
|
|
382
382
|
} & {
|
|
383
383
|
ledger_accounts: {
|
|
384
|
-
"
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
};
|
|
394
|
-
headers: {};
|
|
395
|
-
response: {
|
|
396
|
-
200: {
|
|
397
|
-
quoteAsset: string;
|
|
398
|
-
ledgerAccountType: {
|
|
399
|
-
id: string;
|
|
400
|
-
name: string;
|
|
401
|
-
description: string | null;
|
|
402
|
-
key: string;
|
|
403
|
-
};
|
|
404
|
-
ledgerAccount: {
|
|
405
|
-
id: string;
|
|
406
|
-
createdAt: Date;
|
|
407
|
-
updatedAt: Date;
|
|
408
|
-
userId: string;
|
|
409
|
-
status: "active" | "frozen" | "disabled";
|
|
410
|
-
assetId: string;
|
|
411
|
-
ledgerAccountTypeId: string;
|
|
412
|
-
available: string;
|
|
413
|
-
locked: string;
|
|
414
|
-
version: number;
|
|
384
|
+
"account-types": {
|
|
385
|
+
":accountTypeKey": {
|
|
386
|
+
assets: {
|
|
387
|
+
":assetCode": {
|
|
388
|
+
get: {
|
|
389
|
+
body: {};
|
|
390
|
+
params: {
|
|
391
|
+
assetCode: string;
|
|
392
|
+
accountTypeKey: string;
|
|
415
393
|
};
|
|
416
|
-
|
|
417
|
-
|
|
394
|
+
query: {};
|
|
395
|
+
headers: {};
|
|
396
|
+
response: {
|
|
397
|
+
200: {
|
|
398
|
+
id: string;
|
|
399
|
+
createdAt: Date;
|
|
400
|
+
updatedAt: Date;
|
|
401
|
+
userId: string;
|
|
402
|
+
status: "active" | "frozen" | "disabled";
|
|
403
|
+
asset: {
|
|
404
|
+
symbol: string;
|
|
405
|
+
id: string;
|
|
406
|
+
name: string;
|
|
407
|
+
code: string;
|
|
408
|
+
iconUrl: string;
|
|
409
|
+
category: "FIAT" | "CRYPTO" | "POINT" | "RWA";
|
|
410
|
+
isActive: boolean;
|
|
411
|
+
precision: number;
|
|
412
|
+
};
|
|
413
|
+
assetId: string;
|
|
414
|
+
ledgerAccountTypeId: string;
|
|
415
|
+
available: string;
|
|
416
|
+
locked: string;
|
|
417
|
+
version: number;
|
|
418
|
+
ledgerAccountType: {
|
|
419
|
+
id: string;
|
|
420
|
+
name: string;
|
|
421
|
+
description: string | null;
|
|
422
|
+
key: string;
|
|
423
|
+
isActive: boolean;
|
|
424
|
+
};
|
|
425
|
+
};
|
|
426
|
+
422: {
|
|
427
|
+
type: "validation";
|
|
428
|
+
on: string;
|
|
429
|
+
summary?: string;
|
|
430
|
+
message?: string;
|
|
431
|
+
found?: unknown;
|
|
432
|
+
property?: string;
|
|
433
|
+
expected?: string;
|
|
434
|
+
};
|
|
435
|
+
401: "Unauthorized";
|
|
418
436
|
};
|
|
419
437
|
};
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
438
|
+
};
|
|
439
|
+
};
|
|
440
|
+
};
|
|
441
|
+
};
|
|
442
|
+
};
|
|
443
|
+
} & {
|
|
444
|
+
ledger_accounts: {
|
|
445
|
+
":id": {
|
|
446
|
+
get: {
|
|
447
|
+
body: {};
|
|
448
|
+
params: {
|
|
449
|
+
id: string;
|
|
450
|
+
};
|
|
451
|
+
query: {};
|
|
452
|
+
headers: {};
|
|
453
|
+
response: {
|
|
454
|
+
200: {
|
|
455
|
+
id: string;
|
|
456
|
+
createdAt: Date;
|
|
457
|
+
updatedAt: Date;
|
|
458
|
+
userId: string;
|
|
459
|
+
status: "active" | "frozen" | "disabled";
|
|
460
|
+
asset: {
|
|
461
|
+
symbol: string;
|
|
462
|
+
id: string;
|
|
463
|
+
name: string;
|
|
464
|
+
code: string;
|
|
465
|
+
iconUrl: string;
|
|
466
|
+
category: "FIAT" | "CRYPTO" | "POINT" | "RWA";
|
|
467
|
+
isActive: boolean;
|
|
468
|
+
precision: number;
|
|
469
|
+
};
|
|
470
|
+
assetId: string;
|
|
471
|
+
ledgerAccountTypeId: string;
|
|
472
|
+
available: string;
|
|
473
|
+
locked: string;
|
|
474
|
+
version: number;
|
|
475
|
+
ledgerAccountType: {
|
|
476
|
+
id: string;
|
|
477
|
+
name: string;
|
|
478
|
+
description: string | null;
|
|
479
|
+
key: string;
|
|
480
|
+
isActive: boolean;
|
|
428
481
|
};
|
|
429
|
-
401: "Unauthorized";
|
|
430
482
|
};
|
|
483
|
+
422: {
|
|
484
|
+
type: "validation";
|
|
485
|
+
on: string;
|
|
486
|
+
summary?: string;
|
|
487
|
+
message?: string;
|
|
488
|
+
found?: unknown;
|
|
489
|
+
property?: string;
|
|
490
|
+
expected?: string;
|
|
491
|
+
};
|
|
492
|
+
401: "Unauthorized";
|
|
431
493
|
};
|
|
432
494
|
};
|
|
433
495
|
};
|
|
@@ -1,54 +1,104 @@
|
|
|
1
1
|
import { BaseLedgerAccountService } from "../internal/service";
|
|
2
|
-
import type {
|
|
2
|
+
import type { LedgerAccountByTypeAndAssetParamsType, LedgerAccountIdParamsType } from "./dto.schemas";
|
|
3
3
|
export declare abstract class UserLedgerAccountService extends BaseLedgerAccountService {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
4
|
+
static getAccountByTypeAndAsset(userId: string, params: LedgerAccountByTypeAndAssetParamsType): Promise<{
|
|
5
|
+
id: string;
|
|
6
|
+
createdAt: Date;
|
|
7
|
+
updatedAt: Date;
|
|
8
|
+
userId: string;
|
|
9
|
+
status: "active" | "frozen" | "disabled";
|
|
10
|
+
assetId: string;
|
|
11
|
+
ledgerAccountTypeId: string;
|
|
12
|
+
available: string;
|
|
13
|
+
locked: string;
|
|
14
|
+
version: number;
|
|
15
|
+
asset: {
|
|
16
|
+
symbol: string;
|
|
11
17
|
id: string;
|
|
18
|
+
name: string;
|
|
12
19
|
createdAt: Date;
|
|
13
20
|
updatedAt: Date;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
version: number;
|
|
21
|
-
ledgerAccountType: {
|
|
22
|
-
id: string;
|
|
23
|
-
name: string;
|
|
24
|
-
createdAt: Date;
|
|
25
|
-
updatedAt: Date;
|
|
26
|
-
description: string | null;
|
|
27
|
-
key: string;
|
|
28
|
-
isActive: boolean;
|
|
29
|
-
allowDeposit: boolean;
|
|
30
|
-
allowWithdraw: boolean;
|
|
31
|
-
minWithdrawAmount: string;
|
|
32
|
-
maxWithdrawAmount: string;
|
|
33
|
-
allowTransfer: boolean;
|
|
34
|
-
minTransferAmount: string;
|
|
35
|
-
maxTransferAmount: string;
|
|
36
|
-
allowInternalTransfer: boolean;
|
|
37
|
-
allowInternalReceiveTransfer: boolean;
|
|
38
|
-
minInternalTransferAmount: string;
|
|
39
|
-
maxInternalTransferAmount: string;
|
|
40
|
-
internalTransferRatio: string;
|
|
41
|
-
allowTransaction: boolean;
|
|
42
|
-
hasExpiry: boolean;
|
|
43
|
-
expiryDays: number | null;
|
|
44
|
-
sortOrder: number;
|
|
45
|
-
};
|
|
21
|
+
code: string;
|
|
22
|
+
iconUrl: string;
|
|
23
|
+
category: "FIAT" | "CRYPTO" | "POINT" | "RWA";
|
|
24
|
+
isActive: boolean;
|
|
25
|
+
typeId: string;
|
|
26
|
+
precision: number;
|
|
46
27
|
};
|
|
47
28
|
ledgerAccountType: {
|
|
48
29
|
id: string;
|
|
30
|
+
name: string;
|
|
31
|
+
createdAt: Date;
|
|
32
|
+
updatedAt: Date;
|
|
33
|
+
description: string | null;
|
|
49
34
|
key: string;
|
|
35
|
+
isActive: boolean;
|
|
36
|
+
allowDeposit: boolean;
|
|
37
|
+
allowWithdraw: boolean;
|
|
38
|
+
minWithdrawAmount: string;
|
|
39
|
+
maxWithdrawAmount: string;
|
|
40
|
+
allowTransfer: boolean;
|
|
41
|
+
minTransferAmount: string;
|
|
42
|
+
maxTransferAmount: string;
|
|
43
|
+
allowInternalTransfer: boolean;
|
|
44
|
+
allowInternalReceiveTransfer: boolean;
|
|
45
|
+
minInternalTransferAmount: string;
|
|
46
|
+
maxInternalTransferAmount: string;
|
|
47
|
+
internalTransferRatio: string;
|
|
48
|
+
allowTransaction: boolean;
|
|
49
|
+
hasExpiry: boolean;
|
|
50
|
+
expiryDays: number | null;
|
|
51
|
+
sortOrder: number;
|
|
52
|
+
};
|
|
53
|
+
}>;
|
|
54
|
+
static getAccountById(userId: string, params: LedgerAccountIdParamsType): Promise<{
|
|
55
|
+
id: string;
|
|
56
|
+
createdAt: Date;
|
|
57
|
+
updatedAt: Date;
|
|
58
|
+
userId: string;
|
|
59
|
+
status: "active" | "frozen" | "disabled";
|
|
60
|
+
assetId: string;
|
|
61
|
+
ledgerAccountTypeId: string;
|
|
62
|
+
available: string;
|
|
63
|
+
locked: string;
|
|
64
|
+
version: number;
|
|
65
|
+
asset: {
|
|
66
|
+
symbol: string;
|
|
67
|
+
id: string;
|
|
50
68
|
name: string;
|
|
69
|
+
createdAt: Date;
|
|
70
|
+
updatedAt: Date;
|
|
71
|
+
code: string;
|
|
72
|
+
iconUrl: string;
|
|
73
|
+
category: "FIAT" | "CRYPTO" | "POINT" | "RWA";
|
|
74
|
+
isActive: boolean;
|
|
75
|
+
typeId: string;
|
|
76
|
+
precision: number;
|
|
77
|
+
};
|
|
78
|
+
ledgerAccountType: {
|
|
79
|
+
id: string;
|
|
80
|
+
name: string;
|
|
81
|
+
createdAt: Date;
|
|
82
|
+
updatedAt: Date;
|
|
51
83
|
description: string | null;
|
|
84
|
+
key: string;
|
|
85
|
+
isActive: boolean;
|
|
86
|
+
allowDeposit: boolean;
|
|
87
|
+
allowWithdraw: boolean;
|
|
88
|
+
minWithdrawAmount: string;
|
|
89
|
+
maxWithdrawAmount: string;
|
|
90
|
+
allowTransfer: boolean;
|
|
91
|
+
minTransferAmount: string;
|
|
92
|
+
maxTransferAmount: string;
|
|
93
|
+
allowInternalTransfer: boolean;
|
|
94
|
+
allowInternalReceiveTransfer: boolean;
|
|
95
|
+
minInternalTransferAmount: string;
|
|
96
|
+
maxInternalTransferAmount: string;
|
|
97
|
+
internalTransferRatio: string;
|
|
98
|
+
allowTransaction: boolean;
|
|
99
|
+
hasExpiry: boolean;
|
|
100
|
+
expiryDays: number | null;
|
|
101
|
+
sortOrder: number;
|
|
52
102
|
};
|
|
53
103
|
}>;
|
|
54
104
|
}
|
|
@@ -72,7 +72,7 @@ export declare const ledgerAccountImportJobResponseSchema: import("drizzle-typeb
|
|
|
72
72
|
tableName: "ledger_account_import_job";
|
|
73
73
|
dataType: "string";
|
|
74
74
|
columnType: "PgEnumColumn";
|
|
75
|
-
data: "pending" | "
|
|
75
|
+
data: "pending" | "running" | "success" | "failed";
|
|
76
76
|
driverParam: string;
|
|
77
77
|
notNull: true;
|
|
78
78
|
hasDefault: true;
|
|
@@ -254,9 +254,9 @@ export declare const ledgerAccountImportJobListQuerySchema: import("@sinclair/ty
|
|
|
254
254
|
pageIndex: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
255
255
|
status: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TEnum<{
|
|
256
256
|
pending: "pending";
|
|
257
|
-
failed: "failed";
|
|
258
257
|
running: "running";
|
|
259
258
|
success: "success";
|
|
259
|
+
failed: "failed";
|
|
260
260
|
}>>;
|
|
261
261
|
}>;
|
|
262
262
|
export type LedgerAccountImportJobListQueryType = typeof ledgerAccountImportJobListQuerySchema.static;
|
|
@@ -335,7 +335,7 @@ export declare const ledgerAccountImportJobListResponseSchema: import("@sinclair
|
|
|
335
335
|
tableName: "ledger_account_import_job";
|
|
336
336
|
dataType: "string";
|
|
337
337
|
columnType: "PgEnumColumn";
|
|
338
|
-
data: "pending" | "
|
|
338
|
+
data: "pending" | "running" | "success" | "failed";
|
|
339
339
|
driverParam: string;
|
|
340
340
|
notNull: true;
|
|
341
341
|
hasDefault: true;
|
|
@@ -719,7 +719,7 @@ export declare const ledgerAccountImportItemResponseSchema: import("drizzle-type
|
|
|
719
719
|
tableName: "ledger_account_import_item";
|
|
720
720
|
dataType: "string";
|
|
721
721
|
columnType: "PgEnumColumn";
|
|
722
|
-
data: "
|
|
722
|
+
data: "success" | "failed" | "ignored";
|
|
723
723
|
driverParam: string;
|
|
724
724
|
notNull: true;
|
|
725
725
|
hasDefault: false;
|
|
@@ -877,8 +877,8 @@ export declare const ledgerAccountImportItemListQuerySchema: import("@sinclair/t
|
|
|
877
877
|
pageSize: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
878
878
|
pageIndex: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
879
879
|
status: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TEnum<{
|
|
880
|
-
failed: "failed";
|
|
881
880
|
success: "success";
|
|
881
|
+
failed: "failed";
|
|
882
882
|
ignored: "ignored";
|
|
883
883
|
}>>;
|
|
884
884
|
}>;
|
|
@@ -1094,7 +1094,7 @@ export declare const ledgerAccountImportItemListResponseSchema: import("@sinclai
|
|
|
1094
1094
|
tableName: "ledger_account_import_item";
|
|
1095
1095
|
dataType: "string";
|
|
1096
1096
|
columnType: "PgEnumColumn";
|
|
1097
|
-
data: "
|
|
1097
|
+
data: "success" | "failed" | "ignored";
|
|
1098
1098
|
driverParam: string;
|
|
1099
1099
|
notNull: true;
|
|
1100
1100
|
hasDefault: false;
|