@masheev/better-auth 0.0.0-stage → 1.7.5

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