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