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