sa2kit 2.0.4 → 3.0.0

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