@r2wa-org/eden 0.0.48 → 0.0.50
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/account/admin.router.d.ts +548 -0
- package/dist/src/account/db.schemas.d.ts +346 -0
- package/dist/src/account/dto.schemas.d.ts +414 -0
- package/dist/src/account/index.d.ts +7 -0
- package/dist/src/account/router.d.ts +509 -0
- package/dist/src/account/schema.d.ts +190 -0
- package/dist/src/account/seed.d.ts +1 -0
- package/dist/src/account/service.d.ts +139 -0
- package/dist/src/account-type/admin.router.d.ts +495 -0
- package/dist/src/account-type/db.schemas.d.ts +380 -0
- package/dist/src/account-type/dto.schemas.d.ts +28 -0
- package/dist/src/account-type/index.d.ts +7 -0
- package/dist/src/account-type/router.d.ts +460 -0
- package/dist/src/account-type/schema.d.ts +201 -0
- package/dist/src/account-type/seed.d.ts +1 -0
- package/dist/src/account-type/service.d.ts +52 -0
- package/dist/src/admin/admin/dto.schemas.d.ts +923 -0
- package/dist/src/admin/admin/errors/index.d.ts +14 -0
- package/dist/src/admin/admin/errors/locales/zh.d.ts +13 -0
- package/dist/src/admin/admin/router.d.ts +631 -0
- package/dist/src/admin/admin/service.d.ts +59 -0
- package/dist/src/admin/index.d.ts +3494 -2420
- package/dist/src/admin/user/dto.schemas.d.ts +600 -0
- package/dist/src/admin/user/router.d.ts +82 -0
- package/dist/src/admin/user/service.d.ts +31 -0
- package/dist/src/asset/admin/dto.schemas.d.ts +150 -0
- package/dist/src/asset/admin/router.d.ts +673 -0
- package/dist/src/asset/admin/service.d.ts +101 -0
- package/dist/src/asset/admin.router.d.ts +661 -0
- package/dist/src/asset/db.schemas.d.ts +380 -0
- package/dist/src/asset/dto.schemas.d.ts +139 -0
- package/dist/src/asset/errors/index.d.ts +31 -0
- package/dist/src/asset/errors/locales/zh.d.ts +19 -0
- package/dist/src/asset/index.d.ts +11 -0
- package/dist/src/asset/internal/service.d.ts +16 -0
- package/dist/src/asset/permissions.d.ts +4 -0
- package/dist/src/asset/router.d.ts +480 -0
- package/dist/src/asset/schema.d.ts +209 -0
- package/dist/src/asset/seed.d.ts +1 -0
- package/dist/src/asset/service.d.ts +160 -0
- package/dist/src/asset/user/dto.schemas.d.ts +162 -0
- package/dist/src/asset/user/router.d.ts +576 -0
- package/dist/src/asset/user/service.d.ts +78 -0
- package/dist/src/asset-price/admin/dto.schemas.d.ts +391 -0
- package/dist/src/asset-price/admin/router.d.ts +596 -0
- package/dist/src/asset-price/admin/service.d.ts +43 -0
- package/dist/src/asset-price/db.schemas.d.ts +358 -0
- package/dist/src/asset-price/errors/index.d.ts +16 -0
- package/dist/src/asset-price/errors/locales/zh.d.ts +15 -0
- package/dist/src/asset-price/index.d.ts +11 -0
- package/dist/src/asset-price/internal/service.d.ts +54 -0
- package/dist/src/asset-price/permissions.d.ts +6 -0
- package/dist/src/asset-price/schema.d.ts +191 -0
- package/dist/src/asset-price/seed.d.ts +1 -0
- package/dist/src/asset-price/user/dto.schemas.d.ts +383 -0
- package/dist/src/asset-price/user/router.d.ts +520 -0
- package/dist/src/asset-price/user/service.d.ts +31 -0
- package/dist/src/asset-type/admin/dto.schemas.d.ts +199 -0
- package/dist/src/asset-type/admin/router.d.ts +584 -0
- package/dist/src/asset-type/admin/service.d.ts +39 -0
- package/dist/src/asset-type/admin.router.d.ts +584 -0
- package/dist/src/asset-type/db.schemas.d.ts +278 -0
- package/dist/src/asset-type/dto.schemas.d.ts +178 -0
- package/dist/src/asset-type/errors/index.d.ts +21 -0
- package/dist/src/asset-type/errors/locales/zh.d.ts +14 -0
- package/dist/src/asset-type/index.d.ts +11 -0
- package/dist/src/asset-type/internal/service.d.ts +9 -0
- package/dist/src/asset-type/permissions.d.ts +4 -0
- package/dist/src/asset-type/router.d.ts +472 -0
- package/dist/src/asset-type/schema.d.ts +152 -0
- package/dist/src/asset-type/seed.d.ts +22 -0
- package/dist/src/asset-type/service.d.ts +59 -0
- package/dist/src/asset-type/share/dto.schemas.d.ts +178 -0
- package/dist/src/asset-type/user/dto.schemas.d.ts +49 -0
- package/dist/src/asset-type/user/router.d.ts +472 -0
- package/dist/src/asset-type/user/service.d.ts +19 -0
- package/dist/src/auth/better-auth.d.ts +81 -25
- package/dist/src/auth/permissions.d.ts +56 -16
- package/dist/src/auth/roles.d.ts +265 -36
- package/dist/src/auth/router.d.ts +2 -2
- package/dist/src/bank-account/admin/dto.schemas.d.ts +479 -0
- package/dist/src/bank-account/admin/router.d.ts +880 -0
- package/dist/src/bank-account/admin/service.d.ts +148 -0
- package/dist/src/bank-account/dto.schemas.d.ts +2 -2
- package/dist/src/bank-account/errors/index.d.ts +13 -0
- package/dist/src/bank-account/errors/locales/zh.d.ts +12 -0
- package/dist/src/bank-account/index.d.ts +4 -4
- package/dist/src/bank-account/internal/service.d.ts +51 -0
- package/dist/src/bank-account/service.d.ts +4 -4
- package/dist/src/bank-account/user/dto.schemas.d.ts +458 -0
- package/dist/src/bank-account/user/router.d.ts +680 -0
- package/dist/src/bank-account/user/service.d.ts +133 -0
- package/dist/src/check-in/admin/dto.schemas.d.ts +329 -0
- package/dist/src/check-in/admin/router.d.ts +530 -0
- package/dist/src/check-in/admin/service.d.ts +39 -0
- package/dist/src/check-in/dto.schemas.d.ts +4 -4
- package/dist/src/check-in/index.d.ts +4 -4
- package/dist/src/check-in/internal/service.d.ts +52 -0
- package/dist/src/check-in/user/dto.schemas.d.ts +520 -0
- package/dist/src/check-in/user/router.d.ts +616 -0
- package/dist/src/check-in/user/service.d.ts +50 -0
- package/dist/src/cron/index.d.ts +1 -13
- package/dist/src/db/schemas.d.ts +8 -3
- package/dist/src/deposit/admin/dto.schemas.d.ts +683 -0
- package/dist/src/deposit/admin/router.d.ts +642 -0
- package/dist/src/deposit/admin/service.d.ts +129 -0
- package/dist/src/deposit/admin.router.d.ts +9 -0
- package/dist/src/deposit/db.schemas.d.ts +102 -0
- package/dist/src/deposit/dto.schemas.d.ts +12 -4
- package/dist/src/deposit/errors/index.d.ts +8 -0
- package/dist/src/deposit/errors/locales/zh.d.ts +4 -0
- package/dist/src/deposit/index.d.ts +4 -4
- package/dist/src/deposit/internal/service.d.ts +8 -0
- package/dist/src/deposit/router.d.ts +13 -2
- package/dist/src/deposit/schema.d.ts +53 -0
- package/dist/src/deposit/service.d.ts +30 -10
- package/dist/src/deposit/user/dto.schemas.d.ts +681 -0
- package/dist/src/deposit/user/router.d.ts +632 -0
- package/dist/src/deposit/user/service.d.ts +129 -0
- package/dist/src/dynamic-env/admin.router.d.ts +113 -127
- package/dist/src/dynamic-env/errors/index.d.ts +11 -0
- package/dist/src/dynamic-env/errors/locales/zh.d.ts +10 -0
- package/dist/src/eden/index.d.ts +1 -1
- package/dist/src/env/server.d.ts +0 -1
- package/dist/src/file-storage/admin/dto.schemas.d.ts +209 -0
- package/dist/src/file-storage/admin/router.d.ts +601 -0
- package/dist/src/file-storage/admin/service.d.ts +89 -0
- package/dist/src/file-storage/admin.router.d.ts +2 -2
- package/dist/src/file-storage/db.schemas.d.ts +4 -4
- package/dist/src/file-storage/dto.schemas.d.ts +8 -8
- package/dist/src/file-storage/index.d.ts +5 -4
- package/dist/src/file-storage/internal/service.d.ts +66 -0
- package/dist/src/file-storage/router.d.ts +3 -3
- package/dist/src/file-storage/s3.client.d.ts +4 -4
- package/dist/src/file-storage/schema.d.ts +3 -3
- package/dist/src/file-storage/service.d.ts +7 -7
- package/dist/src/file-storage/share/dto.schemas.d.ts +68 -0
- package/dist/src/file-storage/share/router.d.ts +561 -0
- package/dist/src/file-storage/share.router.d.ts +1 -1
- package/dist/src/file-storage/user/dto.schemas.d.ts +1100 -0
- package/dist/src/file-storage/user/router.d.ts +585 -0
- package/dist/src/file-storage/user/service.d.ts +80 -0
- package/dist/src/index.d.ts +5715 -4110
- package/dist/src/ledger/admin/dto.schemas.d.ts +717 -0
- package/dist/src/ledger/admin/router.d.ts +523 -0
- package/dist/src/ledger/admin/service.d.ts +142 -0
- package/dist/src/ledger/admin.router.d.ts +17 -14
- package/dist/src/ledger/db.schemas.d.ts +266 -58
- package/dist/src/ledger/dto.schemas.d.ts +690 -138
- package/dist/src/ledger/errors/index.d.ts +16 -0
- package/dist/src/ledger/errors/locales/zh.d.ts +8 -0
- package/dist/src/ledger/index.d.ts +4 -4
- package/dist/src/ledger/internal/service.d.ts +182 -0
- package/dist/src/ledger/router.d.ts +17 -16
- package/dist/src/ledger/schema.d.ts +142 -37
- package/dist/src/ledger/service.d.ts +380 -126
- package/dist/src/ledger/user/dto.schemas.d.ts +712 -0
- package/dist/src/ledger/user/router.d.ts +487 -0
- package/dist/src/ledger/user/service.d.ts +142 -0
- package/dist/src/ledger-account/admin/dto.schemas.d.ts +642 -0
- package/dist/src/ledger-account/admin/router.d.ts +691 -0
- package/dist/src/ledger-account/admin/service.d.ts +184 -0
- package/dist/src/ledger-account/admin.router.d.ts +591 -0
- package/dist/src/ledger-account/db.schemas.d.ts +346 -0
- package/dist/src/ledger-account/dto.schemas.d.ts +559 -0
- package/dist/src/ledger-account/errors/index.d.ts +18 -0
- package/dist/src/ledger-account/errors/locales/zh.d.ts +17 -0
- package/dist/src/ledger-account/index.d.ts +8 -0
- package/dist/src/ledger-account/internal/service.d.ts +44 -0
- package/dist/src/ledger-account/permissions.d.ts +4 -0
- package/dist/src/ledger-account/router.d.ts +426 -0
- package/dist/src/ledger-account/schema.d.ts +190 -0
- package/dist/src/ledger-account/seed.d.ts +1 -0
- package/dist/src/ledger-account/service.d.ts +200 -0
- package/dist/src/ledger-account/user/dto.schemas.d.ts +734 -0
- package/dist/src/ledger-account/user/router.d.ts +479 -0
- package/dist/src/ledger-account/user/service.d.ts +54 -0
- package/dist/src/ledger-account-import/admin/dto.schemas.d.ts +1255 -0
- package/dist/src/ledger-account-import/admin/router.d.ts +694 -0
- package/dist/src/ledger-account-import/admin/service.d.ts +92 -0
- package/dist/src/ledger-account-import/admin.router.d.ts +694 -0
- package/dist/src/ledger-account-import/db.schemas.d.ts +1206 -0
- package/dist/src/ledger-account-import/dto.schemas.d.ts +1255 -0
- package/dist/src/ledger-account-import/errors/index.d.ts +18 -0
- package/dist/src/ledger-account-import/errors/locales/zh.d.ts +17 -0
- package/dist/src/ledger-account-import/index.d.ts +8 -0
- package/dist/src/ledger-account-import/internal/service.d.ts +13 -0
- package/dist/src/ledger-account-import/permissions.d.ts +7 -0
- package/dist/src/ledger-account-import/schema.d.ts +636 -0
- package/dist/src/ledger-account-import/service.d.ts +105 -0
- package/dist/src/ledger-account-import/user/service.d.ts +3 -0
- package/dist/src/ledger-account-import/worker.d.ts +1 -0
- package/dist/src/ledger-account-transfer/admin/service.d.ts +3 -0
- package/dist/src/ledger-account-transfer/dto.schemas.d.ts +22 -0
- package/dist/src/ledger-account-transfer/errors/index.d.ts +23 -0
- package/dist/src/ledger-account-transfer/errors/locales/zh.d.ts +15 -0
- package/dist/src/ledger-account-transfer/index.d.ts +6 -0
- package/dist/src/ledger-account-transfer/internal/service.d.ts +8 -0
- package/dist/src/ledger-account-transfer/router.d.ts +469 -0
- package/dist/src/ledger-account-transfer/service.d.ts +26 -0
- package/dist/src/ledger-account-transfer/user/dto.schemas.d.ts +20 -0
- package/dist/src/ledger-account-transfer/user/router.d.ts +466 -0
- package/dist/src/ledger-account-transfer/user/service.d.ts +16 -0
- package/dist/src/ledger-account-type/admin/dto.schemas.d.ts +509 -0
- package/dist/src/ledger-account-type/admin/router.d.ts +711 -0
- package/dist/src/ledger-account-type/admin/service.d.ts +109 -0
- package/dist/src/ledger-account-type/admin.router.d.ts +711 -0
- package/dist/src/ledger-account-type/db.schemas.d.ts +788 -0
- package/dist/src/ledger-account-type/dto.schemas.d.ts +509 -0
- package/dist/src/ledger-account-type/errors/index.d.ts +18 -0
- package/dist/src/ledger-account-type/errors/locales/zh.d.ts +17 -0
- package/dist/src/ledger-account-type/index.d.ts +9 -0
- package/dist/src/ledger-account-type/internal/service.d.ts +8 -0
- package/dist/src/ledger-account-type/permissions.d.ts +4 -0
- package/dist/src/ledger-account-type/router.d.ts +486 -0
- package/dist/src/ledger-account-type/schema.d.ts +405 -0
- package/dist/src/ledger-account-type/seed.d.ts +1 -0
- package/dist/src/ledger-account-type/service.d.ts +147 -0
- package/dist/src/ledger-account-type/user/dto.schemas.d.ts +509 -0
- package/dist/src/ledger-account-type/user/router.d.ts +486 -0
- package/dist/src/ledger-account-type/user/service.d.ts +34 -0
- package/dist/src/news/admin/dto.schemas.d.ts +159 -0
- package/dist/src/news/admin/router.d.ts +821 -0
- package/dist/src/news/admin/service.d.ts +220 -0
- package/dist/src/news/admin.router.d.ts +1 -1
- package/dist/src/news/index.d.ts +4 -3
- package/dist/src/news/internal/service.d.ts +7 -0
- package/dist/src/news/service.d.ts +3 -3
- package/dist/src/news/user/dto.schemas.d.ts +178 -0
- package/dist/src/news/user/router.d.ts +617 -0
- package/dist/src/news/user/service.d.ts +228 -0
- package/dist/src/news-category/admin/dto.schemas.d.ts +52 -0
- package/dist/src/news-category/admin/router.d.ts +204 -0
- package/dist/src/news-category/admin/service.d.ts +54 -0
- package/dist/src/news-category/index.d.ts +4 -3
- package/dist/src/news-category/internal/service.d.ts +5 -0
- package/dist/src/news-category/user/dto.schemas.d.ts +55 -0
- package/dist/src/news-category/user/router.d.ts +457 -0
- package/dist/src/news-category/user/service.d.ts +25 -0
- package/dist/src/notification/admin/dto.schemas.d.ts +432 -0
- package/dist/src/notification/admin/router.d.ts +579 -0
- package/dist/src/notification/admin/service.d.ts +43 -0
- package/dist/src/notification/dto.schemas.d.ts +9 -9
- package/dist/src/notification/index.d.ts +4 -4
- package/dist/src/notification/internal/service.d.ts +28 -0
- package/dist/src/notification/user/dto.schemas.d.ts +411 -0
- package/dist/src/notification/user/router.d.ts +632 -0
- package/dist/src/notification/user/service.d.ts +82 -0
- package/dist/src/receipt-method/admin/dto.schemas.d.ts +392 -0
- package/dist/src/receipt-method/admin/router.d.ts +579 -0
- package/dist/src/receipt-method/admin/service.d.ts +46 -0
- package/dist/src/receipt-method/errors/index.d.ts +17 -0
- package/dist/src/receipt-method/errors/locales/zh.d.ts +16 -0
- package/dist/src/receipt-method/index.d.ts +4 -4
- package/dist/src/receipt-method/internal/service.d.ts +33 -0
- package/dist/src/receipt-method/user/dto.schemas.d.ts +417 -0
- package/dist/src/receipt-method/user/router.d.ts +602 -0
- package/dist/src/receipt-method/user/service.d.ts +73 -0
- package/dist/src/referral/admin/dto.schemas.d.ts +627 -0
- package/dist/src/referral/admin/router.d.ts +562 -0
- package/dist/src/referral/admin/service.d.ts +6 -0
- package/dist/src/referral/index.d.ts +6 -3
- package/dist/src/referral/internal/service.d.ts +23 -0
- package/dist/src/referral/user/dto.schemas.d.ts +636 -0
- package/dist/src/referral/user/router.d.ts +579 -0
- package/dist/src/referral/user/service.d.ts +21 -0
- package/dist/src/referral-depth-config/admin/dto.schemas.d.ts +203 -0
- package/dist/src/referral-depth-config/admin/router.d.ts +646 -0
- package/dist/src/referral-depth-config/admin/service.d.ts +38 -0
- package/dist/src/referral-depth-config/internal/service.d.ts +4 -0
- package/dist/src/server-test/index.d.ts +2 -2
- package/dist/src/shipping-address/admin/dto.schemas.d.ts +289 -0
- package/dist/src/shipping-address/admin/router.d.ts +507 -0
- package/dist/src/shipping-address/admin/service.d.ts +17 -0
- package/dist/src/shipping-address/errors/index.d.ts +12 -0
- package/dist/src/shipping-address/errors/locales/zh.d.ts +11 -0
- package/dist/src/shipping-address/index.d.ts +4 -4
- package/dist/src/shipping-address/internal/service.d.ts +15 -0
- package/dist/src/shipping-address/user/dto.schemas.d.ts +303 -0
- package/dist/src/shipping-address/user/router.d.ts +621 -0
- package/dist/src/shipping-address/user/service.d.ts +68 -0
- package/dist/src/subscription/admin.router.d.ts +6 -6
- package/dist/src/subscription/db.schemas.d.ts +2 -2
- package/dist/src/subscription/dto.schemas.d.ts +293 -293
- package/dist/src/subscription/router.d.ts +7 -7
- package/dist/src/subscription/schema.d.ts +1 -1
- package/dist/src/subscription/service.d.ts +9 -9
- package/dist/src/team/admin/dto.schemas.d.ts +807 -0
- package/dist/src/team/admin/router.d.ts +569 -0
- package/dist/src/team/admin/service.d.ts +6 -0
- package/dist/src/team/index.d.ts +6 -3
- package/dist/src/team/internal/service.d.ts +6 -0
- package/dist/src/team/user/dto.schemas.d.ts +2072 -0
- package/dist/src/team/user/router.d.ts +737 -0
- package/dist/src/team/user/service.d.ts +10 -0
- package/dist/src/transfer/admin/dto.schemas.d.ts +396 -0
- package/dist/src/transfer/admin/router.d.ts +509 -0
- package/dist/src/transfer/admin/service.d.ts +58 -0
- package/dist/src/transfer/admin.router.d.ts +4 -90
- package/dist/src/transfer/db.schemas.d.ts +80 -12
- package/dist/src/transfer/dto.schemas.d.ts +342 -3923
- package/dist/src/transfer/errors/index.d.ts +16 -16
- package/dist/src/transfer/errors/locales/zh.d.ts +8 -8
- package/dist/src/transfer/index.d.ts +7 -4
- package/dist/src/transfer/internal/service.d.ts +8 -0
- package/dist/src/transfer/router.d.ts +36 -119
- package/dist/src/transfer/schema.d.ts +43 -8
- package/dist/src/transfer/service.d.ts +15 -114
- package/dist/src/transfer/user/dto.schemas.d.ts +416 -0
- package/dist/src/transfer/user/router.d.ts +514 -0
- package/dist/src/transfer/user/service.d.ts +69 -0
- package/dist/src/user/admin/dto.schemas.d.ts +1459 -0
- package/dist/src/user/admin/router.d.ts +861 -0
- package/dist/src/user/admin/service.d.ts +168 -0
- package/dist/src/user/dto.schemas.d.ts +4 -4
- package/dist/src/user/errors/index.d.ts +2 -0
- package/dist/src/user/errors/locales/zh.d.ts +1 -0
- package/dist/src/user/index.d.ts +6 -4
- package/dist/src/user/internal/service.d.ts +22 -0
- package/dist/src/user/user/dto.schemas.d.ts +14 -0
- package/dist/src/user/user/router.d.ts +560 -0
- package/dist/src/user/user/service.d.ts +91 -0
- package/dist/src/user-kyc/admin/dto.schemas.d.ts +625 -0
- package/dist/src/user-kyc/admin/router.d.ts +669 -0
- package/dist/src/user-kyc/admin/service.d.ts +89 -0
- package/dist/src/user-kyc/index.d.ts +6 -4
- package/dist/src/user-kyc/internal/service.d.ts +9 -0
- package/dist/src/user-kyc/user/dto.schemas.d.ts +314 -0
- package/dist/src/user-kyc/user/router.d.ts +602 -0
- package/dist/src/user-kyc/user/service.d.ts +64 -0
- package/dist/src/user-security/admin/dto.schemas.d.ts +8 -0
- package/dist/src/user-security/admin/router.d.ts +493 -0
- package/dist/src/user-security/admin/service.d.ts +6 -0
- package/dist/src/user-security/index.d.ts +6 -4
- package/dist/src/user-security/internal/service.d.ts +15 -0
- package/dist/src/user-security/user/dto.schemas.d.ts +21 -0
- package/dist/src/user-security/user/router.d.ts +547 -0
- package/dist/src/user-security/user/service.d.ts +15 -0
- package/dist/src/wallet/admin/dto.schemas.d.ts +317 -0
- package/dist/src/wallet/admin/router.d.ts +519 -0
- package/dist/src/wallet/admin/service.d.ts +27 -0
- package/dist/src/wallet/admin.router.d.ts +50 -147
- package/dist/src/wallet/db.schemas.d.ts +54 -54
- package/dist/src/wallet/dto.schemas.d.ts +47 -1420
- package/dist/src/wallet/ensure.d.ts +2 -2
- package/dist/src/wallet/errors/index.d.ts +10 -0
- package/dist/src/wallet/errors/locales/zh.d.ts +9 -0
- package/dist/src/wallet/index.d.ts +9 -4
- package/dist/src/wallet/internal/service.d.ts +73 -0
- package/dist/src/wallet/permissions.d.ts +8 -0
- package/dist/src/wallet/router.d.ts +39 -209
- package/dist/src/wallet/schema.d.ts +31 -31
- package/dist/src/wallet/seed.d.ts +1 -0
- package/dist/src/wallet/service.d.ts +66 -191
- package/dist/src/wallet/user/dto.schemas.d.ts +432 -0
- package/dist/src/wallet/user/router.d.ts +604 -0
- package/dist/src/wallet/user/service.d.ts +101 -0
- package/dist/src/wallet-import/admin.router.d.ts +7 -3
- package/dist/src/wallet-import/db.schemas.d.ts +154 -18
- package/dist/src/wallet-import/dto.schemas.d.ts +154 -18
- package/dist/src/wallet-import/errors/index.d.ts +2 -1
- package/dist/src/wallet-import/errors/locales/zh.d.ts +2 -1
- package/dist/src/wallet-import/schema.d.ts +80 -10
- package/dist/src/wallet-import/service.d.ts +7 -3
- package/dist/src/wallet-transfer/dto.schemas.d.ts +18 -60
- package/dist/src/wallet-transfer/errors/index.d.ts +12 -14
- package/dist/src/wallet-transfer/errors/locales/zh.d.ts +6 -7
- package/dist/src/wallet-transfer/router.d.ts +32 -28
- package/dist/src/wallet-transfer/service.d.ts +12 -12
- package/dist/src/wallet-type/admin/dto.schemas.d.ts +79 -0
- package/dist/src/wallet-type/admin/router.d.ts +611 -0
- package/dist/src/wallet-type/admin/service.d.ts +58 -0
- package/dist/src/wallet-type/admin.router.d.ts +63 -219
- package/dist/src/wallet-type/db.schemas.d.ts +14 -530
- package/dist/src/wallet-type/dto.schemas.d.ts +44 -125
- package/dist/src/wallet-type/errors/index.d.ts +1 -15
- package/dist/src/wallet-type/errors/locales/zh.d.ts +1 -7
- package/dist/src/wallet-type/index.d.ts +6 -3
- package/dist/src/wallet-type/internal/service.d.ts +219 -0
- package/dist/src/wallet-type/permissions.d.ts +0 -1
- package/dist/src/wallet-type/router.d.ts +481 -0
- package/dist/src/wallet-type/schema.d.ts +41 -250
- package/dist/src/wallet-type/seed.d.ts +0 -3
- package/dist/src/wallet-type/service.d.ts +206 -171
- package/dist/src/wallet-type/user/dto.schemas.d.ts +62 -0
- package/dist/src/wallet-type/user/router.d.ts +481 -0
- package/dist/src/wallet-type/user/service.d.ts +24 -0
- package/dist/src/welfare-cycle/admin/dto.schemas.d.ts +1261 -0
- package/dist/src/welfare-cycle/admin/router.d.ts +1029 -0
- package/dist/src/welfare-cycle/admin/service.d.ts +217 -0
- package/dist/src/welfare-cycle/db.schemas.d.ts +2234 -0
- package/dist/src/welfare-cycle/errors/index.d.ts +19 -0
- package/dist/src/welfare-cycle/errors/locales/zh.d.ts +18 -0
- package/dist/src/welfare-cycle/index.d.ts +7 -0
- package/dist/src/welfare-cycle/internal/service.d.ts +208 -0
- package/dist/src/welfare-cycle/permissions.d.ts +6 -0
- package/dist/src/welfare-cycle/schema.d.ts +1183 -0
- package/dist/src/welfare-cycle/user/dto.schemas.d.ts +1603 -0
- package/dist/src/welfare-cycle/user/router.d.ts +803 -0
- package/dist/src/welfare-cycle/user/service.d.ts +175 -0
- package/dist/src/withdraw/admin/dto.schemas.d.ts +902 -0
- package/dist/src/withdraw/admin/router.d.ts +662 -0
- package/dist/src/withdraw/admin/service.d.ts +83 -0
- package/dist/src/withdraw/admin.router.d.ts +12 -4
- package/dist/src/withdraw/db.schemas.d.ts +74 -6
- package/dist/src/withdraw/dto.schemas.d.ts +115 -12
- package/dist/src/withdraw/errors/index.d.ts +6 -4
- package/dist/src/withdraw/errors/locales/zh.d.ts +3 -2
- package/dist/src/withdraw/index.d.ts +7 -6
- package/dist/src/withdraw/internal/index.d.ts +1 -0
- package/dist/src/withdraw/internal/service.d.ts +10 -0
- package/dist/src/withdraw/router.d.ts +42 -35
- package/dist/src/withdraw/schema.d.ts +39 -4
- package/dist/src/withdraw/service.d.ts +21 -11
- package/dist/src/withdraw/user/dto.schemas.d.ts +902 -0
- package/dist/src/withdraw/user/index.d.ts +3 -0
- package/dist/src/withdraw/user/router.d.ts +529 -0
- package/dist/src/withdraw/user/service.d.ts +45 -0
- package/package.json +1 -1
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { BaseDepositService } from "../internal/service";
|
|
2
|
+
import type { DepositAdminListQueryType, DepositApproveInputType, DepositRejectInputType } from "./dto.schemas";
|
|
3
|
+
export declare abstract class AdminDepositService extends BaseDepositService {
|
|
4
|
+
static approveDeposit(orderId: string, reviewerId: string, input: DepositApproveInputType): Promise<{
|
|
5
|
+
createdAt: Date;
|
|
6
|
+
updatedAt: Date;
|
|
7
|
+
id: string;
|
|
8
|
+
orderNo: string;
|
|
9
|
+
idempotencyKey: string;
|
|
10
|
+
userId: string;
|
|
11
|
+
amount: string;
|
|
12
|
+
assetId: string | null;
|
|
13
|
+
targetAccountId: string | null;
|
|
14
|
+
actualAmount: string | null;
|
|
15
|
+
fee: string | null;
|
|
16
|
+
status: "pending" | "approved" | "rejected" | "completed" | "cancelled";
|
|
17
|
+
paymentChannel: string | null;
|
|
18
|
+
paymentOrderNo: string | null;
|
|
19
|
+
paymentProof: string | null;
|
|
20
|
+
reviewedBy: string | null;
|
|
21
|
+
reviewedAt: Date | null;
|
|
22
|
+
reviewNote: string | null;
|
|
23
|
+
completedAt: Date | null;
|
|
24
|
+
}>;
|
|
25
|
+
static rejectDeposit(orderId: string, reviewerId: string, input: DepositRejectInputType): Promise<{
|
|
26
|
+
createdAt: Date;
|
|
27
|
+
updatedAt: Date;
|
|
28
|
+
id: string;
|
|
29
|
+
orderNo: string;
|
|
30
|
+
idempotencyKey: string;
|
|
31
|
+
userId: string;
|
|
32
|
+
amount: string;
|
|
33
|
+
assetId: string | null;
|
|
34
|
+
targetAccountId: string | null;
|
|
35
|
+
actualAmount: string | null;
|
|
36
|
+
fee: string | null;
|
|
37
|
+
status: "pending" | "approved" | "rejected" | "completed" | "cancelled";
|
|
38
|
+
paymentChannel: string | null;
|
|
39
|
+
paymentOrderNo: string | null;
|
|
40
|
+
paymentProof: string | null;
|
|
41
|
+
reviewedBy: string | null;
|
|
42
|
+
reviewedAt: Date | null;
|
|
43
|
+
reviewNote: string | null;
|
|
44
|
+
completedAt: Date | null;
|
|
45
|
+
}>;
|
|
46
|
+
static listDepositOrders(options?: DepositAdminListQueryType): Promise<{
|
|
47
|
+
orders: {
|
|
48
|
+
id: string;
|
|
49
|
+
createdAt: Date;
|
|
50
|
+
updatedAt: Date;
|
|
51
|
+
userId: string;
|
|
52
|
+
status: "pending" | "approved" | "rejected" | "completed" | "cancelled";
|
|
53
|
+
reviewedAt: Date | null;
|
|
54
|
+
reviewedBy: string | null;
|
|
55
|
+
assetId: string | null;
|
|
56
|
+
amount: string;
|
|
57
|
+
idempotencyKey: string;
|
|
58
|
+
orderNo: string;
|
|
59
|
+
targetAccountId: string | null;
|
|
60
|
+
actualAmount: string | null;
|
|
61
|
+
fee: string | null;
|
|
62
|
+
paymentChannel: string | null;
|
|
63
|
+
paymentOrderNo: string | null;
|
|
64
|
+
paymentProof: string | null;
|
|
65
|
+
reviewNote: string | null;
|
|
66
|
+
completedAt: Date | null;
|
|
67
|
+
user: {
|
|
68
|
+
email: string;
|
|
69
|
+
id: string;
|
|
70
|
+
name: string;
|
|
71
|
+
emailVerified: boolean;
|
|
72
|
+
image: string | null;
|
|
73
|
+
createdAt: Date;
|
|
74
|
+
updatedAt: Date;
|
|
75
|
+
twoFactorEnabled: boolean | null;
|
|
76
|
+
username: string | null;
|
|
77
|
+
displayUsername: string | null;
|
|
78
|
+
isAnonymous: boolean | null;
|
|
79
|
+
phoneNumber: string | null;
|
|
80
|
+
phoneNumberVerified: boolean | null;
|
|
81
|
+
role: string | null;
|
|
82
|
+
banned: boolean | null;
|
|
83
|
+
banReason: string | null;
|
|
84
|
+
banExpires: Date | null;
|
|
85
|
+
};
|
|
86
|
+
}[];
|
|
87
|
+
total: number;
|
|
88
|
+
}>;
|
|
89
|
+
static getDepositOrder(orderId: string): Promise<{
|
|
90
|
+
id: string;
|
|
91
|
+
createdAt: Date;
|
|
92
|
+
updatedAt: Date;
|
|
93
|
+
userId: string;
|
|
94
|
+
status: "pending" | "approved" | "rejected" | "completed" | "cancelled";
|
|
95
|
+
reviewedAt: Date | null;
|
|
96
|
+
reviewedBy: string | null;
|
|
97
|
+
assetId: string | null;
|
|
98
|
+
amount: string;
|
|
99
|
+
idempotencyKey: string;
|
|
100
|
+
orderNo: string;
|
|
101
|
+
targetAccountId: string | null;
|
|
102
|
+
actualAmount: string | null;
|
|
103
|
+
fee: string | null;
|
|
104
|
+
paymentChannel: string | null;
|
|
105
|
+
paymentOrderNo: string | null;
|
|
106
|
+
paymentProof: string | null;
|
|
107
|
+
reviewNote: string | null;
|
|
108
|
+
completedAt: Date | null;
|
|
109
|
+
user: {
|
|
110
|
+
email: string;
|
|
111
|
+
id: string;
|
|
112
|
+
name: string;
|
|
113
|
+
emailVerified: boolean;
|
|
114
|
+
image: string | null;
|
|
115
|
+
createdAt: Date;
|
|
116
|
+
updatedAt: Date;
|
|
117
|
+
twoFactorEnabled: boolean | null;
|
|
118
|
+
username: string | null;
|
|
119
|
+
displayUsername: string | null;
|
|
120
|
+
isAnonymous: boolean | null;
|
|
121
|
+
phoneNumber: string | null;
|
|
122
|
+
phoneNumberVerified: boolean | null;
|
|
123
|
+
role: string | null;
|
|
124
|
+
banned: boolean | null;
|
|
125
|
+
banReason: string | null;
|
|
126
|
+
banExpires: Date | null;
|
|
127
|
+
};
|
|
128
|
+
} | undefined>;
|
|
129
|
+
}
|
|
@@ -423,8 +423,11 @@ export declare const depositAdminRouter: Elysia<"/deposit", {
|
|
|
423
423
|
status: "pending" | "approved" | "rejected" | "completed" | "cancelled";
|
|
424
424
|
reviewedAt: Date | null;
|
|
425
425
|
reviewedBy: string | null;
|
|
426
|
+
assetId: string | null;
|
|
426
427
|
amount: string;
|
|
428
|
+
idempotencyKey: string;
|
|
427
429
|
orderNo: string;
|
|
430
|
+
targetAccountId: string | null;
|
|
428
431
|
actualAmount: string | null;
|
|
429
432
|
fee: string | null;
|
|
430
433
|
paymentChannel: string | null;
|
|
@@ -475,8 +478,11 @@ export declare const depositAdminRouter: Elysia<"/deposit", {
|
|
|
475
478
|
updatedAt: Date;
|
|
476
479
|
id: string;
|
|
477
480
|
orderNo: string;
|
|
481
|
+
idempotencyKey: string;
|
|
478
482
|
userId: string;
|
|
479
483
|
amount: string;
|
|
484
|
+
assetId: string | null;
|
|
485
|
+
targetAccountId: string | null;
|
|
480
486
|
actualAmount: string | null;
|
|
481
487
|
fee: string | null;
|
|
482
488
|
status: "pending" | "approved" | "rejected" | "completed" | "cancelled";
|
|
@@ -523,8 +529,11 @@ export declare const depositAdminRouter: Elysia<"/deposit", {
|
|
|
523
529
|
updatedAt: Date;
|
|
524
530
|
id: string;
|
|
525
531
|
orderNo: string;
|
|
532
|
+
idempotencyKey: string;
|
|
526
533
|
userId: string;
|
|
527
534
|
amount: string;
|
|
535
|
+
assetId: string | null;
|
|
536
|
+
targetAccountId: string | null;
|
|
528
537
|
actualAmount: string | null;
|
|
529
538
|
fee: string | null;
|
|
530
539
|
status: "pending" | "approved" | "rejected" | "completed" | "cancelled";
|
|
@@ -67,6 +67,23 @@ export declare const depositOrderSelectSchema: import("drizzle-typebox").BuildSc
|
|
|
67
67
|
identity: undefined;
|
|
68
68
|
generated: undefined;
|
|
69
69
|
}, {}, {}>;
|
|
70
|
+
idempotencyKey: import("drizzle-orm/pg-core").PgColumn<{
|
|
71
|
+
name: "idempotency_key";
|
|
72
|
+
tableName: "deposit_order";
|
|
73
|
+
dataType: "string";
|
|
74
|
+
columnType: "PgText";
|
|
75
|
+
data: string;
|
|
76
|
+
driverParam: string;
|
|
77
|
+
notNull: true;
|
|
78
|
+
hasDefault: false;
|
|
79
|
+
isPrimaryKey: false;
|
|
80
|
+
isAutoincrement: false;
|
|
81
|
+
hasRuntimeDefault: false;
|
|
82
|
+
enumValues: [string, ...string[]];
|
|
83
|
+
baseColumn: never;
|
|
84
|
+
identity: undefined;
|
|
85
|
+
generated: undefined;
|
|
86
|
+
}, {}, {}>;
|
|
70
87
|
userId: import("drizzle-orm/pg-core").PgColumn<{
|
|
71
88
|
name: "user_id";
|
|
72
89
|
tableName: "deposit_order";
|
|
@@ -101,6 +118,40 @@ export declare const depositOrderSelectSchema: import("drizzle-typebox").BuildSc
|
|
|
101
118
|
identity: undefined;
|
|
102
119
|
generated: undefined;
|
|
103
120
|
}, {}, {}>;
|
|
121
|
+
assetId: import("drizzle-orm/pg-core").PgColumn<{
|
|
122
|
+
name: "asset_id";
|
|
123
|
+
tableName: "deposit_order";
|
|
124
|
+
dataType: "string";
|
|
125
|
+
columnType: "PgUUID";
|
|
126
|
+
data: string;
|
|
127
|
+
driverParam: string;
|
|
128
|
+
notNull: false;
|
|
129
|
+
hasDefault: false;
|
|
130
|
+
isPrimaryKey: false;
|
|
131
|
+
isAutoincrement: false;
|
|
132
|
+
hasRuntimeDefault: false;
|
|
133
|
+
enumValues: undefined;
|
|
134
|
+
baseColumn: never;
|
|
135
|
+
identity: undefined;
|
|
136
|
+
generated: undefined;
|
|
137
|
+
}, {}, {}>;
|
|
138
|
+
targetAccountId: import("drizzle-orm/pg-core").PgColumn<{
|
|
139
|
+
name: "target_account_id";
|
|
140
|
+
tableName: "deposit_order";
|
|
141
|
+
dataType: "string";
|
|
142
|
+
columnType: "PgUUID";
|
|
143
|
+
data: string;
|
|
144
|
+
driverParam: string;
|
|
145
|
+
notNull: false;
|
|
146
|
+
hasDefault: false;
|
|
147
|
+
isPrimaryKey: false;
|
|
148
|
+
isAutoincrement: false;
|
|
149
|
+
hasRuntimeDefault: false;
|
|
150
|
+
enumValues: undefined;
|
|
151
|
+
baseColumn: never;
|
|
152
|
+
identity: undefined;
|
|
153
|
+
generated: undefined;
|
|
154
|
+
}, {}, {}>;
|
|
104
155
|
actualAmount: import("drizzle-orm/pg-core").PgColumn<{
|
|
105
156
|
name: "actual_amount";
|
|
106
157
|
tableName: "deposit_order";
|
|
@@ -342,6 +393,23 @@ export declare const depositOrderInsertSchema: import("drizzle-typebox").BuildSc
|
|
|
342
393
|
identity: undefined;
|
|
343
394
|
generated: undefined;
|
|
344
395
|
}, {}, {}>;
|
|
396
|
+
idempotencyKey: import("drizzle-orm/pg-core").PgColumn<{
|
|
397
|
+
name: "idempotency_key";
|
|
398
|
+
tableName: "deposit_order";
|
|
399
|
+
dataType: "string";
|
|
400
|
+
columnType: "PgText";
|
|
401
|
+
data: string;
|
|
402
|
+
driverParam: string;
|
|
403
|
+
notNull: true;
|
|
404
|
+
hasDefault: false;
|
|
405
|
+
isPrimaryKey: false;
|
|
406
|
+
isAutoincrement: false;
|
|
407
|
+
hasRuntimeDefault: false;
|
|
408
|
+
enumValues: [string, ...string[]];
|
|
409
|
+
baseColumn: never;
|
|
410
|
+
identity: undefined;
|
|
411
|
+
generated: undefined;
|
|
412
|
+
}, {}, {}>;
|
|
345
413
|
userId: import("drizzle-orm/pg-core").PgColumn<{
|
|
346
414
|
name: "user_id";
|
|
347
415
|
tableName: "deposit_order";
|
|
@@ -376,6 +444,40 @@ export declare const depositOrderInsertSchema: import("drizzle-typebox").BuildSc
|
|
|
376
444
|
identity: undefined;
|
|
377
445
|
generated: undefined;
|
|
378
446
|
}, {}, {}>;
|
|
447
|
+
assetId: import("drizzle-orm/pg-core").PgColumn<{
|
|
448
|
+
name: "asset_id";
|
|
449
|
+
tableName: "deposit_order";
|
|
450
|
+
dataType: "string";
|
|
451
|
+
columnType: "PgUUID";
|
|
452
|
+
data: string;
|
|
453
|
+
driverParam: string;
|
|
454
|
+
notNull: false;
|
|
455
|
+
hasDefault: false;
|
|
456
|
+
isPrimaryKey: false;
|
|
457
|
+
isAutoincrement: false;
|
|
458
|
+
hasRuntimeDefault: false;
|
|
459
|
+
enumValues: undefined;
|
|
460
|
+
baseColumn: never;
|
|
461
|
+
identity: undefined;
|
|
462
|
+
generated: undefined;
|
|
463
|
+
}, {}, {}>;
|
|
464
|
+
targetAccountId: import("drizzle-orm/pg-core").PgColumn<{
|
|
465
|
+
name: "target_account_id";
|
|
466
|
+
tableName: "deposit_order";
|
|
467
|
+
dataType: "string";
|
|
468
|
+
columnType: "PgUUID";
|
|
469
|
+
data: string;
|
|
470
|
+
driverParam: string;
|
|
471
|
+
notNull: false;
|
|
472
|
+
hasDefault: false;
|
|
473
|
+
isPrimaryKey: false;
|
|
474
|
+
isAutoincrement: false;
|
|
475
|
+
hasRuntimeDefault: false;
|
|
476
|
+
enumValues: undefined;
|
|
477
|
+
baseColumn: never;
|
|
478
|
+
identity: undefined;
|
|
479
|
+
generated: undefined;
|
|
480
|
+
}, {}, {}>;
|
|
379
481
|
actualAmount: import("drizzle-orm/pg-core").PgColumn<{
|
|
380
482
|
name: "actual_amount";
|
|
381
483
|
tableName: "deposit_order";
|
|
@@ -12,8 +12,11 @@ export declare const depositOrderSelectModel: import("@sinclair/typebox").TObjec
|
|
|
12
12
|
}>;
|
|
13
13
|
reviewedAt: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TDate, import("@sinclair/typebox").TNull]>;
|
|
14
14
|
reviewedBy: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
15
|
+
assetId: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
15
16
|
amount: import("@sinclair/typebox").TString;
|
|
17
|
+
idempotencyKey: import("@sinclair/typebox").TString;
|
|
16
18
|
orderNo: import("@sinclair/typebox").TString;
|
|
19
|
+
targetAccountId: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
17
20
|
actualAmount: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
18
21
|
fee: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
19
22
|
paymentChannel: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
@@ -322,15 +325,17 @@ export declare const DepositStatus: import("@sinclair/typebox").TEnum<{
|
|
|
322
325
|
cancelled: "cancelled";
|
|
323
326
|
}>;
|
|
324
327
|
/**
|
|
325
|
-
*
|
|
328
|
+
* 创建账户充值订单
|
|
326
329
|
*/
|
|
327
|
-
export declare const
|
|
330
|
+
export declare const createLedgerAccountDepositBodyModel: import("@sinclair/typebox").TObject<{
|
|
331
|
+
targetAccountId: import("@sinclair/typebox").TString;
|
|
328
332
|
amount: import("@sinclair/typebox").TString;
|
|
329
|
-
|
|
333
|
+
idempotencyKey: import("@sinclair/typebox").TString;
|
|
334
|
+
paymentChannel: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
330
335
|
paymentOrderNo: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
331
336
|
paymentProof: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
332
337
|
}>;
|
|
333
|
-
export type
|
|
338
|
+
export type LedgerAccountDepositCreateInputType = typeof createLedgerAccountDepositBodyModel.static;
|
|
334
339
|
/**
|
|
335
340
|
* 审核通过充值订单
|
|
336
341
|
*/
|
|
@@ -395,8 +400,11 @@ export declare const depositOrderListResponseModel: import("@sinclair/typebox").
|
|
|
395
400
|
}>;
|
|
396
401
|
reviewedAt: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TDate, import("@sinclair/typebox").TNull]>;
|
|
397
402
|
reviewedBy: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
403
|
+
assetId: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
398
404
|
amount: import("@sinclair/typebox").TString;
|
|
405
|
+
idempotencyKey: import("@sinclair/typebox").TString;
|
|
399
406
|
orderNo: import("@sinclair/typebox").TString;
|
|
407
|
+
targetAccountId: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
400
408
|
actualAmount: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
401
409
|
fee: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
402
410
|
paymentChannel: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
@@ -24,6 +24,14 @@ export declare const DepositErrorCodes: {
|
|
|
24
24
|
readonly DEPOSIT_ORDER_NOT_FOUND_OR_PROCESSED: "DEPOSIT_ORDER_NOT_FOUND_OR_PROCESSED";
|
|
25
25
|
/** 充值订单不存在或无法取消 */
|
|
26
26
|
readonly DEPOSIT_ORDER_NOT_FOUND_OR_CANNOT_CANCEL: "DEPOSIT_ORDER_NOT_FOUND_OR_CANNOT_CANCEL";
|
|
27
|
+
/** 充值金额无效 */
|
|
28
|
+
readonly DEPOSIT_INVALID_AMOUNT: "DEPOSIT_INVALID_AMOUNT";
|
|
29
|
+
/** 充值账户不存在 */
|
|
30
|
+
readonly DEPOSIT_ACCOUNT_NOT_FOUND: "DEPOSIT_ACCOUNT_NOT_FOUND";
|
|
31
|
+
/** 充值账户不允许充值 */
|
|
32
|
+
readonly DEPOSIT_ACCOUNT_NOT_ALLOWED: "DEPOSIT_ACCOUNT_NOT_ALLOWED";
|
|
33
|
+
/** 充值订单数据不完整 */
|
|
34
|
+
readonly DEPOSIT_LEDGER_ACCOUNT_ORDER_DATA_INVALID: "DEPOSIT_LEDGER_ACCOUNT_ORDER_DATA_INVALID";
|
|
27
35
|
};
|
|
28
36
|
type DepositErrorCodesType = typeof DepositErrorCodes;
|
|
29
37
|
export type DepositErrorCode = keyof DepositErrorCodesType;
|
|
@@ -9,6 +9,10 @@ export declare const zh: {
|
|
|
9
9
|
DEPOSIT_COMPLETE_ORDER_FAILED: string;
|
|
10
10
|
DEPOSIT_ORDER_NOT_FOUND_OR_PROCESSED: string;
|
|
11
11
|
DEPOSIT_ORDER_NOT_FOUND_OR_CANNOT_CANCEL: string;
|
|
12
|
+
DEPOSIT_INVALID_AMOUNT: string;
|
|
13
|
+
DEPOSIT_ACCOUNT_NOT_FOUND: string;
|
|
14
|
+
DEPOSIT_ACCOUNT_NOT_ALLOWED: string;
|
|
15
|
+
DEPOSIT_LEDGER_ACCOUNT_ORDER_DATA_INVALID: string;
|
|
12
16
|
};
|
|
13
17
|
type ZHType = typeof zh;
|
|
14
18
|
declare module "../../../error/messages" {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export * from "./schema";
|
|
2
2
|
export * from "./db.schemas";
|
|
3
|
-
export * from "./
|
|
3
|
+
export * from "./admin/service";
|
|
4
|
+
export { depositRouter } from "./user/router";
|
|
5
|
+
export * from "./user/service";
|
|
6
|
+
export * from "./internal/service";
|
|
4
7
|
export * from "./permissions";
|
|
5
|
-
export * from "./service";
|
|
6
|
-
export { depositAdminRouter } from "./admin.router";
|
|
7
|
-
export { depositRouter } from "./router";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import Decimal from "decimal.js";
|
|
2
|
+
export declare abstract class BaseDepositService {
|
|
3
|
+
protected static validateUserId(userId: string): void;
|
|
4
|
+
protected static validateOrderId(orderId: string): void;
|
|
5
|
+
protected static validateAmount(amount: string): Decimal;
|
|
6
|
+
}
|
|
7
|
+
export declare abstract class InternalDepositService extends BaseDepositService {
|
|
8
|
+
}
|
|
@@ -381,13 +381,15 @@ export declare const depositRouter: Elysia<"/deposit", {
|
|
|
381
381
|
deposit: {};
|
|
382
382
|
} & {
|
|
383
383
|
deposit: {
|
|
384
|
-
|
|
384
|
+
ledger_account: {
|
|
385
385
|
post: {
|
|
386
386
|
body: {
|
|
387
|
+
paymentChannel?: string | undefined;
|
|
387
388
|
paymentOrderNo?: string | undefined;
|
|
388
389
|
paymentProof?: string | undefined;
|
|
389
390
|
amount: string;
|
|
390
|
-
|
|
391
|
+
idempotencyKey: string;
|
|
392
|
+
targetAccountId: string;
|
|
391
393
|
};
|
|
392
394
|
params: {};
|
|
393
395
|
query: unknown;
|
|
@@ -401,8 +403,11 @@ export declare const depositRouter: Elysia<"/deposit", {
|
|
|
401
403
|
status: "pending" | "approved" | "rejected" | "completed" | "cancelled";
|
|
402
404
|
reviewedAt: Date | null;
|
|
403
405
|
reviewedBy: string | null;
|
|
406
|
+
assetId: string | null;
|
|
404
407
|
amount: string;
|
|
408
|
+
idempotencyKey: string;
|
|
405
409
|
orderNo: string;
|
|
410
|
+
targetAccountId: string | null;
|
|
406
411
|
actualAmount: string | null;
|
|
407
412
|
fee: string | null;
|
|
408
413
|
paymentChannel: string | null;
|
|
@@ -468,8 +473,11 @@ export declare const depositRouter: Elysia<"/deposit", {
|
|
|
468
473
|
status: "pending" | "approved" | "rejected" | "completed" | "cancelled";
|
|
469
474
|
reviewedAt: Date | null;
|
|
470
475
|
reviewedBy: string | null;
|
|
476
|
+
assetId: string | null;
|
|
471
477
|
amount: string;
|
|
478
|
+
idempotencyKey: string;
|
|
472
479
|
orderNo: string;
|
|
480
|
+
targetAccountId: string | null;
|
|
473
481
|
actualAmount: string | null;
|
|
474
482
|
fee: string | null;
|
|
475
483
|
paymentChannel: string | null;
|
|
@@ -545,8 +553,11 @@ export declare const depositRouter: Elysia<"/deposit", {
|
|
|
545
553
|
updatedAt: Date;
|
|
546
554
|
id: string;
|
|
547
555
|
orderNo: string;
|
|
556
|
+
idempotencyKey: string;
|
|
548
557
|
userId: string;
|
|
549
558
|
amount: string;
|
|
559
|
+
assetId: string | null;
|
|
560
|
+
targetAccountId: string | null;
|
|
550
561
|
actualAmount: string | null;
|
|
551
562
|
fee: string | null;
|
|
552
563
|
status: "pending" | "approved" | "rejected" | "completed" | "cancelled";
|
|
@@ -75,6 +75,23 @@ export declare const depositOrder: import("drizzle-orm/pg-core").PgTableWithColu
|
|
|
75
75
|
identity: undefined;
|
|
76
76
|
generated: undefined;
|
|
77
77
|
}, {}, {}>;
|
|
78
|
+
idempotencyKey: import("drizzle-orm/pg-core").PgColumn<{
|
|
79
|
+
name: "idempotency_key";
|
|
80
|
+
tableName: "deposit_order";
|
|
81
|
+
dataType: "string";
|
|
82
|
+
columnType: "PgText";
|
|
83
|
+
data: string;
|
|
84
|
+
driverParam: string;
|
|
85
|
+
notNull: true;
|
|
86
|
+
hasDefault: false;
|
|
87
|
+
isPrimaryKey: false;
|
|
88
|
+
isAutoincrement: false;
|
|
89
|
+
hasRuntimeDefault: false;
|
|
90
|
+
enumValues: [string, ...string[]];
|
|
91
|
+
baseColumn: never;
|
|
92
|
+
identity: undefined;
|
|
93
|
+
generated: undefined;
|
|
94
|
+
}, {}, {}>;
|
|
78
95
|
userId: import("drizzle-orm/pg-core").PgColumn<{
|
|
79
96
|
name: "user_id";
|
|
80
97
|
tableName: "deposit_order";
|
|
@@ -109,6 +126,40 @@ export declare const depositOrder: import("drizzle-orm/pg-core").PgTableWithColu
|
|
|
109
126
|
identity: undefined;
|
|
110
127
|
generated: undefined;
|
|
111
128
|
}, {}, {}>;
|
|
129
|
+
assetId: import("drizzle-orm/pg-core").PgColumn<{
|
|
130
|
+
name: "asset_id";
|
|
131
|
+
tableName: "deposit_order";
|
|
132
|
+
dataType: "string";
|
|
133
|
+
columnType: "PgUUID";
|
|
134
|
+
data: string;
|
|
135
|
+
driverParam: string;
|
|
136
|
+
notNull: false;
|
|
137
|
+
hasDefault: false;
|
|
138
|
+
isPrimaryKey: false;
|
|
139
|
+
isAutoincrement: false;
|
|
140
|
+
hasRuntimeDefault: false;
|
|
141
|
+
enumValues: undefined;
|
|
142
|
+
baseColumn: never;
|
|
143
|
+
identity: undefined;
|
|
144
|
+
generated: undefined;
|
|
145
|
+
}, {}, {}>;
|
|
146
|
+
targetAccountId: import("drizzle-orm/pg-core").PgColumn<{
|
|
147
|
+
name: "target_account_id";
|
|
148
|
+
tableName: "deposit_order";
|
|
149
|
+
dataType: "string";
|
|
150
|
+
columnType: "PgUUID";
|
|
151
|
+
data: string;
|
|
152
|
+
driverParam: string;
|
|
153
|
+
notNull: false;
|
|
154
|
+
hasDefault: false;
|
|
155
|
+
isPrimaryKey: false;
|
|
156
|
+
isAutoincrement: false;
|
|
157
|
+
hasRuntimeDefault: false;
|
|
158
|
+
enumValues: undefined;
|
|
159
|
+
baseColumn: never;
|
|
160
|
+
identity: undefined;
|
|
161
|
+
generated: undefined;
|
|
162
|
+
}, {}, {}>;
|
|
112
163
|
actualAmount: import("drizzle-orm/pg-core").PgColumn<{
|
|
113
164
|
name: "actual_amount";
|
|
114
165
|
tableName: "deposit_order";
|
|
@@ -284,4 +335,6 @@ export declare const depositOrder: import("drizzle-orm/pg-core").PgTableWithColu
|
|
|
284
335
|
}>;
|
|
285
336
|
export declare const depositOrderRelations: import("drizzle-orm").Relations<"deposit_order", {
|
|
286
337
|
user: import("drizzle-orm").One<"user", true>;
|
|
338
|
+
asset: import("drizzle-orm").One<"asset", false>;
|
|
339
|
+
targetAccount: import("drizzle-orm").One<"ledger_account", false>;
|
|
287
340
|
}>;
|
|
@@ -1,26 +1,28 @@
|
|
|
1
|
-
import
|
|
1
|
+
import Decimal from "decimal.js";
|
|
2
|
+
import type { DepositAdminListQueryType, DepositApproveInputType, DepositListQueryType, DepositRejectInputType, LedgerAccountDepositCreateInputType } from "./dto.schemas";
|
|
2
3
|
/**
|
|
3
4
|
* 充值基础服务(抽象类)
|
|
4
5
|
*/
|
|
5
6
|
declare abstract class BaseDepositService {
|
|
6
7
|
protected static validateUserId(userId: string): void;
|
|
7
8
|
protected static validateOrderId(orderId: string): void;
|
|
9
|
+
protected static validateAmount(amount: string): Decimal;
|
|
8
10
|
}
|
|
9
11
|
/**
|
|
10
12
|
* 管理侧服务
|
|
11
13
|
* 管理员可以审核充值、查看所有充值订单
|
|
12
14
|
*/
|
|
13
15
|
export declare abstract class AdminDepositService extends BaseDepositService {
|
|
14
|
-
|
|
15
|
-
* 审核通过法币充值
|
|
16
|
-
*/
|
|
17
|
-
static approveFiatDeposit(orderId: string, reviewerId: string, input: DepositApproveInputType): Promise<{
|
|
16
|
+
static approveDeposit(orderId: string, reviewerId: string, input: DepositApproveInputType): Promise<{
|
|
18
17
|
createdAt: Date;
|
|
19
18
|
updatedAt: Date;
|
|
20
19
|
id: string;
|
|
21
20
|
orderNo: string;
|
|
21
|
+
idempotencyKey: string;
|
|
22
22
|
userId: string;
|
|
23
23
|
amount: string;
|
|
24
|
+
assetId: string | null;
|
|
25
|
+
targetAccountId: string | null;
|
|
24
26
|
actualAmount: string | null;
|
|
25
27
|
fee: string | null;
|
|
26
28
|
status: "pending" | "approved" | "rejected" | "completed" | "cancelled";
|
|
@@ -40,8 +42,11 @@ export declare abstract class AdminDepositService extends BaseDepositService {
|
|
|
40
42
|
updatedAt: Date;
|
|
41
43
|
id: string;
|
|
42
44
|
orderNo: string;
|
|
45
|
+
idempotencyKey: string;
|
|
43
46
|
userId: string;
|
|
44
47
|
amount: string;
|
|
48
|
+
assetId: string | null;
|
|
49
|
+
targetAccountId: string | null;
|
|
45
50
|
actualAmount: string | null;
|
|
46
51
|
fee: string | null;
|
|
47
52
|
status: "pending" | "approved" | "rejected" | "completed" | "cancelled";
|
|
@@ -54,7 +59,7 @@ export declare abstract class AdminDepositService extends BaseDepositService {
|
|
|
54
59
|
completedAt: Date | null;
|
|
55
60
|
}>;
|
|
56
61
|
/**
|
|
57
|
-
*
|
|
62
|
+
* 充值订单列表
|
|
58
63
|
*/
|
|
59
64
|
static listDepositOrders(options?: DepositAdminListQueryType): Promise<{
|
|
60
65
|
orders: {
|
|
@@ -65,8 +70,11 @@ export declare abstract class AdminDepositService extends BaseDepositService {
|
|
|
65
70
|
status: "pending" | "approved" | "rejected" | "completed" | "cancelled";
|
|
66
71
|
reviewedAt: Date | null;
|
|
67
72
|
reviewedBy: string | null;
|
|
73
|
+
assetId: string | null;
|
|
68
74
|
amount: string;
|
|
75
|
+
idempotencyKey: string;
|
|
69
76
|
orderNo: string;
|
|
77
|
+
targetAccountId: string | null;
|
|
70
78
|
actualAmount: string | null;
|
|
71
79
|
fee: string | null;
|
|
72
80
|
paymentChannel: string | null;
|
|
@@ -107,8 +115,11 @@ export declare abstract class AdminDepositService extends BaseDepositService {
|
|
|
107
115
|
status: "pending" | "approved" | "rejected" | "completed" | "cancelled";
|
|
108
116
|
reviewedAt: Date | null;
|
|
109
117
|
reviewedBy: string | null;
|
|
118
|
+
assetId: string | null;
|
|
110
119
|
amount: string;
|
|
120
|
+
idempotencyKey: string;
|
|
111
121
|
orderNo: string;
|
|
122
|
+
targetAccountId: string | null;
|
|
112
123
|
actualAmount: string | null;
|
|
113
124
|
fee: string | null;
|
|
114
125
|
paymentChannel: string | null;
|
|
@@ -142,10 +153,7 @@ export declare abstract class AdminDepositService extends BaseDepositService {
|
|
|
142
153
|
* 用户端可以创建充值订单、查看自己的充值记录、取消订单
|
|
143
154
|
*/
|
|
144
155
|
export declare abstract class UserDepositService extends BaseDepositService {
|
|
145
|
-
|
|
146
|
-
* 创建法币充值订单
|
|
147
|
-
*/
|
|
148
|
-
static createFiatDeposit(userId: string, input: DepositCreateInputType): Promise<{
|
|
156
|
+
static createLedgerAccountDeposit(userId: string, input: LedgerAccountDepositCreateInputType): Promise<{
|
|
149
157
|
id: string;
|
|
150
158
|
createdAt: Date;
|
|
151
159
|
updatedAt: Date;
|
|
@@ -153,8 +161,11 @@ export declare abstract class UserDepositService extends BaseDepositService {
|
|
|
153
161
|
status: "pending" | "approved" | "rejected" | "completed" | "cancelled";
|
|
154
162
|
reviewedAt: Date | null;
|
|
155
163
|
reviewedBy: string | null;
|
|
164
|
+
assetId: string | null;
|
|
156
165
|
amount: string;
|
|
166
|
+
idempotencyKey: string;
|
|
157
167
|
orderNo: string;
|
|
168
|
+
targetAccountId: string | null;
|
|
158
169
|
actualAmount: string | null;
|
|
159
170
|
fee: string | null;
|
|
160
171
|
paymentChannel: string | null;
|
|
@@ -171,8 +182,11 @@ export declare abstract class UserDepositService extends BaseDepositService {
|
|
|
171
182
|
updatedAt: Date;
|
|
172
183
|
id: string;
|
|
173
184
|
orderNo: string;
|
|
185
|
+
idempotencyKey: string;
|
|
174
186
|
userId: string;
|
|
175
187
|
amount: string;
|
|
188
|
+
assetId: string | null;
|
|
189
|
+
targetAccountId: string | null;
|
|
176
190
|
actualAmount: string | null;
|
|
177
191
|
fee: string | null;
|
|
178
192
|
status: "pending" | "approved" | "rejected" | "completed" | "cancelled";
|
|
@@ -196,8 +210,11 @@ export declare abstract class UserDepositService extends BaseDepositService {
|
|
|
196
210
|
status: "pending" | "approved" | "rejected" | "completed" | "cancelled";
|
|
197
211
|
reviewedAt: Date | null;
|
|
198
212
|
reviewedBy: string | null;
|
|
213
|
+
assetId: string | null;
|
|
199
214
|
amount: string;
|
|
215
|
+
idempotencyKey: string;
|
|
200
216
|
orderNo: string;
|
|
217
|
+
targetAccountId: string | null;
|
|
201
218
|
actualAmount: string | null;
|
|
202
219
|
fee: string | null;
|
|
203
220
|
paymentChannel: string | null;
|
|
@@ -238,8 +255,11 @@ export declare abstract class UserDepositService extends BaseDepositService {
|
|
|
238
255
|
status: "pending" | "approved" | "rejected" | "completed" | "cancelled";
|
|
239
256
|
reviewedAt: Date | null;
|
|
240
257
|
reviewedBy: string | null;
|
|
258
|
+
assetId: string | null;
|
|
241
259
|
amount: string;
|
|
260
|
+
idempotencyKey: string;
|
|
242
261
|
orderNo: string;
|
|
262
|
+
targetAccountId: string | null;
|
|
243
263
|
actualAmount: string | null;
|
|
244
264
|
fee: string | null;
|
|
245
265
|
paymentChannel: string | null;
|