@r2wa-org/eden 0.0.70 → 0.0.72

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