@aitlabs/namkwong 0.0.92
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/README.md +42 -0
- package/dist/admin/index.d.ts +10179 -0
- package/dist/admin-user/admin/dto.schemas.d.ts +878 -0
- package/dist/admin-user/admin/errors/index.d.ts +20 -0
- package/dist/admin-user/admin/errors/locales/zh.d.ts +16 -0
- package/dist/admin-user/admin/router.d.ts +655 -0
- package/dist/admin-user/admin/service.d.ts +60 -0
- package/dist/app-version/admin/dto.schemas.d.ts +99 -0
- package/dist/app-version/admin/router.d.ts +756 -0
- package/dist/app-version/admin/service.d.ts +105 -0
- package/dist/app-version/db.schemas.d.ts +448 -0
- package/dist/app-version/index.d.ts +5 -0
- package/dist/app-version/schema.d.ts +236 -0
- package/dist/app-version/user/dto.schemas.d.ts +40 -0
- package/dist/app-version/user/router.d.ts +67 -0
- package/dist/app-version/user/service.d.ts +22 -0
- package/dist/asset/admin/dto.schemas.d.ts +178 -0
- package/dist/asset/admin/router.d.ts +769 -0
- package/dist/asset/admin/service.d.ts +152 -0
- package/dist/asset/db.schemas.d.ts +380 -0
- package/dist/asset/errors/index.d.ts +33 -0
- package/dist/asset/errors/locales/zh.d.ts +20 -0
- package/dist/asset/index.d.ts +11 -0
- package/dist/asset/internal/service.d.ts +16 -0
- package/dist/asset/permissions.d.ts +4 -0
- package/dist/asset/schema.d.ts +209 -0
- package/dist/asset/seed.d.ts +1 -0
- package/dist/asset/user/dto.schemas.d.ts +92 -0
- package/dist/asset/user/router.d.ts +588 -0
- package/dist/asset/user/service.d.ts +83 -0
- package/dist/asset-convert-product/admin/dto.schemas.d.ts +823 -0
- package/dist/asset-convert-product/admin/router.d.ts +1586 -0
- package/dist/asset-convert-product/admin/service.d.ts +817 -0
- package/dist/asset-convert-product/db.schemas.d.ts +1270 -0
- package/dist/asset-convert-product/errors/index.d.ts +32 -0
- package/dist/asset-convert-product/errors/locales/zh.d.ts +31 -0
- package/dist/asset-convert-product/index.d.ts +9 -0
- package/dist/asset-convert-product/internal/service.d.ts +2 -0
- package/dist/asset-convert-product/permissions.d.ts +5 -0
- package/dist/asset-convert-product/schema.d.ts +688 -0
- package/dist/asset-convert-product/seed.d.ts +1 -0
- package/dist/asset-convert-product/user/dto.schemas.d.ts +1089 -0
- package/dist/asset-convert-product/user/router.d.ts +797 -0
- package/dist/asset-convert-product/user/service.d.ts +413 -0
- package/dist/asset-price/admin/dto.schemas.d.ts +102 -0
- package/dist/asset-price/admin/router.d.ts +658 -0
- package/dist/asset-price/admin/service.d.ts +82 -0
- package/dist/asset-price/constants.d.ts +2 -0
- package/dist/asset-price/cron.d.ts +7 -0
- package/dist/asset-price/db.schemas.d.ts +358 -0
- package/dist/asset-price/errors/index.d.ts +20 -0
- package/dist/asset-price/errors/locales/zh.d.ts +19 -0
- package/dist/asset-price/index.d.ts +12 -0
- package/dist/asset-price/internal/service.d.ts +20 -0
- package/dist/asset-price/permissions.d.ts +6 -0
- package/dist/asset-price/schema.d.ts +191 -0
- package/dist/asset-price/seed.d.ts +1 -0
- package/dist/asset-price/user/dto.schemas.d.ts +45 -0
- package/dist/asset-price/user/router.d.ts +512 -0
- package/dist/asset-price/user/service.d.ts +26 -0
- package/dist/asset-type/admin/dto.schemas.d.ts +404 -0
- package/dist/asset-type/admin/router.d.ts +617 -0
- package/dist/asset-type/admin/service.d.ts +45 -0
- package/dist/asset-type/db.schemas.d.ts +244 -0
- package/dist/asset-type/errors/index.d.ts +27 -0
- package/dist/asset-type/errors/locales/zh.d.ts +17 -0
- package/dist/asset-type/index.d.ts +11 -0
- package/dist/asset-type/internal/service.d.ts +9 -0
- package/dist/asset-type/permissions.d.ts +4 -0
- package/dist/asset-type/schema.d.ts +133 -0
- package/dist/asset-type/seed.d.ts +19 -0
- package/dist/asset-type/user/dto.schemas.d.ts +35 -0
- package/dist/asset-type/user/router.d.ts +471 -0
- package/dist/asset-type/user/service.d.ts +18 -0
- package/dist/auth/better-auth.d.ts +3278 -0
- package/dist/auth/better-hooks.d.ts +23 -0
- package/dist/auth/db.schemas.d.ts +1696 -0
- package/dist/auth/permissions.d.ts +235 -0
- package/dist/auth/roles.d.ts +725 -0
- package/dist/auth/router.d.ts +385 -0
- package/dist/auth/schema.d.ts +882 -0
- package/dist/bank-account/admin/dto.schemas.d.ts +524 -0
- package/dist/bank-account/admin/router.d.ts +909 -0
- package/dist/bank-account/admin/service.d.ts +221 -0
- package/dist/bank-account/db.schemas.d.ts +1032 -0
- package/dist/bank-account/errors/index.d.ts +13 -0
- package/dist/bank-account/errors/locales/zh.d.ts +12 -0
- package/dist/bank-account/index.d.ts +8 -0
- package/dist/bank-account/internal/service.d.ts +51 -0
- package/dist/bank-account/permissions.d.ts +10 -0
- package/dist/bank-account/schema.d.ts +535 -0
- package/dist/bank-account/seed.d.ts +4 -0
- package/dist/bank-account/user/dto.schemas.d.ts +458 -0
- package/dist/bank-account/user/router.d.ts +680 -0
- package/dist/bank-account/user/service.d.ts +133 -0
- package/dist/check-in/admin/dto.schemas.d.ts +312 -0
- package/dist/check-in/admin/router.d.ts +526 -0
- package/dist/check-in/admin/service.d.ts +39 -0
- package/dist/check-in/db.schemas.d.ts +556 -0
- package/dist/check-in/errors/index.d.ts +19 -0
- package/dist/check-in/errors/locales/zh.d.ts +13 -0
- package/dist/check-in/index.d.ts +7 -0
- package/dist/check-in/internal/service.d.ts +51 -0
- package/dist/check-in/permissions.d.ts +6 -0
- package/dist/check-in/schema.d.ts +300 -0
- package/dist/check-in/user/dto.schemas.d.ts +632 -0
- package/dist/check-in/user/router.d.ts +619 -0
- package/dist/check-in/user/service.d.ts +76 -0
- package/dist/cors/index.d.ts +30 -0
- package/dist/cron/index.d.ts +10 -0
- package/dist/db/columns.helpers.d.ts +13 -0
- package/dist/db/enums.d.ts +1 -0
- package/dist/db/index.d.ts +4 -0
- package/dist/db/schemas.d.ts +34 -0
- package/dist/db/transaction.d.ts +3 -0
- package/dist/db/typebox.d.ts +19 -0
- package/dist/deposit/admin/dto.schemas.d.ts +649 -0
- package/dist/deposit/admin/router.d.ts +638 -0
- package/dist/deposit/admin/service.d.ts +127 -0
- package/dist/deposit/db.schemas.d.ts +652 -0
- package/dist/deposit/errors/index.d.ts +45 -0
- package/dist/deposit/errors/locales/zh.d.ts +24 -0
- package/dist/deposit/index.d.ts +7 -0
- package/dist/deposit/internal/service.d.ts +8 -0
- package/dist/deposit/permissions.d.ts +9 -0
- package/dist/deposit/schema.d.ts +340 -0
- package/dist/deposit/user/dto.schemas.d.ts +655 -0
- package/dist/deposit/user/router.d.ts +681 -0
- package/dist/deposit/user/service.d.ts +148 -0
- package/dist/dynamic-env/admin.router.d.ts +632 -0
- package/dist/dynamic-env/cache.d.ts +29 -0
- package/dist/dynamic-env/db.schemas.d.ts +182 -0
- package/dist/dynamic-env/dto.schema.d.ts +17 -0
- package/dist/dynamic-env/errors/index.d.ts +11 -0
- package/dist/dynamic-env/errors/locales/zh.d.ts +10 -0
- package/dist/dynamic-env/index.d.ts +3 -0
- package/dist/dynamic-env/schema.d.ts +96 -0
- package/dist/dynamic-env/service.d.ts +93 -0
- package/dist/email/index.d.ts +2 -0
- package/dist/env/client.d.ts +2 -0
- package/dist/env/index.d.ts +2 -0
- package/dist/env/server.d.ts +45 -0
- package/dist/env/typebox-env.d.ts +7 -0
- package/dist/error/errorcode.d.ts +9 -0
- package/dist/error/index.d.ts +120 -0
- package/dist/error/locales/zh.d.ts +2 -0
- package/dist/error/messages.d.ts +10 -0
- package/dist/external/dto.schemas.d.ts +173 -0
- package/dist/external/errors/index.d.ts +13 -0
- package/dist/external/errors/locales/zh.d.ts +10 -0
- package/dist/external/index.d.ts +4 -0
- package/dist/external/router.d.ts +105 -0
- package/dist/external/service.d.ts +31 -0
- package/dist/file-storage/admin/dto.schemas.d.ts +209 -0
- package/dist/file-storage/admin/router.d.ts +598 -0
- package/dist/file-storage/admin/service.d.ts +89 -0
- package/dist/file-storage/db.schemas.d.ts +1026 -0
- package/dist/file-storage/errors/index.d.ts +19 -0
- package/dist/file-storage/errors/locales/zh.d.ts +18 -0
- package/dist/file-storage/index.d.ts +7 -0
- package/dist/file-storage/internal/service.d.ts +66 -0
- package/dist/file-storage/permissions.d.ts +5 -0
- package/dist/file-storage/s3.client.d.ts +284 -0
- package/dist/file-storage/schema.d.ts +538 -0
- package/dist/file-storage/share/dto.schemas.d.ts +68 -0
- package/dist/file-storage/share/router.d.ts +561 -0
- package/dist/file-storage/user/dto.schemas.d.ts +1100 -0
- package/dist/file-storage/user/router.d.ts +585 -0
- package/dist/file-storage/user/service.d.ts +80 -0
- package/dist/http-access-log.d.ts +30 -0
- package/dist/index.d.ts +16037 -0
- package/dist/ledger/admin/dto.schemas.d.ts +461 -0
- package/dist/ledger/admin/router.d.ts +620 -0
- package/dist/ledger/admin/service.d.ts +22 -0
- package/dist/ledger/db.schemas.d.ts +694 -0
- package/dist/ledger/errors/index.d.ts +38 -0
- package/dist/ledger/errors/locales/zh.d.ts +22 -0
- package/dist/ledger/index.d.ts +6 -0
- package/dist/ledger/internal/service.d.ts +36 -0
- package/dist/ledger/permissions.d.ts +8 -0
- package/dist/ledger/schema.d.ts +365 -0
- package/dist/ledger/user/dto.schemas.d.ts +712 -0
- package/dist/ledger/user/router.d.ts +487 -0
- package/dist/ledger/user/service.d.ts +146 -0
- package/dist/ledger-account/admin/dto.schemas.d.ts +292 -0
- package/dist/ledger-account/admin/router.d.ts +806 -0
- package/dist/ledger-account/admin/service.d.ts +252 -0
- package/dist/ledger-account/db.schemas.d.ts +346 -0
- package/dist/ledger-account/errors/index.d.ts +18 -0
- package/dist/ledger-account/errors/locales/zh.d.ts +17 -0
- package/dist/ledger-account/index.d.ts +8 -0
- package/dist/ledger-account/internal/service.d.ts +44 -0
- package/dist/ledger-account/permissions.d.ts +4 -0
- package/dist/ledger-account/schema.d.ts +190 -0
- package/dist/ledger-account/user/dto.schemas.d.ts +590 -0
- package/dist/ledger-account/user/router.d.ts +602 -0
- package/dist/ledger-account/user/service.d.ts +154 -0
- package/dist/ledger-account-import/admin/dto.schemas.d.ts +1255 -0
- package/dist/ledger-account-import/admin/router.d.ts +691 -0
- package/dist/ledger-account-import/admin/service.d.ts +92 -0
- package/dist/ledger-account-import/db.schemas.d.ts +1206 -0
- package/dist/ledger-account-import/errors/index.d.ts +18 -0
- package/dist/ledger-account-import/errors/locales/zh.d.ts +17 -0
- package/dist/ledger-account-import/index.d.ts +8 -0
- package/dist/ledger-account-import/internal/service.d.ts +13 -0
- package/dist/ledger-account-import/permissions.d.ts +7 -0
- package/dist/ledger-account-import/schema.d.ts +636 -0
- package/dist/ledger-account-import/user/service.d.ts +3 -0
- package/dist/ledger-account-import/worker.d.ts +1 -0
- package/dist/ledger-account-transfer/admin/service.d.ts +3 -0
- package/dist/ledger-account-transfer/errors/index.d.ts +23 -0
- package/dist/ledger-account-transfer/errors/locales/zh.d.ts +15 -0
- package/dist/ledger-account-transfer/index.d.ts +6 -0
- package/dist/ledger-account-transfer/internal/service.d.ts +8 -0
- package/dist/ledger-account-transfer/user/dto.schemas.d.ts +20 -0
- package/dist/ledger-account-transfer/user/router.d.ts +466 -0
- package/dist/ledger-account-transfer/user/service.d.ts +16 -0
- package/dist/ledger-account-type/admin/dto.schemas.d.ts +509 -0
- package/dist/ledger-account-type/admin/router.d.ts +708 -0
- package/dist/ledger-account-type/admin/service.d.ts +109 -0
- package/dist/ledger-account-type/db.schemas.d.ts +788 -0
- package/dist/ledger-account-type/errors/index.d.ts +18 -0
- package/dist/ledger-account-type/errors/locales/zh.d.ts +17 -0
- package/dist/ledger-account-type/index.d.ts +9 -0
- package/dist/ledger-account-type/internal/service.d.ts +8 -0
- package/dist/ledger-account-type/permissions.d.ts +4 -0
- package/dist/ledger-account-type/schema.d.ts +405 -0
- package/dist/ledger-account-type/seed.d.ts +1 -0
- package/dist/ledger-account-type/user/dto.schemas.d.ts +509 -0
- package/dist/ledger-account-type/user/router.d.ts +534 -0
- package/dist/ledger-account-type/user/service.d.ts +59 -0
- package/dist/market-data/admin/dto.schemas.d.ts +600 -0
- package/dist/market-data/admin/router.d.ts +591 -0
- package/dist/market-data/admin/service.d.ts +44 -0
- package/dist/market-data/cron.d.ts +7 -0
- package/dist/market-data/db.schemas.d.ts +380 -0
- package/dist/market-data/errors/index.d.ts +13 -0
- package/dist/market-data/errors/locales/zh.d.ts +12 -0
- package/dist/market-data/internal/service.d.ts +108 -0
- package/dist/market-data/permissions.d.ts +6 -0
- package/dist/market-data/resolutions.d.ts +9 -0
- package/dist/market-data/schema.d.ts +199 -0
- package/dist/market-pricing/admin/dto.schemas.d.ts +725 -0
- package/dist/market-pricing/admin/router.d.ts +1084 -0
- package/dist/market-pricing/admin/service.d.ts +371 -0
- package/dist/market-pricing/cron.d.ts +6 -0
- package/dist/market-pricing/db.schemas.d.ts +1372 -0
- package/dist/market-pricing/defaults.d.ts +22 -0
- package/dist/market-pricing/errors/index.d.ts +35 -0
- package/dist/market-pricing/errors/locales/zh.d.ts +34 -0
- package/dist/market-pricing/internal/service.d.ts +58 -0
- package/dist/market-pricing/permissions.d.ts +4 -0
- package/dist/market-pricing/schema.d.ts +710 -0
- package/dist/nanoid/index.d.ts +2 -0
- package/dist/news/admin/dto.schemas.d.ts +159 -0
- package/dist/news/admin/router.d.ts +818 -0
- package/dist/news/admin/service.d.ts +221 -0
- package/dist/news/db.schemas.d.ts +1150 -0
- package/dist/news/errors/index.d.ts +20 -0
- package/dist/news/errors/locales/zh.d.ts +13 -0
- package/dist/news/index.d.ts +7 -0
- package/dist/news/internal/service.d.ts +7 -0
- package/dist/news/permissions.d.ts +4 -0
- package/dist/news/schema.d.ts +616 -0
- package/dist/news/user/dto.schemas.d.ts +178 -0
- package/dist/news/user/router.d.ts +617 -0
- package/dist/news/user/service.d.ts +228 -0
- package/dist/news-category/admin/dto.schemas.d.ts +52 -0
- package/dist/news-category/admin/router.d.ts +204 -0
- package/dist/news-category/admin/service.d.ts +55 -0
- package/dist/news-category/constants.d.ts +1 -0
- package/dist/news-category/db.schemas.d.ts +324 -0
- package/dist/news-category/errors/index.d.ts +21 -0
- package/dist/news-category/errors/locales/zh.d.ts +14 -0
- package/dist/news-category/index.d.ts +8 -0
- package/dist/news-category/internal/service.d.ts +5 -0
- package/dist/news-category/permissions.d.ts +4 -0
- package/dist/news-category/schema.d.ts +173 -0
- package/dist/news-category/seed.d.ts +12 -0
- package/dist/news-category/user/dto.schemas.d.ts +55 -0
- package/dist/news-category/user/router.d.ts +457 -0
- package/dist/news-category/user/service.d.ts +25 -0
- package/dist/notification/admin/dto.schemas.d.ts +432 -0
- package/dist/notification/admin/router.d.ts +576 -0
- package/dist/notification/admin/service.d.ts +43 -0
- package/dist/notification/db.schemas.d.ts +624 -0
- package/dist/notification/errors/index.d.ts +19 -0
- package/dist/notification/errors/locales/zh.d.ts +13 -0
- package/dist/notification/index.d.ts +7 -0
- package/dist/notification/internal/service.d.ts +28 -0
- package/dist/notification/permissions.d.ts +6 -0
- package/dist/notification/schema.d.ts +347 -0
- package/dist/notification/user/dto.schemas.d.ts +411 -0
- package/dist/notification/user/router.d.ts +632 -0
- package/dist/notification/user/service.d.ts +82 -0
- package/dist/operations-overview/admin/dto.schemas.d.ts +41 -0
- package/dist/operations-overview/admin/router.d.ts +517 -0
- package/dist/operations-overview/admin/service.d.ts +4 -0
- package/dist/portfolio/index.d.ts +2 -0
- package/dist/portfolio/internal/index.d.ts +1 -0
- package/dist/portfolio/internal/service.d.ts +5 -0
- package/dist/portfolio/user/dto.schemas.d.ts +352 -0
- package/dist/portfolio/user/index.d.ts +3 -0
- package/dist/portfolio/user/router.d.ts +659 -0
- package/dist/portfolio/user/service.d.ts +143 -0
- package/dist/receipt-method/admin/dto.schemas.d.ts +62 -0
- package/dist/receipt-method/admin/router.d.ts +592 -0
- package/dist/receipt-method/admin/service.d.ts +82 -0
- package/dist/receipt-method/db.schemas.d.ts +380 -0
- package/dist/receipt-method/errors/index.d.ts +17 -0
- package/dist/receipt-method/errors/locales/zh.d.ts +16 -0
- package/dist/receipt-method/index.d.ts +7 -0
- package/dist/receipt-method/internal/service.d.ts +33 -0
- package/dist/receipt-method/permissions.d.ts +4 -0
- package/dist/receipt-method/schema.d.ts +205 -0
- package/dist/receipt-method/user/dto.schemas.d.ts +417 -0
- package/dist/receipt-method/user/router.d.ts +602 -0
- package/dist/receipt-method/user/service.d.ts +73 -0
- package/dist/referral/admin/dto.schemas.d.ts +597 -0
- package/dist/referral/admin/router.d.ts +553 -0
- package/dist/referral/admin/service.d.ts +6 -0
- package/dist/referral/db.schemas.d.ts +420 -0
- package/dist/referral/errors/index.d.ts +15 -0
- package/dist/referral/errors/locales/zh.d.ts +14 -0
- package/dist/referral/index.d.ts +9 -0
- package/dist/referral/internal/service.d.ts +23 -0
- package/dist/referral/permissions.d.ts +8 -0
- package/dist/referral/schema.d.ts +235 -0
- package/dist/referral/user/dto.schemas.d.ts +602 -0
- package/dist/referral/user/router.d.ts +578 -0
- package/dist/referral/user/service.d.ts +21 -0
- package/dist/referral-depth-config/admin/dto.schemas.d.ts +203 -0
- package/dist/referral-depth-config/admin/router.d.ts +643 -0
- package/dist/referral-depth-config/admin/service.d.ts +38 -0
- package/dist/referral-depth-config/db.schemas.d.ts +176 -0
- package/dist/referral-depth-config/errors/index.d.ts +11 -0
- package/dist/referral-depth-config/errors/locales/zh.d.ts +10 -0
- package/dist/referral-depth-config/internal/service.d.ts +4 -0
- package/dist/referral-depth-config/permissions.d.ts +8 -0
- package/dist/referral-depth-config/schema.d.ts +99 -0
- package/dist/server-test/errors/index.d.ts +10 -0
- package/dist/server-test/errors/locales/zh.d.ts +9 -0
- package/dist/server-test/index.d.ts +486 -0
- package/dist/shipping-address/admin/dto.schemas.d.ts +289 -0
- package/dist/shipping-address/admin/router.d.ts +504 -0
- package/dist/shipping-address/admin/service.d.ts +17 -0
- package/dist/shipping-address/db.schemas.d.ts +278 -0
- package/dist/shipping-address/errors/index.d.ts +12 -0
- package/dist/shipping-address/errors/locales/zh.d.ts +11 -0
- package/dist/shipping-address/index.d.ts +7 -0
- package/dist/shipping-address/internal/service.d.ts +15 -0
- package/dist/shipping-address/permissions.d.ts +4 -0
- package/dist/shipping-address/schema.d.ts +150 -0
- package/dist/shipping-address/user/dto.schemas.d.ts +303 -0
- package/dist/shipping-address/user/router.d.ts +621 -0
- package/dist/shipping-address/user/service.d.ts +68 -0
- package/dist/sms/index.d.ts +5 -0
- package/dist/team/admin/dto.schemas.d.ts +2198 -0
- package/dist/team/admin/router.d.ts +646 -0
- package/dist/team/admin/service.d.ts +6 -0
- package/dist/team/errors/index.d.ts +13 -0
- package/dist/team/errors/locales/zh.d.ts +12 -0
- package/dist/team/index.d.ts +8 -0
- package/dist/team/internal/service.d.ts +6 -0
- package/dist/team/permissions.d.ts +7 -0
- package/dist/team/user/dto.schemas.d.ts +1987 -0
- package/dist/team/user/router.d.ts +734 -0
- package/dist/team/user/service.d.ts +10 -0
- package/dist/trade-market/admin/dto.schemas.d.ts +1393 -0
- package/dist/trade-market/admin/router.d.ts +936 -0
- package/dist/trade-market/admin/service.d.ts +252 -0
- package/dist/trade-market/db.schemas.d.ts +1168 -0
- package/dist/trade-market/errors/index.d.ts +25 -0
- package/dist/trade-market/errors/locales/zh.d.ts +24 -0
- package/dist/trade-market/index.d.ts +9 -0
- package/dist/trade-market/internal/service.d.ts +297 -0
- package/dist/trade-market/permissions.d.ts +5 -0
- package/dist/trade-market/schema.d.ts +619 -0
- package/dist/trade-market/seed.d.ts +1 -0
- package/dist/trade-market/user/dto.schemas.d.ts +660 -0
- package/dist/trade-market/user/router.d.ts +797 -0
- package/dist/trade-market/user/service.d.ts +228 -0
- package/dist/transfer/admin/dto.schemas.d.ts +396 -0
- package/dist/transfer/admin/router.d.ts +506 -0
- package/dist/transfer/admin/service.d.ts +56 -0
- package/dist/transfer/db.schemas.d.ts +386 -0
- package/dist/transfer/errors/index.d.ts +32 -0
- package/dist/transfer/errors/locales/zh.d.ts +19 -0
- package/dist/transfer/index.d.ts +11 -0
- package/dist/transfer/internal/service.d.ts +8 -0
- package/dist/transfer/permissions.d.ts +8 -0
- package/dist/transfer/schema.d.ts +204 -0
- package/dist/transfer/user/dto.schemas.d.ts +416 -0
- package/dist/transfer/user/router.d.ts +514 -0
- package/dist/transfer/user/service.d.ts +67 -0
- package/dist/udf/dto.schemas.d.ts +134 -0
- package/dist/udf/index.d.ts +1 -0
- package/dist/udf/router.d.ts +577 -0
- package/dist/udf/service.d.ts +75 -0
- package/dist/user/admin/dto.schemas.d.ts +1454 -0
- package/dist/user/admin/router.d.ts +891 -0
- package/dist/user/admin/service.d.ts +174 -0
- package/dist/user/db.schemas.d.ts +1038 -0
- package/dist/user/errors/index.d.ts +40 -0
- package/dist/user/errors/locales/zh.d.ts +23 -0
- package/dist/user/index.d.ts +9 -0
- package/dist/user/internal/service.d.ts +22 -0
- package/dist/user/permissions.d.ts +7 -0
- package/dist/user/schema.d.ts +541 -0
- package/dist/user/user/dto.schemas.d.ts +14 -0
- package/dist/user/user/router.d.ts +558 -0
- package/dist/user/user/service.d.ts +89 -0
- package/dist/user-kyc/admin/dto.schemas.d.ts +625 -0
- package/dist/user-kyc/admin/router.d.ts +666 -0
- package/dist/user-kyc/admin/service.d.ts +89 -0
- package/dist/user-kyc/db.schemas.d.ts +896 -0
- package/dist/user-kyc/errors/index.d.ts +21 -0
- package/dist/user-kyc/errors/locales/zh.d.ts +14 -0
- package/dist/user-kyc/index.d.ts +10 -0
- package/dist/user-kyc/internal/service.d.ts +9 -0
- package/dist/user-kyc/permissions.d.ts +6 -0
- package/dist/user-kyc/schema.d.ts +474 -0
- package/dist/user-kyc/user/dto.schemas.d.ts +314 -0
- package/dist/user-kyc/user/router.d.ts +602 -0
- package/dist/user-kyc/user/service.d.ts +64 -0
- package/dist/user-security/admin/dto.schemas.d.ts +8 -0
- package/dist/user-security/admin/router.d.ts +490 -0
- package/dist/user-security/admin/service.d.ts +6 -0
- package/dist/user-security/db.schemas.d.ts +414 -0
- package/dist/user-security/index.d.ts +8 -0
- package/dist/user-security/internal/service.d.ts +15 -0
- package/dist/user-security/schema.d.ts +215 -0
- package/dist/user-security/user/dto.schemas.d.ts +21 -0
- package/dist/user-security/user/router.d.ts +547 -0
- package/dist/user-security/user/service.d.ts +15 -0
- package/dist/utils/date.d.ts +21 -0
- package/dist/utils/index.d.ts +4 -0
- package/dist/utils/order.d.ts +6 -0
- package/dist/utils/pagination.d.ts +113 -0
- package/dist/utils/password.d.ts +8 -0
- package/dist/wallet/admin/dto.schemas.d.ts +349 -0
- package/dist/wallet/admin/router.d.ts +581 -0
- package/dist/wallet/admin/service.d.ts +65 -0
- package/dist/wallet/db.schemas.d.ts +278 -0
- package/dist/wallet/errors/index.d.ts +10 -0
- package/dist/wallet/errors/locales/zh.d.ts +9 -0
- package/dist/wallet/index.d.ts +11 -0
- package/dist/wallet/internal/service.d.ts +177 -0
- package/dist/wallet/permissions.d.ts +8 -0
- package/dist/wallet/schema.d.ts +152 -0
- package/dist/wallet/seed.d.ts +1 -0
- package/dist/wallet/user/dto.schemas.d.ts +372 -0
- package/dist/wallet/user/router.d.ts +544 -0
- package/dist/wallet/user/service.d.ts +75 -0
- package/dist/wallet-type/admin/dto.schemas.d.ts +83 -0
- package/dist/wallet-type/admin/router.d.ts +753 -0
- package/dist/wallet-type/admin/service.d.ts +109 -0
- package/dist/wallet-type/db.schemas.d.ts +278 -0
- package/dist/wallet-type/errors/index.d.ts +15 -0
- package/dist/wallet-type/errors/locales/zh.d.ts +14 -0
- package/dist/wallet-type/index.d.ts +10 -0
- package/dist/wallet-type/internal/service.d.ts +256 -0
- package/dist/wallet-type/permissions.d.ts +4 -0
- package/dist/wallet-type/schema.d.ts +199 -0
- package/dist/wallet-type/seed.d.ts +1 -0
- package/dist/wallet-type/user/dto.schemas.d.ts +62 -0
- package/dist/wallet-type/user/router.d.ts +481 -0
- package/dist/wallet-type/user/service.d.ts +24 -0
- package/dist/welfare-cycle/admin/dto.schemas.d.ts +1242 -0
- package/dist/welfare-cycle/admin/router.d.ts +1805 -0
- package/dist/welfare-cycle/admin/service.d.ts +1034 -0
- package/dist/welfare-cycle/cron.d.ts +7 -0
- package/dist/welfare-cycle/db.schemas.d.ts +2404 -0
- package/dist/welfare-cycle/errors/index.d.ts +27 -0
- package/dist/welfare-cycle/errors/locales/zh.d.ts +26 -0
- package/dist/welfare-cycle/index.d.ts +8 -0
- package/dist/welfare-cycle/internal/service.d.ts +135 -0
- package/dist/welfare-cycle/permissions.d.ts +6 -0
- package/dist/welfare-cycle/schema.d.ts +1272 -0
- package/dist/welfare-cycle/seed.d.ts +1 -0
- package/dist/welfare-cycle/user/dto.schemas.d.ts +2073 -0
- package/dist/welfare-cycle/user/router.d.ts +808 -0
- package/dist/welfare-cycle/user/service.d.ts +192 -0
- package/dist/withdraw/admin/dto.schemas.d.ts +902 -0
- package/dist/withdraw/admin/router.d.ts +659 -0
- package/dist/withdraw/admin/service.d.ts +83 -0
- package/dist/withdraw/db.schemas.d.ts +584 -0
- package/dist/withdraw/errors/index.d.ts +45 -0
- package/dist/withdraw/errors/locales/zh.d.ts +24 -0
- package/dist/withdraw/index.d.ts +8 -0
- package/dist/withdraw/internal/index.d.ts +1 -0
- package/dist/withdraw/internal/service.d.ts +10 -0
- package/dist/withdraw/permissions.d.ts +9 -0
- package/dist/withdraw/schema.d.ts +307 -0
- package/dist/withdraw/user/dto.schemas.d.ts +1508 -0
- package/dist/withdraw/user/index.d.ts +3 -0
- package/dist/withdraw/user/router.d.ts +649 -0
- package/dist/withdraw/user/service.d.ts +66 -0
- package/package.json +72 -0
|
@@ -0,0 +1,3278 @@
|
|
|
1
|
+
import type { BetterAuthPlugin } from 'better-auth';
|
|
2
|
+
import type { BetterAuthOptions } from 'better-auth/minimal';
|
|
3
|
+
import * as roles from './roles';
|
|
4
|
+
export declare const auth: import("better-auth").Auth<{
|
|
5
|
+
readonly database: (options: BetterAuthOptions) => import("better-auth").DBAdapter<BetterAuthOptions>;
|
|
6
|
+
readonly databaseHooks: {
|
|
7
|
+
readonly user: {
|
|
8
|
+
readonly create: {
|
|
9
|
+
readonly after: (user: {
|
|
10
|
+
id: string;
|
|
11
|
+
createdAt: Date;
|
|
12
|
+
updatedAt: Date;
|
|
13
|
+
email: string;
|
|
14
|
+
emailVerified: boolean;
|
|
15
|
+
name: string;
|
|
16
|
+
image?: string | null | undefined;
|
|
17
|
+
} & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null) => Promise<void>;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
readonly user: {
|
|
22
|
+
readonly changeEmail: {
|
|
23
|
+
readonly enabled: true;
|
|
24
|
+
readonly sendChangeEmailConfirmation: ({ user, newEmail, url, token }: {
|
|
25
|
+
user: import("better-auth").User;
|
|
26
|
+
newEmail: string;
|
|
27
|
+
url: string;
|
|
28
|
+
token: string;
|
|
29
|
+
}, request: Request | undefined) => Promise<void>;
|
|
30
|
+
readonly updateEmailWithoutVerification: true;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
readonly hooks: {
|
|
34
|
+
readonly before: (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>;
|
|
35
|
+
};
|
|
36
|
+
readonly emailAndPassword: {
|
|
37
|
+
readonly enabled: true;
|
|
38
|
+
readonly autoSignIn: true;
|
|
39
|
+
readonly sendResetPassword: ({ user, url, token }: {
|
|
40
|
+
user: import("better-auth").User;
|
|
41
|
+
url: string;
|
|
42
|
+
token: string;
|
|
43
|
+
}, request: Request | undefined) => Promise<void>;
|
|
44
|
+
};
|
|
45
|
+
readonly emailVerification: {
|
|
46
|
+
readonly afterEmailVerification: (user: {
|
|
47
|
+
id: string;
|
|
48
|
+
createdAt: Date;
|
|
49
|
+
updatedAt: Date;
|
|
50
|
+
email: string;
|
|
51
|
+
emailVerified: boolean;
|
|
52
|
+
name: string;
|
|
53
|
+
image?: string | null | undefined;
|
|
54
|
+
}, request: Request | undefined) => Promise<void>;
|
|
55
|
+
readonly sendOnSignUp: true;
|
|
56
|
+
readonly sendVerificationEmail: ({ user, url, token }: {
|
|
57
|
+
user: import("better-auth").User;
|
|
58
|
+
url: string;
|
|
59
|
+
token: string;
|
|
60
|
+
}, request: Request | undefined) => Promise<void>;
|
|
61
|
+
};
|
|
62
|
+
readonly trustedOrigins: (request: Request | undefined) => (string | null | undefined)[];
|
|
63
|
+
readonly advanced: {
|
|
64
|
+
readonly cookiePrefix: 'namkwong';
|
|
65
|
+
readonly crossSubDomainCookies: {
|
|
66
|
+
readonly enabled: boolean;
|
|
67
|
+
readonly domain: string;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
readonly disabledPaths: ["/is-username-available"];
|
|
71
|
+
readonly appName: 'My App';
|
|
72
|
+
readonly plugins: [BetterAuthPlugin, {
|
|
73
|
+
id: "bearer";
|
|
74
|
+
version: string;
|
|
75
|
+
hooks: {
|
|
76
|
+
before: {
|
|
77
|
+
matcher(context: import("better-auth").HookEndpointContext): boolean;
|
|
78
|
+
handler: (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
79
|
+
context: {
|
|
80
|
+
headers: Headers;
|
|
81
|
+
};
|
|
82
|
+
} | undefined>;
|
|
83
|
+
}[];
|
|
84
|
+
after: {
|
|
85
|
+
matcher(context: import("better-auth").HookEndpointContext): true;
|
|
86
|
+
handler: (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>;
|
|
87
|
+
}[];
|
|
88
|
+
};
|
|
89
|
+
options: import("better-auth/plugins").BearerOptions | undefined;
|
|
90
|
+
}, {
|
|
91
|
+
id: "two-factor";
|
|
92
|
+
version: string;
|
|
93
|
+
endpoints: {
|
|
94
|
+
enableTwoFactor: import("better-call").StrictEndpoint<"/two-factor/enable", {
|
|
95
|
+
method: "POST";
|
|
96
|
+
body: import("zod").ZodObject<{
|
|
97
|
+
password: import("zod").ZodOptional<import("zod").ZodString>;
|
|
98
|
+
issuer: import("zod").ZodOptional<import("zod").ZodString>;
|
|
99
|
+
}, import("zod/v4/core").$strip> | import("zod").ZodObject<{
|
|
100
|
+
password: import("zod").ZodString;
|
|
101
|
+
issuer: import("zod").ZodOptional<import("zod").ZodString>;
|
|
102
|
+
}, import("zod/v4/core").$strip>;
|
|
103
|
+
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
104
|
+
session: {
|
|
105
|
+
session: Record<string, any> & {
|
|
106
|
+
id: string;
|
|
107
|
+
createdAt: Date;
|
|
108
|
+
updatedAt: Date;
|
|
109
|
+
userId: string;
|
|
110
|
+
expiresAt: Date;
|
|
111
|
+
token: string;
|
|
112
|
+
ipAddress?: string | null | undefined;
|
|
113
|
+
userAgent?: string | null | undefined;
|
|
114
|
+
};
|
|
115
|
+
user: Record<string, any> & {
|
|
116
|
+
id: string;
|
|
117
|
+
createdAt: Date;
|
|
118
|
+
updatedAt: Date;
|
|
119
|
+
email: string;
|
|
120
|
+
emailVerified: boolean;
|
|
121
|
+
name: string;
|
|
122
|
+
image?: string | null | undefined;
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
}>)[];
|
|
126
|
+
metadata: {
|
|
127
|
+
openapi: {
|
|
128
|
+
summary: string;
|
|
129
|
+
description: string;
|
|
130
|
+
responses: {
|
|
131
|
+
200: {
|
|
132
|
+
description: string;
|
|
133
|
+
content: {
|
|
134
|
+
"application/json": {
|
|
135
|
+
schema: {
|
|
136
|
+
type: "object";
|
|
137
|
+
properties: {
|
|
138
|
+
totpURI: {
|
|
139
|
+
type: string;
|
|
140
|
+
description: string;
|
|
141
|
+
};
|
|
142
|
+
backupCodes: {
|
|
143
|
+
type: string;
|
|
144
|
+
items: {
|
|
145
|
+
type: string;
|
|
146
|
+
};
|
|
147
|
+
description: string;
|
|
148
|
+
};
|
|
149
|
+
};
|
|
150
|
+
};
|
|
151
|
+
};
|
|
152
|
+
};
|
|
153
|
+
};
|
|
154
|
+
};
|
|
155
|
+
};
|
|
156
|
+
};
|
|
157
|
+
}, {
|
|
158
|
+
totpURI: string;
|
|
159
|
+
backupCodes: string[];
|
|
160
|
+
}>;
|
|
161
|
+
disableTwoFactor: import("better-call").StrictEndpoint<"/two-factor/disable", {
|
|
162
|
+
method: "POST";
|
|
163
|
+
body: import("zod").ZodObject<{
|
|
164
|
+
password: import("zod").ZodOptional<import("zod").ZodString>;
|
|
165
|
+
}, import("zod/v4/core").$strip> | import("zod").ZodObject<{
|
|
166
|
+
password: import("zod").ZodString;
|
|
167
|
+
}, import("zod/v4/core").$strip>;
|
|
168
|
+
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
169
|
+
session: {
|
|
170
|
+
session: Record<string, any> & {
|
|
171
|
+
id: string;
|
|
172
|
+
createdAt: Date;
|
|
173
|
+
updatedAt: Date;
|
|
174
|
+
userId: string;
|
|
175
|
+
expiresAt: Date;
|
|
176
|
+
token: string;
|
|
177
|
+
ipAddress?: string | null | undefined;
|
|
178
|
+
userAgent?: string | null | undefined;
|
|
179
|
+
};
|
|
180
|
+
user: Record<string, any> & {
|
|
181
|
+
id: string;
|
|
182
|
+
createdAt: Date;
|
|
183
|
+
updatedAt: Date;
|
|
184
|
+
email: string;
|
|
185
|
+
emailVerified: boolean;
|
|
186
|
+
name: string;
|
|
187
|
+
image?: string | null | undefined;
|
|
188
|
+
};
|
|
189
|
+
};
|
|
190
|
+
}>)[];
|
|
191
|
+
metadata: {
|
|
192
|
+
openapi: {
|
|
193
|
+
summary: string;
|
|
194
|
+
description: string;
|
|
195
|
+
responses: {
|
|
196
|
+
200: {
|
|
197
|
+
description: string;
|
|
198
|
+
content: {
|
|
199
|
+
"application/json": {
|
|
200
|
+
schema: {
|
|
201
|
+
type: "object";
|
|
202
|
+
properties: {
|
|
203
|
+
status: {
|
|
204
|
+
type: string;
|
|
205
|
+
};
|
|
206
|
+
};
|
|
207
|
+
};
|
|
208
|
+
};
|
|
209
|
+
};
|
|
210
|
+
};
|
|
211
|
+
};
|
|
212
|
+
};
|
|
213
|
+
};
|
|
214
|
+
}, {
|
|
215
|
+
status: boolean;
|
|
216
|
+
}>;
|
|
217
|
+
verifyBackupCode: import("better-call").StrictEndpoint<"/two-factor/verify-backup-code", {
|
|
218
|
+
method: "POST";
|
|
219
|
+
body: import("zod").ZodObject<{
|
|
220
|
+
code: import("zod").ZodString;
|
|
221
|
+
disableSession: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
222
|
+
trustDevice: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
223
|
+
}, import("zod/v4/core").$strip>;
|
|
224
|
+
metadata: {
|
|
225
|
+
openapi: {
|
|
226
|
+
description: string;
|
|
227
|
+
responses: {
|
|
228
|
+
"200": {
|
|
229
|
+
description: string;
|
|
230
|
+
content: {
|
|
231
|
+
"application/json": {
|
|
232
|
+
schema: {
|
|
233
|
+
type: "object";
|
|
234
|
+
properties: {
|
|
235
|
+
user: {
|
|
236
|
+
type: string;
|
|
237
|
+
properties: {
|
|
238
|
+
id: {
|
|
239
|
+
type: string;
|
|
240
|
+
description: string;
|
|
241
|
+
};
|
|
242
|
+
email: {
|
|
243
|
+
type: string;
|
|
244
|
+
format: string;
|
|
245
|
+
nullable: boolean;
|
|
246
|
+
description: string;
|
|
247
|
+
};
|
|
248
|
+
emailVerified: {
|
|
249
|
+
type: string;
|
|
250
|
+
nullable: boolean;
|
|
251
|
+
description: string;
|
|
252
|
+
};
|
|
253
|
+
name: {
|
|
254
|
+
type: string;
|
|
255
|
+
nullable: boolean;
|
|
256
|
+
description: string;
|
|
257
|
+
};
|
|
258
|
+
image: {
|
|
259
|
+
type: string;
|
|
260
|
+
format: string;
|
|
261
|
+
nullable: boolean;
|
|
262
|
+
description: string;
|
|
263
|
+
};
|
|
264
|
+
twoFactorEnabled: {
|
|
265
|
+
type: string;
|
|
266
|
+
description: string;
|
|
267
|
+
};
|
|
268
|
+
createdAt: {
|
|
269
|
+
type: string;
|
|
270
|
+
format: string;
|
|
271
|
+
description: string;
|
|
272
|
+
};
|
|
273
|
+
updatedAt: {
|
|
274
|
+
type: string;
|
|
275
|
+
format: string;
|
|
276
|
+
description: string;
|
|
277
|
+
};
|
|
278
|
+
};
|
|
279
|
+
required: string[];
|
|
280
|
+
description: string;
|
|
281
|
+
};
|
|
282
|
+
session: {
|
|
283
|
+
type: string;
|
|
284
|
+
properties: {
|
|
285
|
+
token: {
|
|
286
|
+
type: string;
|
|
287
|
+
description: string;
|
|
288
|
+
};
|
|
289
|
+
userId: {
|
|
290
|
+
type: string;
|
|
291
|
+
description: string;
|
|
292
|
+
};
|
|
293
|
+
createdAt: {
|
|
294
|
+
type: string;
|
|
295
|
+
format: string;
|
|
296
|
+
description: string;
|
|
297
|
+
};
|
|
298
|
+
expiresAt: {
|
|
299
|
+
type: string;
|
|
300
|
+
format: string;
|
|
301
|
+
description: string;
|
|
302
|
+
};
|
|
303
|
+
};
|
|
304
|
+
required: string[];
|
|
305
|
+
description: string;
|
|
306
|
+
};
|
|
307
|
+
};
|
|
308
|
+
required: string[];
|
|
309
|
+
};
|
|
310
|
+
};
|
|
311
|
+
};
|
|
312
|
+
};
|
|
313
|
+
};
|
|
314
|
+
};
|
|
315
|
+
};
|
|
316
|
+
}, {
|
|
317
|
+
token: string | undefined;
|
|
318
|
+
user: (Record<string, any> & {
|
|
319
|
+
id: string;
|
|
320
|
+
createdAt: Date;
|
|
321
|
+
updatedAt: Date;
|
|
322
|
+
email: string;
|
|
323
|
+
emailVerified: boolean;
|
|
324
|
+
name: string;
|
|
325
|
+
image?: string | null | undefined;
|
|
326
|
+
}) | import("better-auth/plugins").UserWithTwoFactor;
|
|
327
|
+
}>;
|
|
328
|
+
generateBackupCodes: import("better-call").StrictEndpoint<"/two-factor/generate-backup-codes", {
|
|
329
|
+
method: "POST";
|
|
330
|
+
body: import("zod").ZodObject<{
|
|
331
|
+
password: import("zod").ZodOptional<import("zod").ZodString>;
|
|
332
|
+
}, import("zod/v4/core").$strip> | import("zod").ZodObject<{
|
|
333
|
+
password: import("zod").ZodString;
|
|
334
|
+
}, import("zod/v4/core").$strip>;
|
|
335
|
+
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
336
|
+
session: {
|
|
337
|
+
session: Record<string, any> & {
|
|
338
|
+
id: string;
|
|
339
|
+
createdAt: Date;
|
|
340
|
+
updatedAt: Date;
|
|
341
|
+
userId: string;
|
|
342
|
+
expiresAt: Date;
|
|
343
|
+
token: string;
|
|
344
|
+
ipAddress?: string | null | undefined;
|
|
345
|
+
userAgent?: string | null | undefined;
|
|
346
|
+
};
|
|
347
|
+
user: Record<string, any> & {
|
|
348
|
+
id: string;
|
|
349
|
+
createdAt: Date;
|
|
350
|
+
updatedAt: Date;
|
|
351
|
+
email: string;
|
|
352
|
+
emailVerified: boolean;
|
|
353
|
+
name: string;
|
|
354
|
+
image?: string | null | undefined;
|
|
355
|
+
};
|
|
356
|
+
};
|
|
357
|
+
}>)[];
|
|
358
|
+
metadata: {
|
|
359
|
+
openapi: {
|
|
360
|
+
description: string;
|
|
361
|
+
responses: {
|
|
362
|
+
"200": {
|
|
363
|
+
description: string;
|
|
364
|
+
content: {
|
|
365
|
+
"application/json": {
|
|
366
|
+
schema: {
|
|
367
|
+
type: "object";
|
|
368
|
+
properties: {
|
|
369
|
+
status: {
|
|
370
|
+
type: string;
|
|
371
|
+
description: string;
|
|
372
|
+
enum: boolean[];
|
|
373
|
+
};
|
|
374
|
+
backupCodes: {
|
|
375
|
+
type: string;
|
|
376
|
+
items: {
|
|
377
|
+
type: string;
|
|
378
|
+
};
|
|
379
|
+
description: string;
|
|
380
|
+
};
|
|
381
|
+
};
|
|
382
|
+
required: string[];
|
|
383
|
+
};
|
|
384
|
+
};
|
|
385
|
+
};
|
|
386
|
+
};
|
|
387
|
+
};
|
|
388
|
+
};
|
|
389
|
+
};
|
|
390
|
+
}, {
|
|
391
|
+
status: boolean;
|
|
392
|
+
backupCodes: string[];
|
|
393
|
+
}>;
|
|
394
|
+
viewBackupCodes: import("better-call").StrictEndpoint<string, {
|
|
395
|
+
method: "POST";
|
|
396
|
+
body: import("zod").ZodObject<{
|
|
397
|
+
userId: import("zod").ZodCoercedString<unknown>;
|
|
398
|
+
}, import("zod/v4/core").$strip>;
|
|
399
|
+
}, {
|
|
400
|
+
status: boolean;
|
|
401
|
+
backupCodes: string[];
|
|
402
|
+
}>;
|
|
403
|
+
sendTwoFactorOTP: import("better-call").StrictEndpoint<"/two-factor/send-otp", {
|
|
404
|
+
method: "POST";
|
|
405
|
+
body: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
406
|
+
trustDevice: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
407
|
+
}, import("zod/v4/core").$strip>>;
|
|
408
|
+
metadata: {
|
|
409
|
+
openapi: {
|
|
410
|
+
summary: string;
|
|
411
|
+
description: string;
|
|
412
|
+
responses: {
|
|
413
|
+
200: {
|
|
414
|
+
description: string;
|
|
415
|
+
content: {
|
|
416
|
+
"application/json": {
|
|
417
|
+
schema: {
|
|
418
|
+
type: "object";
|
|
419
|
+
properties: {
|
|
420
|
+
status: {
|
|
421
|
+
type: string;
|
|
422
|
+
};
|
|
423
|
+
};
|
|
424
|
+
};
|
|
425
|
+
};
|
|
426
|
+
};
|
|
427
|
+
};
|
|
428
|
+
};
|
|
429
|
+
};
|
|
430
|
+
};
|
|
431
|
+
}, {
|
|
432
|
+
status: boolean;
|
|
433
|
+
}>;
|
|
434
|
+
verifyTwoFactorOTP: import("better-call").StrictEndpoint<"/two-factor/verify-otp", {
|
|
435
|
+
method: "POST";
|
|
436
|
+
body: import("zod").ZodObject<{
|
|
437
|
+
code: import("zod").ZodString;
|
|
438
|
+
trustDevice: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
439
|
+
}, import("zod/v4/core").$strip>;
|
|
440
|
+
metadata: {
|
|
441
|
+
openapi: {
|
|
442
|
+
summary: string;
|
|
443
|
+
description: string;
|
|
444
|
+
responses: {
|
|
445
|
+
"200": {
|
|
446
|
+
description: string;
|
|
447
|
+
content: {
|
|
448
|
+
"application/json": {
|
|
449
|
+
schema: {
|
|
450
|
+
type: "object";
|
|
451
|
+
properties: {
|
|
452
|
+
token: {
|
|
453
|
+
type: string;
|
|
454
|
+
description: string;
|
|
455
|
+
};
|
|
456
|
+
user: {
|
|
457
|
+
type: string;
|
|
458
|
+
properties: {
|
|
459
|
+
id: {
|
|
460
|
+
type: string;
|
|
461
|
+
description: string;
|
|
462
|
+
};
|
|
463
|
+
email: {
|
|
464
|
+
type: string;
|
|
465
|
+
format: string;
|
|
466
|
+
nullable: boolean;
|
|
467
|
+
description: string;
|
|
468
|
+
};
|
|
469
|
+
emailVerified: {
|
|
470
|
+
type: string;
|
|
471
|
+
nullable: boolean;
|
|
472
|
+
description: string;
|
|
473
|
+
};
|
|
474
|
+
name: {
|
|
475
|
+
type: string;
|
|
476
|
+
nullable: boolean;
|
|
477
|
+
description: string;
|
|
478
|
+
};
|
|
479
|
+
image: {
|
|
480
|
+
type: string;
|
|
481
|
+
format: string;
|
|
482
|
+
nullable: boolean;
|
|
483
|
+
description: string;
|
|
484
|
+
};
|
|
485
|
+
createdAt: {
|
|
486
|
+
type: string;
|
|
487
|
+
format: string;
|
|
488
|
+
description: string;
|
|
489
|
+
};
|
|
490
|
+
updatedAt: {
|
|
491
|
+
type: string;
|
|
492
|
+
format: string;
|
|
493
|
+
description: string;
|
|
494
|
+
};
|
|
495
|
+
};
|
|
496
|
+
required: string[];
|
|
497
|
+
description: string;
|
|
498
|
+
};
|
|
499
|
+
};
|
|
500
|
+
required: string[];
|
|
501
|
+
};
|
|
502
|
+
};
|
|
503
|
+
};
|
|
504
|
+
};
|
|
505
|
+
};
|
|
506
|
+
};
|
|
507
|
+
};
|
|
508
|
+
}, {
|
|
509
|
+
token: string;
|
|
510
|
+
user: import("better-auth/plugins").UserWithTwoFactor;
|
|
511
|
+
} | {
|
|
512
|
+
token: string;
|
|
513
|
+
user: Record<string, any> & {
|
|
514
|
+
id: string;
|
|
515
|
+
createdAt: Date;
|
|
516
|
+
updatedAt: Date;
|
|
517
|
+
email: string;
|
|
518
|
+
emailVerified: boolean;
|
|
519
|
+
name: string;
|
|
520
|
+
image?: string | null | undefined;
|
|
521
|
+
};
|
|
522
|
+
}>;
|
|
523
|
+
generateTOTP: import("better-call").StrictEndpoint<string, {
|
|
524
|
+
method: "POST";
|
|
525
|
+
body: import("zod").ZodObject<{
|
|
526
|
+
secret: import("zod").ZodString;
|
|
527
|
+
}, import("zod/v4/core").$strip>;
|
|
528
|
+
metadata: {
|
|
529
|
+
openapi: {
|
|
530
|
+
summary: string;
|
|
531
|
+
description: string;
|
|
532
|
+
responses: {
|
|
533
|
+
200: {
|
|
534
|
+
description: string;
|
|
535
|
+
content: {
|
|
536
|
+
"application/json": {
|
|
537
|
+
schema: {
|
|
538
|
+
type: "object";
|
|
539
|
+
properties: {
|
|
540
|
+
code: {
|
|
541
|
+
type: string;
|
|
542
|
+
};
|
|
543
|
+
};
|
|
544
|
+
};
|
|
545
|
+
};
|
|
546
|
+
};
|
|
547
|
+
};
|
|
548
|
+
};
|
|
549
|
+
};
|
|
550
|
+
};
|
|
551
|
+
}, {
|
|
552
|
+
code: string;
|
|
553
|
+
}>;
|
|
554
|
+
getTOTPURI: import("better-call").StrictEndpoint<"/two-factor/get-totp-uri", {
|
|
555
|
+
method: "POST";
|
|
556
|
+
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
557
|
+
session: {
|
|
558
|
+
session: Record<string, any> & {
|
|
559
|
+
id: string;
|
|
560
|
+
createdAt: Date;
|
|
561
|
+
updatedAt: Date;
|
|
562
|
+
userId: string;
|
|
563
|
+
expiresAt: Date;
|
|
564
|
+
token: string;
|
|
565
|
+
ipAddress?: string | null | undefined;
|
|
566
|
+
userAgent?: string | null | undefined;
|
|
567
|
+
};
|
|
568
|
+
user: Record<string, any> & {
|
|
569
|
+
id: string;
|
|
570
|
+
createdAt: Date;
|
|
571
|
+
updatedAt: Date;
|
|
572
|
+
email: string;
|
|
573
|
+
emailVerified: boolean;
|
|
574
|
+
name: string;
|
|
575
|
+
image?: string | null | undefined;
|
|
576
|
+
};
|
|
577
|
+
};
|
|
578
|
+
}>)[];
|
|
579
|
+
body: import("zod").ZodObject<{
|
|
580
|
+
password: import("zod").ZodOptional<import("zod").ZodString>;
|
|
581
|
+
}, import("zod/v4/core").$strip> | import("zod").ZodObject<{
|
|
582
|
+
password: import("zod").ZodString;
|
|
583
|
+
}, import("zod/v4/core").$strip>;
|
|
584
|
+
metadata: {
|
|
585
|
+
openapi: {
|
|
586
|
+
summary: string;
|
|
587
|
+
description: string;
|
|
588
|
+
responses: {
|
|
589
|
+
200: {
|
|
590
|
+
description: string;
|
|
591
|
+
content: {
|
|
592
|
+
"application/json": {
|
|
593
|
+
schema: {
|
|
594
|
+
type: "object";
|
|
595
|
+
properties: {
|
|
596
|
+
totpURI: {
|
|
597
|
+
type: string;
|
|
598
|
+
};
|
|
599
|
+
};
|
|
600
|
+
};
|
|
601
|
+
};
|
|
602
|
+
};
|
|
603
|
+
};
|
|
604
|
+
};
|
|
605
|
+
};
|
|
606
|
+
};
|
|
607
|
+
}, {
|
|
608
|
+
totpURI: string;
|
|
609
|
+
}>;
|
|
610
|
+
verifyTOTP: import("better-call").StrictEndpoint<"/two-factor/verify-totp", {
|
|
611
|
+
method: "POST";
|
|
612
|
+
body: import("zod").ZodObject<{
|
|
613
|
+
code: import("zod").ZodString;
|
|
614
|
+
trustDevice: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
615
|
+
}, import("zod/v4/core").$strip>;
|
|
616
|
+
metadata: {
|
|
617
|
+
openapi: {
|
|
618
|
+
summary: string;
|
|
619
|
+
description: string;
|
|
620
|
+
responses: {
|
|
621
|
+
200: {
|
|
622
|
+
description: string;
|
|
623
|
+
content: {
|
|
624
|
+
"application/json": {
|
|
625
|
+
schema: {
|
|
626
|
+
type: "object";
|
|
627
|
+
properties: {
|
|
628
|
+
status: {
|
|
629
|
+
type: string;
|
|
630
|
+
};
|
|
631
|
+
};
|
|
632
|
+
};
|
|
633
|
+
};
|
|
634
|
+
};
|
|
635
|
+
};
|
|
636
|
+
};
|
|
637
|
+
};
|
|
638
|
+
};
|
|
639
|
+
}, {
|
|
640
|
+
token: string;
|
|
641
|
+
user: import("better-auth/plugins").UserWithTwoFactor;
|
|
642
|
+
} | {
|
|
643
|
+
token: string;
|
|
644
|
+
user: Record<string, any> & {
|
|
645
|
+
id: string;
|
|
646
|
+
createdAt: Date;
|
|
647
|
+
updatedAt: Date;
|
|
648
|
+
email: string;
|
|
649
|
+
emailVerified: boolean;
|
|
650
|
+
name: string;
|
|
651
|
+
image?: string | null | undefined;
|
|
652
|
+
};
|
|
653
|
+
}>;
|
|
654
|
+
};
|
|
655
|
+
options: NoInfer<import("better-auth/plugins").TwoFactorOptions>;
|
|
656
|
+
hooks: {
|
|
657
|
+
after: {
|
|
658
|
+
matcher(context: import("better-auth").HookEndpointContext): boolean;
|
|
659
|
+
handler: (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
660
|
+
twoFactorRedirect: boolean;
|
|
661
|
+
twoFactorMethods: string[];
|
|
662
|
+
} | undefined>;
|
|
663
|
+
}[];
|
|
664
|
+
};
|
|
665
|
+
schema: {
|
|
666
|
+
user: {
|
|
667
|
+
fields: {
|
|
668
|
+
twoFactorEnabled: {
|
|
669
|
+
type: "boolean";
|
|
670
|
+
required: false;
|
|
671
|
+
defaultValue: false;
|
|
672
|
+
input: false;
|
|
673
|
+
};
|
|
674
|
+
};
|
|
675
|
+
};
|
|
676
|
+
twoFactor: {
|
|
677
|
+
fields: {
|
|
678
|
+
secret: {
|
|
679
|
+
type: "string";
|
|
680
|
+
required: true;
|
|
681
|
+
returned: false;
|
|
682
|
+
index: true;
|
|
683
|
+
};
|
|
684
|
+
backupCodes: {
|
|
685
|
+
type: "string";
|
|
686
|
+
required: true;
|
|
687
|
+
returned: false;
|
|
688
|
+
};
|
|
689
|
+
userId: {
|
|
690
|
+
type: "string";
|
|
691
|
+
required: true;
|
|
692
|
+
returned: false;
|
|
693
|
+
references: {
|
|
694
|
+
model: string;
|
|
695
|
+
field: string;
|
|
696
|
+
};
|
|
697
|
+
index: true;
|
|
698
|
+
};
|
|
699
|
+
verified: {
|
|
700
|
+
type: "boolean";
|
|
701
|
+
required: false;
|
|
702
|
+
defaultValue: true;
|
|
703
|
+
input: false;
|
|
704
|
+
};
|
|
705
|
+
};
|
|
706
|
+
};
|
|
707
|
+
};
|
|
708
|
+
rateLimit: {
|
|
709
|
+
pathMatcher(path: string): boolean;
|
|
710
|
+
window: number;
|
|
711
|
+
max: number;
|
|
712
|
+
}[];
|
|
713
|
+
$ERROR_CODES: {
|
|
714
|
+
OTP_NOT_ENABLED: import("better-auth").RawError<"OTP_NOT_ENABLED">;
|
|
715
|
+
OTP_HAS_EXPIRED: import("better-auth").RawError<"OTP_HAS_EXPIRED">;
|
|
716
|
+
TOTP_NOT_ENABLED: import("better-auth").RawError<"TOTP_NOT_ENABLED">;
|
|
717
|
+
TWO_FACTOR_NOT_ENABLED: import("better-auth").RawError<"TWO_FACTOR_NOT_ENABLED">;
|
|
718
|
+
BACKUP_CODES_NOT_ENABLED: import("better-auth").RawError<"BACKUP_CODES_NOT_ENABLED">;
|
|
719
|
+
INVALID_BACKUP_CODE: import("better-auth").RawError<"INVALID_BACKUP_CODE">;
|
|
720
|
+
INVALID_CODE: import("better-auth").RawError<"INVALID_CODE">;
|
|
721
|
+
TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE: import("better-auth").RawError<"TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE">;
|
|
722
|
+
INVALID_TWO_FACTOR_COOKIE: import("better-auth").RawError<"INVALID_TWO_FACTOR_COOKIE">;
|
|
723
|
+
};
|
|
724
|
+
}, {
|
|
725
|
+
id: "username";
|
|
726
|
+
version: string;
|
|
727
|
+
init(ctx: import("better-auth").AuthContext): {
|
|
728
|
+
options: {
|
|
729
|
+
databaseHooks: {
|
|
730
|
+
user: {
|
|
731
|
+
create: {
|
|
732
|
+
before(user: {
|
|
733
|
+
id: string;
|
|
734
|
+
createdAt: Date;
|
|
735
|
+
updatedAt: Date;
|
|
736
|
+
email: string;
|
|
737
|
+
emailVerified: boolean;
|
|
738
|
+
name: string;
|
|
739
|
+
image?: string | null | undefined;
|
|
740
|
+
} & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null): Promise<{
|
|
741
|
+
data: {
|
|
742
|
+
displayUsername?: string | undefined;
|
|
743
|
+
username?: string | undefined;
|
|
744
|
+
id: string;
|
|
745
|
+
createdAt: Date;
|
|
746
|
+
updatedAt: Date;
|
|
747
|
+
email: string;
|
|
748
|
+
emailVerified: boolean;
|
|
749
|
+
name: string;
|
|
750
|
+
image?: string | null | undefined;
|
|
751
|
+
};
|
|
752
|
+
}>;
|
|
753
|
+
};
|
|
754
|
+
update: {
|
|
755
|
+
before(user: Partial<{
|
|
756
|
+
id: string;
|
|
757
|
+
createdAt: Date;
|
|
758
|
+
updatedAt: Date;
|
|
759
|
+
email: string;
|
|
760
|
+
emailVerified: boolean;
|
|
761
|
+
name: string;
|
|
762
|
+
image?: string | null | undefined;
|
|
763
|
+
}> & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null): Promise<{
|
|
764
|
+
data: {
|
|
765
|
+
displayUsername?: string | undefined;
|
|
766
|
+
username?: string | undefined;
|
|
767
|
+
id?: string | undefined;
|
|
768
|
+
createdAt?: Date | undefined;
|
|
769
|
+
updatedAt?: Date | undefined;
|
|
770
|
+
email?: string | undefined;
|
|
771
|
+
emailVerified?: boolean | undefined;
|
|
772
|
+
name?: string | undefined;
|
|
773
|
+
image?: string | null | undefined;
|
|
774
|
+
};
|
|
775
|
+
}>;
|
|
776
|
+
};
|
|
777
|
+
};
|
|
778
|
+
};
|
|
779
|
+
};
|
|
780
|
+
};
|
|
781
|
+
endpoints: {
|
|
782
|
+
signInUsername: import("better-call").StrictEndpoint<"/sign-in/username", {
|
|
783
|
+
method: "POST";
|
|
784
|
+
body: import("zod").ZodObject<{
|
|
785
|
+
username: import("zod").ZodString;
|
|
786
|
+
password: import("zod").ZodString;
|
|
787
|
+
rememberMe: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
788
|
+
callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
789
|
+
}, import("zod/v4/core").$strip>;
|
|
790
|
+
metadata: {
|
|
791
|
+
openapi: {
|
|
792
|
+
summary: string;
|
|
793
|
+
description: string;
|
|
794
|
+
responses: {
|
|
795
|
+
200: {
|
|
796
|
+
description: string;
|
|
797
|
+
content: {
|
|
798
|
+
"application/json": {
|
|
799
|
+
schema: {
|
|
800
|
+
type: "object";
|
|
801
|
+
properties: {
|
|
802
|
+
token: {
|
|
803
|
+
type: string;
|
|
804
|
+
description: string;
|
|
805
|
+
};
|
|
806
|
+
user: {
|
|
807
|
+
$ref: string;
|
|
808
|
+
};
|
|
809
|
+
};
|
|
810
|
+
required: string[];
|
|
811
|
+
};
|
|
812
|
+
};
|
|
813
|
+
};
|
|
814
|
+
};
|
|
815
|
+
422: {
|
|
816
|
+
description: string;
|
|
817
|
+
content: {
|
|
818
|
+
"application/json": {
|
|
819
|
+
schema: {
|
|
820
|
+
type: "object";
|
|
821
|
+
properties: {
|
|
822
|
+
message: {
|
|
823
|
+
type: string;
|
|
824
|
+
};
|
|
825
|
+
};
|
|
826
|
+
};
|
|
827
|
+
};
|
|
828
|
+
};
|
|
829
|
+
};
|
|
830
|
+
};
|
|
831
|
+
};
|
|
832
|
+
};
|
|
833
|
+
}, {
|
|
834
|
+
token: string;
|
|
835
|
+
user: {
|
|
836
|
+
id: string;
|
|
837
|
+
createdAt: Date;
|
|
838
|
+
updatedAt: Date;
|
|
839
|
+
email: string;
|
|
840
|
+
emailVerified: boolean;
|
|
841
|
+
name: string;
|
|
842
|
+
image?: string | null | undefined;
|
|
843
|
+
} & {
|
|
844
|
+
username: string;
|
|
845
|
+
displayUsername: string;
|
|
846
|
+
};
|
|
847
|
+
}>;
|
|
848
|
+
isUsernameAvailable: import("better-call").StrictEndpoint<"/is-username-available", {
|
|
849
|
+
method: "POST";
|
|
850
|
+
body: import("zod").ZodObject<{
|
|
851
|
+
username: import("zod").ZodString;
|
|
852
|
+
}, import("zod/v4/core").$strip>;
|
|
853
|
+
}, {
|
|
854
|
+
available: boolean;
|
|
855
|
+
}>;
|
|
856
|
+
};
|
|
857
|
+
schema: {
|
|
858
|
+
user: {
|
|
859
|
+
fields: {
|
|
860
|
+
username: {
|
|
861
|
+
type: "string";
|
|
862
|
+
required: false;
|
|
863
|
+
sortable: true;
|
|
864
|
+
unique: true;
|
|
865
|
+
returned: true;
|
|
866
|
+
transform: {
|
|
867
|
+
input(value: import("better-auth").DBPrimitive): string | number | boolean | Date | Record<string, unknown> | unknown[] | null | undefined;
|
|
868
|
+
};
|
|
869
|
+
};
|
|
870
|
+
displayUsername: {
|
|
871
|
+
type: "string";
|
|
872
|
+
required: false;
|
|
873
|
+
transform: {
|
|
874
|
+
input(value: import("better-auth").DBPrimitive): string | number | boolean | Date | Record<string, unknown> | unknown[] | null | undefined;
|
|
875
|
+
};
|
|
876
|
+
};
|
|
877
|
+
};
|
|
878
|
+
};
|
|
879
|
+
};
|
|
880
|
+
hooks: {
|
|
881
|
+
before: {
|
|
882
|
+
matcher(context: import("better-auth").HookEndpointContext): boolean;
|
|
883
|
+
handler: (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>;
|
|
884
|
+
}[];
|
|
885
|
+
};
|
|
886
|
+
options: import("better-auth/plugins").UsernameOptions | undefined;
|
|
887
|
+
$ERROR_CODES: {
|
|
888
|
+
EMAIL_NOT_VERIFIED: import("better-auth").RawError<"EMAIL_NOT_VERIFIED">;
|
|
889
|
+
UNEXPECTED_ERROR: import("better-auth").RawError<"UNEXPECTED_ERROR">;
|
|
890
|
+
INVALID_USERNAME_OR_PASSWORD: import("better-auth").RawError<"INVALID_USERNAME_OR_PASSWORD">;
|
|
891
|
+
USERNAME_IS_ALREADY_TAKEN: import("better-auth").RawError<"USERNAME_IS_ALREADY_TAKEN">;
|
|
892
|
+
USERNAME_TOO_SHORT: import("better-auth").RawError<"USERNAME_TOO_SHORT">;
|
|
893
|
+
USERNAME_TOO_LONG: import("better-auth").RawError<"USERNAME_TOO_LONG">;
|
|
894
|
+
INVALID_USERNAME: import("better-auth").RawError<"INVALID_USERNAME">;
|
|
895
|
+
INVALID_DISPLAY_USERNAME: import("better-auth").RawError<"INVALID_DISPLAY_USERNAME">;
|
|
896
|
+
};
|
|
897
|
+
}, {
|
|
898
|
+
id: "phone-number";
|
|
899
|
+
version: string;
|
|
900
|
+
init(): {
|
|
901
|
+
options: {
|
|
902
|
+
databaseHooks: {
|
|
903
|
+
user: {
|
|
904
|
+
update: {
|
|
905
|
+
before(data: Partial<{
|
|
906
|
+
id: string;
|
|
907
|
+
createdAt: Date;
|
|
908
|
+
updatedAt: Date;
|
|
909
|
+
email: string;
|
|
910
|
+
emailVerified: boolean;
|
|
911
|
+
name: string;
|
|
912
|
+
image?: string | null | undefined;
|
|
913
|
+
}> & Record<string, unknown>): Promise<{
|
|
914
|
+
data: {
|
|
915
|
+
[x: string]: unknown;
|
|
916
|
+
id?: string | undefined;
|
|
917
|
+
createdAt?: Date | undefined;
|
|
918
|
+
updatedAt?: Date | undefined;
|
|
919
|
+
email?: string | undefined;
|
|
920
|
+
emailVerified?: boolean | undefined;
|
|
921
|
+
name?: string | undefined;
|
|
922
|
+
image?: string | null | undefined;
|
|
923
|
+
};
|
|
924
|
+
} | undefined>;
|
|
925
|
+
};
|
|
926
|
+
};
|
|
927
|
+
};
|
|
928
|
+
};
|
|
929
|
+
};
|
|
930
|
+
hooks: {
|
|
931
|
+
before: {
|
|
932
|
+
matcher: (ctx: import("better-auth").HookEndpointContext) => boolean;
|
|
933
|
+
handler: (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<never>;
|
|
934
|
+
}[];
|
|
935
|
+
};
|
|
936
|
+
endpoints: {
|
|
937
|
+
signInPhoneNumber: import("better-call").StrictEndpoint<"/sign-in/phone-number", {
|
|
938
|
+
method: "POST";
|
|
939
|
+
body: import("zod").ZodObject<{
|
|
940
|
+
phoneNumber: import("zod").ZodString;
|
|
941
|
+
password: import("zod").ZodString;
|
|
942
|
+
rememberMe: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
943
|
+
}, import("zod/v4/core").$strip>;
|
|
944
|
+
metadata: {
|
|
945
|
+
openapi: {
|
|
946
|
+
summary: string;
|
|
947
|
+
description: string;
|
|
948
|
+
responses: {
|
|
949
|
+
200: {
|
|
950
|
+
description: string;
|
|
951
|
+
content: {
|
|
952
|
+
"application/json": {
|
|
953
|
+
schema: {
|
|
954
|
+
type: "object";
|
|
955
|
+
properties: {
|
|
956
|
+
user: {
|
|
957
|
+
$ref: string;
|
|
958
|
+
};
|
|
959
|
+
session: {
|
|
960
|
+
$ref: string;
|
|
961
|
+
};
|
|
962
|
+
};
|
|
963
|
+
};
|
|
964
|
+
};
|
|
965
|
+
};
|
|
966
|
+
};
|
|
967
|
+
400: {
|
|
968
|
+
description: string;
|
|
969
|
+
};
|
|
970
|
+
};
|
|
971
|
+
};
|
|
972
|
+
};
|
|
973
|
+
}, {
|
|
974
|
+
token: string;
|
|
975
|
+
user: import("better-auth/plugins").UserWithPhoneNumber;
|
|
976
|
+
}>;
|
|
977
|
+
sendPhoneNumberOTP: import("better-call").StrictEndpoint<"/phone-number/send-otp", {
|
|
978
|
+
method: "POST";
|
|
979
|
+
body: import("zod").ZodObject<{
|
|
980
|
+
phoneNumber: import("zod").ZodString;
|
|
981
|
+
}, import("zod/v4/core").$strip>;
|
|
982
|
+
metadata: {
|
|
983
|
+
openapi: {
|
|
984
|
+
summary: string;
|
|
985
|
+
description: string;
|
|
986
|
+
responses: {
|
|
987
|
+
200: {
|
|
988
|
+
description: string;
|
|
989
|
+
content: {
|
|
990
|
+
"application/json": {
|
|
991
|
+
schema: {
|
|
992
|
+
type: "object";
|
|
993
|
+
properties: {
|
|
994
|
+
message: {
|
|
995
|
+
type: string;
|
|
996
|
+
};
|
|
997
|
+
};
|
|
998
|
+
};
|
|
999
|
+
};
|
|
1000
|
+
};
|
|
1001
|
+
};
|
|
1002
|
+
};
|
|
1003
|
+
};
|
|
1004
|
+
};
|
|
1005
|
+
}, {
|
|
1006
|
+
message: string;
|
|
1007
|
+
}>;
|
|
1008
|
+
verifyPhoneNumber: import("better-call").StrictEndpoint<"/phone-number/verify", {
|
|
1009
|
+
method: "POST";
|
|
1010
|
+
body: import("zod").ZodIntersection<import("zod").ZodObject<{
|
|
1011
|
+
phoneNumber: import("zod").ZodString;
|
|
1012
|
+
code: import("zod").ZodString;
|
|
1013
|
+
disableSession: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
1014
|
+
updatePhoneNumber: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
1015
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
|
|
1016
|
+
metadata: {
|
|
1017
|
+
openapi: {
|
|
1018
|
+
summary: string;
|
|
1019
|
+
description: string;
|
|
1020
|
+
responses: {
|
|
1021
|
+
"200": {
|
|
1022
|
+
description: string;
|
|
1023
|
+
content: {
|
|
1024
|
+
"application/json": {
|
|
1025
|
+
schema: {
|
|
1026
|
+
type: "object";
|
|
1027
|
+
properties: {
|
|
1028
|
+
status: {
|
|
1029
|
+
type: string;
|
|
1030
|
+
description: string;
|
|
1031
|
+
enum: boolean[];
|
|
1032
|
+
};
|
|
1033
|
+
token: {
|
|
1034
|
+
type: string;
|
|
1035
|
+
nullable: boolean;
|
|
1036
|
+
description: string;
|
|
1037
|
+
};
|
|
1038
|
+
user: {
|
|
1039
|
+
type: string;
|
|
1040
|
+
nullable: boolean;
|
|
1041
|
+
properties: {
|
|
1042
|
+
id: {
|
|
1043
|
+
type: string;
|
|
1044
|
+
description: string;
|
|
1045
|
+
};
|
|
1046
|
+
email: {
|
|
1047
|
+
type: string;
|
|
1048
|
+
format: string;
|
|
1049
|
+
nullable: boolean;
|
|
1050
|
+
description: string;
|
|
1051
|
+
};
|
|
1052
|
+
emailVerified: {
|
|
1053
|
+
type: string;
|
|
1054
|
+
nullable: boolean;
|
|
1055
|
+
description: string;
|
|
1056
|
+
};
|
|
1057
|
+
name: {
|
|
1058
|
+
type: string;
|
|
1059
|
+
nullable: boolean;
|
|
1060
|
+
description: string;
|
|
1061
|
+
};
|
|
1062
|
+
image: {
|
|
1063
|
+
type: string;
|
|
1064
|
+
format: string;
|
|
1065
|
+
nullable: boolean;
|
|
1066
|
+
description: string;
|
|
1067
|
+
};
|
|
1068
|
+
phoneNumber: {
|
|
1069
|
+
type: string;
|
|
1070
|
+
description: string;
|
|
1071
|
+
};
|
|
1072
|
+
phoneNumberVerified: {
|
|
1073
|
+
type: string;
|
|
1074
|
+
description: string;
|
|
1075
|
+
};
|
|
1076
|
+
createdAt: {
|
|
1077
|
+
type: string;
|
|
1078
|
+
format: string;
|
|
1079
|
+
description: string;
|
|
1080
|
+
};
|
|
1081
|
+
updatedAt: {
|
|
1082
|
+
type: string;
|
|
1083
|
+
format: string;
|
|
1084
|
+
description: string;
|
|
1085
|
+
};
|
|
1086
|
+
};
|
|
1087
|
+
required: string[];
|
|
1088
|
+
description: string;
|
|
1089
|
+
};
|
|
1090
|
+
};
|
|
1091
|
+
required: string[];
|
|
1092
|
+
};
|
|
1093
|
+
};
|
|
1094
|
+
};
|
|
1095
|
+
};
|
|
1096
|
+
400: {
|
|
1097
|
+
description: string;
|
|
1098
|
+
};
|
|
1099
|
+
};
|
|
1100
|
+
};
|
|
1101
|
+
};
|
|
1102
|
+
}, {
|
|
1103
|
+
status: boolean;
|
|
1104
|
+
token: string;
|
|
1105
|
+
user: {
|
|
1106
|
+
id: string;
|
|
1107
|
+
createdAt: Date;
|
|
1108
|
+
updatedAt: Date;
|
|
1109
|
+
email: string;
|
|
1110
|
+
emailVerified: boolean;
|
|
1111
|
+
name: string;
|
|
1112
|
+
image?: string | null | undefined;
|
|
1113
|
+
} & import("better-auth/plugins").UserWithPhoneNumber;
|
|
1114
|
+
} | {
|
|
1115
|
+
status: boolean;
|
|
1116
|
+
token: null;
|
|
1117
|
+
user: import("better-auth/plugins").UserWithPhoneNumber;
|
|
1118
|
+
}>;
|
|
1119
|
+
requestPasswordResetPhoneNumber: import("better-call").StrictEndpoint<"/phone-number/request-password-reset", {
|
|
1120
|
+
method: "POST";
|
|
1121
|
+
body: import("zod").ZodObject<{
|
|
1122
|
+
phoneNumber: import("zod").ZodString;
|
|
1123
|
+
}, import("zod/v4/core").$strip>;
|
|
1124
|
+
metadata: {
|
|
1125
|
+
openapi: {
|
|
1126
|
+
description: string;
|
|
1127
|
+
responses: {
|
|
1128
|
+
"200": {
|
|
1129
|
+
description: string;
|
|
1130
|
+
content: {
|
|
1131
|
+
"application/json": {
|
|
1132
|
+
schema: {
|
|
1133
|
+
type: "object";
|
|
1134
|
+
properties: {
|
|
1135
|
+
status: {
|
|
1136
|
+
type: string;
|
|
1137
|
+
description: string;
|
|
1138
|
+
enum: boolean[];
|
|
1139
|
+
};
|
|
1140
|
+
};
|
|
1141
|
+
required: string[];
|
|
1142
|
+
};
|
|
1143
|
+
};
|
|
1144
|
+
};
|
|
1145
|
+
};
|
|
1146
|
+
};
|
|
1147
|
+
};
|
|
1148
|
+
};
|
|
1149
|
+
}, {
|
|
1150
|
+
status: boolean;
|
|
1151
|
+
}>;
|
|
1152
|
+
resetPasswordPhoneNumber: import("better-call").StrictEndpoint<"/phone-number/reset-password", {
|
|
1153
|
+
method: "POST";
|
|
1154
|
+
body: import("zod").ZodObject<{
|
|
1155
|
+
otp: import("zod").ZodString;
|
|
1156
|
+
phoneNumber: import("zod").ZodString;
|
|
1157
|
+
newPassword: import("zod").ZodString;
|
|
1158
|
+
}, import("zod/v4/core").$strip>;
|
|
1159
|
+
metadata: {
|
|
1160
|
+
openapi: {
|
|
1161
|
+
description: string;
|
|
1162
|
+
responses: {
|
|
1163
|
+
"200": {
|
|
1164
|
+
description: string;
|
|
1165
|
+
content: {
|
|
1166
|
+
"application/json": {
|
|
1167
|
+
schema: {
|
|
1168
|
+
type: "object";
|
|
1169
|
+
properties: {
|
|
1170
|
+
status: {
|
|
1171
|
+
type: string;
|
|
1172
|
+
description: string;
|
|
1173
|
+
enum: boolean[];
|
|
1174
|
+
};
|
|
1175
|
+
};
|
|
1176
|
+
required: string[];
|
|
1177
|
+
};
|
|
1178
|
+
};
|
|
1179
|
+
};
|
|
1180
|
+
};
|
|
1181
|
+
};
|
|
1182
|
+
};
|
|
1183
|
+
};
|
|
1184
|
+
}, {
|
|
1185
|
+
status: boolean;
|
|
1186
|
+
}>;
|
|
1187
|
+
};
|
|
1188
|
+
schema: {
|
|
1189
|
+
user: {
|
|
1190
|
+
fields: {
|
|
1191
|
+
phoneNumber: {
|
|
1192
|
+
type: "string";
|
|
1193
|
+
required: false;
|
|
1194
|
+
unique: true;
|
|
1195
|
+
sortable: true;
|
|
1196
|
+
returned: true;
|
|
1197
|
+
};
|
|
1198
|
+
phoneNumberVerified: {
|
|
1199
|
+
type: "boolean";
|
|
1200
|
+
required: false;
|
|
1201
|
+
returned: true;
|
|
1202
|
+
input: false;
|
|
1203
|
+
};
|
|
1204
|
+
};
|
|
1205
|
+
};
|
|
1206
|
+
};
|
|
1207
|
+
rateLimit: {
|
|
1208
|
+
pathMatcher(path: string): boolean;
|
|
1209
|
+
window: number;
|
|
1210
|
+
max: number;
|
|
1211
|
+
}[];
|
|
1212
|
+
options: import("better-auth/plugins").PhoneNumberOptions | undefined;
|
|
1213
|
+
$ERROR_CODES: {
|
|
1214
|
+
OTP_EXPIRED: import("better-auth").RawError<"OTP_EXPIRED">;
|
|
1215
|
+
INVALID_OTP: import("better-auth").RawError<"INVALID_OTP">;
|
|
1216
|
+
TOO_MANY_ATTEMPTS: import("better-auth").RawError<"TOO_MANY_ATTEMPTS">;
|
|
1217
|
+
INVALID_PHONE_NUMBER: import("better-auth").RawError<"INVALID_PHONE_NUMBER">;
|
|
1218
|
+
PHONE_NUMBER_EXIST: import("better-auth").RawError<"PHONE_NUMBER_EXIST">;
|
|
1219
|
+
PHONE_NUMBER_NOT_EXIST: import("better-auth").RawError<"PHONE_NUMBER_NOT_EXIST">;
|
|
1220
|
+
INVALID_PHONE_NUMBER_OR_PASSWORD: import("better-auth").RawError<"INVALID_PHONE_NUMBER_OR_PASSWORD">;
|
|
1221
|
+
UNEXPECTED_ERROR: import("better-auth").RawError<"UNEXPECTED_ERROR">;
|
|
1222
|
+
OTP_NOT_FOUND: import("better-auth").RawError<"OTP_NOT_FOUND">;
|
|
1223
|
+
PHONE_NUMBER_NOT_VERIFIED: import("better-auth").RawError<"PHONE_NUMBER_NOT_VERIFIED">;
|
|
1224
|
+
PHONE_NUMBER_CANNOT_BE_UPDATED: import("better-auth").RawError<"PHONE_NUMBER_CANNOT_BE_UPDATED">;
|
|
1225
|
+
SEND_OTP_NOT_IMPLEMENTED: import("better-auth").RawError<"SEND_OTP_NOT_IMPLEMENTED">;
|
|
1226
|
+
};
|
|
1227
|
+
}, {
|
|
1228
|
+
id: "magic-link";
|
|
1229
|
+
version: string;
|
|
1230
|
+
endpoints: {
|
|
1231
|
+
signInMagicLink: import("better-call").StrictEndpoint<"/sign-in/magic-link", {
|
|
1232
|
+
method: "POST";
|
|
1233
|
+
requireHeaders: true;
|
|
1234
|
+
body: import("zod").ZodObject<{
|
|
1235
|
+
email: import("zod").ZodEmail;
|
|
1236
|
+
name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1237
|
+
callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1238
|
+
newUserCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1239
|
+
errorCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1240
|
+
metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
|
|
1241
|
+
}, import("zod/v4/core").$strip>;
|
|
1242
|
+
metadata: {
|
|
1243
|
+
openapi: {
|
|
1244
|
+
operationId: string;
|
|
1245
|
+
description: string;
|
|
1246
|
+
responses: {
|
|
1247
|
+
200: {
|
|
1248
|
+
description: string;
|
|
1249
|
+
content: {
|
|
1250
|
+
"application/json": {
|
|
1251
|
+
schema: {
|
|
1252
|
+
type: "object";
|
|
1253
|
+
properties: {
|
|
1254
|
+
status: {
|
|
1255
|
+
type: string;
|
|
1256
|
+
};
|
|
1257
|
+
};
|
|
1258
|
+
};
|
|
1259
|
+
};
|
|
1260
|
+
};
|
|
1261
|
+
};
|
|
1262
|
+
};
|
|
1263
|
+
};
|
|
1264
|
+
};
|
|
1265
|
+
}, {
|
|
1266
|
+
status: boolean;
|
|
1267
|
+
}>;
|
|
1268
|
+
magicLinkVerify: import("better-call").StrictEndpoint<"/magic-link/verify", {
|
|
1269
|
+
method: "GET";
|
|
1270
|
+
query: import("zod").ZodObject<{
|
|
1271
|
+
token: import("zod").ZodString;
|
|
1272
|
+
callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1273
|
+
errorCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1274
|
+
newUserCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1275
|
+
}, import("zod/v4/core").$strip>;
|
|
1276
|
+
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>)[];
|
|
1277
|
+
requireHeaders: true;
|
|
1278
|
+
metadata: {
|
|
1279
|
+
openapi: {
|
|
1280
|
+
operationId: string;
|
|
1281
|
+
description: string;
|
|
1282
|
+
responses: {
|
|
1283
|
+
200: {
|
|
1284
|
+
description: string;
|
|
1285
|
+
content: {
|
|
1286
|
+
"application/json": {
|
|
1287
|
+
schema: {
|
|
1288
|
+
type: "object";
|
|
1289
|
+
properties: {
|
|
1290
|
+
session: {
|
|
1291
|
+
$ref: string;
|
|
1292
|
+
};
|
|
1293
|
+
user: {
|
|
1294
|
+
$ref: string;
|
|
1295
|
+
};
|
|
1296
|
+
};
|
|
1297
|
+
};
|
|
1298
|
+
};
|
|
1299
|
+
};
|
|
1300
|
+
};
|
|
1301
|
+
};
|
|
1302
|
+
};
|
|
1303
|
+
};
|
|
1304
|
+
}, {
|
|
1305
|
+
token: string;
|
|
1306
|
+
user: {
|
|
1307
|
+
id: string;
|
|
1308
|
+
createdAt: Date;
|
|
1309
|
+
updatedAt: Date;
|
|
1310
|
+
email: string;
|
|
1311
|
+
emailVerified: boolean;
|
|
1312
|
+
name: string;
|
|
1313
|
+
image?: string | null | undefined;
|
|
1314
|
+
};
|
|
1315
|
+
session: {
|
|
1316
|
+
id: string;
|
|
1317
|
+
createdAt: Date;
|
|
1318
|
+
updatedAt: Date;
|
|
1319
|
+
userId: string;
|
|
1320
|
+
expiresAt: Date;
|
|
1321
|
+
token: string;
|
|
1322
|
+
ipAddress?: string | null | undefined;
|
|
1323
|
+
userAgent?: string | null | undefined;
|
|
1324
|
+
};
|
|
1325
|
+
}>;
|
|
1326
|
+
};
|
|
1327
|
+
rateLimit: {
|
|
1328
|
+
pathMatcher(path: string): boolean;
|
|
1329
|
+
window: number;
|
|
1330
|
+
max: number;
|
|
1331
|
+
}[];
|
|
1332
|
+
options: import("better-auth/plugins").MagicLinkOptions;
|
|
1333
|
+
}, {
|
|
1334
|
+
id: "email-otp";
|
|
1335
|
+
version: string;
|
|
1336
|
+
init(ctx: import("better-auth").AuthContext): {
|
|
1337
|
+
options: {
|
|
1338
|
+
emailVerification: {
|
|
1339
|
+
sendVerificationEmail(data: {
|
|
1340
|
+
user: import("better-auth").User;
|
|
1341
|
+
url: string;
|
|
1342
|
+
token: string;
|
|
1343
|
+
}, request: Request | undefined): Promise<void>;
|
|
1344
|
+
};
|
|
1345
|
+
};
|
|
1346
|
+
} | undefined;
|
|
1347
|
+
endpoints: {
|
|
1348
|
+
sendVerificationOTP: import("better-call").StrictEndpoint<"/email-otp/send-verification-otp", {
|
|
1349
|
+
method: "POST";
|
|
1350
|
+
body: import("zod").ZodObject<{
|
|
1351
|
+
email: import("zod").ZodString;
|
|
1352
|
+
type: import("zod").ZodEnum<{
|
|
1353
|
+
"sign-in": "sign-in";
|
|
1354
|
+
"change-email": "change-email";
|
|
1355
|
+
"email-verification": "email-verification";
|
|
1356
|
+
"forget-password": "forget-password";
|
|
1357
|
+
}>;
|
|
1358
|
+
}, import("zod/v4/core").$strip>;
|
|
1359
|
+
metadata: {
|
|
1360
|
+
openapi: {
|
|
1361
|
+
operationId: string;
|
|
1362
|
+
description: string;
|
|
1363
|
+
responses: {
|
|
1364
|
+
200: {
|
|
1365
|
+
description: string;
|
|
1366
|
+
content: {
|
|
1367
|
+
"application/json": {
|
|
1368
|
+
schema: {
|
|
1369
|
+
type: "object";
|
|
1370
|
+
properties: {
|
|
1371
|
+
success: {
|
|
1372
|
+
type: string;
|
|
1373
|
+
};
|
|
1374
|
+
};
|
|
1375
|
+
};
|
|
1376
|
+
};
|
|
1377
|
+
};
|
|
1378
|
+
};
|
|
1379
|
+
};
|
|
1380
|
+
};
|
|
1381
|
+
};
|
|
1382
|
+
}, {
|
|
1383
|
+
success: boolean;
|
|
1384
|
+
}>;
|
|
1385
|
+
createVerificationOTP: import("better-call").StrictEndpoint<string, {
|
|
1386
|
+
method: "POST";
|
|
1387
|
+
body: import("zod").ZodObject<{
|
|
1388
|
+
email: import("zod").ZodString;
|
|
1389
|
+
type: import("zod").ZodEnum<{
|
|
1390
|
+
"sign-in": "sign-in";
|
|
1391
|
+
"change-email": "change-email";
|
|
1392
|
+
"email-verification": "email-verification";
|
|
1393
|
+
"forget-password": "forget-password";
|
|
1394
|
+
}>;
|
|
1395
|
+
}, import("zod/v4/core").$strip>;
|
|
1396
|
+
metadata: {
|
|
1397
|
+
openapi: {
|
|
1398
|
+
operationId: string;
|
|
1399
|
+
description: string;
|
|
1400
|
+
responses: {
|
|
1401
|
+
200: {
|
|
1402
|
+
description: string;
|
|
1403
|
+
content: {
|
|
1404
|
+
"application/json": {
|
|
1405
|
+
schema: {
|
|
1406
|
+
type: "string";
|
|
1407
|
+
};
|
|
1408
|
+
};
|
|
1409
|
+
};
|
|
1410
|
+
};
|
|
1411
|
+
};
|
|
1412
|
+
};
|
|
1413
|
+
};
|
|
1414
|
+
}, string>;
|
|
1415
|
+
getVerificationOTP: import("better-call").StrictEndpoint<string, {
|
|
1416
|
+
method: "GET";
|
|
1417
|
+
query: import("zod").ZodObject<{
|
|
1418
|
+
email: import("zod").ZodString;
|
|
1419
|
+
type: import("zod").ZodEnum<{
|
|
1420
|
+
"sign-in": "sign-in";
|
|
1421
|
+
"change-email": "change-email";
|
|
1422
|
+
"email-verification": "email-verification";
|
|
1423
|
+
"forget-password": "forget-password";
|
|
1424
|
+
}>;
|
|
1425
|
+
}, import("zod/v4/core").$strip>;
|
|
1426
|
+
metadata: {
|
|
1427
|
+
openapi: {
|
|
1428
|
+
operationId: string;
|
|
1429
|
+
description: string;
|
|
1430
|
+
responses: {
|
|
1431
|
+
"200": {
|
|
1432
|
+
description: string;
|
|
1433
|
+
content: {
|
|
1434
|
+
"application/json": {
|
|
1435
|
+
schema: {
|
|
1436
|
+
type: "object";
|
|
1437
|
+
properties: {
|
|
1438
|
+
otp: {
|
|
1439
|
+
type: string;
|
|
1440
|
+
nullable: boolean;
|
|
1441
|
+
description: string;
|
|
1442
|
+
};
|
|
1443
|
+
};
|
|
1444
|
+
required: string[];
|
|
1445
|
+
};
|
|
1446
|
+
};
|
|
1447
|
+
};
|
|
1448
|
+
};
|
|
1449
|
+
};
|
|
1450
|
+
};
|
|
1451
|
+
};
|
|
1452
|
+
}, {
|
|
1453
|
+
otp: null;
|
|
1454
|
+
} | {
|
|
1455
|
+
otp: string;
|
|
1456
|
+
}>;
|
|
1457
|
+
checkVerificationOTP: import("better-call").StrictEndpoint<"/email-otp/check-verification-otp", {
|
|
1458
|
+
method: "POST";
|
|
1459
|
+
body: import("zod").ZodObject<{
|
|
1460
|
+
email: import("zod").ZodString;
|
|
1461
|
+
type: import("zod").ZodEnum<{
|
|
1462
|
+
"sign-in": "sign-in";
|
|
1463
|
+
"change-email": "change-email";
|
|
1464
|
+
"email-verification": "email-verification";
|
|
1465
|
+
"forget-password": "forget-password";
|
|
1466
|
+
}>;
|
|
1467
|
+
otp: import("zod").ZodString;
|
|
1468
|
+
}, import("zod/v4/core").$strip>;
|
|
1469
|
+
metadata: {
|
|
1470
|
+
openapi: {
|
|
1471
|
+
operationId: string;
|
|
1472
|
+
description: string;
|
|
1473
|
+
responses: {
|
|
1474
|
+
200: {
|
|
1475
|
+
description: string;
|
|
1476
|
+
content: {
|
|
1477
|
+
"application/json": {
|
|
1478
|
+
schema: {
|
|
1479
|
+
type: "object";
|
|
1480
|
+
properties: {
|
|
1481
|
+
success: {
|
|
1482
|
+
type: string;
|
|
1483
|
+
};
|
|
1484
|
+
};
|
|
1485
|
+
};
|
|
1486
|
+
};
|
|
1487
|
+
};
|
|
1488
|
+
};
|
|
1489
|
+
};
|
|
1490
|
+
};
|
|
1491
|
+
};
|
|
1492
|
+
}, {
|
|
1493
|
+
success: boolean;
|
|
1494
|
+
}>;
|
|
1495
|
+
verifyEmailOTP: import("better-call").StrictEndpoint<"/email-otp/verify-email", {
|
|
1496
|
+
method: "POST";
|
|
1497
|
+
body: import("zod").ZodObject<{
|
|
1498
|
+
email: import("zod").ZodString;
|
|
1499
|
+
otp: import("zod").ZodString;
|
|
1500
|
+
}, import("zod/v4/core").$strip>;
|
|
1501
|
+
metadata: {
|
|
1502
|
+
openapi: {
|
|
1503
|
+
description: string;
|
|
1504
|
+
responses: {
|
|
1505
|
+
200: {
|
|
1506
|
+
description: string;
|
|
1507
|
+
content: {
|
|
1508
|
+
"application/json": {
|
|
1509
|
+
schema: {
|
|
1510
|
+
type: "object";
|
|
1511
|
+
properties: {
|
|
1512
|
+
status: {
|
|
1513
|
+
type: string;
|
|
1514
|
+
description: string;
|
|
1515
|
+
enum: boolean[];
|
|
1516
|
+
};
|
|
1517
|
+
token: {
|
|
1518
|
+
type: string;
|
|
1519
|
+
nullable: boolean;
|
|
1520
|
+
description: string;
|
|
1521
|
+
};
|
|
1522
|
+
user: {
|
|
1523
|
+
$ref: string;
|
|
1524
|
+
};
|
|
1525
|
+
};
|
|
1526
|
+
required: string[];
|
|
1527
|
+
};
|
|
1528
|
+
};
|
|
1529
|
+
};
|
|
1530
|
+
};
|
|
1531
|
+
};
|
|
1532
|
+
};
|
|
1533
|
+
};
|
|
1534
|
+
}, {
|
|
1535
|
+
status: boolean;
|
|
1536
|
+
token: string;
|
|
1537
|
+
user: {
|
|
1538
|
+
id: string;
|
|
1539
|
+
createdAt: Date;
|
|
1540
|
+
updatedAt: Date;
|
|
1541
|
+
email: string;
|
|
1542
|
+
emailVerified: boolean;
|
|
1543
|
+
name: string;
|
|
1544
|
+
image?: string | null | undefined;
|
|
1545
|
+
} & Record<string, any>;
|
|
1546
|
+
} | {
|
|
1547
|
+
status: boolean;
|
|
1548
|
+
token: null;
|
|
1549
|
+
user: {
|
|
1550
|
+
id: string;
|
|
1551
|
+
createdAt: Date;
|
|
1552
|
+
updatedAt: Date;
|
|
1553
|
+
email: string;
|
|
1554
|
+
emailVerified: boolean;
|
|
1555
|
+
name: string;
|
|
1556
|
+
image?: string | null | undefined;
|
|
1557
|
+
} & Record<string, any>;
|
|
1558
|
+
}>;
|
|
1559
|
+
signInEmailOTP: import("better-call").StrictEndpoint<"/sign-in/email-otp", {
|
|
1560
|
+
method: "POST";
|
|
1561
|
+
body: import("zod").ZodIntersection<import("zod").ZodObject<{
|
|
1562
|
+
email: import("zod").ZodString;
|
|
1563
|
+
otp: import("zod").ZodString;
|
|
1564
|
+
name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1565
|
+
image: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1566
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
|
|
1567
|
+
metadata: {
|
|
1568
|
+
openapi: {
|
|
1569
|
+
operationId: string;
|
|
1570
|
+
description: string;
|
|
1571
|
+
responses: {
|
|
1572
|
+
200: {
|
|
1573
|
+
description: string;
|
|
1574
|
+
content: {
|
|
1575
|
+
"application/json": {
|
|
1576
|
+
schema: {
|
|
1577
|
+
type: "object";
|
|
1578
|
+
properties: {
|
|
1579
|
+
token: {
|
|
1580
|
+
type: string;
|
|
1581
|
+
description: string;
|
|
1582
|
+
};
|
|
1583
|
+
user: {
|
|
1584
|
+
$ref: string;
|
|
1585
|
+
};
|
|
1586
|
+
};
|
|
1587
|
+
required: string[];
|
|
1588
|
+
};
|
|
1589
|
+
};
|
|
1590
|
+
};
|
|
1591
|
+
};
|
|
1592
|
+
};
|
|
1593
|
+
};
|
|
1594
|
+
};
|
|
1595
|
+
}, {
|
|
1596
|
+
token: string;
|
|
1597
|
+
user: {
|
|
1598
|
+
id: string;
|
|
1599
|
+
createdAt: Date;
|
|
1600
|
+
updatedAt: Date;
|
|
1601
|
+
email: string;
|
|
1602
|
+
emailVerified: boolean;
|
|
1603
|
+
name: string;
|
|
1604
|
+
image?: string | null | undefined;
|
|
1605
|
+
};
|
|
1606
|
+
}>;
|
|
1607
|
+
requestPasswordResetEmailOTP: import("better-call").StrictEndpoint<"/email-otp/request-password-reset", {
|
|
1608
|
+
method: "POST";
|
|
1609
|
+
body: import("zod").ZodObject<{
|
|
1610
|
+
email: import("zod").ZodString;
|
|
1611
|
+
}, import("zod/v4/core").$strip>;
|
|
1612
|
+
metadata: {
|
|
1613
|
+
openapi: {
|
|
1614
|
+
operationId: string;
|
|
1615
|
+
description: string;
|
|
1616
|
+
responses: {
|
|
1617
|
+
200: {
|
|
1618
|
+
description: string;
|
|
1619
|
+
content: {
|
|
1620
|
+
"application/json": {
|
|
1621
|
+
schema: {
|
|
1622
|
+
type: "object";
|
|
1623
|
+
properties: {
|
|
1624
|
+
success: {
|
|
1625
|
+
type: string;
|
|
1626
|
+
description: string;
|
|
1627
|
+
};
|
|
1628
|
+
};
|
|
1629
|
+
};
|
|
1630
|
+
};
|
|
1631
|
+
};
|
|
1632
|
+
};
|
|
1633
|
+
};
|
|
1634
|
+
};
|
|
1635
|
+
};
|
|
1636
|
+
}, {
|
|
1637
|
+
success: boolean;
|
|
1638
|
+
}>;
|
|
1639
|
+
forgetPasswordEmailOTP: import("better-call").StrictEndpoint<"/forget-password/email-otp", {
|
|
1640
|
+
method: "POST";
|
|
1641
|
+
body: import("zod").ZodObject<{
|
|
1642
|
+
email: import("zod").ZodString;
|
|
1643
|
+
}, import("zod/v4/core").$strip>;
|
|
1644
|
+
metadata: {
|
|
1645
|
+
openapi: {
|
|
1646
|
+
operationId: string;
|
|
1647
|
+
description: string;
|
|
1648
|
+
responses: {
|
|
1649
|
+
200: {
|
|
1650
|
+
description: string;
|
|
1651
|
+
content: {
|
|
1652
|
+
"application/json": {
|
|
1653
|
+
schema: {
|
|
1654
|
+
type: "object";
|
|
1655
|
+
properties: {
|
|
1656
|
+
success: {
|
|
1657
|
+
type: string;
|
|
1658
|
+
description: string;
|
|
1659
|
+
};
|
|
1660
|
+
};
|
|
1661
|
+
};
|
|
1662
|
+
};
|
|
1663
|
+
};
|
|
1664
|
+
};
|
|
1665
|
+
};
|
|
1666
|
+
};
|
|
1667
|
+
};
|
|
1668
|
+
}, {
|
|
1669
|
+
success: boolean;
|
|
1670
|
+
}>;
|
|
1671
|
+
resetPasswordEmailOTP: import("better-call").StrictEndpoint<"/email-otp/reset-password", {
|
|
1672
|
+
method: "POST";
|
|
1673
|
+
body: import("zod").ZodObject<{
|
|
1674
|
+
email: import("zod").ZodString;
|
|
1675
|
+
otp: import("zod").ZodString;
|
|
1676
|
+
password: import("zod").ZodString;
|
|
1677
|
+
}, import("zod/v4/core").$strip>;
|
|
1678
|
+
metadata: {
|
|
1679
|
+
openapi: {
|
|
1680
|
+
operationId: string;
|
|
1681
|
+
description: string;
|
|
1682
|
+
responses: {
|
|
1683
|
+
200: {
|
|
1684
|
+
description: string;
|
|
1685
|
+
content: {
|
|
1686
|
+
"application/json": {
|
|
1687
|
+
schema: {
|
|
1688
|
+
type: "object";
|
|
1689
|
+
properties: {
|
|
1690
|
+
success: {
|
|
1691
|
+
type: string;
|
|
1692
|
+
};
|
|
1693
|
+
};
|
|
1694
|
+
};
|
|
1695
|
+
};
|
|
1696
|
+
};
|
|
1697
|
+
};
|
|
1698
|
+
};
|
|
1699
|
+
};
|
|
1700
|
+
};
|
|
1701
|
+
}, {
|
|
1702
|
+
success: boolean;
|
|
1703
|
+
}>;
|
|
1704
|
+
requestEmailChangeEmailOTP: import("better-call").StrictEndpoint<"/email-otp/request-email-change", {
|
|
1705
|
+
method: "POST";
|
|
1706
|
+
body: import("zod").ZodObject<{
|
|
1707
|
+
newEmail: import("zod").ZodString;
|
|
1708
|
+
otp: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1709
|
+
}, import("zod/v4/core").$strip>;
|
|
1710
|
+
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
1711
|
+
session: {
|
|
1712
|
+
session: Record<string, any> & {
|
|
1713
|
+
id: string;
|
|
1714
|
+
createdAt: Date;
|
|
1715
|
+
updatedAt: Date;
|
|
1716
|
+
userId: string;
|
|
1717
|
+
expiresAt: Date;
|
|
1718
|
+
token: string;
|
|
1719
|
+
ipAddress?: string | null | undefined;
|
|
1720
|
+
userAgent?: string | null | undefined;
|
|
1721
|
+
};
|
|
1722
|
+
user: Record<string, any> & {
|
|
1723
|
+
id: string;
|
|
1724
|
+
createdAt: Date;
|
|
1725
|
+
updatedAt: Date;
|
|
1726
|
+
email: string;
|
|
1727
|
+
emailVerified: boolean;
|
|
1728
|
+
name: string;
|
|
1729
|
+
image?: string | null | undefined;
|
|
1730
|
+
};
|
|
1731
|
+
};
|
|
1732
|
+
}>)[];
|
|
1733
|
+
metadata: {
|
|
1734
|
+
openapi: {
|
|
1735
|
+
operationId: string;
|
|
1736
|
+
description: string;
|
|
1737
|
+
responses: {
|
|
1738
|
+
200: {
|
|
1739
|
+
description: string;
|
|
1740
|
+
content: {
|
|
1741
|
+
"application/json": {
|
|
1742
|
+
schema: {
|
|
1743
|
+
type: "object";
|
|
1744
|
+
properties: {
|
|
1745
|
+
success: {
|
|
1746
|
+
type: string;
|
|
1747
|
+
};
|
|
1748
|
+
};
|
|
1749
|
+
};
|
|
1750
|
+
};
|
|
1751
|
+
};
|
|
1752
|
+
};
|
|
1753
|
+
};
|
|
1754
|
+
};
|
|
1755
|
+
};
|
|
1756
|
+
}, {
|
|
1757
|
+
success: boolean;
|
|
1758
|
+
}>;
|
|
1759
|
+
changeEmailEmailOTP: import("better-call").StrictEndpoint<"/email-otp/change-email", {
|
|
1760
|
+
method: "POST";
|
|
1761
|
+
body: import("zod").ZodObject<{
|
|
1762
|
+
newEmail: import("zod").ZodString;
|
|
1763
|
+
otp: import("zod").ZodString;
|
|
1764
|
+
}, import("zod/v4/core").$strip>;
|
|
1765
|
+
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
1766
|
+
session: {
|
|
1767
|
+
session: Record<string, any> & {
|
|
1768
|
+
id: string;
|
|
1769
|
+
createdAt: Date;
|
|
1770
|
+
updatedAt: Date;
|
|
1771
|
+
userId: string;
|
|
1772
|
+
expiresAt: Date;
|
|
1773
|
+
token: string;
|
|
1774
|
+
ipAddress?: string | null | undefined;
|
|
1775
|
+
userAgent?: string | null | undefined;
|
|
1776
|
+
};
|
|
1777
|
+
user: Record<string, any> & {
|
|
1778
|
+
id: string;
|
|
1779
|
+
createdAt: Date;
|
|
1780
|
+
updatedAt: Date;
|
|
1781
|
+
email: string;
|
|
1782
|
+
emailVerified: boolean;
|
|
1783
|
+
name: string;
|
|
1784
|
+
image?: string | null | undefined;
|
|
1785
|
+
};
|
|
1786
|
+
};
|
|
1787
|
+
}>)[];
|
|
1788
|
+
metadata: {
|
|
1789
|
+
openapi: {
|
|
1790
|
+
operationId: string;
|
|
1791
|
+
description: string;
|
|
1792
|
+
responses: {
|
|
1793
|
+
200: {
|
|
1794
|
+
description: string;
|
|
1795
|
+
content: {
|
|
1796
|
+
"application/json": {
|
|
1797
|
+
schema: {
|
|
1798
|
+
type: "object";
|
|
1799
|
+
properties: {
|
|
1800
|
+
success: {
|
|
1801
|
+
type: string;
|
|
1802
|
+
};
|
|
1803
|
+
};
|
|
1804
|
+
};
|
|
1805
|
+
};
|
|
1806
|
+
};
|
|
1807
|
+
};
|
|
1808
|
+
};
|
|
1809
|
+
};
|
|
1810
|
+
};
|
|
1811
|
+
}, {
|
|
1812
|
+
success: boolean;
|
|
1813
|
+
}>;
|
|
1814
|
+
};
|
|
1815
|
+
hooks: {
|
|
1816
|
+
after: {
|
|
1817
|
+
matcher(context: import("better-auth").HookEndpointContext): boolean;
|
|
1818
|
+
handler: (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>;
|
|
1819
|
+
}[];
|
|
1820
|
+
};
|
|
1821
|
+
rateLimit: ({
|
|
1822
|
+
pathMatcher(path: string): path is "/email-otp/send-verification-otp";
|
|
1823
|
+
window: number;
|
|
1824
|
+
max: number;
|
|
1825
|
+
} | {
|
|
1826
|
+
pathMatcher(path: string): path is "/email-otp/check-verification-otp";
|
|
1827
|
+
window: number;
|
|
1828
|
+
max: number;
|
|
1829
|
+
} | {
|
|
1830
|
+
pathMatcher(path: string): path is "/email-otp/verify-email";
|
|
1831
|
+
window: number;
|
|
1832
|
+
max: number;
|
|
1833
|
+
} | {
|
|
1834
|
+
pathMatcher(path: string): path is "/sign-in/email-otp";
|
|
1835
|
+
window: number;
|
|
1836
|
+
max: number;
|
|
1837
|
+
} | {
|
|
1838
|
+
pathMatcher(path: string): path is "/email-otp/request-password-reset";
|
|
1839
|
+
window: number;
|
|
1840
|
+
max: number;
|
|
1841
|
+
} | {
|
|
1842
|
+
pathMatcher(path: string): path is "/email-otp/reset-password";
|
|
1843
|
+
window: number;
|
|
1844
|
+
max: number;
|
|
1845
|
+
} | {
|
|
1846
|
+
pathMatcher(path: string): path is "/forget-password/email-otp";
|
|
1847
|
+
window: number;
|
|
1848
|
+
max: number;
|
|
1849
|
+
} | {
|
|
1850
|
+
pathMatcher(path: string): path is "/email-otp/request-email-change";
|
|
1851
|
+
window: number;
|
|
1852
|
+
max: number;
|
|
1853
|
+
} | {
|
|
1854
|
+
pathMatcher(path: string): path is "/email-otp/change-email";
|
|
1855
|
+
window: number;
|
|
1856
|
+
max: number;
|
|
1857
|
+
})[];
|
|
1858
|
+
options: import("better-auth/plugins").EmailOTPOptions;
|
|
1859
|
+
$ERROR_CODES: {
|
|
1860
|
+
OTP_EXPIRED: import("better-auth").RawError<"OTP_EXPIRED">;
|
|
1861
|
+
INVALID_OTP: import("better-auth").RawError<"INVALID_OTP">;
|
|
1862
|
+
TOO_MANY_ATTEMPTS: import("better-auth").RawError<"TOO_MANY_ATTEMPTS">;
|
|
1863
|
+
};
|
|
1864
|
+
}, {
|
|
1865
|
+
id: "admin";
|
|
1866
|
+
version: string;
|
|
1867
|
+
init(): {
|
|
1868
|
+
options: {
|
|
1869
|
+
databaseHooks: {
|
|
1870
|
+
user: {
|
|
1871
|
+
create: {
|
|
1872
|
+
before(user: {
|
|
1873
|
+
id: string;
|
|
1874
|
+
createdAt: Date;
|
|
1875
|
+
updatedAt: Date;
|
|
1876
|
+
email: string;
|
|
1877
|
+
emailVerified: boolean;
|
|
1878
|
+
name: string;
|
|
1879
|
+
image?: string | null | undefined;
|
|
1880
|
+
} & Record<string, unknown>): Promise<{
|
|
1881
|
+
data: {
|
|
1882
|
+
id: string;
|
|
1883
|
+
createdAt: Date;
|
|
1884
|
+
updatedAt: Date;
|
|
1885
|
+
email: string;
|
|
1886
|
+
emailVerified: boolean;
|
|
1887
|
+
name: string;
|
|
1888
|
+
image?: string | null | undefined;
|
|
1889
|
+
role: string;
|
|
1890
|
+
};
|
|
1891
|
+
}>;
|
|
1892
|
+
};
|
|
1893
|
+
};
|
|
1894
|
+
session: {
|
|
1895
|
+
create: {
|
|
1896
|
+
before(session: {
|
|
1897
|
+
id: string;
|
|
1898
|
+
createdAt: Date;
|
|
1899
|
+
updatedAt: Date;
|
|
1900
|
+
userId: string;
|
|
1901
|
+
expiresAt: Date;
|
|
1902
|
+
token: string;
|
|
1903
|
+
ipAddress?: string | null | undefined;
|
|
1904
|
+
userAgent?: string | null | undefined;
|
|
1905
|
+
} & Record<string, unknown>, ctx: import("better-auth").GenericEndpointContext | null): Promise<void>;
|
|
1906
|
+
};
|
|
1907
|
+
};
|
|
1908
|
+
};
|
|
1909
|
+
};
|
|
1910
|
+
};
|
|
1911
|
+
hooks: {
|
|
1912
|
+
after: {
|
|
1913
|
+
matcher(context: import("better-auth").HookEndpointContext): boolean;
|
|
1914
|
+
handler: (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<import("better-auth/plugins").SessionWithImpersonatedBy[] | undefined>;
|
|
1915
|
+
}[];
|
|
1916
|
+
};
|
|
1917
|
+
endpoints: {
|
|
1918
|
+
setRole: import("better-call").StrictEndpoint<"/admin/set-role", {
|
|
1919
|
+
method: "POST";
|
|
1920
|
+
body: import("zod").ZodObject<{
|
|
1921
|
+
userId: import("zod").ZodCoercedString<unknown>;
|
|
1922
|
+
role: import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString>]>;
|
|
1923
|
+
}, import("zod/v4/core").$strip>;
|
|
1924
|
+
requireHeaders: true;
|
|
1925
|
+
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
1926
|
+
session: {
|
|
1927
|
+
user: import("better-auth/plugins").UserWithRole;
|
|
1928
|
+
session: {
|
|
1929
|
+
id: string;
|
|
1930
|
+
createdAt: Date;
|
|
1931
|
+
updatedAt: Date;
|
|
1932
|
+
userId: string;
|
|
1933
|
+
expiresAt: Date;
|
|
1934
|
+
token: string;
|
|
1935
|
+
ipAddress?: string | null | undefined;
|
|
1936
|
+
userAgent?: string | null | undefined;
|
|
1937
|
+
};
|
|
1938
|
+
};
|
|
1939
|
+
}>)[];
|
|
1940
|
+
metadata: {
|
|
1941
|
+
openapi: {
|
|
1942
|
+
operationId: string;
|
|
1943
|
+
summary: string;
|
|
1944
|
+
description: string;
|
|
1945
|
+
responses: {
|
|
1946
|
+
200: {
|
|
1947
|
+
description: string;
|
|
1948
|
+
content: {
|
|
1949
|
+
"application/json": {
|
|
1950
|
+
schema: {
|
|
1951
|
+
type: "object";
|
|
1952
|
+
properties: {
|
|
1953
|
+
user: {
|
|
1954
|
+
$ref: string;
|
|
1955
|
+
};
|
|
1956
|
+
};
|
|
1957
|
+
};
|
|
1958
|
+
};
|
|
1959
|
+
};
|
|
1960
|
+
};
|
|
1961
|
+
};
|
|
1962
|
+
};
|
|
1963
|
+
$Infer: {
|
|
1964
|
+
body: {
|
|
1965
|
+
userId: string;
|
|
1966
|
+
role: "admin" | "authAdmin" | "authUser" | "superAdmin" | "user" | ("admin" | "authAdmin" | "authUser" | "superAdmin" | "user")[];
|
|
1967
|
+
};
|
|
1968
|
+
};
|
|
1969
|
+
};
|
|
1970
|
+
}, {
|
|
1971
|
+
user: import("better-auth/plugins").UserWithRole;
|
|
1972
|
+
}>;
|
|
1973
|
+
getUser: import("better-call").StrictEndpoint<"/admin/get-user", {
|
|
1974
|
+
method: "GET";
|
|
1975
|
+
query: import("zod").ZodObject<{
|
|
1976
|
+
id: import("zod").ZodString;
|
|
1977
|
+
}, import("zod/v4/core").$strip>;
|
|
1978
|
+
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
1979
|
+
session: {
|
|
1980
|
+
user: import("better-auth/plugins").UserWithRole;
|
|
1981
|
+
session: {
|
|
1982
|
+
id: string;
|
|
1983
|
+
createdAt: Date;
|
|
1984
|
+
updatedAt: Date;
|
|
1985
|
+
userId: string;
|
|
1986
|
+
expiresAt: Date;
|
|
1987
|
+
token: string;
|
|
1988
|
+
ipAddress?: string | null | undefined;
|
|
1989
|
+
userAgent?: string | null | undefined;
|
|
1990
|
+
};
|
|
1991
|
+
};
|
|
1992
|
+
}>)[];
|
|
1993
|
+
metadata: {
|
|
1994
|
+
openapi: {
|
|
1995
|
+
operationId: string;
|
|
1996
|
+
summary: string;
|
|
1997
|
+
description: string;
|
|
1998
|
+
responses: {
|
|
1999
|
+
200: {
|
|
2000
|
+
description: string;
|
|
2001
|
+
content: {
|
|
2002
|
+
"application/json": {
|
|
2003
|
+
schema: {
|
|
2004
|
+
type: "object";
|
|
2005
|
+
properties: {
|
|
2006
|
+
user: {
|
|
2007
|
+
$ref: string;
|
|
2008
|
+
};
|
|
2009
|
+
};
|
|
2010
|
+
};
|
|
2011
|
+
};
|
|
2012
|
+
};
|
|
2013
|
+
};
|
|
2014
|
+
};
|
|
2015
|
+
};
|
|
2016
|
+
};
|
|
2017
|
+
}, import("better-auth/plugins").UserWithRole>;
|
|
2018
|
+
createUser: import("better-call").StrictEndpoint<"/admin/create-user", {
|
|
2019
|
+
method: "POST";
|
|
2020
|
+
body: import("zod").ZodObject<{
|
|
2021
|
+
email: import("zod").ZodString;
|
|
2022
|
+
password: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2023
|
+
name: import("zod").ZodString;
|
|
2024
|
+
role: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString>]>>;
|
|
2025
|
+
data: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
|
|
2026
|
+
}, import("zod/v4/core").$strip>;
|
|
2027
|
+
metadata: {
|
|
2028
|
+
openapi: {
|
|
2029
|
+
operationId: string;
|
|
2030
|
+
summary: string;
|
|
2031
|
+
description: string;
|
|
2032
|
+
responses: {
|
|
2033
|
+
200: {
|
|
2034
|
+
description: string;
|
|
2035
|
+
content: {
|
|
2036
|
+
"application/json": {
|
|
2037
|
+
schema: {
|
|
2038
|
+
type: "object";
|
|
2039
|
+
properties: {
|
|
2040
|
+
user: {
|
|
2041
|
+
$ref: string;
|
|
2042
|
+
};
|
|
2043
|
+
};
|
|
2044
|
+
};
|
|
2045
|
+
};
|
|
2046
|
+
};
|
|
2047
|
+
};
|
|
2048
|
+
};
|
|
2049
|
+
};
|
|
2050
|
+
$Infer: {
|
|
2051
|
+
body: {
|
|
2052
|
+
email: string;
|
|
2053
|
+
password?: string | undefined;
|
|
2054
|
+
name: string;
|
|
2055
|
+
role?: "admin" | "authAdmin" | "authUser" | "superAdmin" | "user" | ("admin" | "authAdmin" | "authUser" | "superAdmin" | "user")[] | undefined;
|
|
2056
|
+
data?: Record<string, any> | undefined;
|
|
2057
|
+
};
|
|
2058
|
+
};
|
|
2059
|
+
};
|
|
2060
|
+
}, {
|
|
2061
|
+
user: import("better-auth/plugins").UserWithRole;
|
|
2062
|
+
}>;
|
|
2063
|
+
adminUpdateUser: import("better-call").StrictEndpoint<"/admin/update-user", {
|
|
2064
|
+
method: "POST";
|
|
2065
|
+
body: import("zod").ZodObject<{
|
|
2066
|
+
userId: import("zod").ZodCoercedString<unknown>;
|
|
2067
|
+
data: import("zod").ZodRecord<import("zod").ZodAny, import("zod").ZodAny>;
|
|
2068
|
+
}, import("zod/v4/core").$strip>;
|
|
2069
|
+
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
2070
|
+
session: {
|
|
2071
|
+
user: import("better-auth/plugins").UserWithRole;
|
|
2072
|
+
session: {
|
|
2073
|
+
id: string;
|
|
2074
|
+
createdAt: Date;
|
|
2075
|
+
updatedAt: Date;
|
|
2076
|
+
userId: string;
|
|
2077
|
+
expiresAt: Date;
|
|
2078
|
+
token: string;
|
|
2079
|
+
ipAddress?: string | null | undefined;
|
|
2080
|
+
userAgent?: string | null | undefined;
|
|
2081
|
+
};
|
|
2082
|
+
};
|
|
2083
|
+
}>)[];
|
|
2084
|
+
metadata: {
|
|
2085
|
+
openapi: {
|
|
2086
|
+
operationId: string;
|
|
2087
|
+
summary: string;
|
|
2088
|
+
description: string;
|
|
2089
|
+
responses: {
|
|
2090
|
+
200: {
|
|
2091
|
+
description: string;
|
|
2092
|
+
content: {
|
|
2093
|
+
"application/json": {
|
|
2094
|
+
schema: {
|
|
2095
|
+
type: "object";
|
|
2096
|
+
properties: {
|
|
2097
|
+
user: {
|
|
2098
|
+
$ref: string;
|
|
2099
|
+
};
|
|
2100
|
+
};
|
|
2101
|
+
};
|
|
2102
|
+
};
|
|
2103
|
+
};
|
|
2104
|
+
};
|
|
2105
|
+
};
|
|
2106
|
+
};
|
|
2107
|
+
};
|
|
2108
|
+
}, import("better-auth/plugins").UserWithRole>;
|
|
2109
|
+
listUsers: import("better-call").StrictEndpoint<"/admin/list-users", {
|
|
2110
|
+
method: "GET";
|
|
2111
|
+
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
2112
|
+
session: {
|
|
2113
|
+
user: import("better-auth/plugins").UserWithRole;
|
|
2114
|
+
session: {
|
|
2115
|
+
id: string;
|
|
2116
|
+
createdAt: Date;
|
|
2117
|
+
updatedAt: Date;
|
|
2118
|
+
userId: string;
|
|
2119
|
+
expiresAt: Date;
|
|
2120
|
+
token: string;
|
|
2121
|
+
ipAddress?: string | null | undefined;
|
|
2122
|
+
userAgent?: string | null | undefined;
|
|
2123
|
+
};
|
|
2124
|
+
};
|
|
2125
|
+
}>)[];
|
|
2126
|
+
query: import("zod").ZodObject<{
|
|
2127
|
+
searchValue: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2128
|
+
searchField: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
2129
|
+
email: "email";
|
|
2130
|
+
name: "name";
|
|
2131
|
+
}>>;
|
|
2132
|
+
searchOperator: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
2133
|
+
contains: "contains";
|
|
2134
|
+
starts_with: "starts_with";
|
|
2135
|
+
ends_with: "ends_with";
|
|
2136
|
+
}>>;
|
|
2137
|
+
limit: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber]>>;
|
|
2138
|
+
offset: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber]>>;
|
|
2139
|
+
sortBy: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2140
|
+
sortDirection: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
2141
|
+
asc: "asc";
|
|
2142
|
+
desc: "desc";
|
|
2143
|
+
}>>;
|
|
2144
|
+
filterField: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2145
|
+
filterValue: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodUnion<[import("zod").ZodUnion<[import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber]>, import("zod").ZodBoolean]>, import("zod").ZodArray<import("zod").ZodString>]>, import("zod").ZodArray<import("zod").ZodNumber>]>>;
|
|
2146
|
+
filterOperator: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
2147
|
+
eq: "eq";
|
|
2148
|
+
ne: "ne";
|
|
2149
|
+
gt: "gt";
|
|
2150
|
+
gte: "gte";
|
|
2151
|
+
lt: "lt";
|
|
2152
|
+
lte: "lte";
|
|
2153
|
+
in: "in";
|
|
2154
|
+
not_in: "not_in";
|
|
2155
|
+
contains: "contains";
|
|
2156
|
+
starts_with: "starts_with";
|
|
2157
|
+
ends_with: "ends_with";
|
|
2158
|
+
}>>;
|
|
2159
|
+
}, import("zod/v4/core").$strip>;
|
|
2160
|
+
metadata: {
|
|
2161
|
+
openapi: {
|
|
2162
|
+
operationId: string;
|
|
2163
|
+
summary: string;
|
|
2164
|
+
description: string;
|
|
2165
|
+
responses: {
|
|
2166
|
+
200: {
|
|
2167
|
+
description: string;
|
|
2168
|
+
content: {
|
|
2169
|
+
"application/json": {
|
|
2170
|
+
schema: {
|
|
2171
|
+
type: "object";
|
|
2172
|
+
properties: {
|
|
2173
|
+
users: {
|
|
2174
|
+
type: string;
|
|
2175
|
+
items: {
|
|
2176
|
+
$ref: string;
|
|
2177
|
+
};
|
|
2178
|
+
};
|
|
2179
|
+
total: {
|
|
2180
|
+
type: string;
|
|
2181
|
+
};
|
|
2182
|
+
limit: {
|
|
2183
|
+
type: string;
|
|
2184
|
+
};
|
|
2185
|
+
offset: {
|
|
2186
|
+
type: string;
|
|
2187
|
+
};
|
|
2188
|
+
};
|
|
2189
|
+
required: string[];
|
|
2190
|
+
};
|
|
2191
|
+
};
|
|
2192
|
+
};
|
|
2193
|
+
};
|
|
2194
|
+
};
|
|
2195
|
+
};
|
|
2196
|
+
};
|
|
2197
|
+
}, {
|
|
2198
|
+
users: import("better-auth/plugins").UserWithRole[];
|
|
2199
|
+
total: number;
|
|
2200
|
+
}>;
|
|
2201
|
+
listUserSessions: import("better-call").StrictEndpoint<"/admin/list-user-sessions", {
|
|
2202
|
+
method: "POST";
|
|
2203
|
+
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
2204
|
+
session: {
|
|
2205
|
+
user: import("better-auth/plugins").UserWithRole;
|
|
2206
|
+
session: {
|
|
2207
|
+
id: string;
|
|
2208
|
+
createdAt: Date;
|
|
2209
|
+
updatedAt: Date;
|
|
2210
|
+
userId: string;
|
|
2211
|
+
expiresAt: Date;
|
|
2212
|
+
token: string;
|
|
2213
|
+
ipAddress?: string | null | undefined;
|
|
2214
|
+
userAgent?: string | null | undefined;
|
|
2215
|
+
};
|
|
2216
|
+
};
|
|
2217
|
+
}>)[];
|
|
2218
|
+
body: import("zod").ZodObject<{
|
|
2219
|
+
userId: import("zod").ZodCoercedString<unknown>;
|
|
2220
|
+
}, import("zod/v4/core").$strip>;
|
|
2221
|
+
metadata: {
|
|
2222
|
+
openapi: {
|
|
2223
|
+
operationId: string;
|
|
2224
|
+
summary: string;
|
|
2225
|
+
description: string;
|
|
2226
|
+
responses: {
|
|
2227
|
+
200: {
|
|
2228
|
+
description: string;
|
|
2229
|
+
content: {
|
|
2230
|
+
"application/json": {
|
|
2231
|
+
schema: {
|
|
2232
|
+
type: "object";
|
|
2233
|
+
properties: {
|
|
2234
|
+
sessions: {
|
|
2235
|
+
type: string;
|
|
2236
|
+
items: {
|
|
2237
|
+
$ref: string;
|
|
2238
|
+
};
|
|
2239
|
+
};
|
|
2240
|
+
};
|
|
2241
|
+
};
|
|
2242
|
+
};
|
|
2243
|
+
};
|
|
2244
|
+
};
|
|
2245
|
+
};
|
|
2246
|
+
};
|
|
2247
|
+
};
|
|
2248
|
+
}, {
|
|
2249
|
+
sessions: import("better-auth/plugins").SessionWithImpersonatedBy[];
|
|
2250
|
+
}>;
|
|
2251
|
+
unbanUser: import("better-call").StrictEndpoint<"/admin/unban-user", {
|
|
2252
|
+
method: "POST";
|
|
2253
|
+
body: import("zod").ZodObject<{
|
|
2254
|
+
userId: import("zod").ZodCoercedString<unknown>;
|
|
2255
|
+
}, import("zod/v4/core").$strip>;
|
|
2256
|
+
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
2257
|
+
session: {
|
|
2258
|
+
user: import("better-auth/plugins").UserWithRole;
|
|
2259
|
+
session: {
|
|
2260
|
+
id: string;
|
|
2261
|
+
createdAt: Date;
|
|
2262
|
+
updatedAt: Date;
|
|
2263
|
+
userId: string;
|
|
2264
|
+
expiresAt: Date;
|
|
2265
|
+
token: string;
|
|
2266
|
+
ipAddress?: string | null | undefined;
|
|
2267
|
+
userAgent?: string | null | undefined;
|
|
2268
|
+
};
|
|
2269
|
+
};
|
|
2270
|
+
}>)[];
|
|
2271
|
+
metadata: {
|
|
2272
|
+
openapi: {
|
|
2273
|
+
operationId: string;
|
|
2274
|
+
summary: string;
|
|
2275
|
+
description: string;
|
|
2276
|
+
responses: {
|
|
2277
|
+
200: {
|
|
2278
|
+
description: string;
|
|
2279
|
+
content: {
|
|
2280
|
+
"application/json": {
|
|
2281
|
+
schema: {
|
|
2282
|
+
type: "object";
|
|
2283
|
+
properties: {
|
|
2284
|
+
user: {
|
|
2285
|
+
$ref: string;
|
|
2286
|
+
};
|
|
2287
|
+
};
|
|
2288
|
+
};
|
|
2289
|
+
};
|
|
2290
|
+
};
|
|
2291
|
+
};
|
|
2292
|
+
};
|
|
2293
|
+
};
|
|
2294
|
+
};
|
|
2295
|
+
}, {
|
|
2296
|
+
user: import("better-auth/plugins").UserWithRole;
|
|
2297
|
+
}>;
|
|
2298
|
+
banUser: import("better-call").StrictEndpoint<"/admin/ban-user", {
|
|
2299
|
+
method: "POST";
|
|
2300
|
+
body: import("zod").ZodObject<{
|
|
2301
|
+
userId: import("zod").ZodCoercedString<unknown>;
|
|
2302
|
+
banReason: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2303
|
+
banExpiresIn: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
2304
|
+
}, import("zod/v4/core").$strip>;
|
|
2305
|
+
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
2306
|
+
session: {
|
|
2307
|
+
user: import("better-auth/plugins").UserWithRole;
|
|
2308
|
+
session: {
|
|
2309
|
+
id: string;
|
|
2310
|
+
createdAt: Date;
|
|
2311
|
+
updatedAt: Date;
|
|
2312
|
+
userId: string;
|
|
2313
|
+
expiresAt: Date;
|
|
2314
|
+
token: string;
|
|
2315
|
+
ipAddress?: string | null | undefined;
|
|
2316
|
+
userAgent?: string | null | undefined;
|
|
2317
|
+
};
|
|
2318
|
+
};
|
|
2319
|
+
}>)[];
|
|
2320
|
+
metadata: {
|
|
2321
|
+
openapi: {
|
|
2322
|
+
operationId: string;
|
|
2323
|
+
summary: string;
|
|
2324
|
+
description: string;
|
|
2325
|
+
responses: {
|
|
2326
|
+
200: {
|
|
2327
|
+
description: string;
|
|
2328
|
+
content: {
|
|
2329
|
+
"application/json": {
|
|
2330
|
+
schema: {
|
|
2331
|
+
type: "object";
|
|
2332
|
+
properties: {
|
|
2333
|
+
user: {
|
|
2334
|
+
$ref: string;
|
|
2335
|
+
};
|
|
2336
|
+
};
|
|
2337
|
+
};
|
|
2338
|
+
};
|
|
2339
|
+
};
|
|
2340
|
+
};
|
|
2341
|
+
};
|
|
2342
|
+
};
|
|
2343
|
+
};
|
|
2344
|
+
}, {
|
|
2345
|
+
user: import("better-auth/plugins").UserWithRole;
|
|
2346
|
+
}>;
|
|
2347
|
+
impersonateUser: import("better-call").StrictEndpoint<"/admin/impersonate-user", {
|
|
2348
|
+
method: "POST";
|
|
2349
|
+
body: import("zod").ZodObject<{
|
|
2350
|
+
userId: import("zod").ZodCoercedString<unknown>;
|
|
2351
|
+
}, import("zod/v4/core").$strip>;
|
|
2352
|
+
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
2353
|
+
session: {
|
|
2354
|
+
user: import("better-auth/plugins").UserWithRole;
|
|
2355
|
+
session: {
|
|
2356
|
+
id: string;
|
|
2357
|
+
createdAt: Date;
|
|
2358
|
+
updatedAt: Date;
|
|
2359
|
+
userId: string;
|
|
2360
|
+
expiresAt: Date;
|
|
2361
|
+
token: string;
|
|
2362
|
+
ipAddress?: string | null | undefined;
|
|
2363
|
+
userAgent?: string | null | undefined;
|
|
2364
|
+
};
|
|
2365
|
+
};
|
|
2366
|
+
}>)[];
|
|
2367
|
+
metadata: {
|
|
2368
|
+
openapi: {
|
|
2369
|
+
operationId: string;
|
|
2370
|
+
summary: string;
|
|
2371
|
+
description: string;
|
|
2372
|
+
responses: {
|
|
2373
|
+
200: {
|
|
2374
|
+
description: string;
|
|
2375
|
+
content: {
|
|
2376
|
+
"application/json": {
|
|
2377
|
+
schema: {
|
|
2378
|
+
type: "object";
|
|
2379
|
+
properties: {
|
|
2380
|
+
session: {
|
|
2381
|
+
$ref: string;
|
|
2382
|
+
};
|
|
2383
|
+
user: {
|
|
2384
|
+
$ref: string;
|
|
2385
|
+
};
|
|
2386
|
+
};
|
|
2387
|
+
};
|
|
2388
|
+
};
|
|
2389
|
+
};
|
|
2390
|
+
};
|
|
2391
|
+
};
|
|
2392
|
+
};
|
|
2393
|
+
};
|
|
2394
|
+
}, {
|
|
2395
|
+
session: {
|
|
2396
|
+
id: string;
|
|
2397
|
+
createdAt: Date;
|
|
2398
|
+
updatedAt: Date;
|
|
2399
|
+
userId: string;
|
|
2400
|
+
expiresAt: Date;
|
|
2401
|
+
token: string;
|
|
2402
|
+
ipAddress?: string | null | undefined;
|
|
2403
|
+
userAgent?: string | null | undefined;
|
|
2404
|
+
};
|
|
2405
|
+
user: import("better-auth/plugins").UserWithRole;
|
|
2406
|
+
}>;
|
|
2407
|
+
stopImpersonating: import("better-call").StrictEndpoint<"/admin/stop-impersonating", {
|
|
2408
|
+
method: "POST";
|
|
2409
|
+
requireHeaders: true;
|
|
2410
|
+
}, {
|
|
2411
|
+
session: {
|
|
2412
|
+
id: string;
|
|
2413
|
+
createdAt: Date;
|
|
2414
|
+
updatedAt: Date;
|
|
2415
|
+
userId: string;
|
|
2416
|
+
expiresAt: Date;
|
|
2417
|
+
token: string;
|
|
2418
|
+
ipAddress?: string | null | undefined;
|
|
2419
|
+
userAgent?: string | null | undefined;
|
|
2420
|
+
} & Record<string, any>;
|
|
2421
|
+
user: {
|
|
2422
|
+
id: string;
|
|
2423
|
+
createdAt: Date;
|
|
2424
|
+
updatedAt: Date;
|
|
2425
|
+
email: string;
|
|
2426
|
+
emailVerified: boolean;
|
|
2427
|
+
name: string;
|
|
2428
|
+
image?: string | null | undefined;
|
|
2429
|
+
} & Record<string, any>;
|
|
2430
|
+
}>;
|
|
2431
|
+
revokeUserSession: import("better-call").StrictEndpoint<"/admin/revoke-user-session", {
|
|
2432
|
+
method: "POST";
|
|
2433
|
+
body: import("zod").ZodObject<{
|
|
2434
|
+
sessionToken: import("zod").ZodString;
|
|
2435
|
+
}, import("zod/v4/core").$strip>;
|
|
2436
|
+
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
2437
|
+
session: {
|
|
2438
|
+
user: import("better-auth/plugins").UserWithRole;
|
|
2439
|
+
session: {
|
|
2440
|
+
id: string;
|
|
2441
|
+
createdAt: Date;
|
|
2442
|
+
updatedAt: Date;
|
|
2443
|
+
userId: string;
|
|
2444
|
+
expiresAt: Date;
|
|
2445
|
+
token: string;
|
|
2446
|
+
ipAddress?: string | null | undefined;
|
|
2447
|
+
userAgent?: string | null | undefined;
|
|
2448
|
+
};
|
|
2449
|
+
};
|
|
2450
|
+
}>)[];
|
|
2451
|
+
metadata: {
|
|
2452
|
+
openapi: {
|
|
2453
|
+
operationId: string;
|
|
2454
|
+
summary: string;
|
|
2455
|
+
description: string;
|
|
2456
|
+
responses: {
|
|
2457
|
+
200: {
|
|
2458
|
+
description: string;
|
|
2459
|
+
content: {
|
|
2460
|
+
"application/json": {
|
|
2461
|
+
schema: {
|
|
2462
|
+
type: "object";
|
|
2463
|
+
properties: {
|
|
2464
|
+
success: {
|
|
2465
|
+
type: string;
|
|
2466
|
+
};
|
|
2467
|
+
};
|
|
2468
|
+
};
|
|
2469
|
+
};
|
|
2470
|
+
};
|
|
2471
|
+
};
|
|
2472
|
+
};
|
|
2473
|
+
};
|
|
2474
|
+
};
|
|
2475
|
+
}, {
|
|
2476
|
+
success: boolean;
|
|
2477
|
+
}>;
|
|
2478
|
+
revokeUserSessions: import("better-call").StrictEndpoint<"/admin/revoke-user-sessions", {
|
|
2479
|
+
method: "POST";
|
|
2480
|
+
body: import("zod").ZodObject<{
|
|
2481
|
+
userId: import("zod").ZodCoercedString<unknown>;
|
|
2482
|
+
}, import("zod/v4/core").$strip>;
|
|
2483
|
+
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
2484
|
+
session: {
|
|
2485
|
+
user: import("better-auth/plugins").UserWithRole;
|
|
2486
|
+
session: {
|
|
2487
|
+
id: string;
|
|
2488
|
+
createdAt: Date;
|
|
2489
|
+
updatedAt: Date;
|
|
2490
|
+
userId: string;
|
|
2491
|
+
expiresAt: Date;
|
|
2492
|
+
token: string;
|
|
2493
|
+
ipAddress?: string | null | undefined;
|
|
2494
|
+
userAgent?: string | null | undefined;
|
|
2495
|
+
};
|
|
2496
|
+
};
|
|
2497
|
+
}>)[];
|
|
2498
|
+
metadata: {
|
|
2499
|
+
openapi: {
|
|
2500
|
+
operationId: string;
|
|
2501
|
+
summary: string;
|
|
2502
|
+
description: string;
|
|
2503
|
+
responses: {
|
|
2504
|
+
200: {
|
|
2505
|
+
description: string;
|
|
2506
|
+
content: {
|
|
2507
|
+
"application/json": {
|
|
2508
|
+
schema: {
|
|
2509
|
+
type: "object";
|
|
2510
|
+
properties: {
|
|
2511
|
+
success: {
|
|
2512
|
+
type: string;
|
|
2513
|
+
};
|
|
2514
|
+
};
|
|
2515
|
+
};
|
|
2516
|
+
};
|
|
2517
|
+
};
|
|
2518
|
+
};
|
|
2519
|
+
};
|
|
2520
|
+
};
|
|
2521
|
+
};
|
|
2522
|
+
}, {
|
|
2523
|
+
success: boolean;
|
|
2524
|
+
}>;
|
|
2525
|
+
removeUser: import("better-call").StrictEndpoint<"/admin/remove-user", {
|
|
2526
|
+
method: "POST";
|
|
2527
|
+
body: import("zod").ZodObject<{
|
|
2528
|
+
userId: import("zod").ZodCoercedString<unknown>;
|
|
2529
|
+
}, import("zod/v4/core").$strip>;
|
|
2530
|
+
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
2531
|
+
session: {
|
|
2532
|
+
user: import("better-auth/plugins").UserWithRole;
|
|
2533
|
+
session: {
|
|
2534
|
+
id: string;
|
|
2535
|
+
createdAt: Date;
|
|
2536
|
+
updatedAt: Date;
|
|
2537
|
+
userId: string;
|
|
2538
|
+
expiresAt: Date;
|
|
2539
|
+
token: string;
|
|
2540
|
+
ipAddress?: string | null | undefined;
|
|
2541
|
+
userAgent?: string | null | undefined;
|
|
2542
|
+
};
|
|
2543
|
+
};
|
|
2544
|
+
}>)[];
|
|
2545
|
+
metadata: {
|
|
2546
|
+
openapi: {
|
|
2547
|
+
operationId: string;
|
|
2548
|
+
summary: string;
|
|
2549
|
+
description: string;
|
|
2550
|
+
responses: {
|
|
2551
|
+
200: {
|
|
2552
|
+
description: string;
|
|
2553
|
+
content: {
|
|
2554
|
+
"application/json": {
|
|
2555
|
+
schema: {
|
|
2556
|
+
type: "object";
|
|
2557
|
+
properties: {
|
|
2558
|
+
success: {
|
|
2559
|
+
type: string;
|
|
2560
|
+
};
|
|
2561
|
+
};
|
|
2562
|
+
};
|
|
2563
|
+
};
|
|
2564
|
+
};
|
|
2565
|
+
};
|
|
2566
|
+
};
|
|
2567
|
+
};
|
|
2568
|
+
};
|
|
2569
|
+
}, {
|
|
2570
|
+
success: boolean;
|
|
2571
|
+
}>;
|
|
2572
|
+
setUserPassword: import("better-call").StrictEndpoint<"/admin/set-user-password", {
|
|
2573
|
+
method: "POST";
|
|
2574
|
+
body: import("zod").ZodObject<{
|
|
2575
|
+
newPassword: import("zod").ZodString;
|
|
2576
|
+
userId: import("zod").ZodCoercedString<unknown>;
|
|
2577
|
+
}, import("zod/v4/core").$strip>;
|
|
2578
|
+
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
2579
|
+
session: {
|
|
2580
|
+
user: import("better-auth/plugins").UserWithRole;
|
|
2581
|
+
session: {
|
|
2582
|
+
id: string;
|
|
2583
|
+
createdAt: Date;
|
|
2584
|
+
updatedAt: Date;
|
|
2585
|
+
userId: string;
|
|
2586
|
+
expiresAt: Date;
|
|
2587
|
+
token: string;
|
|
2588
|
+
ipAddress?: string | null | undefined;
|
|
2589
|
+
userAgent?: string | null | undefined;
|
|
2590
|
+
};
|
|
2591
|
+
};
|
|
2592
|
+
}>)[];
|
|
2593
|
+
metadata: {
|
|
2594
|
+
openapi: {
|
|
2595
|
+
operationId: string;
|
|
2596
|
+
summary: string;
|
|
2597
|
+
description: string;
|
|
2598
|
+
responses: {
|
|
2599
|
+
200: {
|
|
2600
|
+
description: string;
|
|
2601
|
+
content: {
|
|
2602
|
+
"application/json": {
|
|
2603
|
+
schema: {
|
|
2604
|
+
type: "object";
|
|
2605
|
+
properties: {
|
|
2606
|
+
status: {
|
|
2607
|
+
type: string;
|
|
2608
|
+
};
|
|
2609
|
+
};
|
|
2610
|
+
};
|
|
2611
|
+
};
|
|
2612
|
+
};
|
|
2613
|
+
};
|
|
2614
|
+
};
|
|
2615
|
+
};
|
|
2616
|
+
};
|
|
2617
|
+
}, {
|
|
2618
|
+
status: boolean;
|
|
2619
|
+
}>;
|
|
2620
|
+
userHasPermission: import("better-call").StrictEndpoint<"/admin/has-permission", {
|
|
2621
|
+
method: "POST";
|
|
2622
|
+
body: import("zod").ZodIntersection<import("zod").ZodObject<{
|
|
2623
|
+
userId: import("zod").ZodOptional<import("zod").ZodCoercedString<unknown>>;
|
|
2624
|
+
role: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2625
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodXor<readonly [import("zod").ZodObject<{
|
|
2626
|
+
permission: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString>>;
|
|
2627
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
2628
|
+
permissions: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString>>;
|
|
2629
|
+
}, import("zod/v4/core").$strip>]>>;
|
|
2630
|
+
metadata: {
|
|
2631
|
+
openapi: {
|
|
2632
|
+
description: string;
|
|
2633
|
+
requestBody: {
|
|
2634
|
+
content: {
|
|
2635
|
+
"application/json": {
|
|
2636
|
+
schema: {
|
|
2637
|
+
type: "object";
|
|
2638
|
+
properties: {
|
|
2639
|
+
permissions: {
|
|
2640
|
+
type: string;
|
|
2641
|
+
description: string;
|
|
2642
|
+
};
|
|
2643
|
+
};
|
|
2644
|
+
required: string[];
|
|
2645
|
+
};
|
|
2646
|
+
};
|
|
2647
|
+
};
|
|
2648
|
+
};
|
|
2649
|
+
responses: {
|
|
2650
|
+
"200": {
|
|
2651
|
+
description: string;
|
|
2652
|
+
content: {
|
|
2653
|
+
"application/json": {
|
|
2654
|
+
schema: {
|
|
2655
|
+
type: "object";
|
|
2656
|
+
properties: {
|
|
2657
|
+
error: {
|
|
2658
|
+
type: string;
|
|
2659
|
+
};
|
|
2660
|
+
success: {
|
|
2661
|
+
type: string;
|
|
2662
|
+
};
|
|
2663
|
+
};
|
|
2664
|
+
required: string[];
|
|
2665
|
+
};
|
|
2666
|
+
};
|
|
2667
|
+
};
|
|
2668
|
+
};
|
|
2669
|
+
};
|
|
2670
|
+
};
|
|
2671
|
+
$Infer: {
|
|
2672
|
+
body: {
|
|
2673
|
+
permissions: {
|
|
2674
|
+
readonly user?: ("ban" | "create" | "delete" | "get" | "impersonate" | "impersonate-admins" | "list" | "set-password" | "set-role" | "update")[] | undefined;
|
|
2675
|
+
readonly session?: ("delete" | "list" | "revoke")[] | undefined;
|
|
2676
|
+
readonly 'asset_convert_product:product'?: ("create" | "list" | "read" | "update")[] | undefined;
|
|
2677
|
+
readonly 'asset_convert_product:order'?: ("list" | "read")[] | undefined;
|
|
2678
|
+
readonly 'asset_price:price'?: ("latest" | "list" | "read")[] | undefined;
|
|
2679
|
+
readonly 'asset_price:admin'?: ("create" | "latest" | "list" | "read")[] | undefined;
|
|
2680
|
+
readonly 'asset-type:type'?: ("create" | "list" | "read" | "update")[] | undefined;
|
|
2681
|
+
readonly 'asset:item'?: ("create" | "list" | "read" | "update")[] | undefined;
|
|
2682
|
+
readonly 'checkIn:checkIn'?: ("create" | "list" | "read")[] | undefined;
|
|
2683
|
+
readonly 'checkIn:admin'?: ("list" | "read")[] | undefined;
|
|
2684
|
+
readonly 'deposit:order'?: ("create" | "list" | "read" | "update")[] | undefined;
|
|
2685
|
+
readonly 'deposit:review'?: ("list" | "read" | "update")[] | undefined;
|
|
2686
|
+
readonly 'ledger_account:import'?: ("create" | "list" | "read")[] | undefined;
|
|
2687
|
+
readonly 'ledger-account:type'?: ("create" | "list" | "read" | "update")[] | undefined;
|
|
2688
|
+
readonly 'ledger-account:account'?: ("list" | "read" | "update")[] | undefined;
|
|
2689
|
+
readonly 'ledger:entry'?: ("adjust" | "list" | "read" | "view_all")[] | undefined;
|
|
2690
|
+
readonly 'market_data:ticker'?: ("latest" | "read")[] | undefined;
|
|
2691
|
+
readonly 'market_data:kline'?: ("list" | "read")[] | undefined;
|
|
2692
|
+
readonly 'market_data:admin'?: ("list" | "read" | "run")[] | undefined;
|
|
2693
|
+
readonly 'market_pricing:strategy'?: ("create" | "delete" | "list" | "read" | "run" | "update")[] | undefined;
|
|
2694
|
+
readonly 'news:category'?: ("create" | "delete" | "list" | "read" | "update")[] | undefined;
|
|
2695
|
+
readonly 'news:news'?: ("create" | "delete" | "list" | "read" | "update")[] | undefined;
|
|
2696
|
+
readonly 'notification:notification'?: ("list" | "read" | "update")[] | undefined;
|
|
2697
|
+
readonly 'notification:admin'?: ("create" | "list" | "read" | "stats")[] | undefined;
|
|
2698
|
+
readonly 'receipt_method:item'?: ("create" | "delete" | "list" | "read" | "update")[] | undefined;
|
|
2699
|
+
readonly 'referral:depth-config'?: ("create" | "delete" | "list" | "read" | "update")[] | undefined;
|
|
2700
|
+
readonly 'referral:relation'?: ("bind" | "list" | "read")[] | undefined;
|
|
2701
|
+
readonly 'shipping_address:item'?: ("create" | "delete" | "list" | "read" | "update")[] | undefined;
|
|
2702
|
+
readonly 'team:member'?: ("list" | "read" | "stats")[] | undefined;
|
|
2703
|
+
readonly 'trade_market:market'?: ("create" | "delete" | "list" | "read" | "update")[] | undefined;
|
|
2704
|
+
readonly 'trade_market:order'?: ("create" | "list" | "read")[] | undefined;
|
|
2705
|
+
readonly 'transfer:order'?: ("create" | "list" | "read")[] | undefined;
|
|
2706
|
+
readonly 'kyc:method'?: ("create" | "read" | "update")[] | undefined;
|
|
2707
|
+
readonly 'kyc:admin'?: ("approve" | "list" | "read" | "reject")[] | undefined;
|
|
2708
|
+
readonly 'user:profile'?: ("read" | "update")[] | undefined;
|
|
2709
|
+
readonly 'user:referral'?: "bind"[] | undefined;
|
|
2710
|
+
readonly 'admin:user-profile'?: ("list" | "read" | "update")[] | undefined;
|
|
2711
|
+
readonly 'wallet:type'?: ("create" | "delete" | "list" | "read" | "update")[] | undefined;
|
|
2712
|
+
readonly 'wallet:container'?: ("list" | "read")[] | undefined;
|
|
2713
|
+
readonly 'welfare_cycle:plan'?: ("create" | "delete" | "list" | "read" | "update")[] | undefined;
|
|
2714
|
+
readonly 'welfare_cycle:subscription'?: ("create" | "list" | "read")[] | undefined;
|
|
2715
|
+
readonly 'welfare_cycle:payout'?: ("create" | "list" | "read")[] | undefined;
|
|
2716
|
+
readonly 'withdraw:manage'?: ("create" | "read")[] | undefined;
|
|
2717
|
+
readonly 'withdraw:review'?: ("approve" | "paid" | "read" | "reject")[] | undefined;
|
|
2718
|
+
};
|
|
2719
|
+
} & {
|
|
2720
|
+
userId?: string | undefined;
|
|
2721
|
+
role?: "admin" | "authAdmin" | "authUser" | "superAdmin" | "user" | undefined;
|
|
2722
|
+
};
|
|
2723
|
+
};
|
|
2724
|
+
};
|
|
2725
|
+
}, {
|
|
2726
|
+
error: null;
|
|
2727
|
+
success: boolean;
|
|
2728
|
+
}>;
|
|
2729
|
+
};
|
|
2730
|
+
$ERROR_CODES: {
|
|
2731
|
+
USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL: import("better-auth").RawError<"USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL">;
|
|
2732
|
+
FAILED_TO_CREATE_USER: import("better-auth").RawError<"FAILED_TO_CREATE_USER">;
|
|
2733
|
+
USER_ALREADY_EXISTS: import("better-auth").RawError<"USER_ALREADY_EXISTS">;
|
|
2734
|
+
YOU_CANNOT_BAN_YOURSELF: import("better-auth").RawError<"YOU_CANNOT_BAN_YOURSELF">;
|
|
2735
|
+
YOU_ARE_NOT_ALLOWED_TO_CHANGE_USERS_ROLE: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_CHANGE_USERS_ROLE">;
|
|
2736
|
+
YOU_ARE_NOT_ALLOWED_TO_CREATE_USERS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_CREATE_USERS">;
|
|
2737
|
+
YOU_ARE_NOT_ALLOWED_TO_LIST_USERS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_LIST_USERS">;
|
|
2738
|
+
YOU_ARE_NOT_ALLOWED_TO_LIST_USERS_SESSIONS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_LIST_USERS_SESSIONS">;
|
|
2739
|
+
YOU_ARE_NOT_ALLOWED_TO_BAN_USERS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_BAN_USERS">;
|
|
2740
|
+
YOU_ARE_NOT_ALLOWED_TO_IMPERSONATE_USERS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_IMPERSONATE_USERS">;
|
|
2741
|
+
YOU_ARE_NOT_ALLOWED_TO_REVOKE_USERS_SESSIONS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_REVOKE_USERS_SESSIONS">;
|
|
2742
|
+
YOU_ARE_NOT_ALLOWED_TO_DELETE_USERS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_DELETE_USERS">;
|
|
2743
|
+
YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PASSWORD: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PASSWORD">;
|
|
2744
|
+
BANNED_USER: import("better-auth").RawError<"BANNED_USER">;
|
|
2745
|
+
YOU_ARE_NOT_ALLOWED_TO_GET_USER: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_GET_USER">;
|
|
2746
|
+
NO_DATA_TO_UPDATE: import("better-auth").RawError<"NO_DATA_TO_UPDATE">;
|
|
2747
|
+
YOU_ARE_NOT_ALLOWED_TO_UPDATE_USERS: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_UPDATE_USERS">;
|
|
2748
|
+
YOU_CANNOT_REMOVE_YOURSELF: import("better-auth").RawError<"YOU_CANNOT_REMOVE_YOURSELF">;
|
|
2749
|
+
YOU_ARE_NOT_ALLOWED_TO_SET_NON_EXISTENT_VALUE: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_SET_NON_EXISTENT_VALUE">;
|
|
2750
|
+
YOU_CANNOT_IMPERSONATE_ADMINS: import("better-auth").RawError<"YOU_CANNOT_IMPERSONATE_ADMINS">;
|
|
2751
|
+
INVALID_ROLE_TYPE: import("better-auth").RawError<"INVALID_ROLE_TYPE">;
|
|
2752
|
+
};
|
|
2753
|
+
schema: {
|
|
2754
|
+
user: {
|
|
2755
|
+
fields: {
|
|
2756
|
+
role: {
|
|
2757
|
+
type: "string";
|
|
2758
|
+
required: false;
|
|
2759
|
+
input: false;
|
|
2760
|
+
};
|
|
2761
|
+
banned: {
|
|
2762
|
+
type: "boolean";
|
|
2763
|
+
defaultValue: false;
|
|
2764
|
+
required: false;
|
|
2765
|
+
input: false;
|
|
2766
|
+
};
|
|
2767
|
+
banReason: {
|
|
2768
|
+
type: "string";
|
|
2769
|
+
required: false;
|
|
2770
|
+
input: false;
|
|
2771
|
+
};
|
|
2772
|
+
banExpires: {
|
|
2773
|
+
type: "date";
|
|
2774
|
+
required: false;
|
|
2775
|
+
input: false;
|
|
2776
|
+
};
|
|
2777
|
+
};
|
|
2778
|
+
};
|
|
2779
|
+
session: {
|
|
2780
|
+
fields: {
|
|
2781
|
+
impersonatedBy: {
|
|
2782
|
+
type: "string";
|
|
2783
|
+
required: false;
|
|
2784
|
+
};
|
|
2785
|
+
};
|
|
2786
|
+
};
|
|
2787
|
+
};
|
|
2788
|
+
options: NoInfer<{
|
|
2789
|
+
ac: {
|
|
2790
|
+
newRole<K extends "admin:user-profile" | "asset-type:type" | "asset:item" | "asset_convert_product:order" | "asset_convert_product:product" | "asset_price:admin" | "asset_price:price" | "checkIn:admin" | "checkIn:checkIn" | "deposit:order" | "deposit:review" | "kyc:admin" | "kyc:method" | "ledger-account:account" | "ledger-account:type" | "ledger:entry" | "ledger_account:import" | "market_data:admin" | "market_data:kline" | "market_data:ticker" | "market_pricing:strategy" | "news:category" | "news:news" | "notification:admin" | "notification:notification" | "receipt_method:item" | "referral:depth-config" | "referral:relation" | "session" | "shipping_address:item" | "team:member" | "trade_market:market" | "trade_market:order" | "transfer:order" | "user" | "user:profile" | "user:referral" | "wallet:container" | "wallet:type" | "welfare_cycle:payout" | "welfare_cycle:plan" | "welfare_cycle:subscription" | "withdraw:manage" | "withdraw:review">(statements: import("better-auth/plugins").Subset<K, {
|
|
2791
|
+
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "impersonate-admins", "delete", "set-password", "get", "update"];
|
|
2792
|
+
readonly session: readonly ["list", "revoke", "delete"];
|
|
2793
|
+
readonly 'asset_convert_product:product': readonly ['create', 'read', 'update', 'list'];
|
|
2794
|
+
readonly 'asset_convert_product:order': readonly ['read', 'list'];
|
|
2795
|
+
readonly 'asset_price:price': readonly ['read', 'list', 'latest'];
|
|
2796
|
+
readonly 'asset_price:admin': readonly ['create', 'read', 'list', 'latest'];
|
|
2797
|
+
readonly 'asset-type:type': readonly ['create', 'read', 'update', 'list'];
|
|
2798
|
+
readonly 'asset:item': readonly ['create', 'read', 'update', 'list'];
|
|
2799
|
+
readonly 'checkIn:checkIn': readonly ['create', 'read', 'list'];
|
|
2800
|
+
readonly 'checkIn:admin': readonly ['read', 'list'];
|
|
2801
|
+
readonly 'deposit:order': readonly ['create', 'read', 'update', 'list'];
|
|
2802
|
+
readonly 'deposit:review': readonly ['read', 'update', 'list'];
|
|
2803
|
+
readonly 'ledger_account:import': readonly ['create', 'read', 'list'];
|
|
2804
|
+
readonly 'ledger-account:type': readonly ['create', 'read', 'update', 'list'];
|
|
2805
|
+
readonly 'ledger-account:account': readonly ['read', 'update', 'list'];
|
|
2806
|
+
readonly 'ledger:entry': readonly ['read', 'list', 'view_all', 'adjust'];
|
|
2807
|
+
readonly 'market_data:ticker': readonly ['read', 'latest'];
|
|
2808
|
+
readonly 'market_data:kline': readonly ['read', 'list'];
|
|
2809
|
+
readonly 'market_data:admin': readonly ['read', 'list', 'run'];
|
|
2810
|
+
readonly 'market_pricing:strategy': readonly ['create', 'read', 'update', 'delete', 'list', 'run'];
|
|
2811
|
+
readonly 'news:category': readonly ['create', 'read', 'update', 'delete', 'list'];
|
|
2812
|
+
readonly 'news:news': readonly ['create', 'read', 'update', 'delete', 'list'];
|
|
2813
|
+
readonly 'notification:notification': readonly ['read', 'update', 'list'];
|
|
2814
|
+
readonly 'notification:admin': readonly ['create', 'read', 'list', 'stats'];
|
|
2815
|
+
readonly 'receipt_method:item': readonly ['create', 'read', 'update', 'delete', 'list'];
|
|
2816
|
+
readonly 'referral:depth-config': readonly ['create', 'read', 'update', 'delete', 'list'];
|
|
2817
|
+
readonly 'referral:relation': readonly ['bind', 'read', 'list'];
|
|
2818
|
+
readonly 'shipping_address:item': readonly ['create', 'read', 'update', 'delete', 'list'];
|
|
2819
|
+
readonly 'team:member': readonly ['read', 'list', 'stats'];
|
|
2820
|
+
readonly 'trade_market:market': readonly ['create', 'read', 'update', 'delete', 'list'];
|
|
2821
|
+
readonly 'trade_market:order': readonly ['create', 'read', 'list'];
|
|
2822
|
+
readonly 'transfer:order': readonly ['create', 'read', 'list'];
|
|
2823
|
+
readonly 'kyc:method': readonly ['create', 'read', 'update'];
|
|
2824
|
+
readonly 'kyc:admin': readonly ['read', 'list', 'approve', 'reject'];
|
|
2825
|
+
readonly 'user:profile': readonly ['read', 'update'];
|
|
2826
|
+
readonly 'user:referral': readonly ['bind'];
|
|
2827
|
+
readonly 'admin:user-profile': readonly ['read', 'update', 'list'];
|
|
2828
|
+
readonly 'wallet:type': readonly ['create', 'read', 'update', 'delete', 'list'];
|
|
2829
|
+
readonly 'wallet:container': readonly ['read', 'list'];
|
|
2830
|
+
readonly 'welfare_cycle:plan': readonly ['create', 'read', 'update', 'delete', 'list'];
|
|
2831
|
+
readonly 'welfare_cycle:subscription': readonly ['create', 'read', 'list'];
|
|
2832
|
+
readonly 'welfare_cycle:payout': readonly ['create', 'read', 'list'];
|
|
2833
|
+
readonly 'withdraw:manage': readonly ['create', 'read'];
|
|
2834
|
+
readonly 'withdraw:review': readonly ['read', 'approve', 'reject', 'paid'];
|
|
2835
|
+
}>): {
|
|
2836
|
+
authorize<K_1 extends K>(request: K_1 extends infer T extends K_2 ? { [key in T]?: {
|
|
2837
|
+
actions: import("better-auth/plugins").Subset<K, {
|
|
2838
|
+
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "impersonate-admins", "delete", "set-password", "get", "update"];
|
|
2839
|
+
readonly session: readonly ["list", "revoke", "delete"];
|
|
2840
|
+
readonly 'asset_convert_product:product': readonly ['create', 'read', 'update', 'list'];
|
|
2841
|
+
readonly 'asset_convert_product:order': readonly ['read', 'list'];
|
|
2842
|
+
readonly 'asset_price:price': readonly ['read', 'list', 'latest'];
|
|
2843
|
+
readonly 'asset_price:admin': readonly ['create', 'read', 'list', 'latest'];
|
|
2844
|
+
readonly 'asset-type:type': readonly ['create', 'read', 'update', 'list'];
|
|
2845
|
+
readonly 'asset:item': readonly ['create', 'read', 'update', 'list'];
|
|
2846
|
+
readonly 'checkIn:checkIn': readonly ['create', 'read', 'list'];
|
|
2847
|
+
readonly 'checkIn:admin': readonly ['read', 'list'];
|
|
2848
|
+
readonly 'deposit:order': readonly ['create', 'read', 'update', 'list'];
|
|
2849
|
+
readonly 'deposit:review': readonly ['read', 'update', 'list'];
|
|
2850
|
+
readonly 'ledger_account:import': readonly ['create', 'read', 'list'];
|
|
2851
|
+
readonly 'ledger-account:type': readonly ['create', 'read', 'update', 'list'];
|
|
2852
|
+
readonly 'ledger-account:account': readonly ['read', 'update', 'list'];
|
|
2853
|
+
readonly 'ledger:entry': readonly ['read', 'list', 'view_all', 'adjust'];
|
|
2854
|
+
readonly 'market_data:ticker': readonly ['read', 'latest'];
|
|
2855
|
+
readonly 'market_data:kline': readonly ['read', 'list'];
|
|
2856
|
+
readonly 'market_data:admin': readonly ['read', 'list', 'run'];
|
|
2857
|
+
readonly 'market_pricing:strategy': readonly ['create', 'read', 'update', 'delete', 'list', 'run'];
|
|
2858
|
+
readonly 'news:category': readonly ['create', 'read', 'update', 'delete', 'list'];
|
|
2859
|
+
readonly 'news:news': readonly ['create', 'read', 'update', 'delete', 'list'];
|
|
2860
|
+
readonly 'notification:notification': readonly ['read', 'update', 'list'];
|
|
2861
|
+
readonly 'notification:admin': readonly ['create', 'read', 'list', 'stats'];
|
|
2862
|
+
readonly 'receipt_method:item': readonly ['create', 'read', 'update', 'delete', 'list'];
|
|
2863
|
+
readonly 'referral:depth-config': readonly ['create', 'read', 'update', 'delete', 'list'];
|
|
2864
|
+
readonly 'referral:relation': readonly ['bind', 'read', 'list'];
|
|
2865
|
+
readonly 'shipping_address:item': readonly ['create', 'read', 'update', 'delete', 'list'];
|
|
2866
|
+
readonly 'team:member': readonly ['read', 'list', 'stats'];
|
|
2867
|
+
readonly 'trade_market:market': readonly ['create', 'read', 'update', 'delete', 'list'];
|
|
2868
|
+
readonly 'trade_market:order': readonly ['create', 'read', 'list'];
|
|
2869
|
+
readonly 'transfer:order': readonly ['create', 'read', 'list'];
|
|
2870
|
+
readonly 'kyc:method': readonly ['create', 'read', 'update'];
|
|
2871
|
+
readonly 'kyc:admin': readonly ['read', 'list', 'approve', 'reject'];
|
|
2872
|
+
readonly 'user:profile': readonly ['read', 'update'];
|
|
2873
|
+
readonly 'user:referral': readonly ['bind'];
|
|
2874
|
+
readonly 'admin:user-profile': readonly ['read', 'update', 'list'];
|
|
2875
|
+
readonly 'wallet:type': readonly ['create', 'read', 'update', 'delete', 'list'];
|
|
2876
|
+
readonly 'wallet:container': readonly ['read', 'list'];
|
|
2877
|
+
readonly 'welfare_cycle:plan': readonly ['create', 'read', 'update', 'delete', 'list'];
|
|
2878
|
+
readonly 'welfare_cycle:subscription': readonly ['create', 'read', 'list'];
|
|
2879
|
+
readonly 'welfare_cycle:payout': readonly ['create', 'read', 'list'];
|
|
2880
|
+
readonly 'withdraw:manage': readonly ['create', 'read'];
|
|
2881
|
+
readonly 'withdraw:review': readonly ['read', 'approve', 'reject', 'paid'];
|
|
2882
|
+
}>[key];
|
|
2883
|
+
connector: "OR" | "AND";
|
|
2884
|
+
} | import("better-auth/plugins").Subset<K, {
|
|
2885
|
+
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "impersonate-admins", "delete", "set-password", "get", "update"];
|
|
2886
|
+
readonly session: readonly ["list", "revoke", "delete"];
|
|
2887
|
+
readonly 'asset_convert_product:product': readonly ['create', 'read', 'update', 'list'];
|
|
2888
|
+
readonly 'asset_convert_product:order': readonly ['read', 'list'];
|
|
2889
|
+
readonly 'asset_price:price': readonly ['read', 'list', 'latest'];
|
|
2890
|
+
readonly 'asset_price:admin': readonly ['create', 'read', 'list', 'latest'];
|
|
2891
|
+
readonly 'asset-type:type': readonly ['create', 'read', 'update', 'list'];
|
|
2892
|
+
readonly 'asset:item': readonly ['create', 'read', 'update', 'list'];
|
|
2893
|
+
readonly 'checkIn:checkIn': readonly ['create', 'read', 'list'];
|
|
2894
|
+
readonly 'checkIn:admin': readonly ['read', 'list'];
|
|
2895
|
+
readonly 'deposit:order': readonly ['create', 'read', 'update', 'list'];
|
|
2896
|
+
readonly 'deposit:review': readonly ['read', 'update', 'list'];
|
|
2897
|
+
readonly 'ledger_account:import': readonly ['create', 'read', 'list'];
|
|
2898
|
+
readonly 'ledger-account:type': readonly ['create', 'read', 'update', 'list'];
|
|
2899
|
+
readonly 'ledger-account:account': readonly ['read', 'update', 'list'];
|
|
2900
|
+
readonly 'ledger:entry': readonly ['read', 'list', 'view_all', 'adjust'];
|
|
2901
|
+
readonly 'market_data:ticker': readonly ['read', 'latest'];
|
|
2902
|
+
readonly 'market_data:kline': readonly ['read', 'list'];
|
|
2903
|
+
readonly 'market_data:admin': readonly ['read', 'list', 'run'];
|
|
2904
|
+
readonly 'market_pricing:strategy': readonly ['create', 'read', 'update', 'delete', 'list', 'run'];
|
|
2905
|
+
readonly 'news:category': readonly ['create', 'read', 'update', 'delete', 'list'];
|
|
2906
|
+
readonly 'news:news': readonly ['create', 'read', 'update', 'delete', 'list'];
|
|
2907
|
+
readonly 'notification:notification': readonly ['read', 'update', 'list'];
|
|
2908
|
+
readonly 'notification:admin': readonly ['create', 'read', 'list', 'stats'];
|
|
2909
|
+
readonly 'receipt_method:item': readonly ['create', 'read', 'update', 'delete', 'list'];
|
|
2910
|
+
readonly 'referral:depth-config': readonly ['create', 'read', 'update', 'delete', 'list'];
|
|
2911
|
+
readonly 'referral:relation': readonly ['bind', 'read', 'list'];
|
|
2912
|
+
readonly 'shipping_address:item': readonly ['create', 'read', 'update', 'delete', 'list'];
|
|
2913
|
+
readonly 'team:member': readonly ['read', 'list', 'stats'];
|
|
2914
|
+
readonly 'trade_market:market': readonly ['create', 'read', 'update', 'delete', 'list'];
|
|
2915
|
+
readonly 'trade_market:order': readonly ['create', 'read', 'list'];
|
|
2916
|
+
readonly 'transfer:order': readonly ['create', 'read', 'list'];
|
|
2917
|
+
readonly 'kyc:method': readonly ['create', 'read', 'update'];
|
|
2918
|
+
readonly 'kyc:admin': readonly ['read', 'list', 'approve', 'reject'];
|
|
2919
|
+
readonly 'user:profile': readonly ['read', 'update'];
|
|
2920
|
+
readonly 'user:referral': readonly ['bind'];
|
|
2921
|
+
readonly 'admin:user-profile': readonly ['read', 'update', 'list'];
|
|
2922
|
+
readonly 'wallet:type': readonly ['create', 'read', 'update', 'delete', 'list'];
|
|
2923
|
+
readonly 'wallet:container': readonly ['read', 'list'];
|
|
2924
|
+
readonly 'welfare_cycle:plan': readonly ['create', 'read', 'update', 'delete', 'list'];
|
|
2925
|
+
readonly 'welfare_cycle:subscription': readonly ['create', 'read', 'list'];
|
|
2926
|
+
readonly 'welfare_cycle:payout': readonly ['create', 'read', 'list'];
|
|
2927
|
+
readonly 'withdraw:manage': readonly ['create', 'read'];
|
|
2928
|
+
readonly 'withdraw:review': readonly ['read', 'approve', 'reject', 'paid'];
|
|
2929
|
+
}>[key] | undefined; } : never, connector?: "OR" | "AND"): import("better-auth/plugins").AuthorizeResponse;
|
|
2930
|
+
statements: import("better-auth/plugins").Subset<K, {
|
|
2931
|
+
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "impersonate-admins", "delete", "set-password", "get", "update"];
|
|
2932
|
+
readonly session: readonly ["list", "revoke", "delete"];
|
|
2933
|
+
readonly 'asset_convert_product:product': readonly ['create', 'read', 'update', 'list'];
|
|
2934
|
+
readonly 'asset_convert_product:order': readonly ['read', 'list'];
|
|
2935
|
+
readonly 'asset_price:price': readonly ['read', 'list', 'latest'];
|
|
2936
|
+
readonly 'asset_price:admin': readonly ['create', 'read', 'list', 'latest'];
|
|
2937
|
+
readonly 'asset-type:type': readonly ['create', 'read', 'update', 'list'];
|
|
2938
|
+
readonly 'asset:item': readonly ['create', 'read', 'update', 'list'];
|
|
2939
|
+
readonly 'checkIn:checkIn': readonly ['create', 'read', 'list'];
|
|
2940
|
+
readonly 'checkIn:admin': readonly ['read', 'list'];
|
|
2941
|
+
readonly 'deposit:order': readonly ['create', 'read', 'update', 'list'];
|
|
2942
|
+
readonly 'deposit:review': readonly ['read', 'update', 'list'];
|
|
2943
|
+
readonly 'ledger_account:import': readonly ['create', 'read', 'list'];
|
|
2944
|
+
readonly 'ledger-account:type': readonly ['create', 'read', 'update', 'list'];
|
|
2945
|
+
readonly 'ledger-account:account': readonly ['read', 'update', 'list'];
|
|
2946
|
+
readonly 'ledger:entry': readonly ['read', 'list', 'view_all', 'adjust'];
|
|
2947
|
+
readonly 'market_data:ticker': readonly ['read', 'latest'];
|
|
2948
|
+
readonly 'market_data:kline': readonly ['read', 'list'];
|
|
2949
|
+
readonly 'market_data:admin': readonly ['read', 'list', 'run'];
|
|
2950
|
+
readonly 'market_pricing:strategy': readonly ['create', 'read', 'update', 'delete', 'list', 'run'];
|
|
2951
|
+
readonly 'news:category': readonly ['create', 'read', 'update', 'delete', 'list'];
|
|
2952
|
+
readonly 'news:news': readonly ['create', 'read', 'update', 'delete', 'list'];
|
|
2953
|
+
readonly 'notification:notification': readonly ['read', 'update', 'list'];
|
|
2954
|
+
readonly 'notification:admin': readonly ['create', 'read', 'list', 'stats'];
|
|
2955
|
+
readonly 'receipt_method:item': readonly ['create', 'read', 'update', 'delete', 'list'];
|
|
2956
|
+
readonly 'referral:depth-config': readonly ['create', 'read', 'update', 'delete', 'list'];
|
|
2957
|
+
readonly 'referral:relation': readonly ['bind', 'read', 'list'];
|
|
2958
|
+
readonly 'shipping_address:item': readonly ['create', 'read', 'update', 'delete', 'list'];
|
|
2959
|
+
readonly 'team:member': readonly ['read', 'list', 'stats'];
|
|
2960
|
+
readonly 'trade_market:market': readonly ['create', 'read', 'update', 'delete', 'list'];
|
|
2961
|
+
readonly 'trade_market:order': readonly ['create', 'read', 'list'];
|
|
2962
|
+
readonly 'transfer:order': readonly ['create', 'read', 'list'];
|
|
2963
|
+
readonly 'kyc:method': readonly ['create', 'read', 'update'];
|
|
2964
|
+
readonly 'kyc:admin': readonly ['read', 'list', 'approve', 'reject'];
|
|
2965
|
+
readonly 'user:profile': readonly ['read', 'update'];
|
|
2966
|
+
readonly 'user:referral': readonly ['bind'];
|
|
2967
|
+
readonly 'admin:user-profile': readonly ['read', 'update', 'list'];
|
|
2968
|
+
readonly 'wallet:type': readonly ['create', 'read', 'update', 'delete', 'list'];
|
|
2969
|
+
readonly 'wallet:container': readonly ['read', 'list'];
|
|
2970
|
+
readonly 'welfare_cycle:plan': readonly ['create', 'read', 'update', 'delete', 'list'];
|
|
2971
|
+
readonly 'welfare_cycle:subscription': readonly ['create', 'read', 'list'];
|
|
2972
|
+
readonly 'welfare_cycle:payout': readonly ['create', 'read', 'list'];
|
|
2973
|
+
readonly 'withdraw:manage': readonly ['create', 'read'];
|
|
2974
|
+
readonly 'withdraw:review': readonly ['read', 'approve', 'reject', 'paid'];
|
|
2975
|
+
}>;
|
|
2976
|
+
};
|
|
2977
|
+
statements: {
|
|
2978
|
+
readonly user: readonly ["create", "list", "set-role", "ban", "impersonate", "impersonate-admins", "delete", "set-password", "get", "update"];
|
|
2979
|
+
readonly session: readonly ["list", "revoke", "delete"];
|
|
2980
|
+
readonly 'asset_convert_product:product': readonly ['create', 'read', 'update', 'list'];
|
|
2981
|
+
readonly 'asset_convert_product:order': readonly ['read', 'list'];
|
|
2982
|
+
readonly 'asset_price:price': readonly ['read', 'list', 'latest'];
|
|
2983
|
+
readonly 'asset_price:admin': readonly ['create', 'read', 'list', 'latest'];
|
|
2984
|
+
readonly 'asset-type:type': readonly ['create', 'read', 'update', 'list'];
|
|
2985
|
+
readonly 'asset:item': readonly ['create', 'read', 'update', 'list'];
|
|
2986
|
+
readonly 'checkIn:checkIn': readonly ['create', 'read', 'list'];
|
|
2987
|
+
readonly 'checkIn:admin': readonly ['read', 'list'];
|
|
2988
|
+
readonly 'deposit:order': readonly ['create', 'read', 'update', 'list'];
|
|
2989
|
+
readonly 'deposit:review': readonly ['read', 'update', 'list'];
|
|
2990
|
+
readonly 'ledger_account:import': readonly ['create', 'read', 'list'];
|
|
2991
|
+
readonly 'ledger-account:type': readonly ['create', 'read', 'update', 'list'];
|
|
2992
|
+
readonly 'ledger-account:account': readonly ['read', 'update', 'list'];
|
|
2993
|
+
readonly 'ledger:entry': readonly ['read', 'list', 'view_all', 'adjust'];
|
|
2994
|
+
readonly 'market_data:ticker': readonly ['read', 'latest'];
|
|
2995
|
+
readonly 'market_data:kline': readonly ['read', 'list'];
|
|
2996
|
+
readonly 'market_data:admin': readonly ['read', 'list', 'run'];
|
|
2997
|
+
readonly 'market_pricing:strategy': readonly ['create', 'read', 'update', 'delete', 'list', 'run'];
|
|
2998
|
+
readonly 'news:category': readonly ['create', 'read', 'update', 'delete', 'list'];
|
|
2999
|
+
readonly 'news:news': readonly ['create', 'read', 'update', 'delete', 'list'];
|
|
3000
|
+
readonly 'notification:notification': readonly ['read', 'update', 'list'];
|
|
3001
|
+
readonly 'notification:admin': readonly ['create', 'read', 'list', 'stats'];
|
|
3002
|
+
readonly 'receipt_method:item': readonly ['create', 'read', 'update', 'delete', 'list'];
|
|
3003
|
+
readonly 'referral:depth-config': readonly ['create', 'read', 'update', 'delete', 'list'];
|
|
3004
|
+
readonly 'referral:relation': readonly ['bind', 'read', 'list'];
|
|
3005
|
+
readonly 'shipping_address:item': readonly ['create', 'read', 'update', 'delete', 'list'];
|
|
3006
|
+
readonly 'team:member': readonly ['read', 'list', 'stats'];
|
|
3007
|
+
readonly 'trade_market:market': readonly ['create', 'read', 'update', 'delete', 'list'];
|
|
3008
|
+
readonly 'trade_market:order': readonly ['create', 'read', 'list'];
|
|
3009
|
+
readonly 'transfer:order': readonly ['create', 'read', 'list'];
|
|
3010
|
+
readonly 'kyc:method': readonly ['create', 'read', 'update'];
|
|
3011
|
+
readonly 'kyc:admin': readonly ['read', 'list', 'approve', 'reject'];
|
|
3012
|
+
readonly 'user:profile': readonly ['read', 'update'];
|
|
3013
|
+
readonly 'user:referral': readonly ['bind'];
|
|
3014
|
+
readonly 'admin:user-profile': readonly ['read', 'update', 'list'];
|
|
3015
|
+
readonly 'wallet:type': readonly ['create', 'read', 'update', 'delete', 'list'];
|
|
3016
|
+
readonly 'wallet:container': readonly ['read', 'list'];
|
|
3017
|
+
readonly 'welfare_cycle:plan': readonly ['create', 'read', 'update', 'delete', 'list'];
|
|
3018
|
+
readonly 'welfare_cycle:subscription': readonly ['create', 'read', 'list'];
|
|
3019
|
+
readonly 'welfare_cycle:payout': readonly ['create', 'read', 'list'];
|
|
3020
|
+
readonly 'withdraw:manage': readonly ['create', 'read'];
|
|
3021
|
+
readonly 'withdraw:review': readonly ['read', 'approve', 'reject', 'paid'];
|
|
3022
|
+
};
|
|
3023
|
+
};
|
|
3024
|
+
roles: typeof roles;
|
|
3025
|
+
defaultRole: string;
|
|
3026
|
+
adminRoles: string[];
|
|
3027
|
+
}>;
|
|
3028
|
+
}, {
|
|
3029
|
+
id: "last-login-method";
|
|
3030
|
+
version: string;
|
|
3031
|
+
init(ctx: import("better-auth").AuthContext): {
|
|
3032
|
+
options: {
|
|
3033
|
+
databaseHooks: {
|
|
3034
|
+
user: {
|
|
3035
|
+
create: {
|
|
3036
|
+
before(user: {
|
|
3037
|
+
id: string;
|
|
3038
|
+
createdAt: Date;
|
|
3039
|
+
updatedAt: Date;
|
|
3040
|
+
email: string;
|
|
3041
|
+
emailVerified: boolean;
|
|
3042
|
+
name: string;
|
|
3043
|
+
image?: string | null | undefined;
|
|
3044
|
+
} & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null): Promise<{
|
|
3045
|
+
data: {
|
|
3046
|
+
lastLoginMethod: any;
|
|
3047
|
+
id: string;
|
|
3048
|
+
createdAt: Date;
|
|
3049
|
+
updatedAt: Date;
|
|
3050
|
+
email: string;
|
|
3051
|
+
emailVerified: boolean;
|
|
3052
|
+
name: string;
|
|
3053
|
+
image?: string | null | undefined;
|
|
3054
|
+
};
|
|
3055
|
+
} | undefined>;
|
|
3056
|
+
};
|
|
3057
|
+
};
|
|
3058
|
+
session: {
|
|
3059
|
+
create: {
|
|
3060
|
+
after(session: {
|
|
3061
|
+
id: string;
|
|
3062
|
+
createdAt: Date;
|
|
3063
|
+
updatedAt: Date;
|
|
3064
|
+
userId: string;
|
|
3065
|
+
expiresAt: Date;
|
|
3066
|
+
token: string;
|
|
3067
|
+
ipAddress?: string | null | undefined;
|
|
3068
|
+
userAgent?: string | null | undefined;
|
|
3069
|
+
} & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null): Promise<void>;
|
|
3070
|
+
};
|
|
3071
|
+
};
|
|
3072
|
+
};
|
|
3073
|
+
};
|
|
3074
|
+
};
|
|
3075
|
+
hooks: {
|
|
3076
|
+
after: {
|
|
3077
|
+
matcher(): true;
|
|
3078
|
+
handler: (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>;
|
|
3079
|
+
}[];
|
|
3080
|
+
};
|
|
3081
|
+
schema: undefined;
|
|
3082
|
+
options: NoInfer<import("better-auth/plugins").LastLoginMethodOptions>;
|
|
3083
|
+
}, {
|
|
3084
|
+
id: "multi-session";
|
|
3085
|
+
version: string;
|
|
3086
|
+
endpoints: {
|
|
3087
|
+
listDeviceSessions: import("better-call").StrictEndpoint<"/multi-session/list-device-sessions", {
|
|
3088
|
+
method: "GET";
|
|
3089
|
+
requireHeaders: true;
|
|
3090
|
+
}, {
|
|
3091
|
+
session: {
|
|
3092
|
+
id: string;
|
|
3093
|
+
createdAt: Date;
|
|
3094
|
+
updatedAt: Date;
|
|
3095
|
+
userId: string;
|
|
3096
|
+
expiresAt: Date;
|
|
3097
|
+
token: string;
|
|
3098
|
+
ipAddress?: string | null | undefined;
|
|
3099
|
+
userAgent?: string | null | undefined;
|
|
3100
|
+
};
|
|
3101
|
+
user: {
|
|
3102
|
+
id: string;
|
|
3103
|
+
createdAt: Date;
|
|
3104
|
+
updatedAt: Date;
|
|
3105
|
+
email: string;
|
|
3106
|
+
emailVerified: boolean;
|
|
3107
|
+
name: string;
|
|
3108
|
+
image?: string | null | undefined;
|
|
3109
|
+
};
|
|
3110
|
+
}[]>;
|
|
3111
|
+
setActiveSession: import("better-call").StrictEndpoint<"/multi-session/set-active", {
|
|
3112
|
+
method: "POST";
|
|
3113
|
+
body: import("zod").ZodObject<{
|
|
3114
|
+
sessionToken: import("zod").ZodString;
|
|
3115
|
+
}, import("zod/v4/core").$strip>;
|
|
3116
|
+
requireHeaders: true;
|
|
3117
|
+
metadata: {
|
|
3118
|
+
openapi: {
|
|
3119
|
+
description: string;
|
|
3120
|
+
responses: {
|
|
3121
|
+
200: {
|
|
3122
|
+
description: string;
|
|
3123
|
+
content: {
|
|
3124
|
+
"application/json": {
|
|
3125
|
+
schema: {
|
|
3126
|
+
type: "object";
|
|
3127
|
+
properties: {
|
|
3128
|
+
session: {
|
|
3129
|
+
$ref: string;
|
|
3130
|
+
};
|
|
3131
|
+
};
|
|
3132
|
+
};
|
|
3133
|
+
};
|
|
3134
|
+
};
|
|
3135
|
+
};
|
|
3136
|
+
};
|
|
3137
|
+
};
|
|
3138
|
+
};
|
|
3139
|
+
}, {
|
|
3140
|
+
session: {
|
|
3141
|
+
id: string;
|
|
3142
|
+
createdAt: Date;
|
|
3143
|
+
updatedAt: Date;
|
|
3144
|
+
userId: string;
|
|
3145
|
+
expiresAt: Date;
|
|
3146
|
+
token: string;
|
|
3147
|
+
ipAddress?: string | null | undefined;
|
|
3148
|
+
userAgent?: string | null | undefined;
|
|
3149
|
+
} & Record<string, any>;
|
|
3150
|
+
user: {
|
|
3151
|
+
id: string;
|
|
3152
|
+
createdAt: Date;
|
|
3153
|
+
updatedAt: Date;
|
|
3154
|
+
email: string;
|
|
3155
|
+
emailVerified: boolean;
|
|
3156
|
+
name: string;
|
|
3157
|
+
image?: string | null | undefined;
|
|
3158
|
+
} & Record<string, any>;
|
|
3159
|
+
}>;
|
|
3160
|
+
revokeDeviceSession: import("better-call").StrictEndpoint<"/multi-session/revoke", {
|
|
3161
|
+
method: "POST";
|
|
3162
|
+
body: import("zod").ZodObject<{
|
|
3163
|
+
sessionToken: import("zod").ZodString;
|
|
3164
|
+
}, import("zod/v4/core").$strip>;
|
|
3165
|
+
requireHeaders: true;
|
|
3166
|
+
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
3167
|
+
session: {
|
|
3168
|
+
session: Record<string, any> & {
|
|
3169
|
+
id: string;
|
|
3170
|
+
createdAt: Date;
|
|
3171
|
+
updatedAt: Date;
|
|
3172
|
+
userId: string;
|
|
3173
|
+
expiresAt: Date;
|
|
3174
|
+
token: string;
|
|
3175
|
+
ipAddress?: string | null | undefined;
|
|
3176
|
+
userAgent?: string | null | undefined;
|
|
3177
|
+
};
|
|
3178
|
+
user: Record<string, any> & {
|
|
3179
|
+
id: string;
|
|
3180
|
+
createdAt: Date;
|
|
3181
|
+
updatedAt: Date;
|
|
3182
|
+
email: string;
|
|
3183
|
+
emailVerified: boolean;
|
|
3184
|
+
name: string;
|
|
3185
|
+
image?: string | null | undefined;
|
|
3186
|
+
};
|
|
3187
|
+
};
|
|
3188
|
+
}>)[];
|
|
3189
|
+
metadata: {
|
|
3190
|
+
openapi: {
|
|
3191
|
+
description: string;
|
|
3192
|
+
responses: {
|
|
3193
|
+
200: {
|
|
3194
|
+
description: string;
|
|
3195
|
+
content: {
|
|
3196
|
+
"application/json": {
|
|
3197
|
+
schema: {
|
|
3198
|
+
type: "object";
|
|
3199
|
+
properties: {
|
|
3200
|
+
status: {
|
|
3201
|
+
type: string;
|
|
3202
|
+
};
|
|
3203
|
+
};
|
|
3204
|
+
};
|
|
3205
|
+
};
|
|
3206
|
+
};
|
|
3207
|
+
};
|
|
3208
|
+
};
|
|
3209
|
+
};
|
|
3210
|
+
};
|
|
3211
|
+
}, {
|
|
3212
|
+
status: boolean;
|
|
3213
|
+
}>;
|
|
3214
|
+
};
|
|
3215
|
+
hooks: {
|
|
3216
|
+
after: {
|
|
3217
|
+
matcher: (context: import("better-auth").HookEndpointContext) => boolean;
|
|
3218
|
+
handler: (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>;
|
|
3219
|
+
}[];
|
|
3220
|
+
};
|
|
3221
|
+
options: import("better-auth/plugins").MultiSessionConfig | undefined;
|
|
3222
|
+
$ERROR_CODES: {
|
|
3223
|
+
INVALID_SESSION_TOKEN: import("better-auth").RawError<"INVALID_SESSION_TOKEN">;
|
|
3224
|
+
};
|
|
3225
|
+
}, {
|
|
3226
|
+
id: "open-api";
|
|
3227
|
+
version: string;
|
|
3228
|
+
endpoints: {
|
|
3229
|
+
generateOpenAPISchema: import("better-call").StrictEndpoint<"/open-api/generate-schema", {
|
|
3230
|
+
method: "GET";
|
|
3231
|
+
}, {
|
|
3232
|
+
openapi: string;
|
|
3233
|
+
info: {
|
|
3234
|
+
title: string;
|
|
3235
|
+
description: string;
|
|
3236
|
+
version: string;
|
|
3237
|
+
};
|
|
3238
|
+
components: {
|
|
3239
|
+
securitySchemes: {
|
|
3240
|
+
apiKeyCookie: {
|
|
3241
|
+
type: string;
|
|
3242
|
+
in: string;
|
|
3243
|
+
name: string;
|
|
3244
|
+
description: string;
|
|
3245
|
+
};
|
|
3246
|
+
bearerAuth: {
|
|
3247
|
+
type: string;
|
|
3248
|
+
scheme: string;
|
|
3249
|
+
description: string;
|
|
3250
|
+
};
|
|
3251
|
+
};
|
|
3252
|
+
schemas: {
|
|
3253
|
+
[x: string]: import("better-auth/plugins").OpenAPIModelSchema;
|
|
3254
|
+
};
|
|
3255
|
+
};
|
|
3256
|
+
security: {
|
|
3257
|
+
apiKeyCookie: never[];
|
|
3258
|
+
bearerAuth: never[];
|
|
3259
|
+
}[];
|
|
3260
|
+
servers: {
|
|
3261
|
+
url: string;
|
|
3262
|
+
}[];
|
|
3263
|
+
tags: {
|
|
3264
|
+
name: string;
|
|
3265
|
+
description: string;
|
|
3266
|
+
}[];
|
|
3267
|
+
paths: Record<string, import("better-auth/plugins").Path>;
|
|
3268
|
+
}>;
|
|
3269
|
+
openAPIReference: import("better-call").StrictEndpoint<import("better-auth").LiteralString | "/reference", {
|
|
3270
|
+
method: "GET";
|
|
3271
|
+
metadata: {
|
|
3272
|
+
readonly scope: "server";
|
|
3273
|
+
};
|
|
3274
|
+
}, Response>;
|
|
3275
|
+
};
|
|
3276
|
+
options: NoInfer<import("better-auth/plugins").OpenAPIOptions>;
|
|
3277
|
+
}];
|
|
3278
|
+
}>;
|