@sirketio/auth 0.0.1

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 (594) hide show
  1. package/dist/_virtual/_rolldown/runtime.mjs +36 -0
  2. package/dist/adapter/index.d.mts +4 -0
  3. package/dist/adapter/index.mjs +7 -0
  4. package/dist/api/index.d.mts +3872 -0
  5. package/dist/api/index.mjs +206 -0
  6. package/dist/api/index.mjs.map +1 -0
  7. package/dist/api/middlewares/index.d.mts +1 -0
  8. package/dist/api/middlewares/index.mjs +3 -0
  9. package/dist/api/middlewares/origin-check.d.mts +18 -0
  10. package/dist/api/middlewares/origin-check.mjs +140 -0
  11. package/dist/api/middlewares/origin-check.mjs.map +1 -0
  12. package/dist/api/rate-limiter/index.mjs +204 -0
  13. package/dist/api/rate-limiter/index.mjs.map +1 -0
  14. package/dist/api/routes/account.d.mts +410 -0
  15. package/dist/api/routes/account.mjs +493 -0
  16. package/dist/api/routes/account.mjs.map +1 -0
  17. package/dist/api/routes/callback.d.mts +31 -0
  18. package/dist/api/routes/callback.mjs +179 -0
  19. package/dist/api/routes/callback.mjs.map +1 -0
  20. package/dist/api/routes/email-verification.d.mts +161 -0
  21. package/dist/api/routes/email-verification.mjs +299 -0
  22. package/dist/api/routes/email-verification.mjs.map +1 -0
  23. package/dist/api/routes/error.d.mts +28 -0
  24. package/dist/api/routes/error.mjs +386 -0
  25. package/dist/api/routes/error.mjs.map +1 -0
  26. package/dist/api/routes/index.d.mts +11 -0
  27. package/dist/api/routes/index.mjs +13 -0
  28. package/dist/api/routes/ok.d.mts +36 -0
  29. package/dist/api/routes/ok.mjs +30 -0
  30. package/dist/api/routes/ok.mjs.map +1 -0
  31. package/dist/api/routes/password.d.mts +182 -0
  32. package/dist/api/routes/password.mjs +198 -0
  33. package/dist/api/routes/password.mjs.map +1 -0
  34. package/dist/api/routes/session.d.mts +415 -0
  35. package/dist/api/routes/session.mjs +483 -0
  36. package/dist/api/routes/session.mjs.map +1 -0
  37. package/dist/api/routes/sign-in.d.mts +171 -0
  38. package/dist/api/routes/sign-in.mjs +263 -0
  39. package/dist/api/routes/sign-in.mjs.map +1 -0
  40. package/dist/api/routes/sign-out.d.mts +36 -0
  41. package/dist/api/routes/sign-out.mjs +33 -0
  42. package/dist/api/routes/sign-out.mjs.map +1 -0
  43. package/dist/api/routes/sign-up.d.mts +160 -0
  44. package/dist/api/routes/sign-up.mjs +227 -0
  45. package/dist/api/routes/sign-up.mjs.map +1 -0
  46. package/dist/api/routes/update-user.d.mts +445 -0
  47. package/dist/api/routes/update-user.mjs +493 -0
  48. package/dist/api/routes/update-user.mjs.map +1 -0
  49. package/dist/api/state/oauth.d.mts +18 -0
  50. package/dist/api/state/oauth.mjs +8 -0
  51. package/dist/api/state/oauth.mjs.map +1 -0
  52. package/dist/api/state/should-session-refresh.d.mts +13 -0
  53. package/dist/api/state/should-session-refresh.mjs +16 -0
  54. package/dist/api/state/should-session-refresh.mjs.map +1 -0
  55. package/dist/api/to-auth-endpoints.mjs +197 -0
  56. package/dist/api/to-auth-endpoints.mjs.map +1 -0
  57. package/dist/auth/base.mjs +45 -0
  58. package/dist/auth/base.mjs.map +1 -0
  59. package/dist/auth/minimal.d.mts +12 -0
  60. package/dist/auth/minimal.mjs +14 -0
  61. package/dist/auth/minimal.mjs.map +1 -0
  62. package/dist/auth/trusted-origins.mjs +31 -0
  63. package/dist/auth/trusted-origins.mjs.map +1 -0
  64. package/dist/client/broadcast-channel.d.mts +20 -0
  65. package/dist/client/broadcast-channel.mjs +46 -0
  66. package/dist/client/broadcast-channel.mjs.map +1 -0
  67. package/dist/client/config.mjs +90 -0
  68. package/dist/client/config.mjs.map +1 -0
  69. package/dist/client/fetch-plugins.mjs +18 -0
  70. package/dist/client/fetch-plugins.mjs.map +1 -0
  71. package/dist/client/focus-manager.d.mts +11 -0
  72. package/dist/client/focus-manager.mjs +32 -0
  73. package/dist/client/focus-manager.mjs.map +1 -0
  74. package/dist/client/index.d.mts +33 -0
  75. package/dist/client/index.mjs +21 -0
  76. package/dist/client/index.mjs.map +1 -0
  77. package/dist/client/online-manager.d.mts +12 -0
  78. package/dist/client/online-manager.mjs +35 -0
  79. package/dist/client/online-manager.mjs.map +1 -0
  80. package/dist/client/parser.mjs +73 -0
  81. package/dist/client/parser.mjs.map +1 -0
  82. package/dist/client/path-to-object.d.mts +65 -0
  83. package/dist/client/plugins/index.d.mts +53 -0
  84. package/dist/client/plugins/index.mjs +30 -0
  85. package/dist/client/plugins/infer-plugin.d.mts +16 -0
  86. package/dist/client/plugins/infer-plugin.mjs +11 -0
  87. package/dist/client/plugins/infer-plugin.mjs.map +1 -0
  88. package/dist/client/proxy.mjs +79 -0
  89. package/dist/client/proxy.mjs.map +1 -0
  90. package/dist/client/query.d.mts +23 -0
  91. package/dist/client/query.mjs +98 -0
  92. package/dist/client/query.mjs.map +1 -0
  93. package/dist/client/react/index.d.mts +128 -0
  94. package/dist/client/react/index.mjs +24 -0
  95. package/dist/client/react/index.mjs.map +1 -0
  96. package/dist/client/react/react-store.d.mts +47 -0
  97. package/dist/client/react/react-store.mjs +47 -0
  98. package/dist/client/react/react-store.mjs.map +1 -0
  99. package/dist/client/session-atom.mjs +29 -0
  100. package/dist/client/session-atom.mjs.map +1 -0
  101. package/dist/client/session-refresh.d.mts +28 -0
  102. package/dist/client/session-refresh.mjs +140 -0
  103. package/dist/client/session-refresh.mjs.map +1 -0
  104. package/dist/client/types.d.mts +41 -0
  105. package/dist/client/vanilla.d.mts +127 -0
  106. package/dist/client/vanilla.mjs +20 -0
  107. package/dist/client/vanilla.mjs.map +1 -0
  108. package/dist/context/create-context.mjs +211 -0
  109. package/dist/context/create-context.mjs.map +1 -0
  110. package/dist/context/helpers.mjs +83 -0
  111. package/dist/context/helpers.mjs.map +1 -0
  112. package/dist/context/init.mjs +20 -0
  113. package/dist/context/init.mjs.map +1 -0
  114. package/dist/cookies/cookie-utils.d.mts +29 -0
  115. package/dist/cookies/cookie-utils.mjs +105 -0
  116. package/dist/cookies/cookie-utils.mjs.map +1 -0
  117. package/dist/cookies/index.d.mts +121 -0
  118. package/dist/cookies/index.mjs +261 -0
  119. package/dist/cookies/index.mjs.map +1 -0
  120. package/dist/cookies/session-store.d.mts +36 -0
  121. package/dist/cookies/session-store.mjs +200 -0
  122. package/dist/cookies/session-store.mjs.map +1 -0
  123. package/dist/crypto/buffer.d.mts +8 -0
  124. package/dist/crypto/buffer.mjs +18 -0
  125. package/dist/crypto/buffer.mjs.map +1 -0
  126. package/dist/crypto/index.d.mts +27 -0
  127. package/dist/crypto/index.mjs +38 -0
  128. package/dist/crypto/index.mjs.map +1 -0
  129. package/dist/crypto/jwt.d.mts +8 -0
  130. package/dist/crypto/jwt.mjs +95 -0
  131. package/dist/crypto/jwt.mjs.map +1 -0
  132. package/dist/crypto/password.d.mts +12 -0
  133. package/dist/crypto/password.mjs +36 -0
  134. package/dist/crypto/password.mjs.map +1 -0
  135. package/dist/crypto/random.d.mts +5 -0
  136. package/dist/crypto/random.mjs +8 -0
  137. package/dist/crypto/random.mjs.map +1 -0
  138. package/dist/db/adapter-base.d.mts +8 -0
  139. package/dist/db/adapter-base.mjs +19 -0
  140. package/dist/db/adapter-base.mjs.map +1 -0
  141. package/dist/db/field-converter.d.mts +8 -0
  142. package/dist/db/field-converter.mjs +21 -0
  143. package/dist/db/field-converter.mjs.map +1 -0
  144. package/dist/db/field.d.mts +42 -0
  145. package/dist/db/get-schema.d.mts +11 -0
  146. package/dist/db/get-schema.mjs +39 -0
  147. package/dist/db/get-schema.mjs.map +1 -0
  148. package/dist/db/index.d.mts +18 -0
  149. package/dist/db/index.mjs +34 -0
  150. package/dist/db/index.mjs.map +1 -0
  151. package/dist/db/internal-adapter.d.mts +14 -0
  152. package/dist/db/internal-adapter.mjs +616 -0
  153. package/dist/db/internal-adapter.mjs.map +1 -0
  154. package/dist/db/schema.d.mts +49 -0
  155. package/dist/db/schema.mjs +118 -0
  156. package/dist/db/schema.mjs.map +1 -0
  157. package/dist/db/to-zod.d.mts +36 -0
  158. package/dist/db/to-zod.mjs +26 -0
  159. package/dist/db/to-zod.mjs.map +1 -0
  160. package/dist/db/verification-token-storage.mjs +28 -0
  161. package/dist/db/verification-token-storage.mjs.map +1 -0
  162. package/dist/db/with-hooks.d.mts +33 -0
  163. package/dist/db/with-hooks.mjs +159 -0
  164. package/dist/db/with-hooks.mjs.map +1 -0
  165. package/dist/index.d.mts +53 -0
  166. package/dist/index.mjs +27 -0
  167. package/dist/integrations/next-js.d.mts +29 -0
  168. package/dist/integrations/next-js.mjs +85 -0
  169. package/dist/integrations/next-js.mjs.map +1 -0
  170. package/dist/oauth2/index.d.mts +5 -0
  171. package/dist/oauth2/index.mjs +7 -0
  172. package/dist/oauth2/link-account.d.mts +48 -0
  173. package/dist/oauth2/link-account.mjs +143 -0
  174. package/dist/oauth2/link-account.mjs.map +1 -0
  175. package/dist/oauth2/state.d.mts +26 -0
  176. package/dist/oauth2/state.mjs +51 -0
  177. package/dist/oauth2/state.mjs.map +1 -0
  178. package/dist/oauth2/utils.d.mts +8 -0
  179. package/dist/oauth2/utils.mjs +31 -0
  180. package/dist/oauth2/utils.mjs.map +1 -0
  181. package/dist/plugins/access/access.d.mts +30 -0
  182. package/dist/plugins/access/access.mjs +46 -0
  183. package/dist/plugins/access/access.mjs.map +1 -0
  184. package/dist/plugins/access/index.d.mts +3 -0
  185. package/dist/plugins/access/index.mjs +3 -0
  186. package/dist/plugins/access/types.d.mts +17 -0
  187. package/dist/plugins/additional-fields/client.d.mts +96 -0
  188. package/dist/plugins/additional-fields/client.mjs +11 -0
  189. package/dist/plugins/additional-fields/client.mjs.map +1 -0
  190. package/dist/plugins/admin/access/index.d.mts +2 -0
  191. package/dist/plugins/admin/access/index.mjs +3 -0
  192. package/dist/plugins/admin/access/statement.d.mts +118 -0
  193. package/dist/plugins/admin/access/statement.mjs +53 -0
  194. package/dist/plugins/admin/access/statement.mjs.map +1 -0
  195. package/dist/plugins/admin/admin.d.mts +911 -0
  196. package/dist/plugins/admin/admin.mjs +95 -0
  197. package/dist/plugins/admin/admin.mjs.map +1 -0
  198. package/dist/plugins/admin/client.d.mts +76 -0
  199. package/dist/plugins/admin/client.mjs +36 -0
  200. package/dist/plugins/admin/client.mjs.map +1 -0
  201. package/dist/plugins/admin/error-codes.d.mts +29 -0
  202. package/dist/plugins/admin/error-codes.mjs +30 -0
  203. package/dist/plugins/admin/error-codes.mjs.map +1 -0
  204. package/dist/plugins/admin/has-permission.mjs +16 -0
  205. package/dist/plugins/admin/has-permission.mjs.map +1 -0
  206. package/dist/plugins/admin/index.d.mts +3 -0
  207. package/dist/plugins/admin/index.mjs +3 -0
  208. package/dist/plugins/admin/routes.mjs +841 -0
  209. package/dist/plugins/admin/routes.mjs.map +1 -0
  210. package/dist/plugins/admin/schema.d.mts +40 -0
  211. package/dist/plugins/admin/schema.mjs +34 -0
  212. package/dist/plugins/admin/schema.mjs.map +1 -0
  213. package/dist/plugins/admin/types.d.mts +89 -0
  214. package/dist/plugins/api-key/adapter.mjs +468 -0
  215. package/dist/plugins/api-key/adapter.mjs.map +1 -0
  216. package/dist/plugins/api-key/client.d.mts +46 -0
  217. package/dist/plugins/api-key/client.mjs +19 -0
  218. package/dist/plugins/api-key/client.mjs.map +1 -0
  219. package/dist/plugins/api-key/error-codes.d.mts +33 -0
  220. package/dist/plugins/api-key/error-codes.mjs +34 -0
  221. package/dist/plugins/api-key/error-codes.mjs.map +1 -0
  222. package/dist/plugins/api-key/index.d.mts +1251 -0
  223. package/dist/plugins/api-key/index.mjs +134 -0
  224. package/dist/plugins/api-key/index.mjs.map +1 -0
  225. package/dist/plugins/api-key/rate-limit.mjs +74 -0
  226. package/dist/plugins/api-key/rate-limit.mjs.map +1 -0
  227. package/dist/plugins/api-key/routes/create-api-key.mjs +252 -0
  228. package/dist/plugins/api-key/routes/create-api-key.mjs.map +1 -0
  229. package/dist/plugins/api-key/routes/delete-all-expired-api-keys.mjs +24 -0
  230. package/dist/plugins/api-key/routes/delete-all-expired-api-keys.mjs.map +1 -0
  231. package/dist/plugins/api-key/routes/delete-api-key.mjs +74 -0
  232. package/dist/plugins/api-key/routes/delete-api-key.mjs.map +1 -0
  233. package/dist/plugins/api-key/routes/get-api-key.mjs +158 -0
  234. package/dist/plugins/api-key/routes/get-api-key.mjs.map +1 -0
  235. package/dist/plugins/api-key/routes/index.mjs +71 -0
  236. package/dist/plugins/api-key/routes/index.mjs.map +1 -0
  237. package/dist/plugins/api-key/routes/list-api-keys.mjs +194 -0
  238. package/dist/plugins/api-key/routes/list-api-keys.mjs.map +1 -0
  239. package/dist/plugins/api-key/routes/update-api-key.mjs +248 -0
  240. package/dist/plugins/api-key/routes/update-api-key.mjs.map +1 -0
  241. package/dist/plugins/api-key/routes/verify-api-key.mjs +224 -0
  242. package/dist/plugins/api-key/routes/verify-api-key.mjs.map +1 -0
  243. package/dist/plugins/api-key/schema.d.mts +199 -0
  244. package/dist/plugins/api-key/schema.mjs +130 -0
  245. package/dist/plugins/api-key/schema.mjs.map +1 -0
  246. package/dist/plugins/api-key/types.d.mts +346 -0
  247. package/dist/plugins/bearer/index.d.mts +45 -0
  248. package/dist/plugins/bearer/index.mjs +66 -0
  249. package/dist/plugins/bearer/index.mjs.map +1 -0
  250. package/dist/plugins/captcha/constants.d.mts +10 -0
  251. package/dist/plugins/captcha/constants.mjs +22 -0
  252. package/dist/plugins/captcha/constants.mjs.map +1 -0
  253. package/dist/plugins/captcha/error-codes.mjs +16 -0
  254. package/dist/plugins/captcha/error-codes.mjs.map +1 -0
  255. package/dist/plugins/captcha/index.d.mts +21 -0
  256. package/dist/plugins/captcha/index.mjs +62 -0
  257. package/dist/plugins/captcha/index.mjs.map +1 -0
  258. package/dist/plugins/captcha/types.d.mts +28 -0
  259. package/dist/plugins/captcha/utils.mjs +11 -0
  260. package/dist/plugins/captcha/utils.mjs.map +1 -0
  261. package/dist/plugins/captcha/verify-handlers/captchafox.mjs +28 -0
  262. package/dist/plugins/captcha/verify-handlers/captchafox.mjs.map +1 -0
  263. package/dist/plugins/captcha/verify-handlers/cloudflare-turnstile.mjs +26 -0
  264. package/dist/plugins/captcha/verify-handlers/cloudflare-turnstile.mjs.map +1 -0
  265. package/dist/plugins/captcha/verify-handlers/google-recaptcha.mjs +30 -0
  266. package/dist/plugins/captcha/verify-handlers/google-recaptcha.mjs.map +1 -0
  267. package/dist/plugins/captcha/verify-handlers/h-captcha.mjs +28 -0
  268. package/dist/plugins/captcha/verify-handlers/h-captcha.mjs.map +1 -0
  269. package/dist/plugins/captcha/verify-handlers/index.mjs +6 -0
  270. package/dist/plugins/custom-session/client.d.mts +17 -0
  271. package/dist/plugins/custom-session/client.mjs +11 -0
  272. package/dist/plugins/custom-session/client.mjs.map +1 -0
  273. package/dist/plugins/custom-session/index.d.mts +72 -0
  274. package/dist/plugins/custom-session/index.mjs +78 -0
  275. package/dist/plugins/custom-session/index.mjs.map +1 -0
  276. package/dist/plugins/device-authorization/client.d.mts +17 -0
  277. package/dist/plugins/device-authorization/client.mjs +18 -0
  278. package/dist/plugins/device-authorization/client.mjs.map +1 -0
  279. package/dist/plugins/device-authorization/error-codes.mjs +21 -0
  280. package/dist/plugins/device-authorization/error-codes.mjs.map +1 -0
  281. package/dist/plugins/device-authorization/index.d.mts +424 -0
  282. package/dist/plugins/device-authorization/index.mjs +50 -0
  283. package/dist/plugins/device-authorization/index.mjs.map +1 -0
  284. package/dist/plugins/device-authorization/routes.mjs +510 -0
  285. package/dist/plugins/device-authorization/routes.mjs.map +1 -0
  286. package/dist/plugins/device-authorization/schema.mjs +57 -0
  287. package/dist/plugins/device-authorization/schema.mjs.map +1 -0
  288. package/dist/plugins/email-otp/client.d.mts +21 -0
  289. package/dist/plugins/email-otp/client.mjs +18 -0
  290. package/dist/plugins/email-otp/client.mjs.map +1 -0
  291. package/dist/plugins/email-otp/error-codes.d.mts +11 -0
  292. package/dist/plugins/email-otp/error-codes.mjs +12 -0
  293. package/dist/plugins/email-otp/error-codes.mjs.map +1 -0
  294. package/dist/plugins/email-otp/index.d.mts +428 -0
  295. package/dist/plugins/email-otp/index.mjs +130 -0
  296. package/dist/plugins/email-otp/index.mjs.map +1 -0
  297. package/dist/plugins/email-otp/otp-token.mjs +29 -0
  298. package/dist/plugins/email-otp/otp-token.mjs.map +1 -0
  299. package/dist/plugins/email-otp/routes.mjs +631 -0
  300. package/dist/plugins/email-otp/routes.mjs.map +1 -0
  301. package/dist/plugins/email-otp/types.d.mts +86 -0
  302. package/dist/plugins/email-otp/utils.mjs +17 -0
  303. package/dist/plugins/email-otp/utils.mjs.map +1 -0
  304. package/dist/plugins/generic-oauth/client.d.mts +33 -0
  305. package/dist/plugins/generic-oauth/client.mjs +14 -0
  306. package/dist/plugins/generic-oauth/client.mjs.map +1 -0
  307. package/dist/plugins/generic-oauth/error-codes.d.mts +16 -0
  308. package/dist/plugins/generic-oauth/error-codes.mjs +17 -0
  309. package/dist/plugins/generic-oauth/error-codes.mjs.map +1 -0
  310. package/dist/plugins/generic-oauth/index.d.mts +201 -0
  311. package/dist/plugins/generic-oauth/index.mjs +145 -0
  312. package/dist/plugins/generic-oauth/index.mjs.map +1 -0
  313. package/dist/plugins/generic-oauth/providers/auth0.d.mts +37 -0
  314. package/dist/plugins/generic-oauth/providers/auth0.mjs +62 -0
  315. package/dist/plugins/generic-oauth/providers/auth0.mjs.map +1 -0
  316. package/dist/plugins/generic-oauth/providers/gumroad.d.mts +32 -0
  317. package/dist/plugins/generic-oauth/providers/gumroad.mjs +60 -0
  318. package/dist/plugins/generic-oauth/providers/gumroad.mjs.map +1 -0
  319. package/dist/plugins/generic-oauth/providers/hubspot.d.mts +37 -0
  320. package/dist/plugins/generic-oauth/providers/hubspot.mjs +60 -0
  321. package/dist/plugins/generic-oauth/providers/hubspot.mjs.map +1 -0
  322. package/dist/plugins/generic-oauth/providers/index.d.mts +9 -0
  323. package/dist/plugins/generic-oauth/providers/index.mjs +11 -0
  324. package/dist/plugins/generic-oauth/providers/keycloak.d.mts +37 -0
  325. package/dist/plugins/generic-oauth/providers/keycloak.mjs +62 -0
  326. package/dist/plugins/generic-oauth/providers/keycloak.mjs.map +1 -0
  327. package/dist/plugins/generic-oauth/providers/line.d.mts +55 -0
  328. package/dist/plugins/generic-oauth/providers/line.mjs +91 -0
  329. package/dist/plugins/generic-oauth/providers/line.mjs.map +1 -0
  330. package/dist/plugins/generic-oauth/providers/microsoft-entra-id.d.mts +37 -0
  331. package/dist/plugins/generic-oauth/providers/microsoft-entra-id.mjs +66 -0
  332. package/dist/plugins/generic-oauth/providers/microsoft-entra-id.mjs.map +1 -0
  333. package/dist/plugins/generic-oauth/providers/okta.d.mts +37 -0
  334. package/dist/plugins/generic-oauth/providers/okta.mjs +62 -0
  335. package/dist/plugins/generic-oauth/providers/okta.mjs.map +1 -0
  336. package/dist/plugins/generic-oauth/providers/patreon.d.mts +30 -0
  337. package/dist/plugins/generic-oauth/providers/patreon.mjs +59 -0
  338. package/dist/plugins/generic-oauth/providers/patreon.mjs.map +1 -0
  339. package/dist/plugins/generic-oauth/providers/slack.d.mts +30 -0
  340. package/dist/plugins/generic-oauth/providers/slack.mjs +61 -0
  341. package/dist/plugins/generic-oauth/providers/slack.mjs.map +1 -0
  342. package/dist/plugins/generic-oauth/routes.mjs +411 -0
  343. package/dist/plugins/generic-oauth/routes.mjs.map +1 -0
  344. package/dist/plugins/generic-oauth/types.d.mts +159 -0
  345. package/dist/plugins/haveibeenpwned/index.d.mts +46 -0
  346. package/dist/plugins/haveibeenpwned/index.mjs +57 -0
  347. package/dist/plugins/haveibeenpwned/index.mjs.map +1 -0
  348. package/dist/plugins/index.d.mts +65 -0
  349. package/dist/plugins/index.mjs +48 -0
  350. package/dist/plugins/jwt/adapter.mjs +27 -0
  351. package/dist/plugins/jwt/adapter.mjs.map +1 -0
  352. package/dist/plugins/jwt/client.d.mts +40 -0
  353. package/dist/plugins/jwt/client.mjs +19 -0
  354. package/dist/plugins/jwt/client.mjs.map +1 -0
  355. package/dist/plugins/jwt/index.d.mts +224 -0
  356. package/dist/plugins/jwt/index.mjs +202 -0
  357. package/dist/plugins/jwt/index.mjs.map +1 -0
  358. package/dist/plugins/jwt/schema.d.mts +26 -0
  359. package/dist/plugins/jwt/schema.mjs +23 -0
  360. package/dist/plugins/jwt/schema.mjs.map +1 -0
  361. package/dist/plugins/jwt/sign.d.mts +57 -0
  362. package/dist/plugins/jwt/sign.mjs +66 -0
  363. package/dist/plugins/jwt/sign.mjs.map +1 -0
  364. package/dist/plugins/jwt/types.d.mts +194 -0
  365. package/dist/plugins/jwt/utils.d.mts +42 -0
  366. package/dist/plugins/jwt/utils.mjs +64 -0
  367. package/dist/plugins/jwt/utils.mjs.map +1 -0
  368. package/dist/plugins/jwt/verify.d.mts +12 -0
  369. package/dist/plugins/jwt/verify.mjs +46 -0
  370. package/dist/plugins/jwt/verify.mjs.map +1 -0
  371. package/dist/plugins/last-login-method/client.d.mts +38 -0
  372. package/dist/plugins/last-login-method/client.mjs +32 -0
  373. package/dist/plugins/last-login-method/client.mjs.map +1 -0
  374. package/dist/plugins/last-login-method/index.d.mts +118 -0
  375. package/dist/plugins/last-login-method/index.mjs +76 -0
  376. package/dist/plugins/last-login-method/index.mjs.map +1 -0
  377. package/dist/plugins/magic-link/client.d.mts +10 -0
  378. package/dist/plugins/magic-link/client.mjs +11 -0
  379. package/dist/plugins/magic-link/client.mjs.map +1 -0
  380. package/dist/plugins/magic-link/index.d.mts +193 -0
  381. package/dist/plugins/magic-link/index.mjs +177 -0
  382. package/dist/plugins/magic-link/index.mjs.map +1 -0
  383. package/dist/plugins/magic-link/utils.mjs +12 -0
  384. package/dist/plugins/magic-link/utils.mjs.map +1 -0
  385. package/dist/plugins/mcp/authorize.mjs +133 -0
  386. package/dist/plugins/mcp/authorize.mjs.map +1 -0
  387. package/dist/plugins/mcp/index.d.mts +458 -0
  388. package/dist/plugins/mcp/index.mjs +717 -0
  389. package/dist/plugins/mcp/index.mjs.map +1 -0
  390. package/dist/plugins/multi-session/client.d.mts +19 -0
  391. package/dist/plugins/multi-session/client.mjs +20 -0
  392. package/dist/plugins/multi-session/client.mjs.map +1 -0
  393. package/dist/plugins/multi-session/error-codes.d.mts +9 -0
  394. package/dist/plugins/multi-session/error-codes.mjs +8 -0
  395. package/dist/plugins/multi-session/error-codes.mjs.map +1 -0
  396. package/dist/plugins/multi-session/index.d.mts +235 -0
  397. package/dist/plugins/multi-session/index.mjs +172 -0
  398. package/dist/plugins/multi-session/index.mjs.map +1 -0
  399. package/dist/plugins/oauth-proxy/index.d.mts +97 -0
  400. package/dist/plugins/oauth-proxy/index.mjs +305 -0
  401. package/dist/plugins/oauth-proxy/index.mjs.map +1 -0
  402. package/dist/plugins/oauth-proxy/utils.mjs +51 -0
  403. package/dist/plugins/oauth-proxy/utils.mjs.map +1 -0
  404. package/dist/plugins/oidc-provider/authorize.mjs +194 -0
  405. package/dist/plugins/oidc-provider/authorize.mjs.map +1 -0
  406. package/dist/plugins/oidc-provider/client.d.mts +12 -0
  407. package/dist/plugins/oidc-provider/client.mjs +11 -0
  408. package/dist/plugins/oidc-provider/client.mjs.map +1 -0
  409. package/dist/plugins/oidc-provider/error.mjs +17 -0
  410. package/dist/plugins/oidc-provider/error.mjs.map +1 -0
  411. package/dist/plugins/oidc-provider/index.d.mts +702 -0
  412. package/dist/plugins/oidc-provider/index.mjs +1093 -0
  413. package/dist/plugins/oidc-provider/index.mjs.map +1 -0
  414. package/dist/plugins/oidc-provider/schema.d.mts +160 -0
  415. package/dist/plugins/oidc-provider/schema.mjs +132 -0
  416. package/dist/plugins/oidc-provider/schema.mjs.map +1 -0
  417. package/dist/plugins/oidc-provider/types.d.mts +517 -0
  418. package/dist/plugins/oidc-provider/utils/prompt.mjs +19 -0
  419. package/dist/plugins/oidc-provider/utils/prompt.mjs.map +1 -0
  420. package/dist/plugins/oidc-provider/utils.mjs +15 -0
  421. package/dist/plugins/oidc-provider/utils.mjs.map +1 -0
  422. package/dist/plugins/one-tap/client.d.mts +174 -0
  423. package/dist/plugins/one-tap/client.mjs +188 -0
  424. package/dist/plugins/one-tap/client.mjs.map +1 -0
  425. package/dist/plugins/one-tap/index.d.mts +83 -0
  426. package/dist/plugins/one-tap/index.mjs +95 -0
  427. package/dist/plugins/one-tap/index.mjs.map +1 -0
  428. package/dist/plugins/one-time-token/client.d.mts +10 -0
  429. package/dist/plugins/one-time-token/client.mjs +11 -0
  430. package/dist/plugins/one-time-token/client.mjs.map +1 -0
  431. package/dist/plugins/one-time-token/index.d.mts +133 -0
  432. package/dist/plugins/one-time-token/index.mjs +82 -0
  433. package/dist/plugins/one-time-token/index.mjs.map +1 -0
  434. package/dist/plugins/one-time-token/utils.mjs +12 -0
  435. package/dist/plugins/one-time-token/utils.mjs.map +1 -0
  436. package/dist/plugins/open-api/generator.d.mts +115 -0
  437. package/dist/plugins/open-api/generator.mjs +315 -0
  438. package/dist/plugins/open-api/generator.mjs.map +1 -0
  439. package/dist/plugins/open-api/index.d.mts +97 -0
  440. package/dist/plugins/open-api/index.mjs +67 -0
  441. package/dist/plugins/open-api/index.mjs.map +1 -0
  442. package/dist/plugins/open-api/logo.mjs +15 -0
  443. package/dist/plugins/open-api/logo.mjs.map +1 -0
  444. package/dist/plugins/organization/access/index.d.mts +2 -0
  445. package/dist/plugins/organization/access/index.mjs +3 -0
  446. package/dist/plugins/organization/access/statement.d.mts +249 -0
  447. package/dist/plugins/organization/access/statement.mjs +81 -0
  448. package/dist/plugins/organization/access/statement.mjs.map +1 -0
  449. package/dist/plugins/organization/adapter.d.mts +792 -0
  450. package/dist/plugins/organization/adapter.mjs +624 -0
  451. package/dist/plugins/organization/adapter.mjs.map +1 -0
  452. package/dist/plugins/organization/call.mjs +19 -0
  453. package/dist/plugins/organization/call.mjs.map +1 -0
  454. package/dist/plugins/organization/client.d.mts +372 -0
  455. package/dist/plugins/organization/client.mjs +95 -0
  456. package/dist/plugins/organization/client.mjs.map +1 -0
  457. package/dist/plugins/organization/error-codes.d.mts +65 -0
  458. package/dist/plugins/organization/error-codes.mjs +66 -0
  459. package/dist/plugins/organization/error-codes.mjs.map +1 -0
  460. package/dist/plugins/organization/has-permission.mjs +35 -0
  461. package/dist/plugins/organization/has-permission.mjs.map +1 -0
  462. package/dist/plugins/organization/index.d.mts +5 -0
  463. package/dist/plugins/organization/index.mjs +4 -0
  464. package/dist/plugins/organization/organization.d.mts +394 -0
  465. package/dist/plugins/organization/organization.mjs +428 -0
  466. package/dist/plugins/organization/organization.mjs.map +1 -0
  467. package/dist/plugins/organization/permission.d.mts +17 -0
  468. package/dist/plugins/organization/permission.mjs +16 -0
  469. package/dist/plugins/organization/permission.mjs.map +1 -0
  470. package/dist/plugins/organization/routes/crud-access-control.d.mts +394 -0
  471. package/dist/plugins/organization/routes/crud-access-control.mjs +678 -0
  472. package/dist/plugins/organization/routes/crud-access-control.mjs.map +1 -0
  473. package/dist/plugins/organization/routes/crud-invites.d.mts +1031 -0
  474. package/dist/plugins/organization/routes/crud-invites.mjs +551 -0
  475. package/dist/plugins/organization/routes/crud-invites.mjs.map +1 -0
  476. package/dist/plugins/organization/routes/crud-members.d.mts +940 -0
  477. package/dist/plugins/organization/routes/crud-members.mjs +466 -0
  478. package/dist/plugins/organization/routes/crud-members.mjs.map +1 -0
  479. package/dist/plugins/organization/routes/crud-org.d.mts +708 -0
  480. package/dist/plugins/organization/routes/crud-org.mjs +423 -0
  481. package/dist/plugins/organization/routes/crud-org.mjs.map +1 -0
  482. package/dist/plugins/organization/routes/crud-team.d.mts +1071 -0
  483. package/dist/plugins/organization/routes/crud-team.mjs +676 -0
  484. package/dist/plugins/organization/routes/crud-team.mjs.map +1 -0
  485. package/dist/plugins/organization/schema.d.mts +376 -0
  486. package/dist/plugins/organization/schema.mjs +68 -0
  487. package/dist/plugins/organization/schema.mjs.map +1 -0
  488. package/dist/plugins/organization/types.d.mts +677 -0
  489. package/dist/plugins/phone-number/client.d.mts +31 -0
  490. package/dist/plugins/phone-number/client.mjs +20 -0
  491. package/dist/plugins/phone-number/client.mjs.map +1 -0
  492. package/dist/plugins/phone-number/error-codes.d.mts +20 -0
  493. package/dist/plugins/phone-number/error-codes.mjs +21 -0
  494. package/dist/plugins/phone-number/error-codes.mjs.map +1 -0
  495. package/dist/plugins/phone-number/index.d.mts +318 -0
  496. package/dist/plugins/phone-number/index.mjs +49 -0
  497. package/dist/plugins/phone-number/index.mjs.map +1 -0
  498. package/dist/plugins/phone-number/routes.mjs +472 -0
  499. package/dist/plugins/phone-number/routes.mjs.map +1 -0
  500. package/dist/plugins/phone-number/schema.d.mts +23 -0
  501. package/dist/plugins/phone-number/schema.mjs +20 -0
  502. package/dist/plugins/phone-number/schema.mjs.map +1 -0
  503. package/dist/plugins/phone-number/types.d.mts +118 -0
  504. package/dist/plugins/two-factor/backup-codes/index.d.mts +279 -0
  505. package/dist/plugins/two-factor/backup-codes/index.mjs +277 -0
  506. package/dist/plugins/two-factor/backup-codes/index.mjs.map +1 -0
  507. package/dist/plugins/two-factor/client.d.mts +55 -0
  508. package/dist/plugins/two-factor/client.mjs +37 -0
  509. package/dist/plugins/two-factor/client.mjs.map +1 -0
  510. package/dist/plugins/two-factor/constant.mjs +8 -0
  511. package/dist/plugins/two-factor/constant.mjs.map +1 -0
  512. package/dist/plugins/two-factor/error-code.d.mts +17 -0
  513. package/dist/plugins/two-factor/error-code.mjs +18 -0
  514. package/dist/plugins/two-factor/error-code.mjs.map +1 -0
  515. package/dist/plugins/two-factor/index.d.mts +670 -0
  516. package/dist/plugins/two-factor/index.mjs +228 -0
  517. package/dist/plugins/two-factor/index.mjs.map +1 -0
  518. package/dist/plugins/two-factor/otp/index.d.mts +216 -0
  519. package/dist/plugins/two-factor/otp/index.mjs +199 -0
  520. package/dist/plugins/two-factor/otp/index.mjs.map +1 -0
  521. package/dist/plugins/two-factor/schema.d.mts +41 -0
  522. package/dist/plugins/two-factor/schema.mjs +36 -0
  523. package/dist/plugins/two-factor/schema.mjs.map +1 -0
  524. package/dist/plugins/two-factor/totp/index.d.mts +210 -0
  525. package/dist/plugins/two-factor/totp/index.mjs +157 -0
  526. package/dist/plugins/two-factor/totp/index.mjs.map +1 -0
  527. package/dist/plugins/two-factor/types.d.mts +73 -0
  528. package/dist/plugins/two-factor/utils.mjs +12 -0
  529. package/dist/plugins/two-factor/utils.mjs.map +1 -0
  530. package/dist/plugins/two-factor/verify-two-factor.mjs +85 -0
  531. package/dist/plugins/two-factor/verify-two-factor.mjs.map +1 -0
  532. package/dist/plugins/username/client.d.mts +26 -0
  533. package/dist/plugins/username/client.mjs +18 -0
  534. package/dist/plugins/username/client.mjs.map +1 -0
  535. package/dist/plugins/username/error-codes.d.mts +16 -0
  536. package/dist/plugins/username/error-codes.mjs +17 -0
  537. package/dist/plugins/username/error-codes.mjs.map +1 -0
  538. package/dist/plugins/username/index.d.mts +251 -0
  539. package/dist/plugins/username/index.mjs +234 -0
  540. package/dist/plugins/username/index.mjs.map +1 -0
  541. package/dist/plugins/username/schema.d.mts +33 -0
  542. package/dist/plugins/username/schema.mjs +26 -0
  543. package/dist/plugins/username/schema.mjs.map +1 -0
  544. package/dist/providers/index.d.mts +1 -0
  545. package/dist/providers/index.mjs +3 -0
  546. package/dist/state.d.mts +42 -0
  547. package/dist/state.mjs +107 -0
  548. package/dist/state.mjs.map +1 -0
  549. package/dist/types/adapter.d.mts +2 -0
  550. package/dist/types/api.d.mts +29 -0
  551. package/dist/types/auth.d.mts +29 -0
  552. package/dist/types/helper.d.mts +10 -0
  553. package/dist/types/index.d.mts +11 -0
  554. package/dist/types/index.mjs +1 -0
  555. package/dist/types/models.d.mts +11 -0
  556. package/dist/types/plugins.d.mts +20 -0
  557. package/dist/utils/boolean.mjs +8 -0
  558. package/dist/utils/boolean.mjs.map +1 -0
  559. package/dist/utils/constants.mjs +6 -0
  560. package/dist/utils/constants.mjs.map +1 -0
  561. package/dist/utils/date.mjs +8 -0
  562. package/dist/utils/date.mjs.map +1 -0
  563. package/dist/utils/get-request-ip.d.mts +7 -0
  564. package/dist/utils/get-request-ip.mjs +23 -0
  565. package/dist/utils/get-request-ip.mjs.map +1 -0
  566. package/dist/utils/hide-metadata.d.mts +7 -0
  567. package/dist/utils/hide-metadata.mjs +6 -0
  568. package/dist/utils/hide-metadata.mjs.map +1 -0
  569. package/dist/utils/index.d.mts +4 -0
  570. package/dist/utils/index.mjs +6 -0
  571. package/dist/utils/is-api-error.d.mts +7 -0
  572. package/dist/utils/is-api-error.mjs +11 -0
  573. package/dist/utils/is-api-error.mjs.map +1 -0
  574. package/dist/utils/is-atom.mjs +8 -0
  575. package/dist/utils/is-atom.mjs.map +1 -0
  576. package/dist/utils/is-promise.mjs +8 -0
  577. package/dist/utils/is-promise.mjs.map +1 -0
  578. package/dist/utils/middleware-response.mjs +9 -0
  579. package/dist/utils/middleware-response.mjs.map +1 -0
  580. package/dist/utils/password.mjs +26 -0
  581. package/dist/utils/password.mjs.map +1 -0
  582. package/dist/utils/plugin-helper.mjs +17 -0
  583. package/dist/utils/plugin-helper.mjs.map +1 -0
  584. package/dist/utils/shim.mjs +24 -0
  585. package/dist/utils/shim.mjs.map +1 -0
  586. package/dist/utils/time.d.mts +49 -0
  587. package/dist/utils/time.mjs +100 -0
  588. package/dist/utils/time.mjs.map +1 -0
  589. package/dist/utils/url.d.mts +8 -0
  590. package/dist/utils/url.mjs +92 -0
  591. package/dist/utils/url.mjs.map +1 -0
  592. package/dist/utils/wildcard.mjs +108 -0
  593. package/dist/utils/wildcard.mjs.map +1 -0
  594. package/package.json +428 -0
@@ -0,0 +1,3872 @@
1
+ import { Prettify as Prettify$1, UnionToIntersection } from "../types/helper.mjs";
2
+ import { AdditionalUserFieldsInput } from "../types/models.mjs";
3
+ import "../types/index.mjs";
4
+ import "../index.mjs";
5
+ import { getIp } from "../utils/get-request-ip.mjs";
6
+ import { isAPIError } from "../utils/is-api-error.mjs";
7
+ import { formCsrfMiddleware, originCheck, originCheckMiddleware } from "./middlewares/origin-check.mjs";
8
+ import "./middlewares/index.mjs";
9
+ import { accountInfo, getAccessToken, linkSocialAccount, listUserAccounts, refreshToken, unlinkAccount } from "./routes/account.mjs";
10
+ import { callbackOAuth } from "./routes/callback.mjs";
11
+ import { createEmailVerificationToken, sendVerificationEmail, sendVerificationEmailFn, verifyEmail } from "./routes/email-verification.mjs";
12
+ import { error } from "./routes/error.mjs";
13
+ import { ok } from "./routes/ok.mjs";
14
+ import { requestPasswordReset, requestPasswordResetCallback, resetPassword, verifyPassword } from "./routes/password.mjs";
15
+ import { freshSessionMiddleware, getSession, getSessionFromCtx, listSessions, requestOnlySessionMiddleware, revokeOtherSessions, revokeSession, revokeSessions, sensitiveSessionMiddleware, sessionMiddleware } from "./routes/session.mjs";
16
+ import { signInEmail, signInSocial } from "./routes/sign-in.mjs";
17
+ import { signOut } from "./routes/sign-out.mjs";
18
+ import { signUpEmail } from "./routes/sign-up.mjs";
19
+ import { changeEmail, changePassword, deleteUser, deleteUserCallback, setPassword, updateUser } from "./routes/update-user.mjs";
20
+ import "./routes/index.mjs";
21
+ import { getOAuthState } from "./state/oauth.mjs";
22
+ import { getShouldSkipSessionRefresh, setShouldSkipSessionRefresh } from "./state/should-session-refresh.mjs";
23
+ import { AuthContext, Awaitable, BetterAuthOptions, BetterAuthPlugin } from "@better-auth/core";
24
+ import * as _better_auth_core_db0 from "@better-auth/core/db";
25
+ import { InternalLogger } from "@better-auth/core/env";
26
+ import { APIError } from "@better-auth/core/error";
27
+ import * as _better_auth_core_oauth20 from "@better-auth/core/oauth2";
28
+ import * as better_call0 from "better-call";
29
+ import { AuthEndpoint, AuthMiddleware, createAuthEndpoint, createAuthMiddleware, optionsMiddleware } from "@better-auth/core/api";
30
+ import * as zod from "zod";
31
+ import * as zod_v4_core0 from "zod/v4/core";
32
+
33
+ //#region src/api/index.d.ts
34
+ declare function checkEndpointConflicts(options: BetterAuthOptions, logger: InternalLogger): void;
35
+ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<AuthContext>, options: Option): {
36
+ api: {
37
+ readonly ok: better_call0.StrictEndpoint<"/ok", {
38
+ method: "GET";
39
+ metadata: {
40
+ openapi: {
41
+ description: string;
42
+ responses: {
43
+ "200": {
44
+ description: string;
45
+ content: {
46
+ "application/json": {
47
+ schema: {
48
+ type: "object";
49
+ properties: {
50
+ ok: {
51
+ type: string;
52
+ description: string;
53
+ };
54
+ };
55
+ required: string[];
56
+ };
57
+ };
58
+ };
59
+ };
60
+ };
61
+ };
62
+ scope: "server";
63
+ };
64
+ }, {
65
+ ok: boolean;
66
+ }>;
67
+ readonly error: better_call0.StrictEndpoint<"/error", {
68
+ method: "GET";
69
+ metadata: {
70
+ openapi: {
71
+ description: string;
72
+ responses: {
73
+ "200": {
74
+ description: string;
75
+ content: {
76
+ "text/html": {
77
+ schema: {
78
+ type: "string";
79
+ description: string;
80
+ };
81
+ };
82
+ };
83
+ };
84
+ };
85
+ };
86
+ scope: "server";
87
+ };
88
+ }, Response>;
89
+ readonly signInSocial: better_call0.StrictEndpoint<"/sign-in/social", {
90
+ method: "POST";
91
+ operationId: string;
92
+ body: zod.ZodObject<{
93
+ callbackURL: zod.ZodOptional<zod.ZodString>;
94
+ newUserCallbackURL: zod.ZodOptional<zod.ZodString>;
95
+ errorCallbackURL: zod.ZodOptional<zod.ZodString>;
96
+ provider: zod.ZodType<"github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | (string & {}), unknown, zod_v4_core0.$ZodTypeInternals<"github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | (string & {}), unknown>>;
97
+ disableRedirect: zod.ZodOptional<zod.ZodBoolean>;
98
+ idToken: zod.ZodOptional<zod.ZodObject<{
99
+ token: zod.ZodString;
100
+ nonce: zod.ZodOptional<zod.ZodString>;
101
+ accessToken: zod.ZodOptional<zod.ZodString>;
102
+ refreshToken: zod.ZodOptional<zod.ZodString>;
103
+ expiresAt: zod.ZodOptional<zod.ZodNumber>;
104
+ }, zod_v4_core0.$strip>>;
105
+ scopes: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
106
+ requestSignUp: zod.ZodOptional<zod.ZodBoolean>;
107
+ loginHint: zod.ZodOptional<zod.ZodString>;
108
+ additionalData: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodAny>>;
109
+ }, zod_v4_core0.$strip>;
110
+ metadata: {
111
+ $Infer: {
112
+ body: zod.infer<zod.ZodObject<{
113
+ callbackURL: zod.ZodOptional<zod.ZodString>;
114
+ newUserCallbackURL: zod.ZodOptional<zod.ZodString>;
115
+ errorCallbackURL: zod.ZodOptional<zod.ZodString>;
116
+ provider: zod.ZodType<"github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | (string & {}), unknown, zod_v4_core0.$ZodTypeInternals<"github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | (string & {}), unknown>>;
117
+ disableRedirect: zod.ZodOptional<zod.ZodBoolean>;
118
+ idToken: zod.ZodOptional<zod.ZodObject<{
119
+ token: zod.ZodString;
120
+ nonce: zod.ZodOptional<zod.ZodString>;
121
+ accessToken: zod.ZodOptional<zod.ZodString>;
122
+ refreshToken: zod.ZodOptional<zod.ZodString>;
123
+ expiresAt: zod.ZodOptional<zod.ZodNumber>;
124
+ }, zod_v4_core0.$strip>>;
125
+ scopes: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
126
+ requestSignUp: zod.ZodOptional<zod.ZodBoolean>;
127
+ loginHint: zod.ZodOptional<zod.ZodString>;
128
+ additionalData: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodAny>>;
129
+ }, zod_v4_core0.$strip>>;
130
+ returned: {
131
+ redirect: boolean;
132
+ token?: string | undefined;
133
+ url?: string | undefined;
134
+ user?: ({
135
+ id: string;
136
+ createdAt: Date;
137
+ updatedAt: Date;
138
+ email: string;
139
+ emailVerified: boolean;
140
+ name: string;
141
+ image?: string | null | undefined;
142
+ } & _better_auth_core_db0.InferDBFieldsFromOptions<Option["user"]> & _better_auth_core_db0.InferDBFieldsFromPlugins<"user", Option["plugins"]> extends infer T ? { [K in keyof T]: T[K] } : never) | undefined;
143
+ };
144
+ };
145
+ openapi: {
146
+ description: string;
147
+ operationId: string;
148
+ responses: {
149
+ "200": {
150
+ description: string;
151
+ content: {
152
+ "application/json": {
153
+ schema: {
154
+ type: "object";
155
+ description: string;
156
+ properties: {
157
+ token: {
158
+ type: string;
159
+ };
160
+ user: {
161
+ type: string;
162
+ $ref: string;
163
+ };
164
+ url: {
165
+ type: string;
166
+ };
167
+ redirect: {
168
+ type: string;
169
+ enum: boolean[];
170
+ };
171
+ };
172
+ required: string[];
173
+ };
174
+ };
175
+ };
176
+ };
177
+ };
178
+ };
179
+ };
180
+ }, {
181
+ redirect: boolean;
182
+ url: string;
183
+ } | {
184
+ redirect: boolean;
185
+ token: string;
186
+ url: undefined;
187
+ user: {
188
+ id: string;
189
+ createdAt: Date;
190
+ updatedAt: Date;
191
+ email: string;
192
+ emailVerified: boolean;
193
+ name: string;
194
+ image?: string | null | undefined;
195
+ } & _better_auth_core_db0.InferDBFieldsFromOptions<Option["user"]> & _better_auth_core_db0.InferDBFieldsFromPlugins<"user", Option["plugins"]> extends infer T_1 ? { [K in keyof T_1]: T_1[K] } : never;
196
+ }>;
197
+ readonly callbackOAuth: better_call0.StrictEndpoint<"/callback/:id", {
198
+ method: ("GET" | "POST")[];
199
+ operationId: string;
200
+ body: zod.ZodOptional<zod.ZodObject<{
201
+ code: zod.ZodOptional<zod.ZodString>;
202
+ error: zod.ZodOptional<zod.ZodString>;
203
+ device_id: zod.ZodOptional<zod.ZodString>;
204
+ error_description: zod.ZodOptional<zod.ZodString>;
205
+ state: zod.ZodOptional<zod.ZodString>;
206
+ user: zod.ZodOptional<zod.ZodString>;
207
+ }, zod_v4_core0.$strip>>;
208
+ query: zod.ZodOptional<zod.ZodObject<{
209
+ code: zod.ZodOptional<zod.ZodString>;
210
+ error: zod.ZodOptional<zod.ZodString>;
211
+ device_id: zod.ZodOptional<zod.ZodString>;
212
+ error_description: zod.ZodOptional<zod.ZodString>;
213
+ state: zod.ZodOptional<zod.ZodString>;
214
+ user: zod.ZodOptional<zod.ZodString>;
215
+ }, zod_v4_core0.$strip>>;
216
+ metadata: {
217
+ allowedMediaTypes: string[];
218
+ scope: "server";
219
+ };
220
+ }, void>;
221
+ readonly getSession: better_call0.StrictEndpoint<"/get-session", {
222
+ method: ("GET" | "POST")[];
223
+ operationId: string;
224
+ query: zod.ZodOptional<zod.ZodObject<{
225
+ disableCookieCache: zod.ZodOptional<zod.ZodCoercedBoolean<unknown>>;
226
+ disableRefresh: zod.ZodOptional<zod.ZodCoercedBoolean<unknown>>;
227
+ }, zod_v4_core0.$strip>>;
228
+ requireHeaders: true;
229
+ metadata: {
230
+ openapi: {
231
+ operationId: string;
232
+ description: string;
233
+ responses: {
234
+ "200": {
235
+ description: string;
236
+ content: {
237
+ "application/json": {
238
+ schema: {
239
+ type: "object";
240
+ nullable: boolean;
241
+ properties: {
242
+ session: {
243
+ $ref: string;
244
+ };
245
+ user: {
246
+ $ref: string;
247
+ };
248
+ };
249
+ required: string[];
250
+ };
251
+ };
252
+ };
253
+ };
254
+ };
255
+ };
256
+ };
257
+ }, {
258
+ session: {
259
+ id: string;
260
+ createdAt: Date;
261
+ updatedAt: Date;
262
+ userId: string;
263
+ expiresAt: Date;
264
+ token: string;
265
+ ipAddress?: string | null | undefined;
266
+ userAgent?: string | null | undefined;
267
+ } & _better_auth_core_db0.InferDBFieldsFromOptions<Option["session"]> & _better_auth_core_db0.InferDBFieldsFromPlugins<"session", Option["plugins"]> extends infer T_2 ? { [K_1 in keyof T_2]: T_2[K_1] } : never;
268
+ user: {
269
+ id: string;
270
+ createdAt: Date;
271
+ updatedAt: Date;
272
+ email: string;
273
+ emailVerified: boolean;
274
+ name: string;
275
+ image?: string | null | undefined;
276
+ } & _better_auth_core_db0.InferDBFieldsFromOptions<Option["user"]> & _better_auth_core_db0.InferDBFieldsFromPlugins<"user", Option["plugins"]> extends infer T_3 ? { [K in keyof T_3]: T_3[K] } : never;
277
+ } | null>;
278
+ readonly signOut: better_call0.StrictEndpoint<"/sign-out", {
279
+ method: "POST";
280
+ operationId: string;
281
+ requireHeaders: true;
282
+ metadata: {
283
+ openapi: {
284
+ operationId: string;
285
+ description: string;
286
+ responses: {
287
+ "200": {
288
+ description: string;
289
+ content: {
290
+ "application/json": {
291
+ schema: {
292
+ type: "object";
293
+ properties: {
294
+ success: {
295
+ type: string;
296
+ };
297
+ };
298
+ };
299
+ };
300
+ };
301
+ };
302
+ };
303
+ };
304
+ };
305
+ }, {
306
+ success: boolean;
307
+ }>;
308
+ readonly signUpEmail: better_call0.StrictEndpoint<"/sign-up/email", {
309
+ method: "POST";
310
+ operationId: string;
311
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<void>)[];
312
+ body: zod.ZodIntersection<zod.ZodObject<{
313
+ name: zod.ZodString;
314
+ email: zod.ZodEmail;
315
+ password: zod.ZodString;
316
+ image: zod.ZodOptional<zod.ZodString>;
317
+ callbackURL: zod.ZodOptional<zod.ZodString>;
318
+ rememberMe: zod.ZodOptional<zod.ZodBoolean>;
319
+ }, zod_v4_core0.$strip>, zod.ZodRecord<zod.ZodString, zod.ZodAny>>;
320
+ metadata: {
321
+ allowedMediaTypes: string[];
322
+ $Infer: {
323
+ body: {
324
+ name: string;
325
+ email: string;
326
+ password: string;
327
+ image?: string | undefined;
328
+ callbackURL?: string | undefined;
329
+ rememberMe?: boolean | undefined;
330
+ } & _better_auth_core_db0.InferDBFieldsFromPluginsInput<"user", Option["plugins"]> & _better_auth_core_db0.InferDBFieldsFromOptionsInput<Option["user"]>;
331
+ returned: {
332
+ token: string | null;
333
+ user: {
334
+ id: string;
335
+ createdAt: Date;
336
+ updatedAt: Date;
337
+ email: string;
338
+ emailVerified: boolean;
339
+ name: string;
340
+ image?: string | null | undefined;
341
+ } & _better_auth_core_db0.InferDBFieldsFromOptions<Option["user"]> & _better_auth_core_db0.InferDBFieldsFromPlugins<"user", Option["plugins"]> extends infer T_4 ? { [K in keyof T_4]: T_4[K] } : never;
342
+ };
343
+ };
344
+ openapi: {
345
+ operationId: string;
346
+ description: string;
347
+ requestBody: {
348
+ content: {
349
+ "application/json": {
350
+ schema: {
351
+ type: "object";
352
+ properties: {
353
+ name: {
354
+ type: string;
355
+ description: string;
356
+ };
357
+ email: {
358
+ type: string;
359
+ description: string;
360
+ };
361
+ password: {
362
+ type: string;
363
+ description: string;
364
+ };
365
+ image: {
366
+ type: string;
367
+ description: string;
368
+ };
369
+ callbackURL: {
370
+ type: string;
371
+ description: string;
372
+ };
373
+ rememberMe: {
374
+ type: string;
375
+ description: string;
376
+ };
377
+ };
378
+ required: string[];
379
+ };
380
+ };
381
+ };
382
+ };
383
+ responses: {
384
+ "200": {
385
+ description: string;
386
+ content: {
387
+ "application/json": {
388
+ schema: {
389
+ type: "object";
390
+ properties: {
391
+ token: {
392
+ type: string;
393
+ nullable: boolean;
394
+ description: string;
395
+ };
396
+ user: {
397
+ type: string;
398
+ properties: {
399
+ id: {
400
+ type: string;
401
+ description: string;
402
+ };
403
+ email: {
404
+ type: string;
405
+ format: string;
406
+ description: string;
407
+ };
408
+ name: {
409
+ type: string;
410
+ description: string;
411
+ };
412
+ image: {
413
+ type: string;
414
+ format: string;
415
+ nullable: boolean;
416
+ description: string;
417
+ };
418
+ emailVerified: {
419
+ type: string;
420
+ description: string;
421
+ };
422
+ createdAt: {
423
+ type: string;
424
+ format: string;
425
+ description: string;
426
+ };
427
+ updatedAt: {
428
+ type: string;
429
+ format: string;
430
+ description: string;
431
+ };
432
+ };
433
+ required: string[];
434
+ };
435
+ };
436
+ required: string[];
437
+ };
438
+ };
439
+ };
440
+ };
441
+ "422": {
442
+ description: string;
443
+ content: {
444
+ "application/json": {
445
+ schema: {
446
+ type: "object";
447
+ properties: {
448
+ message: {
449
+ type: string;
450
+ };
451
+ };
452
+ };
453
+ };
454
+ };
455
+ };
456
+ };
457
+ };
458
+ };
459
+ }, {
460
+ token: null;
461
+ user: {
462
+ id: string;
463
+ createdAt: Date;
464
+ updatedAt: Date;
465
+ email: string;
466
+ emailVerified: boolean;
467
+ name: string;
468
+ image?: string | null | undefined;
469
+ } & _better_auth_core_db0.InferDBFieldsFromOptions<Option["user"]> & _better_auth_core_db0.InferDBFieldsFromPlugins<"user", Option["plugins"]> extends infer T_5 ? { [K in keyof T_5]: T_5[K] } : never;
470
+ } | {
471
+ token: string;
472
+ user: {
473
+ id: string;
474
+ createdAt: Date;
475
+ updatedAt: Date;
476
+ email: string;
477
+ emailVerified: boolean;
478
+ name: string;
479
+ image?: string | null | undefined;
480
+ } & _better_auth_core_db0.InferDBFieldsFromOptions<Option["user"]> & _better_auth_core_db0.InferDBFieldsFromPlugins<"user", Option["plugins"]> extends infer T_6 ? { [K in keyof T_6]: T_6[K] } : never;
481
+ }>;
482
+ readonly signInEmail: better_call0.StrictEndpoint<"/sign-in/email", {
483
+ method: "POST";
484
+ operationId: string;
485
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<void>)[];
486
+ body: zod.ZodObject<{
487
+ email: zod.ZodString;
488
+ password: zod.ZodString;
489
+ callbackURL: zod.ZodOptional<zod.ZodString>;
490
+ rememberMe: zod.ZodOptional<zod.ZodDefault<zod.ZodBoolean>>;
491
+ }, zod_v4_core0.$strip>;
492
+ metadata: {
493
+ allowedMediaTypes: string[];
494
+ $Infer: {
495
+ body: {
496
+ email: string;
497
+ password: string;
498
+ callbackURL?: string | undefined;
499
+ rememberMe?: boolean | undefined;
500
+ };
501
+ returned: {
502
+ redirect: boolean;
503
+ token: string;
504
+ url?: string | undefined;
505
+ user: {
506
+ id: string;
507
+ createdAt: Date;
508
+ updatedAt: Date;
509
+ email: string;
510
+ emailVerified: boolean;
511
+ name: string;
512
+ image?: string | null | undefined;
513
+ } & _better_auth_core_db0.InferDBFieldsFromOptions<Option["user"]> & _better_auth_core_db0.InferDBFieldsFromPlugins<"user", Option["plugins"]> extends infer T_7 ? { [K in keyof T_7]: T_7[K] } : never;
514
+ };
515
+ };
516
+ openapi: {
517
+ operationId: string;
518
+ description: string;
519
+ responses: {
520
+ "200": {
521
+ description: string;
522
+ content: {
523
+ "application/json": {
524
+ schema: {
525
+ type: "object";
526
+ description: string;
527
+ properties: {
528
+ redirect: {
529
+ type: string;
530
+ enum: boolean[];
531
+ };
532
+ token: {
533
+ type: string;
534
+ description: string;
535
+ };
536
+ url: {
537
+ type: string;
538
+ nullable: boolean;
539
+ };
540
+ user: {
541
+ type: string;
542
+ $ref: string;
543
+ };
544
+ };
545
+ required: string[];
546
+ };
547
+ };
548
+ };
549
+ };
550
+ };
551
+ };
552
+ };
553
+ }, {
554
+ redirect: boolean;
555
+ token: string;
556
+ url?: string | undefined;
557
+ user: {
558
+ id: string;
559
+ createdAt: Date;
560
+ updatedAt: Date;
561
+ email: string;
562
+ emailVerified: boolean;
563
+ name: string;
564
+ image?: string | null | undefined;
565
+ } & _better_auth_core_db0.InferDBFieldsFromOptions<Option["user"]> & _better_auth_core_db0.InferDBFieldsFromPlugins<"user", Option["plugins"]> extends infer T_8 ? { [K in keyof T_8]: T_8[K] } : never;
566
+ }>;
567
+ readonly resetPassword: better_call0.StrictEndpoint<"/reset-password", {
568
+ method: "POST";
569
+ operationId: string;
570
+ query: zod.ZodOptional<zod.ZodObject<{
571
+ token: zod.ZodOptional<zod.ZodString>;
572
+ }, zod_v4_core0.$strip>>;
573
+ body: zod.ZodObject<{
574
+ newPassword: zod.ZodString;
575
+ token: zod.ZodOptional<zod.ZodString>;
576
+ }, zod_v4_core0.$strip>;
577
+ metadata: {
578
+ openapi: {
579
+ operationId: string;
580
+ description: string;
581
+ responses: {
582
+ "200": {
583
+ description: string;
584
+ content: {
585
+ "application/json": {
586
+ schema: {
587
+ type: "object";
588
+ properties: {
589
+ status: {
590
+ type: string;
591
+ };
592
+ };
593
+ };
594
+ };
595
+ };
596
+ };
597
+ };
598
+ };
599
+ };
600
+ }, {
601
+ status: boolean;
602
+ }>;
603
+ readonly verifyPassword: better_call0.StrictEndpoint<"/verify-password", {
604
+ method: "POST";
605
+ body: zod.ZodObject<{
606
+ password: zod.ZodString;
607
+ }, zod_v4_core0.$strip>;
608
+ metadata: {
609
+ scope: "server";
610
+ openapi: {
611
+ operationId: string;
612
+ description: string;
613
+ responses: {
614
+ "200": {
615
+ description: string;
616
+ content: {
617
+ "application/json": {
618
+ schema: {
619
+ type: "object";
620
+ properties: {
621
+ status: {
622
+ type: string;
623
+ };
624
+ };
625
+ };
626
+ };
627
+ };
628
+ };
629
+ };
630
+ };
631
+ };
632
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
633
+ session: {
634
+ session: Record<string, any> & {
635
+ id: string;
636
+ createdAt: Date;
637
+ updatedAt: Date;
638
+ userId: string;
639
+ expiresAt: Date;
640
+ token: string;
641
+ ipAddress?: string | null | undefined;
642
+ userAgent?: string | null | undefined;
643
+ };
644
+ user: Record<string, any> & {
645
+ id: string;
646
+ createdAt: Date;
647
+ updatedAt: Date;
648
+ email: string;
649
+ emailVerified: boolean;
650
+ name: string;
651
+ image?: string | null | undefined;
652
+ };
653
+ };
654
+ }>)[];
655
+ }, {
656
+ status: boolean;
657
+ }>;
658
+ readonly verifyEmail: better_call0.StrictEndpoint<"/verify-email", {
659
+ method: "GET";
660
+ operationId: string;
661
+ query: zod.ZodObject<{
662
+ token: zod.ZodString;
663
+ callbackURL: zod.ZodOptional<zod.ZodString>;
664
+ }, zod_v4_core0.$strip>;
665
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<void>)[];
666
+ metadata: {
667
+ openapi: {
668
+ description: string;
669
+ parameters: ({
670
+ name: string;
671
+ in: "query";
672
+ description: string;
673
+ required: true;
674
+ schema: {
675
+ type: "string";
676
+ };
677
+ } | {
678
+ name: string;
679
+ in: "query";
680
+ description: string;
681
+ required: false;
682
+ schema: {
683
+ type: "string";
684
+ };
685
+ })[];
686
+ responses: {
687
+ "200": {
688
+ description: string;
689
+ content: {
690
+ "application/json": {
691
+ schema: {
692
+ type: "object";
693
+ properties: {
694
+ user: {
695
+ type: string;
696
+ $ref: string;
697
+ };
698
+ status: {
699
+ type: string;
700
+ description: string;
701
+ };
702
+ };
703
+ required: string[];
704
+ };
705
+ };
706
+ };
707
+ };
708
+ };
709
+ };
710
+ };
711
+ }, void | {
712
+ status: boolean;
713
+ }>;
714
+ readonly sendVerificationEmail: better_call0.StrictEndpoint<"/send-verification-email", {
715
+ method: "POST";
716
+ operationId: string;
717
+ body: zod.ZodObject<{
718
+ email: zod.ZodEmail;
719
+ callbackURL: zod.ZodOptional<zod.ZodString>;
720
+ }, zod_v4_core0.$strip>;
721
+ metadata: {
722
+ openapi: {
723
+ operationId: string;
724
+ description: string;
725
+ requestBody: {
726
+ content: {
727
+ "application/json": {
728
+ schema: {
729
+ type: "object";
730
+ properties: {
731
+ email: {
732
+ type: string;
733
+ description: string;
734
+ example: string;
735
+ };
736
+ callbackURL: {
737
+ type: string;
738
+ description: string;
739
+ example: string;
740
+ nullable: boolean;
741
+ };
742
+ };
743
+ required: string[];
744
+ };
745
+ };
746
+ };
747
+ };
748
+ responses: {
749
+ "200": {
750
+ description: string;
751
+ content: {
752
+ "application/json": {
753
+ schema: {
754
+ type: "object";
755
+ properties: {
756
+ status: {
757
+ type: string;
758
+ description: string;
759
+ example: boolean;
760
+ };
761
+ };
762
+ };
763
+ };
764
+ };
765
+ };
766
+ "400": {
767
+ description: string;
768
+ content: {
769
+ "application/json": {
770
+ schema: {
771
+ type: "object";
772
+ properties: {
773
+ message: {
774
+ type: string;
775
+ description: string;
776
+ example: string;
777
+ };
778
+ };
779
+ };
780
+ };
781
+ };
782
+ };
783
+ };
784
+ };
785
+ };
786
+ }, {
787
+ status: boolean;
788
+ }>;
789
+ readonly changeEmail: better_call0.StrictEndpoint<"/change-email", {
790
+ method: "POST";
791
+ body: zod.ZodObject<{
792
+ newEmail: zod.ZodEmail;
793
+ callbackURL: zod.ZodOptional<zod.ZodString>;
794
+ }, zod_v4_core0.$strip>;
795
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
796
+ session: {
797
+ session: Record<string, any> & {
798
+ id: string;
799
+ createdAt: Date;
800
+ updatedAt: Date;
801
+ userId: string;
802
+ expiresAt: Date;
803
+ token: string;
804
+ ipAddress?: string | null | undefined;
805
+ userAgent?: string | null | undefined;
806
+ };
807
+ user: Record<string, any> & {
808
+ id: string;
809
+ createdAt: Date;
810
+ updatedAt: Date;
811
+ email: string;
812
+ emailVerified: boolean;
813
+ name: string;
814
+ image?: string | null | undefined;
815
+ };
816
+ };
817
+ }>)[];
818
+ metadata: {
819
+ openapi: {
820
+ operationId: string;
821
+ responses: {
822
+ "200": {
823
+ description: string;
824
+ content: {
825
+ "application/json": {
826
+ schema: {
827
+ type: "object";
828
+ properties: {
829
+ user: {
830
+ type: string;
831
+ $ref: string;
832
+ };
833
+ status: {
834
+ type: string;
835
+ description: string;
836
+ };
837
+ message: {
838
+ type: string;
839
+ enum: string[];
840
+ description: string;
841
+ nullable: boolean;
842
+ };
843
+ };
844
+ required: string[];
845
+ };
846
+ };
847
+ };
848
+ };
849
+ "422": {
850
+ description: string;
851
+ content: {
852
+ "application/json": {
853
+ schema: {
854
+ type: "object";
855
+ properties: {
856
+ message: {
857
+ type: string;
858
+ };
859
+ };
860
+ };
861
+ };
862
+ };
863
+ };
864
+ };
865
+ };
866
+ };
867
+ }, {
868
+ status: boolean;
869
+ }>;
870
+ readonly changePassword: better_call0.StrictEndpoint<"/change-password", {
871
+ method: "POST";
872
+ operationId: string;
873
+ body: zod.ZodObject<{
874
+ newPassword: zod.ZodString;
875
+ currentPassword: zod.ZodString;
876
+ revokeOtherSessions: zod.ZodOptional<zod.ZodBoolean>;
877
+ }, zod_v4_core0.$strip>;
878
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
879
+ session: {
880
+ session: Record<string, any> & {
881
+ id: string;
882
+ createdAt: Date;
883
+ updatedAt: Date;
884
+ userId: string;
885
+ expiresAt: Date;
886
+ token: string;
887
+ ipAddress?: string | null | undefined;
888
+ userAgent?: string | null | undefined;
889
+ };
890
+ user: Record<string, any> & {
891
+ id: string;
892
+ createdAt: Date;
893
+ updatedAt: Date;
894
+ email: string;
895
+ emailVerified: boolean;
896
+ name: string;
897
+ image?: string | null | undefined;
898
+ };
899
+ };
900
+ }>)[];
901
+ metadata: {
902
+ openapi: {
903
+ operationId: string;
904
+ description: string;
905
+ responses: {
906
+ "200": {
907
+ description: string;
908
+ content: {
909
+ "application/json": {
910
+ schema: {
911
+ type: "object";
912
+ properties: {
913
+ token: {
914
+ type: string;
915
+ nullable: boolean;
916
+ description: string;
917
+ };
918
+ user: {
919
+ type: string;
920
+ properties: {
921
+ id: {
922
+ type: string;
923
+ description: string;
924
+ };
925
+ email: {
926
+ type: string;
927
+ format: string;
928
+ description: string;
929
+ };
930
+ name: {
931
+ type: string;
932
+ description: string;
933
+ };
934
+ image: {
935
+ type: string;
936
+ format: string;
937
+ nullable: boolean;
938
+ description: string;
939
+ };
940
+ emailVerified: {
941
+ type: string;
942
+ description: string;
943
+ };
944
+ createdAt: {
945
+ type: string;
946
+ format: string;
947
+ description: string;
948
+ };
949
+ updatedAt: {
950
+ type: string;
951
+ format: string;
952
+ description: string;
953
+ };
954
+ };
955
+ required: string[];
956
+ };
957
+ };
958
+ required: string[];
959
+ };
960
+ };
961
+ };
962
+ };
963
+ };
964
+ };
965
+ };
966
+ }, {
967
+ token: string | null;
968
+ user: {
969
+ id: string;
970
+ createdAt: Date;
971
+ updatedAt: Date;
972
+ email: string;
973
+ emailVerified: boolean;
974
+ name: string;
975
+ image?: string | null | undefined;
976
+ } & Record<string, any> & {
977
+ id: string;
978
+ createdAt: Date;
979
+ updatedAt: Date;
980
+ email: string;
981
+ emailVerified: boolean;
982
+ name: string;
983
+ image?: string | null | undefined;
984
+ };
985
+ }>;
986
+ readonly setPassword: better_call0.StrictEndpoint<string, {
987
+ method: "POST";
988
+ body: zod.ZodObject<{
989
+ newPassword: zod.ZodString;
990
+ }, zod_v4_core0.$strip>;
991
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
992
+ session: {
993
+ session: Record<string, any> & {
994
+ id: string;
995
+ createdAt: Date;
996
+ updatedAt: Date;
997
+ userId: string;
998
+ expiresAt: Date;
999
+ token: string;
1000
+ ipAddress?: string | null | undefined;
1001
+ userAgent?: string | null | undefined;
1002
+ };
1003
+ user: Record<string, any> & {
1004
+ id: string;
1005
+ createdAt: Date;
1006
+ updatedAt: Date;
1007
+ email: string;
1008
+ emailVerified: boolean;
1009
+ name: string;
1010
+ image?: string | null | undefined;
1011
+ };
1012
+ };
1013
+ }>)[];
1014
+ }, {
1015
+ status: boolean;
1016
+ }>;
1017
+ readonly updateUser: better_call0.StrictEndpoint<"/update-user", {
1018
+ method: "POST";
1019
+ operationId: string;
1020
+ body: zod.ZodRecord<zod.ZodString, zod.ZodAny>;
1021
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
1022
+ session: {
1023
+ session: Record<string, any> & {
1024
+ id: string;
1025
+ createdAt: Date;
1026
+ updatedAt: Date;
1027
+ userId: string;
1028
+ expiresAt: Date;
1029
+ token: string;
1030
+ ipAddress?: string | null | undefined;
1031
+ userAgent?: string | null | undefined;
1032
+ };
1033
+ user: Record<string, any> & {
1034
+ id: string;
1035
+ createdAt: Date;
1036
+ updatedAt: Date;
1037
+ email: string;
1038
+ emailVerified: boolean;
1039
+ name: string;
1040
+ image?: string | null | undefined;
1041
+ };
1042
+ };
1043
+ }>)[];
1044
+ metadata: {
1045
+ $Infer: {
1046
+ body: Partial<AdditionalUserFieldsInput<Option>> & {
1047
+ name?: string | undefined;
1048
+ image?: string | undefined | null;
1049
+ };
1050
+ };
1051
+ openapi: {
1052
+ operationId: string;
1053
+ description: string;
1054
+ requestBody: {
1055
+ content: {
1056
+ "application/json": {
1057
+ schema: {
1058
+ type: "object";
1059
+ properties: {
1060
+ name: {
1061
+ type: string;
1062
+ description: string;
1063
+ };
1064
+ image: {
1065
+ type: string;
1066
+ description: string;
1067
+ nullable: boolean;
1068
+ };
1069
+ };
1070
+ };
1071
+ };
1072
+ };
1073
+ };
1074
+ responses: {
1075
+ "200": {
1076
+ description: string;
1077
+ content: {
1078
+ "application/json": {
1079
+ schema: {
1080
+ type: "object";
1081
+ properties: {
1082
+ user: {
1083
+ type: string;
1084
+ $ref: string;
1085
+ };
1086
+ };
1087
+ };
1088
+ };
1089
+ };
1090
+ };
1091
+ };
1092
+ };
1093
+ };
1094
+ }, {
1095
+ status: boolean;
1096
+ }>;
1097
+ readonly deleteUser: better_call0.StrictEndpoint<"/delete-user", {
1098
+ method: "POST";
1099
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
1100
+ session: {
1101
+ session: Record<string, any> & {
1102
+ id: string;
1103
+ createdAt: Date;
1104
+ updatedAt: Date;
1105
+ userId: string;
1106
+ expiresAt: Date;
1107
+ token: string;
1108
+ ipAddress?: string | null | undefined;
1109
+ userAgent?: string | null | undefined;
1110
+ };
1111
+ user: Record<string, any> & {
1112
+ id: string;
1113
+ createdAt: Date;
1114
+ updatedAt: Date;
1115
+ email: string;
1116
+ emailVerified: boolean;
1117
+ name: string;
1118
+ image?: string | null | undefined;
1119
+ };
1120
+ };
1121
+ }>)[];
1122
+ body: zod.ZodObject<{
1123
+ callbackURL: zod.ZodOptional<zod.ZodString>;
1124
+ password: zod.ZodOptional<zod.ZodString>;
1125
+ token: zod.ZodOptional<zod.ZodString>;
1126
+ }, zod_v4_core0.$strip>;
1127
+ metadata: {
1128
+ openapi: {
1129
+ operationId: string;
1130
+ description: string;
1131
+ requestBody: {
1132
+ content: {
1133
+ "application/json": {
1134
+ schema: {
1135
+ type: "object";
1136
+ properties: {
1137
+ callbackURL: {
1138
+ type: string;
1139
+ description: string;
1140
+ };
1141
+ password: {
1142
+ type: string;
1143
+ description: string;
1144
+ };
1145
+ token: {
1146
+ type: string;
1147
+ description: string;
1148
+ };
1149
+ };
1150
+ };
1151
+ };
1152
+ };
1153
+ };
1154
+ responses: {
1155
+ "200": {
1156
+ description: string;
1157
+ content: {
1158
+ "application/json": {
1159
+ schema: {
1160
+ type: "object";
1161
+ properties: {
1162
+ success: {
1163
+ type: string;
1164
+ description: string;
1165
+ };
1166
+ message: {
1167
+ type: string;
1168
+ enum: string[];
1169
+ description: string;
1170
+ };
1171
+ };
1172
+ required: string[];
1173
+ };
1174
+ };
1175
+ };
1176
+ };
1177
+ };
1178
+ };
1179
+ };
1180
+ }, {
1181
+ success: boolean;
1182
+ message: string;
1183
+ }>;
1184
+ readonly requestPasswordReset: better_call0.StrictEndpoint<"/request-password-reset", {
1185
+ method: "POST";
1186
+ body: zod.ZodObject<{
1187
+ email: zod.ZodEmail;
1188
+ redirectTo: zod.ZodOptional<zod.ZodString>;
1189
+ }, zod_v4_core0.$strip>;
1190
+ metadata: {
1191
+ openapi: {
1192
+ operationId: string;
1193
+ description: string;
1194
+ responses: {
1195
+ "200": {
1196
+ description: string;
1197
+ content: {
1198
+ "application/json": {
1199
+ schema: {
1200
+ type: "object";
1201
+ properties: {
1202
+ status: {
1203
+ type: string;
1204
+ };
1205
+ message: {
1206
+ type: string;
1207
+ };
1208
+ };
1209
+ };
1210
+ };
1211
+ };
1212
+ };
1213
+ };
1214
+ };
1215
+ };
1216
+ }, {
1217
+ status: boolean;
1218
+ message: string;
1219
+ }>;
1220
+ readonly requestPasswordResetCallback: better_call0.StrictEndpoint<"/reset-password/:token", {
1221
+ method: "GET";
1222
+ operationId: string;
1223
+ query: zod.ZodObject<{
1224
+ callbackURL: zod.ZodString;
1225
+ }, zod_v4_core0.$strip>;
1226
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<void>)[];
1227
+ metadata: {
1228
+ openapi: {
1229
+ operationId: string;
1230
+ description: string;
1231
+ parameters: ({
1232
+ name: string;
1233
+ in: "path";
1234
+ required: true;
1235
+ description: string;
1236
+ schema: {
1237
+ type: "string";
1238
+ };
1239
+ } | {
1240
+ name: string;
1241
+ in: "query";
1242
+ required: true;
1243
+ description: string;
1244
+ schema: {
1245
+ type: "string";
1246
+ };
1247
+ })[];
1248
+ responses: {
1249
+ "200": {
1250
+ description: string;
1251
+ content: {
1252
+ "application/json": {
1253
+ schema: {
1254
+ type: "object";
1255
+ properties: {
1256
+ token: {
1257
+ type: string;
1258
+ };
1259
+ };
1260
+ };
1261
+ };
1262
+ };
1263
+ };
1264
+ };
1265
+ };
1266
+ };
1267
+ }, never>;
1268
+ readonly listSessions: better_call0.StrictEndpoint<"/list-sessions", {
1269
+ method: "GET";
1270
+ operationId: string;
1271
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
1272
+ session: {
1273
+ session: Record<string, any> & {
1274
+ id: string;
1275
+ createdAt: Date;
1276
+ updatedAt: Date;
1277
+ userId: string;
1278
+ expiresAt: Date;
1279
+ token: string;
1280
+ ipAddress?: string | null | undefined;
1281
+ userAgent?: string | null | undefined;
1282
+ };
1283
+ user: Record<string, any> & {
1284
+ id: string;
1285
+ createdAt: Date;
1286
+ updatedAt: Date;
1287
+ email: string;
1288
+ emailVerified: boolean;
1289
+ name: string;
1290
+ image?: string | null | undefined;
1291
+ };
1292
+ };
1293
+ }>)[];
1294
+ requireHeaders: true;
1295
+ metadata: {
1296
+ openapi: {
1297
+ operationId: string;
1298
+ description: string;
1299
+ responses: {
1300
+ "200": {
1301
+ description: string;
1302
+ content: {
1303
+ "application/json": {
1304
+ schema: {
1305
+ type: "array";
1306
+ items: {
1307
+ $ref: string;
1308
+ };
1309
+ };
1310
+ };
1311
+ };
1312
+ };
1313
+ };
1314
+ };
1315
+ };
1316
+ }, Prettify$1<{
1317
+ id: string;
1318
+ createdAt: Date;
1319
+ updatedAt: Date;
1320
+ userId: string;
1321
+ expiresAt: Date;
1322
+ token: string;
1323
+ ipAddress?: string | null | undefined;
1324
+ userAgent?: string | null | undefined;
1325
+ } & _better_auth_core_db0.InferDBFieldsFromOptions<Option["session"]> & _better_auth_core_db0.InferDBFieldsFromPlugins<"session", Option["plugins"]> extends infer T_9 ? { [K_1 in keyof T_9]: T_9[K_1] } : never>[]>;
1326
+ readonly revokeSession: better_call0.StrictEndpoint<"/revoke-session", {
1327
+ method: "POST";
1328
+ body: zod.ZodObject<{
1329
+ token: zod.ZodString;
1330
+ }, zod_v4_core0.$strip>;
1331
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
1332
+ session: {
1333
+ session: Record<string, any> & {
1334
+ id: string;
1335
+ createdAt: Date;
1336
+ updatedAt: Date;
1337
+ userId: string;
1338
+ expiresAt: Date;
1339
+ token: string;
1340
+ ipAddress?: string | null | undefined;
1341
+ userAgent?: string | null | undefined;
1342
+ };
1343
+ user: Record<string, any> & {
1344
+ id: string;
1345
+ createdAt: Date;
1346
+ updatedAt: Date;
1347
+ email: string;
1348
+ emailVerified: boolean;
1349
+ name: string;
1350
+ image?: string | null | undefined;
1351
+ };
1352
+ };
1353
+ }>)[];
1354
+ requireHeaders: true;
1355
+ metadata: {
1356
+ openapi: {
1357
+ description: string;
1358
+ requestBody: {
1359
+ content: {
1360
+ "application/json": {
1361
+ schema: {
1362
+ type: "object";
1363
+ properties: {
1364
+ token: {
1365
+ type: string;
1366
+ description: string;
1367
+ };
1368
+ };
1369
+ required: string[];
1370
+ };
1371
+ };
1372
+ };
1373
+ };
1374
+ responses: {
1375
+ "200": {
1376
+ description: string;
1377
+ content: {
1378
+ "application/json": {
1379
+ schema: {
1380
+ type: "object";
1381
+ properties: {
1382
+ status: {
1383
+ type: string;
1384
+ description: string;
1385
+ };
1386
+ };
1387
+ required: string[];
1388
+ };
1389
+ };
1390
+ };
1391
+ };
1392
+ };
1393
+ };
1394
+ };
1395
+ }, {
1396
+ status: boolean;
1397
+ }>;
1398
+ readonly revokeSessions: better_call0.StrictEndpoint<"/revoke-sessions", {
1399
+ method: "POST";
1400
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
1401
+ session: {
1402
+ session: Record<string, any> & {
1403
+ id: string;
1404
+ createdAt: Date;
1405
+ updatedAt: Date;
1406
+ userId: string;
1407
+ expiresAt: Date;
1408
+ token: string;
1409
+ ipAddress?: string | null | undefined;
1410
+ userAgent?: string | null | undefined;
1411
+ };
1412
+ user: Record<string, any> & {
1413
+ id: string;
1414
+ createdAt: Date;
1415
+ updatedAt: Date;
1416
+ email: string;
1417
+ emailVerified: boolean;
1418
+ name: string;
1419
+ image?: string | null | undefined;
1420
+ };
1421
+ };
1422
+ }>)[];
1423
+ requireHeaders: true;
1424
+ metadata: {
1425
+ openapi: {
1426
+ description: string;
1427
+ responses: {
1428
+ "200": {
1429
+ description: string;
1430
+ content: {
1431
+ "application/json": {
1432
+ schema: {
1433
+ type: "object";
1434
+ properties: {
1435
+ status: {
1436
+ type: string;
1437
+ description: string;
1438
+ };
1439
+ };
1440
+ required: string[];
1441
+ };
1442
+ };
1443
+ };
1444
+ };
1445
+ };
1446
+ };
1447
+ };
1448
+ }, {
1449
+ status: boolean;
1450
+ }>;
1451
+ readonly revokeOtherSessions: better_call0.StrictEndpoint<"/revoke-other-sessions", {
1452
+ method: "POST";
1453
+ requireHeaders: true;
1454
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
1455
+ session: {
1456
+ session: Record<string, any> & {
1457
+ id: string;
1458
+ createdAt: Date;
1459
+ updatedAt: Date;
1460
+ userId: string;
1461
+ expiresAt: Date;
1462
+ token: string;
1463
+ ipAddress?: string | null | undefined;
1464
+ userAgent?: string | null | undefined;
1465
+ };
1466
+ user: Record<string, any> & {
1467
+ id: string;
1468
+ createdAt: Date;
1469
+ updatedAt: Date;
1470
+ email: string;
1471
+ emailVerified: boolean;
1472
+ name: string;
1473
+ image?: string | null | undefined;
1474
+ };
1475
+ };
1476
+ }>)[];
1477
+ metadata: {
1478
+ openapi: {
1479
+ description: string;
1480
+ responses: {
1481
+ "200": {
1482
+ description: string;
1483
+ content: {
1484
+ "application/json": {
1485
+ schema: {
1486
+ type: "object";
1487
+ properties: {
1488
+ status: {
1489
+ type: string;
1490
+ description: string;
1491
+ };
1492
+ };
1493
+ required: string[];
1494
+ };
1495
+ };
1496
+ };
1497
+ };
1498
+ };
1499
+ };
1500
+ };
1501
+ }, {
1502
+ status: boolean;
1503
+ }>;
1504
+ readonly linkSocialAccount: better_call0.StrictEndpoint<"/link-social", {
1505
+ method: "POST";
1506
+ requireHeaders: true;
1507
+ body: zod.ZodObject<{
1508
+ callbackURL: zod.ZodOptional<zod.ZodString>;
1509
+ provider: zod.ZodType<"github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | (string & {}), unknown, zod_v4_core0.$ZodTypeInternals<"github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | (string & {}), unknown>>;
1510
+ idToken: zod.ZodOptional<zod.ZodObject<{
1511
+ token: zod.ZodString;
1512
+ nonce: zod.ZodOptional<zod.ZodString>;
1513
+ accessToken: zod.ZodOptional<zod.ZodString>;
1514
+ refreshToken: zod.ZodOptional<zod.ZodString>;
1515
+ scopes: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
1516
+ }, zod_v4_core0.$strip>>;
1517
+ requestSignUp: zod.ZodOptional<zod.ZodBoolean>;
1518
+ scopes: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
1519
+ errorCallbackURL: zod.ZodOptional<zod.ZodString>;
1520
+ disableRedirect: zod.ZodOptional<zod.ZodBoolean>;
1521
+ additionalData: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodAny>>;
1522
+ }, zod_v4_core0.$strip>;
1523
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
1524
+ session: {
1525
+ session: Record<string, any> & {
1526
+ id: string;
1527
+ createdAt: Date;
1528
+ updatedAt: Date;
1529
+ userId: string;
1530
+ expiresAt: Date;
1531
+ token: string;
1532
+ ipAddress?: string | null | undefined;
1533
+ userAgent?: string | null | undefined;
1534
+ };
1535
+ user: Record<string, any> & {
1536
+ id: string;
1537
+ createdAt: Date;
1538
+ updatedAt: Date;
1539
+ email: string;
1540
+ emailVerified: boolean;
1541
+ name: string;
1542
+ image?: string | null | undefined;
1543
+ };
1544
+ };
1545
+ }>)[];
1546
+ metadata: {
1547
+ openapi: {
1548
+ description: string;
1549
+ operationId: string;
1550
+ responses: {
1551
+ "200": {
1552
+ description: string;
1553
+ content: {
1554
+ "application/json": {
1555
+ schema: {
1556
+ type: "object";
1557
+ properties: {
1558
+ url: {
1559
+ type: string;
1560
+ description: string;
1561
+ };
1562
+ redirect: {
1563
+ type: string;
1564
+ description: string;
1565
+ };
1566
+ status: {
1567
+ type: string;
1568
+ };
1569
+ };
1570
+ required: string[];
1571
+ };
1572
+ };
1573
+ };
1574
+ };
1575
+ };
1576
+ };
1577
+ };
1578
+ }, {
1579
+ url: string;
1580
+ redirect: boolean;
1581
+ }>;
1582
+ readonly listUserAccounts: better_call0.StrictEndpoint<"/list-accounts", {
1583
+ method: "GET";
1584
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
1585
+ session: {
1586
+ session: Record<string, any> & {
1587
+ id: string;
1588
+ createdAt: Date;
1589
+ updatedAt: Date;
1590
+ userId: string;
1591
+ expiresAt: Date;
1592
+ token: string;
1593
+ ipAddress?: string | null | undefined;
1594
+ userAgent?: string | null | undefined;
1595
+ };
1596
+ user: Record<string, any> & {
1597
+ id: string;
1598
+ createdAt: Date;
1599
+ updatedAt: Date;
1600
+ email: string;
1601
+ emailVerified: boolean;
1602
+ name: string;
1603
+ image?: string | null | undefined;
1604
+ };
1605
+ };
1606
+ }>)[];
1607
+ metadata: {
1608
+ openapi: {
1609
+ operationId: string;
1610
+ description: string;
1611
+ responses: {
1612
+ "200": {
1613
+ description: string;
1614
+ content: {
1615
+ "application/json": {
1616
+ schema: {
1617
+ type: "array";
1618
+ items: {
1619
+ type: string;
1620
+ properties: {
1621
+ id: {
1622
+ type: string;
1623
+ };
1624
+ providerId: {
1625
+ type: string;
1626
+ };
1627
+ createdAt: {
1628
+ type: string;
1629
+ format: string;
1630
+ };
1631
+ updatedAt: {
1632
+ type: string;
1633
+ format: string;
1634
+ };
1635
+ accountId: {
1636
+ type: string;
1637
+ };
1638
+ userId: {
1639
+ type: string;
1640
+ };
1641
+ scopes: {
1642
+ type: string;
1643
+ items: {
1644
+ type: string;
1645
+ };
1646
+ };
1647
+ };
1648
+ required: string[];
1649
+ };
1650
+ };
1651
+ };
1652
+ };
1653
+ };
1654
+ };
1655
+ };
1656
+ };
1657
+ }, {
1658
+ scopes: string[];
1659
+ id: string;
1660
+ createdAt: Date;
1661
+ updatedAt: Date;
1662
+ providerId: string;
1663
+ accountId: string;
1664
+ userId: string;
1665
+ }[]>;
1666
+ readonly deleteUserCallback: better_call0.StrictEndpoint<"/delete-user/callback", {
1667
+ method: "GET";
1668
+ query: zod.ZodObject<{
1669
+ token: zod.ZodString;
1670
+ callbackURL: zod.ZodOptional<zod.ZodString>;
1671
+ }, zod_v4_core0.$strip>;
1672
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<void>)[];
1673
+ metadata: {
1674
+ openapi: {
1675
+ description: string;
1676
+ responses: {
1677
+ "200": {
1678
+ description: string;
1679
+ content: {
1680
+ "application/json": {
1681
+ schema: {
1682
+ type: "object";
1683
+ properties: {
1684
+ success: {
1685
+ type: string;
1686
+ description: string;
1687
+ };
1688
+ message: {
1689
+ type: string;
1690
+ enum: string[];
1691
+ description: string;
1692
+ };
1693
+ };
1694
+ required: string[];
1695
+ };
1696
+ };
1697
+ };
1698
+ };
1699
+ };
1700
+ };
1701
+ };
1702
+ }, {
1703
+ success: boolean;
1704
+ message: string;
1705
+ }>;
1706
+ readonly unlinkAccount: better_call0.StrictEndpoint<"/unlink-account", {
1707
+ method: "POST";
1708
+ body: zod.ZodObject<{
1709
+ providerId: zod.ZodString;
1710
+ accountId: zod.ZodOptional<zod.ZodString>;
1711
+ }, zod_v4_core0.$strip>;
1712
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
1713
+ session: {
1714
+ session: Record<string, any> & {
1715
+ id: string;
1716
+ createdAt: Date;
1717
+ updatedAt: Date;
1718
+ userId: string;
1719
+ expiresAt: Date;
1720
+ token: string;
1721
+ ipAddress?: string | null | undefined;
1722
+ userAgent?: string | null | undefined;
1723
+ };
1724
+ user: Record<string, any> & {
1725
+ id: string;
1726
+ createdAt: Date;
1727
+ updatedAt: Date;
1728
+ email: string;
1729
+ emailVerified: boolean;
1730
+ name: string;
1731
+ image?: string | null | undefined;
1732
+ };
1733
+ };
1734
+ }>)[];
1735
+ metadata: {
1736
+ openapi: {
1737
+ description: string;
1738
+ responses: {
1739
+ "200": {
1740
+ description: string;
1741
+ content: {
1742
+ "application/json": {
1743
+ schema: {
1744
+ type: "object";
1745
+ properties: {
1746
+ status: {
1747
+ type: string;
1748
+ };
1749
+ };
1750
+ };
1751
+ };
1752
+ };
1753
+ };
1754
+ };
1755
+ };
1756
+ };
1757
+ }, {
1758
+ status: boolean;
1759
+ }>;
1760
+ readonly refreshToken: better_call0.StrictEndpoint<"/refresh-token", {
1761
+ method: "POST";
1762
+ body: zod.ZodObject<{
1763
+ providerId: zod.ZodString;
1764
+ accountId: zod.ZodOptional<zod.ZodString>;
1765
+ userId: zod.ZodOptional<zod.ZodString>;
1766
+ }, zod_v4_core0.$strip>;
1767
+ metadata: {
1768
+ openapi: {
1769
+ description: string;
1770
+ responses: {
1771
+ 200: {
1772
+ description: string;
1773
+ content: {
1774
+ "application/json": {
1775
+ schema: {
1776
+ type: "object";
1777
+ properties: {
1778
+ tokenType: {
1779
+ type: string;
1780
+ };
1781
+ idToken: {
1782
+ type: string;
1783
+ };
1784
+ accessToken: {
1785
+ type: string;
1786
+ };
1787
+ refreshToken: {
1788
+ type: string;
1789
+ };
1790
+ accessTokenExpiresAt: {
1791
+ type: string;
1792
+ format: string;
1793
+ };
1794
+ refreshTokenExpiresAt: {
1795
+ type: string;
1796
+ format: string;
1797
+ };
1798
+ };
1799
+ };
1800
+ };
1801
+ };
1802
+ };
1803
+ 400: {
1804
+ description: string;
1805
+ };
1806
+ };
1807
+ };
1808
+ };
1809
+ }, {
1810
+ accessToken: string | undefined;
1811
+ refreshToken: string | undefined;
1812
+ accessTokenExpiresAt: Date | undefined;
1813
+ refreshTokenExpiresAt: Date | undefined;
1814
+ scope: string | null | undefined;
1815
+ idToken: string | null | undefined;
1816
+ providerId: string;
1817
+ accountId: string;
1818
+ }>;
1819
+ readonly getAccessToken: better_call0.StrictEndpoint<"/get-access-token", {
1820
+ method: "POST";
1821
+ body: zod.ZodObject<{
1822
+ providerId: zod.ZodString;
1823
+ accountId: zod.ZodOptional<zod.ZodString>;
1824
+ userId: zod.ZodOptional<zod.ZodString>;
1825
+ }, zod_v4_core0.$strip>;
1826
+ metadata: {
1827
+ openapi: {
1828
+ description: string;
1829
+ responses: {
1830
+ 200: {
1831
+ description: string;
1832
+ content: {
1833
+ "application/json": {
1834
+ schema: {
1835
+ type: "object";
1836
+ properties: {
1837
+ tokenType: {
1838
+ type: string;
1839
+ };
1840
+ idToken: {
1841
+ type: string;
1842
+ };
1843
+ accessToken: {
1844
+ type: string;
1845
+ };
1846
+ accessTokenExpiresAt: {
1847
+ type: string;
1848
+ format: string;
1849
+ };
1850
+ };
1851
+ };
1852
+ };
1853
+ };
1854
+ };
1855
+ 400: {
1856
+ description: string;
1857
+ };
1858
+ };
1859
+ };
1860
+ };
1861
+ }, {
1862
+ accessToken: string;
1863
+ accessTokenExpiresAt: Date | undefined;
1864
+ scopes: string[];
1865
+ idToken: string | undefined;
1866
+ }>;
1867
+ readonly accountInfo: better_call0.StrictEndpoint<"/account-info", {
1868
+ method: "GET";
1869
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
1870
+ session: {
1871
+ session: Record<string, any> & {
1872
+ id: string;
1873
+ createdAt: Date;
1874
+ updatedAt: Date;
1875
+ userId: string;
1876
+ expiresAt: Date;
1877
+ token: string;
1878
+ ipAddress?: string | null | undefined;
1879
+ userAgent?: string | null | undefined;
1880
+ };
1881
+ user: Record<string, any> & {
1882
+ id: string;
1883
+ createdAt: Date;
1884
+ updatedAt: Date;
1885
+ email: string;
1886
+ emailVerified: boolean;
1887
+ name: string;
1888
+ image?: string | null | undefined;
1889
+ };
1890
+ };
1891
+ }>)[];
1892
+ metadata: {
1893
+ openapi: {
1894
+ description: string;
1895
+ responses: {
1896
+ "200": {
1897
+ description: string;
1898
+ content: {
1899
+ "application/json": {
1900
+ schema: {
1901
+ type: "object";
1902
+ properties: {
1903
+ user: {
1904
+ type: string;
1905
+ properties: {
1906
+ id: {
1907
+ type: string;
1908
+ };
1909
+ name: {
1910
+ type: string;
1911
+ };
1912
+ email: {
1913
+ type: string;
1914
+ };
1915
+ image: {
1916
+ type: string;
1917
+ };
1918
+ emailVerified: {
1919
+ type: string;
1920
+ };
1921
+ };
1922
+ required: string[];
1923
+ };
1924
+ data: {
1925
+ type: string;
1926
+ properties: {};
1927
+ additionalProperties: boolean;
1928
+ };
1929
+ };
1930
+ required: string[];
1931
+ additionalProperties: boolean;
1932
+ };
1933
+ };
1934
+ };
1935
+ };
1936
+ };
1937
+ };
1938
+ };
1939
+ query: zod.ZodOptional<zod.ZodObject<{
1940
+ accountId: zod.ZodOptional<zod.ZodString>;
1941
+ }, zod_v4_core0.$strip>>;
1942
+ }, {
1943
+ user: _better_auth_core_oauth20.OAuth2UserInfo;
1944
+ data: Record<string, any>;
1945
+ } | null>;
1946
+ } & UnionToIntersection<Option["plugins"] extends (infer T_10)[] ? T_10 extends BetterAuthPlugin ? T_10 extends {
1947
+ endpoints: infer E;
1948
+ } ? E : {} : {} : {}>;
1949
+ middlewares: {
1950
+ path: string;
1951
+ middleware: any;
1952
+ }[];
1953
+ };
1954
+ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, options: Option) => {
1955
+ handler: (request: Request) => Promise<Response>;
1956
+ endpoints: {
1957
+ readonly ok: better_call0.StrictEndpoint<"/ok", {
1958
+ method: "GET";
1959
+ metadata: {
1960
+ openapi: {
1961
+ description: string;
1962
+ responses: {
1963
+ "200": {
1964
+ description: string;
1965
+ content: {
1966
+ "application/json": {
1967
+ schema: {
1968
+ type: "object";
1969
+ properties: {
1970
+ ok: {
1971
+ type: string;
1972
+ description: string;
1973
+ };
1974
+ };
1975
+ required: string[];
1976
+ };
1977
+ };
1978
+ };
1979
+ };
1980
+ };
1981
+ };
1982
+ scope: "server";
1983
+ };
1984
+ }, {
1985
+ ok: boolean;
1986
+ }>;
1987
+ readonly error: better_call0.StrictEndpoint<"/error", {
1988
+ method: "GET";
1989
+ metadata: {
1990
+ openapi: {
1991
+ description: string;
1992
+ responses: {
1993
+ "200": {
1994
+ description: string;
1995
+ content: {
1996
+ "text/html": {
1997
+ schema: {
1998
+ type: "string";
1999
+ description: string;
2000
+ };
2001
+ };
2002
+ };
2003
+ };
2004
+ };
2005
+ };
2006
+ scope: "server";
2007
+ };
2008
+ }, Response>;
2009
+ readonly signInSocial: better_call0.StrictEndpoint<"/sign-in/social", {
2010
+ method: "POST";
2011
+ operationId: string;
2012
+ body: zod.ZodObject<{
2013
+ callbackURL: zod.ZodOptional<zod.ZodString>;
2014
+ newUserCallbackURL: zod.ZodOptional<zod.ZodString>;
2015
+ errorCallbackURL: zod.ZodOptional<zod.ZodString>;
2016
+ provider: zod.ZodType<"github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | (string & {}), unknown, zod_v4_core0.$ZodTypeInternals<"github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | (string & {}), unknown>>;
2017
+ disableRedirect: zod.ZodOptional<zod.ZodBoolean>;
2018
+ idToken: zod.ZodOptional<zod.ZodObject<{
2019
+ token: zod.ZodString;
2020
+ nonce: zod.ZodOptional<zod.ZodString>;
2021
+ accessToken: zod.ZodOptional<zod.ZodString>;
2022
+ refreshToken: zod.ZodOptional<zod.ZodString>;
2023
+ expiresAt: zod.ZodOptional<zod.ZodNumber>;
2024
+ }, zod_v4_core0.$strip>>;
2025
+ scopes: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
2026
+ requestSignUp: zod.ZodOptional<zod.ZodBoolean>;
2027
+ loginHint: zod.ZodOptional<zod.ZodString>;
2028
+ additionalData: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodAny>>;
2029
+ }, zod_v4_core0.$strip>;
2030
+ metadata: {
2031
+ $Infer: {
2032
+ body: zod.infer<zod.ZodObject<{
2033
+ callbackURL: zod.ZodOptional<zod.ZodString>;
2034
+ newUserCallbackURL: zod.ZodOptional<zod.ZodString>;
2035
+ errorCallbackURL: zod.ZodOptional<zod.ZodString>;
2036
+ provider: zod.ZodType<"github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | (string & {}), unknown, zod_v4_core0.$ZodTypeInternals<"github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | (string & {}), unknown>>;
2037
+ disableRedirect: zod.ZodOptional<zod.ZodBoolean>;
2038
+ idToken: zod.ZodOptional<zod.ZodObject<{
2039
+ token: zod.ZodString;
2040
+ nonce: zod.ZodOptional<zod.ZodString>;
2041
+ accessToken: zod.ZodOptional<zod.ZodString>;
2042
+ refreshToken: zod.ZodOptional<zod.ZodString>;
2043
+ expiresAt: zod.ZodOptional<zod.ZodNumber>;
2044
+ }, zod_v4_core0.$strip>>;
2045
+ scopes: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
2046
+ requestSignUp: zod.ZodOptional<zod.ZodBoolean>;
2047
+ loginHint: zod.ZodOptional<zod.ZodString>;
2048
+ additionalData: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodAny>>;
2049
+ }, zod_v4_core0.$strip>>;
2050
+ returned: {
2051
+ redirect: boolean;
2052
+ token?: string | undefined;
2053
+ url?: string | undefined;
2054
+ user?: ({
2055
+ id: string;
2056
+ createdAt: Date;
2057
+ updatedAt: Date;
2058
+ email: string;
2059
+ emailVerified: boolean;
2060
+ name: string;
2061
+ image?: string | null | undefined;
2062
+ } & _better_auth_core_db0.InferDBFieldsFromOptions<Option["user"]> & _better_auth_core_db0.InferDBFieldsFromPlugins<"user", Option["plugins"]> extends infer T ? { [K in keyof T]: T[K] } : never) | undefined;
2063
+ };
2064
+ };
2065
+ openapi: {
2066
+ description: string;
2067
+ operationId: string;
2068
+ responses: {
2069
+ "200": {
2070
+ description: string;
2071
+ content: {
2072
+ "application/json": {
2073
+ schema: {
2074
+ type: "object";
2075
+ description: string;
2076
+ properties: {
2077
+ token: {
2078
+ type: string;
2079
+ };
2080
+ user: {
2081
+ type: string;
2082
+ $ref: string;
2083
+ };
2084
+ url: {
2085
+ type: string;
2086
+ };
2087
+ redirect: {
2088
+ type: string;
2089
+ enum: boolean[];
2090
+ };
2091
+ };
2092
+ required: string[];
2093
+ };
2094
+ };
2095
+ };
2096
+ };
2097
+ };
2098
+ };
2099
+ };
2100
+ }, {
2101
+ redirect: boolean;
2102
+ url: string;
2103
+ } | {
2104
+ redirect: boolean;
2105
+ token: string;
2106
+ url: undefined;
2107
+ user: {
2108
+ id: string;
2109
+ createdAt: Date;
2110
+ updatedAt: Date;
2111
+ email: string;
2112
+ emailVerified: boolean;
2113
+ name: string;
2114
+ image?: string | null | undefined;
2115
+ } & _better_auth_core_db0.InferDBFieldsFromOptions<Option["user"]> & _better_auth_core_db0.InferDBFieldsFromPlugins<"user", Option["plugins"]> extends infer T_1 ? { [K in keyof T_1]: T_1[K] } : never;
2116
+ }>;
2117
+ readonly callbackOAuth: better_call0.StrictEndpoint<"/callback/:id", {
2118
+ method: ("GET" | "POST")[];
2119
+ operationId: string;
2120
+ body: zod.ZodOptional<zod.ZodObject<{
2121
+ code: zod.ZodOptional<zod.ZodString>;
2122
+ error: zod.ZodOptional<zod.ZodString>;
2123
+ device_id: zod.ZodOptional<zod.ZodString>;
2124
+ error_description: zod.ZodOptional<zod.ZodString>;
2125
+ state: zod.ZodOptional<zod.ZodString>;
2126
+ user: zod.ZodOptional<zod.ZodString>;
2127
+ }, zod_v4_core0.$strip>>;
2128
+ query: zod.ZodOptional<zod.ZodObject<{
2129
+ code: zod.ZodOptional<zod.ZodString>;
2130
+ error: zod.ZodOptional<zod.ZodString>;
2131
+ device_id: zod.ZodOptional<zod.ZodString>;
2132
+ error_description: zod.ZodOptional<zod.ZodString>;
2133
+ state: zod.ZodOptional<zod.ZodString>;
2134
+ user: zod.ZodOptional<zod.ZodString>;
2135
+ }, zod_v4_core0.$strip>>;
2136
+ metadata: {
2137
+ allowedMediaTypes: string[];
2138
+ scope: "server";
2139
+ };
2140
+ }, void>;
2141
+ readonly getSession: better_call0.StrictEndpoint<"/get-session", {
2142
+ method: ("GET" | "POST")[];
2143
+ operationId: string;
2144
+ query: zod.ZodOptional<zod.ZodObject<{
2145
+ disableCookieCache: zod.ZodOptional<zod.ZodCoercedBoolean<unknown>>;
2146
+ disableRefresh: zod.ZodOptional<zod.ZodCoercedBoolean<unknown>>;
2147
+ }, zod_v4_core0.$strip>>;
2148
+ requireHeaders: true;
2149
+ metadata: {
2150
+ openapi: {
2151
+ operationId: string;
2152
+ description: string;
2153
+ responses: {
2154
+ "200": {
2155
+ description: string;
2156
+ content: {
2157
+ "application/json": {
2158
+ schema: {
2159
+ type: "object";
2160
+ nullable: boolean;
2161
+ properties: {
2162
+ session: {
2163
+ $ref: string;
2164
+ };
2165
+ user: {
2166
+ $ref: string;
2167
+ };
2168
+ };
2169
+ required: string[];
2170
+ };
2171
+ };
2172
+ };
2173
+ };
2174
+ };
2175
+ };
2176
+ };
2177
+ }, {
2178
+ session: {
2179
+ id: string;
2180
+ createdAt: Date;
2181
+ updatedAt: Date;
2182
+ userId: string;
2183
+ expiresAt: Date;
2184
+ token: string;
2185
+ ipAddress?: string | null | undefined;
2186
+ userAgent?: string | null | undefined;
2187
+ } & _better_auth_core_db0.InferDBFieldsFromOptions<Option["session"]> & _better_auth_core_db0.InferDBFieldsFromPlugins<"session", Option["plugins"]> extends infer T_2 ? { [K_1 in keyof T_2]: T_2[K_1] } : never;
2188
+ user: {
2189
+ id: string;
2190
+ createdAt: Date;
2191
+ updatedAt: Date;
2192
+ email: string;
2193
+ emailVerified: boolean;
2194
+ name: string;
2195
+ image?: string | null | undefined;
2196
+ } & _better_auth_core_db0.InferDBFieldsFromOptions<Option["user"]> & _better_auth_core_db0.InferDBFieldsFromPlugins<"user", Option["plugins"]> extends infer T_3 ? { [K in keyof T_3]: T_3[K] } : never;
2197
+ } | null>;
2198
+ readonly signOut: better_call0.StrictEndpoint<"/sign-out", {
2199
+ method: "POST";
2200
+ operationId: string;
2201
+ requireHeaders: true;
2202
+ metadata: {
2203
+ openapi: {
2204
+ operationId: string;
2205
+ description: string;
2206
+ responses: {
2207
+ "200": {
2208
+ description: string;
2209
+ content: {
2210
+ "application/json": {
2211
+ schema: {
2212
+ type: "object";
2213
+ properties: {
2214
+ success: {
2215
+ type: string;
2216
+ };
2217
+ };
2218
+ };
2219
+ };
2220
+ };
2221
+ };
2222
+ };
2223
+ };
2224
+ };
2225
+ }, {
2226
+ success: boolean;
2227
+ }>;
2228
+ readonly signUpEmail: better_call0.StrictEndpoint<"/sign-up/email", {
2229
+ method: "POST";
2230
+ operationId: string;
2231
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<void>)[];
2232
+ body: zod.ZodIntersection<zod.ZodObject<{
2233
+ name: zod.ZodString;
2234
+ email: zod.ZodEmail;
2235
+ password: zod.ZodString;
2236
+ image: zod.ZodOptional<zod.ZodString>;
2237
+ callbackURL: zod.ZodOptional<zod.ZodString>;
2238
+ rememberMe: zod.ZodOptional<zod.ZodBoolean>;
2239
+ }, zod_v4_core0.$strip>, zod.ZodRecord<zod.ZodString, zod.ZodAny>>;
2240
+ metadata: {
2241
+ allowedMediaTypes: string[];
2242
+ $Infer: {
2243
+ body: {
2244
+ name: string;
2245
+ email: string;
2246
+ password: string;
2247
+ image?: string | undefined;
2248
+ callbackURL?: string | undefined;
2249
+ rememberMe?: boolean | undefined;
2250
+ } & _better_auth_core_db0.InferDBFieldsFromPluginsInput<"user", Option["plugins"]> & _better_auth_core_db0.InferDBFieldsFromOptionsInput<Option["user"]>;
2251
+ returned: {
2252
+ token: string | null;
2253
+ user: {
2254
+ id: string;
2255
+ createdAt: Date;
2256
+ updatedAt: Date;
2257
+ email: string;
2258
+ emailVerified: boolean;
2259
+ name: string;
2260
+ image?: string | null | undefined;
2261
+ } & _better_auth_core_db0.InferDBFieldsFromOptions<Option["user"]> & _better_auth_core_db0.InferDBFieldsFromPlugins<"user", Option["plugins"]> extends infer T_4 ? { [K in keyof T_4]: T_4[K] } : never;
2262
+ };
2263
+ };
2264
+ openapi: {
2265
+ operationId: string;
2266
+ description: string;
2267
+ requestBody: {
2268
+ content: {
2269
+ "application/json": {
2270
+ schema: {
2271
+ type: "object";
2272
+ properties: {
2273
+ name: {
2274
+ type: string;
2275
+ description: string;
2276
+ };
2277
+ email: {
2278
+ type: string;
2279
+ description: string;
2280
+ };
2281
+ password: {
2282
+ type: string;
2283
+ description: string;
2284
+ };
2285
+ image: {
2286
+ type: string;
2287
+ description: string;
2288
+ };
2289
+ callbackURL: {
2290
+ type: string;
2291
+ description: string;
2292
+ };
2293
+ rememberMe: {
2294
+ type: string;
2295
+ description: string;
2296
+ };
2297
+ };
2298
+ required: string[];
2299
+ };
2300
+ };
2301
+ };
2302
+ };
2303
+ responses: {
2304
+ "200": {
2305
+ description: string;
2306
+ content: {
2307
+ "application/json": {
2308
+ schema: {
2309
+ type: "object";
2310
+ properties: {
2311
+ token: {
2312
+ type: string;
2313
+ nullable: boolean;
2314
+ description: string;
2315
+ };
2316
+ user: {
2317
+ type: string;
2318
+ properties: {
2319
+ id: {
2320
+ type: string;
2321
+ description: string;
2322
+ };
2323
+ email: {
2324
+ type: string;
2325
+ format: string;
2326
+ description: string;
2327
+ };
2328
+ name: {
2329
+ type: string;
2330
+ description: string;
2331
+ };
2332
+ image: {
2333
+ type: string;
2334
+ format: string;
2335
+ nullable: boolean;
2336
+ description: string;
2337
+ };
2338
+ emailVerified: {
2339
+ type: string;
2340
+ description: string;
2341
+ };
2342
+ createdAt: {
2343
+ type: string;
2344
+ format: string;
2345
+ description: string;
2346
+ };
2347
+ updatedAt: {
2348
+ type: string;
2349
+ format: string;
2350
+ description: string;
2351
+ };
2352
+ };
2353
+ required: string[];
2354
+ };
2355
+ };
2356
+ required: string[];
2357
+ };
2358
+ };
2359
+ };
2360
+ };
2361
+ "422": {
2362
+ description: string;
2363
+ content: {
2364
+ "application/json": {
2365
+ schema: {
2366
+ type: "object";
2367
+ properties: {
2368
+ message: {
2369
+ type: string;
2370
+ };
2371
+ };
2372
+ };
2373
+ };
2374
+ };
2375
+ };
2376
+ };
2377
+ };
2378
+ };
2379
+ }, {
2380
+ token: null;
2381
+ user: {
2382
+ id: string;
2383
+ createdAt: Date;
2384
+ updatedAt: Date;
2385
+ email: string;
2386
+ emailVerified: boolean;
2387
+ name: string;
2388
+ image?: string | null | undefined;
2389
+ } & _better_auth_core_db0.InferDBFieldsFromOptions<Option["user"]> & _better_auth_core_db0.InferDBFieldsFromPlugins<"user", Option["plugins"]> extends infer T_5 ? { [K in keyof T_5]: T_5[K] } : never;
2390
+ } | {
2391
+ token: string;
2392
+ user: {
2393
+ id: string;
2394
+ createdAt: Date;
2395
+ updatedAt: Date;
2396
+ email: string;
2397
+ emailVerified: boolean;
2398
+ name: string;
2399
+ image?: string | null | undefined;
2400
+ } & _better_auth_core_db0.InferDBFieldsFromOptions<Option["user"]> & _better_auth_core_db0.InferDBFieldsFromPlugins<"user", Option["plugins"]> extends infer T_6 ? { [K in keyof T_6]: T_6[K] } : never;
2401
+ }>;
2402
+ readonly signInEmail: better_call0.StrictEndpoint<"/sign-in/email", {
2403
+ method: "POST";
2404
+ operationId: string;
2405
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<void>)[];
2406
+ body: zod.ZodObject<{
2407
+ email: zod.ZodString;
2408
+ password: zod.ZodString;
2409
+ callbackURL: zod.ZodOptional<zod.ZodString>;
2410
+ rememberMe: zod.ZodOptional<zod.ZodDefault<zod.ZodBoolean>>;
2411
+ }, zod_v4_core0.$strip>;
2412
+ metadata: {
2413
+ allowedMediaTypes: string[];
2414
+ $Infer: {
2415
+ body: {
2416
+ email: string;
2417
+ password: string;
2418
+ callbackURL?: string | undefined;
2419
+ rememberMe?: boolean | undefined;
2420
+ };
2421
+ returned: {
2422
+ redirect: boolean;
2423
+ token: string;
2424
+ url?: string | undefined;
2425
+ user: {
2426
+ id: string;
2427
+ createdAt: Date;
2428
+ updatedAt: Date;
2429
+ email: string;
2430
+ emailVerified: boolean;
2431
+ name: string;
2432
+ image?: string | null | undefined;
2433
+ } & _better_auth_core_db0.InferDBFieldsFromOptions<Option["user"]> & _better_auth_core_db0.InferDBFieldsFromPlugins<"user", Option["plugins"]> extends infer T_7 ? { [K in keyof T_7]: T_7[K] } : never;
2434
+ };
2435
+ };
2436
+ openapi: {
2437
+ operationId: string;
2438
+ description: string;
2439
+ responses: {
2440
+ "200": {
2441
+ description: string;
2442
+ content: {
2443
+ "application/json": {
2444
+ schema: {
2445
+ type: "object";
2446
+ description: string;
2447
+ properties: {
2448
+ redirect: {
2449
+ type: string;
2450
+ enum: boolean[];
2451
+ };
2452
+ token: {
2453
+ type: string;
2454
+ description: string;
2455
+ };
2456
+ url: {
2457
+ type: string;
2458
+ nullable: boolean;
2459
+ };
2460
+ user: {
2461
+ type: string;
2462
+ $ref: string;
2463
+ };
2464
+ };
2465
+ required: string[];
2466
+ };
2467
+ };
2468
+ };
2469
+ };
2470
+ };
2471
+ };
2472
+ };
2473
+ }, {
2474
+ redirect: boolean;
2475
+ token: string;
2476
+ url?: string | undefined;
2477
+ user: {
2478
+ id: string;
2479
+ createdAt: Date;
2480
+ updatedAt: Date;
2481
+ email: string;
2482
+ emailVerified: boolean;
2483
+ name: string;
2484
+ image?: string | null | undefined;
2485
+ } & _better_auth_core_db0.InferDBFieldsFromOptions<Option["user"]> & _better_auth_core_db0.InferDBFieldsFromPlugins<"user", Option["plugins"]> extends infer T_8 ? { [K in keyof T_8]: T_8[K] } : never;
2486
+ }>;
2487
+ readonly resetPassword: better_call0.StrictEndpoint<"/reset-password", {
2488
+ method: "POST";
2489
+ operationId: string;
2490
+ query: zod.ZodOptional<zod.ZodObject<{
2491
+ token: zod.ZodOptional<zod.ZodString>;
2492
+ }, zod_v4_core0.$strip>>;
2493
+ body: zod.ZodObject<{
2494
+ newPassword: zod.ZodString;
2495
+ token: zod.ZodOptional<zod.ZodString>;
2496
+ }, zod_v4_core0.$strip>;
2497
+ metadata: {
2498
+ openapi: {
2499
+ operationId: string;
2500
+ description: string;
2501
+ responses: {
2502
+ "200": {
2503
+ description: string;
2504
+ content: {
2505
+ "application/json": {
2506
+ schema: {
2507
+ type: "object";
2508
+ properties: {
2509
+ status: {
2510
+ type: string;
2511
+ };
2512
+ };
2513
+ };
2514
+ };
2515
+ };
2516
+ };
2517
+ };
2518
+ };
2519
+ };
2520
+ }, {
2521
+ status: boolean;
2522
+ }>;
2523
+ readonly verifyPassword: better_call0.StrictEndpoint<"/verify-password", {
2524
+ method: "POST";
2525
+ body: zod.ZodObject<{
2526
+ password: zod.ZodString;
2527
+ }, zod_v4_core0.$strip>;
2528
+ metadata: {
2529
+ scope: "server";
2530
+ openapi: {
2531
+ operationId: string;
2532
+ description: string;
2533
+ responses: {
2534
+ "200": {
2535
+ description: string;
2536
+ content: {
2537
+ "application/json": {
2538
+ schema: {
2539
+ type: "object";
2540
+ properties: {
2541
+ status: {
2542
+ type: string;
2543
+ };
2544
+ };
2545
+ };
2546
+ };
2547
+ };
2548
+ };
2549
+ };
2550
+ };
2551
+ };
2552
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
2553
+ session: {
2554
+ session: Record<string, any> & {
2555
+ id: string;
2556
+ createdAt: Date;
2557
+ updatedAt: Date;
2558
+ userId: string;
2559
+ expiresAt: Date;
2560
+ token: string;
2561
+ ipAddress?: string | null | undefined;
2562
+ userAgent?: string | null | undefined;
2563
+ };
2564
+ user: Record<string, any> & {
2565
+ id: string;
2566
+ createdAt: Date;
2567
+ updatedAt: Date;
2568
+ email: string;
2569
+ emailVerified: boolean;
2570
+ name: string;
2571
+ image?: string | null | undefined;
2572
+ };
2573
+ };
2574
+ }>)[];
2575
+ }, {
2576
+ status: boolean;
2577
+ }>;
2578
+ readonly verifyEmail: better_call0.StrictEndpoint<"/verify-email", {
2579
+ method: "GET";
2580
+ operationId: string;
2581
+ query: zod.ZodObject<{
2582
+ token: zod.ZodString;
2583
+ callbackURL: zod.ZodOptional<zod.ZodString>;
2584
+ }, zod_v4_core0.$strip>;
2585
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<void>)[];
2586
+ metadata: {
2587
+ openapi: {
2588
+ description: string;
2589
+ parameters: ({
2590
+ name: string;
2591
+ in: "query";
2592
+ description: string;
2593
+ required: true;
2594
+ schema: {
2595
+ type: "string";
2596
+ };
2597
+ } | {
2598
+ name: string;
2599
+ in: "query";
2600
+ description: string;
2601
+ required: false;
2602
+ schema: {
2603
+ type: "string";
2604
+ };
2605
+ })[];
2606
+ responses: {
2607
+ "200": {
2608
+ description: string;
2609
+ content: {
2610
+ "application/json": {
2611
+ schema: {
2612
+ type: "object";
2613
+ properties: {
2614
+ user: {
2615
+ type: string;
2616
+ $ref: string;
2617
+ };
2618
+ status: {
2619
+ type: string;
2620
+ description: string;
2621
+ };
2622
+ };
2623
+ required: string[];
2624
+ };
2625
+ };
2626
+ };
2627
+ };
2628
+ };
2629
+ };
2630
+ };
2631
+ }, void | {
2632
+ status: boolean;
2633
+ }>;
2634
+ readonly sendVerificationEmail: better_call0.StrictEndpoint<"/send-verification-email", {
2635
+ method: "POST";
2636
+ operationId: string;
2637
+ body: zod.ZodObject<{
2638
+ email: zod.ZodEmail;
2639
+ callbackURL: zod.ZodOptional<zod.ZodString>;
2640
+ }, zod_v4_core0.$strip>;
2641
+ metadata: {
2642
+ openapi: {
2643
+ operationId: string;
2644
+ description: string;
2645
+ requestBody: {
2646
+ content: {
2647
+ "application/json": {
2648
+ schema: {
2649
+ type: "object";
2650
+ properties: {
2651
+ email: {
2652
+ type: string;
2653
+ description: string;
2654
+ example: string;
2655
+ };
2656
+ callbackURL: {
2657
+ type: string;
2658
+ description: string;
2659
+ example: string;
2660
+ nullable: boolean;
2661
+ };
2662
+ };
2663
+ required: string[];
2664
+ };
2665
+ };
2666
+ };
2667
+ };
2668
+ responses: {
2669
+ "200": {
2670
+ description: string;
2671
+ content: {
2672
+ "application/json": {
2673
+ schema: {
2674
+ type: "object";
2675
+ properties: {
2676
+ status: {
2677
+ type: string;
2678
+ description: string;
2679
+ example: boolean;
2680
+ };
2681
+ };
2682
+ };
2683
+ };
2684
+ };
2685
+ };
2686
+ "400": {
2687
+ description: string;
2688
+ content: {
2689
+ "application/json": {
2690
+ schema: {
2691
+ type: "object";
2692
+ properties: {
2693
+ message: {
2694
+ type: string;
2695
+ description: string;
2696
+ example: string;
2697
+ };
2698
+ };
2699
+ };
2700
+ };
2701
+ };
2702
+ };
2703
+ };
2704
+ };
2705
+ };
2706
+ }, {
2707
+ status: boolean;
2708
+ }>;
2709
+ readonly changeEmail: better_call0.StrictEndpoint<"/change-email", {
2710
+ method: "POST";
2711
+ body: zod.ZodObject<{
2712
+ newEmail: zod.ZodEmail;
2713
+ callbackURL: zod.ZodOptional<zod.ZodString>;
2714
+ }, zod_v4_core0.$strip>;
2715
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
2716
+ session: {
2717
+ session: Record<string, any> & {
2718
+ id: string;
2719
+ createdAt: Date;
2720
+ updatedAt: Date;
2721
+ userId: string;
2722
+ expiresAt: Date;
2723
+ token: string;
2724
+ ipAddress?: string | null | undefined;
2725
+ userAgent?: string | null | undefined;
2726
+ };
2727
+ user: Record<string, any> & {
2728
+ id: string;
2729
+ createdAt: Date;
2730
+ updatedAt: Date;
2731
+ email: string;
2732
+ emailVerified: boolean;
2733
+ name: string;
2734
+ image?: string | null | undefined;
2735
+ };
2736
+ };
2737
+ }>)[];
2738
+ metadata: {
2739
+ openapi: {
2740
+ operationId: string;
2741
+ responses: {
2742
+ "200": {
2743
+ description: string;
2744
+ content: {
2745
+ "application/json": {
2746
+ schema: {
2747
+ type: "object";
2748
+ properties: {
2749
+ user: {
2750
+ type: string;
2751
+ $ref: string;
2752
+ };
2753
+ status: {
2754
+ type: string;
2755
+ description: string;
2756
+ };
2757
+ message: {
2758
+ type: string;
2759
+ enum: string[];
2760
+ description: string;
2761
+ nullable: boolean;
2762
+ };
2763
+ };
2764
+ required: string[];
2765
+ };
2766
+ };
2767
+ };
2768
+ };
2769
+ "422": {
2770
+ description: string;
2771
+ content: {
2772
+ "application/json": {
2773
+ schema: {
2774
+ type: "object";
2775
+ properties: {
2776
+ message: {
2777
+ type: string;
2778
+ };
2779
+ };
2780
+ };
2781
+ };
2782
+ };
2783
+ };
2784
+ };
2785
+ };
2786
+ };
2787
+ }, {
2788
+ status: boolean;
2789
+ }>;
2790
+ readonly changePassword: better_call0.StrictEndpoint<"/change-password", {
2791
+ method: "POST";
2792
+ operationId: string;
2793
+ body: zod.ZodObject<{
2794
+ newPassword: zod.ZodString;
2795
+ currentPassword: zod.ZodString;
2796
+ revokeOtherSessions: zod.ZodOptional<zod.ZodBoolean>;
2797
+ }, zod_v4_core0.$strip>;
2798
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
2799
+ session: {
2800
+ session: Record<string, any> & {
2801
+ id: string;
2802
+ createdAt: Date;
2803
+ updatedAt: Date;
2804
+ userId: string;
2805
+ expiresAt: Date;
2806
+ token: string;
2807
+ ipAddress?: string | null | undefined;
2808
+ userAgent?: string | null | undefined;
2809
+ };
2810
+ user: Record<string, any> & {
2811
+ id: string;
2812
+ createdAt: Date;
2813
+ updatedAt: Date;
2814
+ email: string;
2815
+ emailVerified: boolean;
2816
+ name: string;
2817
+ image?: string | null | undefined;
2818
+ };
2819
+ };
2820
+ }>)[];
2821
+ metadata: {
2822
+ openapi: {
2823
+ operationId: string;
2824
+ description: string;
2825
+ responses: {
2826
+ "200": {
2827
+ description: string;
2828
+ content: {
2829
+ "application/json": {
2830
+ schema: {
2831
+ type: "object";
2832
+ properties: {
2833
+ token: {
2834
+ type: string;
2835
+ nullable: boolean;
2836
+ description: string;
2837
+ };
2838
+ user: {
2839
+ type: string;
2840
+ properties: {
2841
+ id: {
2842
+ type: string;
2843
+ description: string;
2844
+ };
2845
+ email: {
2846
+ type: string;
2847
+ format: string;
2848
+ description: string;
2849
+ };
2850
+ name: {
2851
+ type: string;
2852
+ description: string;
2853
+ };
2854
+ image: {
2855
+ type: string;
2856
+ format: string;
2857
+ nullable: boolean;
2858
+ description: string;
2859
+ };
2860
+ emailVerified: {
2861
+ type: string;
2862
+ description: string;
2863
+ };
2864
+ createdAt: {
2865
+ type: string;
2866
+ format: string;
2867
+ description: string;
2868
+ };
2869
+ updatedAt: {
2870
+ type: string;
2871
+ format: string;
2872
+ description: string;
2873
+ };
2874
+ };
2875
+ required: string[];
2876
+ };
2877
+ };
2878
+ required: string[];
2879
+ };
2880
+ };
2881
+ };
2882
+ };
2883
+ };
2884
+ };
2885
+ };
2886
+ }, {
2887
+ token: string | null;
2888
+ user: {
2889
+ id: string;
2890
+ createdAt: Date;
2891
+ updatedAt: Date;
2892
+ email: string;
2893
+ emailVerified: boolean;
2894
+ name: string;
2895
+ image?: string | null | undefined;
2896
+ } & Record<string, any> & {
2897
+ id: string;
2898
+ createdAt: Date;
2899
+ updatedAt: Date;
2900
+ email: string;
2901
+ emailVerified: boolean;
2902
+ name: string;
2903
+ image?: string | null | undefined;
2904
+ };
2905
+ }>;
2906
+ readonly setPassword: better_call0.StrictEndpoint<string, {
2907
+ method: "POST";
2908
+ body: zod.ZodObject<{
2909
+ newPassword: zod.ZodString;
2910
+ }, zod_v4_core0.$strip>;
2911
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
2912
+ session: {
2913
+ session: Record<string, any> & {
2914
+ id: string;
2915
+ createdAt: Date;
2916
+ updatedAt: Date;
2917
+ userId: string;
2918
+ expiresAt: Date;
2919
+ token: string;
2920
+ ipAddress?: string | null | undefined;
2921
+ userAgent?: string | null | undefined;
2922
+ };
2923
+ user: Record<string, any> & {
2924
+ id: string;
2925
+ createdAt: Date;
2926
+ updatedAt: Date;
2927
+ email: string;
2928
+ emailVerified: boolean;
2929
+ name: string;
2930
+ image?: string | null | undefined;
2931
+ };
2932
+ };
2933
+ }>)[];
2934
+ }, {
2935
+ status: boolean;
2936
+ }>;
2937
+ readonly updateUser: better_call0.StrictEndpoint<"/update-user", {
2938
+ method: "POST";
2939
+ operationId: string;
2940
+ body: zod.ZodRecord<zod.ZodString, zod.ZodAny>;
2941
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
2942
+ session: {
2943
+ session: Record<string, any> & {
2944
+ id: string;
2945
+ createdAt: Date;
2946
+ updatedAt: Date;
2947
+ userId: string;
2948
+ expiresAt: Date;
2949
+ token: string;
2950
+ ipAddress?: string | null | undefined;
2951
+ userAgent?: string | null | undefined;
2952
+ };
2953
+ user: Record<string, any> & {
2954
+ id: string;
2955
+ createdAt: Date;
2956
+ updatedAt: Date;
2957
+ email: string;
2958
+ emailVerified: boolean;
2959
+ name: string;
2960
+ image?: string | null | undefined;
2961
+ };
2962
+ };
2963
+ }>)[];
2964
+ metadata: {
2965
+ $Infer: {
2966
+ body: Partial<AdditionalUserFieldsInput<Option>> & {
2967
+ name?: string | undefined;
2968
+ image?: string | undefined | null;
2969
+ };
2970
+ };
2971
+ openapi: {
2972
+ operationId: string;
2973
+ description: string;
2974
+ requestBody: {
2975
+ content: {
2976
+ "application/json": {
2977
+ schema: {
2978
+ type: "object";
2979
+ properties: {
2980
+ name: {
2981
+ type: string;
2982
+ description: string;
2983
+ };
2984
+ image: {
2985
+ type: string;
2986
+ description: string;
2987
+ nullable: boolean;
2988
+ };
2989
+ };
2990
+ };
2991
+ };
2992
+ };
2993
+ };
2994
+ responses: {
2995
+ "200": {
2996
+ description: string;
2997
+ content: {
2998
+ "application/json": {
2999
+ schema: {
3000
+ type: "object";
3001
+ properties: {
3002
+ user: {
3003
+ type: string;
3004
+ $ref: string;
3005
+ };
3006
+ };
3007
+ };
3008
+ };
3009
+ };
3010
+ };
3011
+ };
3012
+ };
3013
+ };
3014
+ }, {
3015
+ status: boolean;
3016
+ }>;
3017
+ readonly deleteUser: better_call0.StrictEndpoint<"/delete-user", {
3018
+ method: "POST";
3019
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
3020
+ session: {
3021
+ session: Record<string, any> & {
3022
+ id: string;
3023
+ createdAt: Date;
3024
+ updatedAt: Date;
3025
+ userId: string;
3026
+ expiresAt: Date;
3027
+ token: string;
3028
+ ipAddress?: string | null | undefined;
3029
+ userAgent?: string | null | undefined;
3030
+ };
3031
+ user: Record<string, any> & {
3032
+ id: string;
3033
+ createdAt: Date;
3034
+ updatedAt: Date;
3035
+ email: string;
3036
+ emailVerified: boolean;
3037
+ name: string;
3038
+ image?: string | null | undefined;
3039
+ };
3040
+ };
3041
+ }>)[];
3042
+ body: zod.ZodObject<{
3043
+ callbackURL: zod.ZodOptional<zod.ZodString>;
3044
+ password: zod.ZodOptional<zod.ZodString>;
3045
+ token: zod.ZodOptional<zod.ZodString>;
3046
+ }, zod_v4_core0.$strip>;
3047
+ metadata: {
3048
+ openapi: {
3049
+ operationId: string;
3050
+ description: string;
3051
+ requestBody: {
3052
+ content: {
3053
+ "application/json": {
3054
+ schema: {
3055
+ type: "object";
3056
+ properties: {
3057
+ callbackURL: {
3058
+ type: string;
3059
+ description: string;
3060
+ };
3061
+ password: {
3062
+ type: string;
3063
+ description: string;
3064
+ };
3065
+ token: {
3066
+ type: string;
3067
+ description: string;
3068
+ };
3069
+ };
3070
+ };
3071
+ };
3072
+ };
3073
+ };
3074
+ responses: {
3075
+ "200": {
3076
+ description: string;
3077
+ content: {
3078
+ "application/json": {
3079
+ schema: {
3080
+ type: "object";
3081
+ properties: {
3082
+ success: {
3083
+ type: string;
3084
+ description: string;
3085
+ };
3086
+ message: {
3087
+ type: string;
3088
+ enum: string[];
3089
+ description: string;
3090
+ };
3091
+ };
3092
+ required: string[];
3093
+ };
3094
+ };
3095
+ };
3096
+ };
3097
+ };
3098
+ };
3099
+ };
3100
+ }, {
3101
+ success: boolean;
3102
+ message: string;
3103
+ }>;
3104
+ readonly requestPasswordReset: better_call0.StrictEndpoint<"/request-password-reset", {
3105
+ method: "POST";
3106
+ body: zod.ZodObject<{
3107
+ email: zod.ZodEmail;
3108
+ redirectTo: zod.ZodOptional<zod.ZodString>;
3109
+ }, zod_v4_core0.$strip>;
3110
+ metadata: {
3111
+ openapi: {
3112
+ operationId: string;
3113
+ description: string;
3114
+ responses: {
3115
+ "200": {
3116
+ description: string;
3117
+ content: {
3118
+ "application/json": {
3119
+ schema: {
3120
+ type: "object";
3121
+ properties: {
3122
+ status: {
3123
+ type: string;
3124
+ };
3125
+ message: {
3126
+ type: string;
3127
+ };
3128
+ };
3129
+ };
3130
+ };
3131
+ };
3132
+ };
3133
+ };
3134
+ };
3135
+ };
3136
+ }, {
3137
+ status: boolean;
3138
+ message: string;
3139
+ }>;
3140
+ readonly requestPasswordResetCallback: better_call0.StrictEndpoint<"/reset-password/:token", {
3141
+ method: "GET";
3142
+ operationId: string;
3143
+ query: zod.ZodObject<{
3144
+ callbackURL: zod.ZodString;
3145
+ }, zod_v4_core0.$strip>;
3146
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<void>)[];
3147
+ metadata: {
3148
+ openapi: {
3149
+ operationId: string;
3150
+ description: string;
3151
+ parameters: ({
3152
+ name: string;
3153
+ in: "path";
3154
+ required: true;
3155
+ description: string;
3156
+ schema: {
3157
+ type: "string";
3158
+ };
3159
+ } | {
3160
+ name: string;
3161
+ in: "query";
3162
+ required: true;
3163
+ description: string;
3164
+ schema: {
3165
+ type: "string";
3166
+ };
3167
+ })[];
3168
+ responses: {
3169
+ "200": {
3170
+ description: string;
3171
+ content: {
3172
+ "application/json": {
3173
+ schema: {
3174
+ type: "object";
3175
+ properties: {
3176
+ token: {
3177
+ type: string;
3178
+ };
3179
+ };
3180
+ };
3181
+ };
3182
+ };
3183
+ };
3184
+ };
3185
+ };
3186
+ };
3187
+ }, never>;
3188
+ readonly listSessions: better_call0.StrictEndpoint<"/list-sessions", {
3189
+ method: "GET";
3190
+ operationId: string;
3191
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
3192
+ session: {
3193
+ session: Record<string, any> & {
3194
+ id: string;
3195
+ createdAt: Date;
3196
+ updatedAt: Date;
3197
+ userId: string;
3198
+ expiresAt: Date;
3199
+ token: string;
3200
+ ipAddress?: string | null | undefined;
3201
+ userAgent?: string | null | undefined;
3202
+ };
3203
+ user: Record<string, any> & {
3204
+ id: string;
3205
+ createdAt: Date;
3206
+ updatedAt: Date;
3207
+ email: string;
3208
+ emailVerified: boolean;
3209
+ name: string;
3210
+ image?: string | null | undefined;
3211
+ };
3212
+ };
3213
+ }>)[];
3214
+ requireHeaders: true;
3215
+ metadata: {
3216
+ openapi: {
3217
+ operationId: string;
3218
+ description: string;
3219
+ responses: {
3220
+ "200": {
3221
+ description: string;
3222
+ content: {
3223
+ "application/json": {
3224
+ schema: {
3225
+ type: "array";
3226
+ items: {
3227
+ $ref: string;
3228
+ };
3229
+ };
3230
+ };
3231
+ };
3232
+ };
3233
+ };
3234
+ };
3235
+ };
3236
+ }, Prettify$1<{
3237
+ id: string;
3238
+ createdAt: Date;
3239
+ updatedAt: Date;
3240
+ userId: string;
3241
+ expiresAt: Date;
3242
+ token: string;
3243
+ ipAddress?: string | null | undefined;
3244
+ userAgent?: string | null | undefined;
3245
+ } & _better_auth_core_db0.InferDBFieldsFromOptions<Option["session"]> & _better_auth_core_db0.InferDBFieldsFromPlugins<"session", Option["plugins"]> extends infer T_9 ? { [K_1 in keyof T_9]: T_9[K_1] } : never>[]>;
3246
+ readonly revokeSession: better_call0.StrictEndpoint<"/revoke-session", {
3247
+ method: "POST";
3248
+ body: zod.ZodObject<{
3249
+ token: zod.ZodString;
3250
+ }, zod_v4_core0.$strip>;
3251
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
3252
+ session: {
3253
+ session: Record<string, any> & {
3254
+ id: string;
3255
+ createdAt: Date;
3256
+ updatedAt: Date;
3257
+ userId: string;
3258
+ expiresAt: Date;
3259
+ token: string;
3260
+ ipAddress?: string | null | undefined;
3261
+ userAgent?: string | null | undefined;
3262
+ };
3263
+ user: Record<string, any> & {
3264
+ id: string;
3265
+ createdAt: Date;
3266
+ updatedAt: Date;
3267
+ email: string;
3268
+ emailVerified: boolean;
3269
+ name: string;
3270
+ image?: string | null | undefined;
3271
+ };
3272
+ };
3273
+ }>)[];
3274
+ requireHeaders: true;
3275
+ metadata: {
3276
+ openapi: {
3277
+ description: string;
3278
+ requestBody: {
3279
+ content: {
3280
+ "application/json": {
3281
+ schema: {
3282
+ type: "object";
3283
+ properties: {
3284
+ token: {
3285
+ type: string;
3286
+ description: string;
3287
+ };
3288
+ };
3289
+ required: string[];
3290
+ };
3291
+ };
3292
+ };
3293
+ };
3294
+ responses: {
3295
+ "200": {
3296
+ description: string;
3297
+ content: {
3298
+ "application/json": {
3299
+ schema: {
3300
+ type: "object";
3301
+ properties: {
3302
+ status: {
3303
+ type: string;
3304
+ description: string;
3305
+ };
3306
+ };
3307
+ required: string[];
3308
+ };
3309
+ };
3310
+ };
3311
+ };
3312
+ };
3313
+ };
3314
+ };
3315
+ }, {
3316
+ status: boolean;
3317
+ }>;
3318
+ readonly revokeSessions: better_call0.StrictEndpoint<"/revoke-sessions", {
3319
+ method: "POST";
3320
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
3321
+ session: {
3322
+ session: Record<string, any> & {
3323
+ id: string;
3324
+ createdAt: Date;
3325
+ updatedAt: Date;
3326
+ userId: string;
3327
+ expiresAt: Date;
3328
+ token: string;
3329
+ ipAddress?: string | null | undefined;
3330
+ userAgent?: string | null | undefined;
3331
+ };
3332
+ user: Record<string, any> & {
3333
+ id: string;
3334
+ createdAt: Date;
3335
+ updatedAt: Date;
3336
+ email: string;
3337
+ emailVerified: boolean;
3338
+ name: string;
3339
+ image?: string | null | undefined;
3340
+ };
3341
+ };
3342
+ }>)[];
3343
+ requireHeaders: true;
3344
+ metadata: {
3345
+ openapi: {
3346
+ description: string;
3347
+ responses: {
3348
+ "200": {
3349
+ description: string;
3350
+ content: {
3351
+ "application/json": {
3352
+ schema: {
3353
+ type: "object";
3354
+ properties: {
3355
+ status: {
3356
+ type: string;
3357
+ description: string;
3358
+ };
3359
+ };
3360
+ required: string[];
3361
+ };
3362
+ };
3363
+ };
3364
+ };
3365
+ };
3366
+ };
3367
+ };
3368
+ }, {
3369
+ status: boolean;
3370
+ }>;
3371
+ readonly revokeOtherSessions: better_call0.StrictEndpoint<"/revoke-other-sessions", {
3372
+ method: "POST";
3373
+ requireHeaders: true;
3374
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
3375
+ session: {
3376
+ session: Record<string, any> & {
3377
+ id: string;
3378
+ createdAt: Date;
3379
+ updatedAt: Date;
3380
+ userId: string;
3381
+ expiresAt: Date;
3382
+ token: string;
3383
+ ipAddress?: string | null | undefined;
3384
+ userAgent?: string | null | undefined;
3385
+ };
3386
+ user: Record<string, any> & {
3387
+ id: string;
3388
+ createdAt: Date;
3389
+ updatedAt: Date;
3390
+ email: string;
3391
+ emailVerified: boolean;
3392
+ name: string;
3393
+ image?: string | null | undefined;
3394
+ };
3395
+ };
3396
+ }>)[];
3397
+ metadata: {
3398
+ openapi: {
3399
+ description: string;
3400
+ responses: {
3401
+ "200": {
3402
+ description: string;
3403
+ content: {
3404
+ "application/json": {
3405
+ schema: {
3406
+ type: "object";
3407
+ properties: {
3408
+ status: {
3409
+ type: string;
3410
+ description: string;
3411
+ };
3412
+ };
3413
+ required: string[];
3414
+ };
3415
+ };
3416
+ };
3417
+ };
3418
+ };
3419
+ };
3420
+ };
3421
+ }, {
3422
+ status: boolean;
3423
+ }>;
3424
+ readonly linkSocialAccount: better_call0.StrictEndpoint<"/link-social", {
3425
+ method: "POST";
3426
+ requireHeaders: true;
3427
+ body: zod.ZodObject<{
3428
+ callbackURL: zod.ZodOptional<zod.ZodString>;
3429
+ provider: zod.ZodType<"github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | (string & {}), unknown, zod_v4_core0.$ZodTypeInternals<"github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | (string & {}), unknown>>;
3430
+ idToken: zod.ZodOptional<zod.ZodObject<{
3431
+ token: zod.ZodString;
3432
+ nonce: zod.ZodOptional<zod.ZodString>;
3433
+ accessToken: zod.ZodOptional<zod.ZodString>;
3434
+ refreshToken: zod.ZodOptional<zod.ZodString>;
3435
+ scopes: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
3436
+ }, zod_v4_core0.$strip>>;
3437
+ requestSignUp: zod.ZodOptional<zod.ZodBoolean>;
3438
+ scopes: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
3439
+ errorCallbackURL: zod.ZodOptional<zod.ZodString>;
3440
+ disableRedirect: zod.ZodOptional<zod.ZodBoolean>;
3441
+ additionalData: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodAny>>;
3442
+ }, zod_v4_core0.$strip>;
3443
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
3444
+ session: {
3445
+ session: Record<string, any> & {
3446
+ id: string;
3447
+ createdAt: Date;
3448
+ updatedAt: Date;
3449
+ userId: string;
3450
+ expiresAt: Date;
3451
+ token: string;
3452
+ ipAddress?: string | null | undefined;
3453
+ userAgent?: string | null | undefined;
3454
+ };
3455
+ user: Record<string, any> & {
3456
+ id: string;
3457
+ createdAt: Date;
3458
+ updatedAt: Date;
3459
+ email: string;
3460
+ emailVerified: boolean;
3461
+ name: string;
3462
+ image?: string | null | undefined;
3463
+ };
3464
+ };
3465
+ }>)[];
3466
+ metadata: {
3467
+ openapi: {
3468
+ description: string;
3469
+ operationId: string;
3470
+ responses: {
3471
+ "200": {
3472
+ description: string;
3473
+ content: {
3474
+ "application/json": {
3475
+ schema: {
3476
+ type: "object";
3477
+ properties: {
3478
+ url: {
3479
+ type: string;
3480
+ description: string;
3481
+ };
3482
+ redirect: {
3483
+ type: string;
3484
+ description: string;
3485
+ };
3486
+ status: {
3487
+ type: string;
3488
+ };
3489
+ };
3490
+ required: string[];
3491
+ };
3492
+ };
3493
+ };
3494
+ };
3495
+ };
3496
+ };
3497
+ };
3498
+ }, {
3499
+ url: string;
3500
+ redirect: boolean;
3501
+ }>;
3502
+ readonly listUserAccounts: better_call0.StrictEndpoint<"/list-accounts", {
3503
+ method: "GET";
3504
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
3505
+ session: {
3506
+ session: Record<string, any> & {
3507
+ id: string;
3508
+ createdAt: Date;
3509
+ updatedAt: Date;
3510
+ userId: string;
3511
+ expiresAt: Date;
3512
+ token: string;
3513
+ ipAddress?: string | null | undefined;
3514
+ userAgent?: string | null | undefined;
3515
+ };
3516
+ user: Record<string, any> & {
3517
+ id: string;
3518
+ createdAt: Date;
3519
+ updatedAt: Date;
3520
+ email: string;
3521
+ emailVerified: boolean;
3522
+ name: string;
3523
+ image?: string | null | undefined;
3524
+ };
3525
+ };
3526
+ }>)[];
3527
+ metadata: {
3528
+ openapi: {
3529
+ operationId: string;
3530
+ description: string;
3531
+ responses: {
3532
+ "200": {
3533
+ description: string;
3534
+ content: {
3535
+ "application/json": {
3536
+ schema: {
3537
+ type: "array";
3538
+ items: {
3539
+ type: string;
3540
+ properties: {
3541
+ id: {
3542
+ type: string;
3543
+ };
3544
+ providerId: {
3545
+ type: string;
3546
+ };
3547
+ createdAt: {
3548
+ type: string;
3549
+ format: string;
3550
+ };
3551
+ updatedAt: {
3552
+ type: string;
3553
+ format: string;
3554
+ };
3555
+ accountId: {
3556
+ type: string;
3557
+ };
3558
+ userId: {
3559
+ type: string;
3560
+ };
3561
+ scopes: {
3562
+ type: string;
3563
+ items: {
3564
+ type: string;
3565
+ };
3566
+ };
3567
+ };
3568
+ required: string[];
3569
+ };
3570
+ };
3571
+ };
3572
+ };
3573
+ };
3574
+ };
3575
+ };
3576
+ };
3577
+ }, {
3578
+ scopes: string[];
3579
+ id: string;
3580
+ createdAt: Date;
3581
+ updatedAt: Date;
3582
+ providerId: string;
3583
+ accountId: string;
3584
+ userId: string;
3585
+ }[]>;
3586
+ readonly deleteUserCallback: better_call0.StrictEndpoint<"/delete-user/callback", {
3587
+ method: "GET";
3588
+ query: zod.ZodObject<{
3589
+ token: zod.ZodString;
3590
+ callbackURL: zod.ZodOptional<zod.ZodString>;
3591
+ }, zod_v4_core0.$strip>;
3592
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<void>)[];
3593
+ metadata: {
3594
+ openapi: {
3595
+ description: string;
3596
+ responses: {
3597
+ "200": {
3598
+ description: string;
3599
+ content: {
3600
+ "application/json": {
3601
+ schema: {
3602
+ type: "object";
3603
+ properties: {
3604
+ success: {
3605
+ type: string;
3606
+ description: string;
3607
+ };
3608
+ message: {
3609
+ type: string;
3610
+ enum: string[];
3611
+ description: string;
3612
+ };
3613
+ };
3614
+ required: string[];
3615
+ };
3616
+ };
3617
+ };
3618
+ };
3619
+ };
3620
+ };
3621
+ };
3622
+ }, {
3623
+ success: boolean;
3624
+ message: string;
3625
+ }>;
3626
+ readonly unlinkAccount: better_call0.StrictEndpoint<"/unlink-account", {
3627
+ method: "POST";
3628
+ body: zod.ZodObject<{
3629
+ providerId: zod.ZodString;
3630
+ accountId: zod.ZodOptional<zod.ZodString>;
3631
+ }, zod_v4_core0.$strip>;
3632
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
3633
+ session: {
3634
+ session: Record<string, any> & {
3635
+ id: string;
3636
+ createdAt: Date;
3637
+ updatedAt: Date;
3638
+ userId: string;
3639
+ expiresAt: Date;
3640
+ token: string;
3641
+ ipAddress?: string | null | undefined;
3642
+ userAgent?: string | null | undefined;
3643
+ };
3644
+ user: Record<string, any> & {
3645
+ id: string;
3646
+ createdAt: Date;
3647
+ updatedAt: Date;
3648
+ email: string;
3649
+ emailVerified: boolean;
3650
+ name: string;
3651
+ image?: string | null | undefined;
3652
+ };
3653
+ };
3654
+ }>)[];
3655
+ metadata: {
3656
+ openapi: {
3657
+ description: string;
3658
+ responses: {
3659
+ "200": {
3660
+ description: string;
3661
+ content: {
3662
+ "application/json": {
3663
+ schema: {
3664
+ type: "object";
3665
+ properties: {
3666
+ status: {
3667
+ type: string;
3668
+ };
3669
+ };
3670
+ };
3671
+ };
3672
+ };
3673
+ };
3674
+ };
3675
+ };
3676
+ };
3677
+ }, {
3678
+ status: boolean;
3679
+ }>;
3680
+ readonly refreshToken: better_call0.StrictEndpoint<"/refresh-token", {
3681
+ method: "POST";
3682
+ body: zod.ZodObject<{
3683
+ providerId: zod.ZodString;
3684
+ accountId: zod.ZodOptional<zod.ZodString>;
3685
+ userId: zod.ZodOptional<zod.ZodString>;
3686
+ }, zod_v4_core0.$strip>;
3687
+ metadata: {
3688
+ openapi: {
3689
+ description: string;
3690
+ responses: {
3691
+ 200: {
3692
+ description: string;
3693
+ content: {
3694
+ "application/json": {
3695
+ schema: {
3696
+ type: "object";
3697
+ properties: {
3698
+ tokenType: {
3699
+ type: string;
3700
+ };
3701
+ idToken: {
3702
+ type: string;
3703
+ };
3704
+ accessToken: {
3705
+ type: string;
3706
+ };
3707
+ refreshToken: {
3708
+ type: string;
3709
+ };
3710
+ accessTokenExpiresAt: {
3711
+ type: string;
3712
+ format: string;
3713
+ };
3714
+ refreshTokenExpiresAt: {
3715
+ type: string;
3716
+ format: string;
3717
+ };
3718
+ };
3719
+ };
3720
+ };
3721
+ };
3722
+ };
3723
+ 400: {
3724
+ description: string;
3725
+ };
3726
+ };
3727
+ };
3728
+ };
3729
+ }, {
3730
+ accessToken: string | undefined;
3731
+ refreshToken: string | undefined;
3732
+ accessTokenExpiresAt: Date | undefined;
3733
+ refreshTokenExpiresAt: Date | undefined;
3734
+ scope: string | null | undefined;
3735
+ idToken: string | null | undefined;
3736
+ providerId: string;
3737
+ accountId: string;
3738
+ }>;
3739
+ readonly getAccessToken: better_call0.StrictEndpoint<"/get-access-token", {
3740
+ method: "POST";
3741
+ body: zod.ZodObject<{
3742
+ providerId: zod.ZodString;
3743
+ accountId: zod.ZodOptional<zod.ZodString>;
3744
+ userId: zod.ZodOptional<zod.ZodString>;
3745
+ }, zod_v4_core0.$strip>;
3746
+ metadata: {
3747
+ openapi: {
3748
+ description: string;
3749
+ responses: {
3750
+ 200: {
3751
+ description: string;
3752
+ content: {
3753
+ "application/json": {
3754
+ schema: {
3755
+ type: "object";
3756
+ properties: {
3757
+ tokenType: {
3758
+ type: string;
3759
+ };
3760
+ idToken: {
3761
+ type: string;
3762
+ };
3763
+ accessToken: {
3764
+ type: string;
3765
+ };
3766
+ accessTokenExpiresAt: {
3767
+ type: string;
3768
+ format: string;
3769
+ };
3770
+ };
3771
+ };
3772
+ };
3773
+ };
3774
+ };
3775
+ 400: {
3776
+ description: string;
3777
+ };
3778
+ };
3779
+ };
3780
+ };
3781
+ }, {
3782
+ accessToken: string;
3783
+ accessTokenExpiresAt: Date | undefined;
3784
+ scopes: string[];
3785
+ idToken: string | undefined;
3786
+ }>;
3787
+ readonly accountInfo: better_call0.StrictEndpoint<"/account-info", {
3788
+ method: "GET";
3789
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
3790
+ session: {
3791
+ session: Record<string, any> & {
3792
+ id: string;
3793
+ createdAt: Date;
3794
+ updatedAt: Date;
3795
+ userId: string;
3796
+ expiresAt: Date;
3797
+ token: string;
3798
+ ipAddress?: string | null | undefined;
3799
+ userAgent?: string | null | undefined;
3800
+ };
3801
+ user: Record<string, any> & {
3802
+ id: string;
3803
+ createdAt: Date;
3804
+ updatedAt: Date;
3805
+ email: string;
3806
+ emailVerified: boolean;
3807
+ name: string;
3808
+ image?: string | null | undefined;
3809
+ };
3810
+ };
3811
+ }>)[];
3812
+ metadata: {
3813
+ openapi: {
3814
+ description: string;
3815
+ responses: {
3816
+ "200": {
3817
+ description: string;
3818
+ content: {
3819
+ "application/json": {
3820
+ schema: {
3821
+ type: "object";
3822
+ properties: {
3823
+ user: {
3824
+ type: string;
3825
+ properties: {
3826
+ id: {
3827
+ type: string;
3828
+ };
3829
+ name: {
3830
+ type: string;
3831
+ };
3832
+ email: {
3833
+ type: string;
3834
+ };
3835
+ image: {
3836
+ type: string;
3837
+ };
3838
+ emailVerified: {
3839
+ type: string;
3840
+ };
3841
+ };
3842
+ required: string[];
3843
+ };
3844
+ data: {
3845
+ type: string;
3846
+ properties: {};
3847
+ additionalProperties: boolean;
3848
+ };
3849
+ };
3850
+ required: string[];
3851
+ additionalProperties: boolean;
3852
+ };
3853
+ };
3854
+ };
3855
+ };
3856
+ };
3857
+ };
3858
+ };
3859
+ query: zod.ZodOptional<zod.ZodObject<{
3860
+ accountId: zod.ZodOptional<zod.ZodString>;
3861
+ }, zod_v4_core0.$strip>>;
3862
+ }, {
3863
+ user: _better_auth_core_oauth20.OAuth2UserInfo;
3864
+ data: Record<string, any>;
3865
+ } | null>;
3866
+ } & UnionToIntersection<Option["plugins"] extends (infer T_10)[] ? T_10 extends BetterAuthPlugin ? T_10 extends {
3867
+ endpoints: infer E;
3868
+ } ? E : {} : {} : {}>;
3869
+ };
3870
+ //#endregion
3871
+ export { APIError, type AuthEndpoint, type AuthMiddleware, accountInfo, callbackOAuth, changeEmail, changePassword, checkEndpointConflicts, createAuthEndpoint, createAuthMiddleware, createEmailVerificationToken, deleteUser, deleteUserCallback, error, formCsrfMiddleware, freshSessionMiddleware, getAccessToken, getEndpoints, getIp, getOAuthState, getSession, getSessionFromCtx, getShouldSkipSessionRefresh, isAPIError, linkSocialAccount, listSessions, listUserAccounts, ok, optionsMiddleware, originCheck, originCheckMiddleware, refreshToken, requestOnlySessionMiddleware, requestPasswordReset, requestPasswordResetCallback, resetPassword, revokeOtherSessions, revokeSession, revokeSessions, router, sendVerificationEmail, sendVerificationEmailFn, sensitiveSessionMiddleware, sessionMiddleware, setPassword, setShouldSkipSessionRefresh, signInEmail, signInSocial, signOut, signUpEmail, unlinkAccount, updateUser, verifyEmail, verifyPassword };
3872
+ //# sourceMappingURL=index.d.mts.map