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