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