better-auth 1.7.0-beta.2 → 1.7.0-beta.4

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 (282) hide show
  1. package/README.md +14 -15
  2. package/dist/_virtual/_rolldown/runtime.mjs +10 -1
  3. package/dist/api/index.d.mts +18 -48
  4. package/dist/api/routes/account.d.mts +4 -23
  5. package/dist/api/routes/account.mjs +102 -75
  6. package/dist/api/routes/callback.mjs +42 -20
  7. package/dist/api/routes/email-verification.d.mts +1 -0
  8. package/dist/api/routes/email-verification.mjs +6 -5
  9. package/dist/api/routes/error.mjs +1 -1
  10. package/dist/api/routes/password.mjs +1 -1
  11. package/dist/api/routes/session.mjs +15 -10
  12. package/dist/api/routes/sign-in.d.mts +3 -1
  13. package/dist/api/routes/sign-in.mjs +13 -15
  14. package/dist/api/routes/sign-up.d.mts +1 -0
  15. package/dist/api/routes/sign-up.mjs +10 -8
  16. package/dist/api/routes/update-user.mjs +8 -8
  17. package/dist/api/to-auth-endpoints.mjs +7 -1
  18. package/dist/auth/base.mjs +30 -27
  19. package/dist/client/config.mjs +8 -1
  20. package/dist/client/fetch-plugins.mjs +2 -1
  21. package/dist/client/index.d.mts +2 -2
  22. package/dist/client/lynx/index.d.mts +13 -0
  23. package/dist/client/lynx/index.mjs +2 -1
  24. package/dist/client/parser.mjs +0 -1
  25. package/dist/client/plugins/index.d.mts +4 -17
  26. package/dist/client/plugins/index.mjs +1 -4
  27. package/dist/client/proxy.mjs +2 -1
  28. package/dist/client/react/index.d.mts +13 -0
  29. package/dist/client/react/index.mjs +2 -1
  30. package/dist/client/session-atom.mjs +12 -1
  31. package/dist/client/solid/index.d.mts +13 -0
  32. package/dist/client/solid/index.mjs +3 -2
  33. package/dist/client/svelte/index.d.mts +13 -0
  34. package/dist/client/svelte/index.mjs +2 -1
  35. package/dist/client/vanilla.d.mts +13 -0
  36. package/dist/client/vanilla.mjs +2 -1
  37. package/dist/client/vue/index.d.mts +13 -0
  38. package/dist/client/vue/index.mjs +2 -1
  39. package/dist/context/create-context.mjs +10 -14
  40. package/dist/context/helpers.mjs +3 -2
  41. package/dist/cookies/cookie-utils.d.mts +33 -1
  42. package/dist/cookies/cookie-utils.mjs +95 -14
  43. package/dist/cookies/index.d.mts +2 -3
  44. package/dist/cookies/index.mjs +39 -11
  45. package/dist/cookies/session-store.mjs +4 -23
  46. package/dist/db/get-migration.mjs +4 -4
  47. package/dist/db/index.d.mts +2 -2
  48. package/dist/db/index.mjs +3 -2
  49. package/dist/db/internal-adapter.mjs +129 -27
  50. package/dist/db/schema.d.mts +14 -1
  51. package/dist/db/schema.mjs +26 -1
  52. package/dist/db/with-hooks.d.mts +1 -0
  53. package/dist/db/with-hooks.mjs +58 -1
  54. package/dist/index.d.mts +2 -2
  55. package/dist/index.mjs +2 -2
  56. package/dist/integrations/cookie-plugin-guard.mjs +18 -0
  57. package/dist/integrations/next-js.mjs +6 -0
  58. package/dist/integrations/svelte-kit.mjs +6 -0
  59. package/dist/integrations/tanstack-start-solid.mjs +6 -0
  60. package/dist/integrations/tanstack-start.mjs +6 -0
  61. package/dist/node_modules/.pnpm/clipboardy@4.0.0/node_modules/clipboardy/index.mjs +32 -0
  62. package/dist/node_modules/.pnpm/clipboardy@4.0.0/node_modules/clipboardy/lib/linux.mjs +55 -0
  63. package/dist/node_modules/.pnpm/clipboardy@4.0.0/node_modules/clipboardy/lib/macos.mjs +26 -0
  64. package/dist/node_modules/.pnpm/clipboardy@4.0.0/node_modules/clipboardy/lib/termux.mjs +39 -0
  65. package/dist/node_modules/.pnpm/clipboardy@4.0.0/node_modules/clipboardy/lib/windows.mjs +19 -0
  66. package/dist/node_modules/.pnpm/consola@3.4.2/node_modules/consola/dist/chunks/prompt.mjs +845 -0
  67. package/dist/node_modules/.pnpm/consola@3.4.2/node_modules/consola/dist/core.mjs +386 -0
  68. package/dist/node_modules/.pnpm/consola@3.4.2/node_modules/consola/dist/index.mjs +320 -0
  69. package/dist/node_modules/.pnpm/consola@3.4.2/node_modules/consola/dist/shared/consola.DRwqZj3T.mjs +62 -0
  70. package/dist/node_modules/.pnpm/consola@3.4.2/node_modules/consola/dist/shared/consola.DXBYu-KD.mjs +190 -0
  71. package/dist/node_modules/.pnpm/consola@3.4.2/node_modules/consola/dist/utils.mjs +2 -0
  72. package/dist/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/index.mjs +29 -0
  73. package/dist/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.mjs +42 -0
  74. package/dist/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.mjs +67 -0
  75. package/dist/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.mjs +23 -0
  76. package/dist/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.mjs +22 -0
  77. package/dist/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.mjs +36 -0
  78. package/dist/node_modules/.pnpm/crossws@0.3.5/node_modules/crossws/dist/adapters/node.d.mts +292 -0
  79. package/dist/node_modules/.pnpm/crossws@0.3.5/node_modules/crossws/dist/adapters/node.mjs +127 -0
  80. package/dist/node_modules/.pnpm/crossws@0.3.5/node_modules/crossws/dist/index.d.mts +145 -0
  81. package/dist/node_modules/.pnpm/crossws@0.3.5/node_modules/crossws/dist/shared/crossws.BQXMA5bH.d.mts +298 -0
  82. package/dist/node_modules/.pnpm/crossws@0.3.5/node_modules/crossws/dist/shared/crossws.By9qWDAI.mjs +9 -0
  83. package/dist/node_modules/.pnpm/crossws@0.3.5/node_modules/crossws/dist/shared/crossws.CipVM6lf.mjs +3549 -0
  84. package/dist/node_modules/.pnpm/crossws@0.3.5/node_modules/crossws/dist/shared/crossws.D9ehKjSh.mjs +66 -0
  85. package/dist/node_modules/.pnpm/crossws@0.3.5/node_modules/crossws/dist/shared/crossws.DfCzGthR.mjs +227 -0
  86. package/dist/node_modules/.pnpm/execa@8.0.1/node_modules/execa/index.mjs +224 -0
  87. package/dist/node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/command.mjs +52 -0
  88. package/dist/node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/error.mjs +54 -0
  89. package/dist/node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/kill.mjs +62 -0
  90. package/dist/node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/pipe.mjs +26 -0
  91. package/dist/node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/promise.mjs +32 -0
  92. package/dist/node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/stdio.mjs +19 -0
  93. package/dist/node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/stream.mjs +98 -0
  94. package/dist/node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/verbose.mjs +15 -0
  95. package/dist/node_modules/.pnpm/get-port-please@3.2.0/node_modules/get-port-please/dist/index.d.mts +15 -0
  96. package/dist/node_modules/.pnpm/get-port-please@3.2.0/node_modules/get-port-please/dist/index.mjs +220 -0
  97. package/dist/node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/array-buffer.mjs +54 -0
  98. package/dist/node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/array.mjs +2 -0
  99. package/dist/node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/buffer.mjs +14 -0
  100. package/dist/node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/contents.mjs +76 -0
  101. package/dist/node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/index.mjs +6 -0
  102. package/dist/node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/string.mjs +35 -0
  103. package/dist/node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/utils.mjs +10 -0
  104. package/dist/node_modules/.pnpm/http-shutdown@1.2.2/node_modules/http-shutdown/index.mjs +76 -0
  105. package/dist/node_modules/.pnpm/human-signals@5.0.0/node_modules/human-signals/build/src/core.mjs +274 -0
  106. package/dist/node_modules/.pnpm/human-signals@5.0.0/node_modules/human-signals/build/src/main.mjs +44 -0
  107. package/dist/node_modules/.pnpm/human-signals@5.0.0/node_modules/human-signals/build/src/realtime.mjs +15 -0
  108. package/dist/node_modules/.pnpm/human-signals@5.0.0/node_modules/human-signals/build/src/signals.mjs +23 -0
  109. package/dist/node_modules/.pnpm/is-docker@3.0.0/node_modules/is-docker/index.mjs +24 -0
  110. package/dist/node_modules/.pnpm/is-inside-container@1.0.0/node_modules/is-inside-container/index.mjs +18 -0
  111. package/dist/node_modules/.pnpm/is-stream@3.0.0/node_modules/is-stream/index.mjs +9 -0
  112. package/dist/node_modules/.pnpm/is-wsl@3.1.1/node_modules/is-wsl/index.mjs +20 -0
  113. package/dist/node_modules/.pnpm/is64bit@2.0.0/node_modules/is64bit/index.mjs +13 -0
  114. package/dist/node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.mjs +47 -0
  115. package/dist/node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.mjs +33 -0
  116. package/dist/node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.mjs +33 -0
  117. package/dist/node_modules/.pnpm/listhen@1.9.0/node_modules/listhen/dist/chunks/xdg-open.mjs +1070 -0
  118. package/dist/node_modules/.pnpm/listhen@1.9.0/node_modules/listhen/dist/index.mjs +619 -0
  119. package/dist/node_modules/.pnpm/listhen@1.9.0/node_modules/listhen/dist/shared/listhen.1c46e31d.d.mts +83 -0
  120. package/dist/node_modules/.pnpm/merge-stream@2.0.0/node_modules/merge-stream/index.mjs +38 -0
  121. package/dist/node_modules/.pnpm/mimic-fn@4.0.0/node_modules/mimic-fn/index.mjs +38 -0
  122. package/dist/node_modules/.pnpm/node-forge@1.4.0/node_modules/node-forge/lib/aes.mjs +597 -0
  123. package/dist/node_modules/.pnpm/node-forge@1.4.0/node_modules/node-forge/lib/aesCipherSuites.mjs +195 -0
  124. package/dist/node_modules/.pnpm/node-forge@1.4.0/node_modules/node-forge/lib/asn1-validator.mjs +76 -0
  125. package/dist/node_modules/.pnpm/node-forge@1.4.0/node_modules/node-forge/lib/asn1.mjs +967 -0
  126. package/dist/node_modules/.pnpm/node-forge@1.4.0/node_modules/node-forge/lib/baseN.mjs +137 -0
  127. package/dist/node_modules/.pnpm/node-forge@1.4.0/node_modules/node-forge/lib/cipher.mjs +186 -0
  128. package/dist/node_modules/.pnpm/node-forge@1.4.0/node_modules/node-forge/lib/cipherModes.mjs +597 -0
  129. package/dist/node_modules/.pnpm/node-forge@1.4.0/node_modules/node-forge/lib/des.mjs +1187 -0
  130. package/dist/node_modules/.pnpm/node-forge@1.4.0/node_modules/node-forge/lib/ed25519.mjs +1029 -0
  131. package/dist/node_modules/.pnpm/node-forge@1.4.0/node_modules/node-forge/lib/forge.mjs +15 -0
  132. package/dist/node_modules/.pnpm/node-forge@1.4.0/node_modules/node-forge/lib/hmac.mjs +107 -0
  133. package/dist/node_modules/.pnpm/node-forge@1.4.0/node_modules/node-forge/lib/index.mjs +66 -0
  134. package/dist/node_modules/.pnpm/node-forge@1.4.0/node_modules/node-forge/lib/jsbn.mjs +1334 -0
  135. package/dist/node_modules/.pnpm/node-forge@1.4.0/node_modules/node-forge/lib/kem.mjs +146 -0
  136. package/dist/node_modules/.pnpm/node-forge@1.4.0/node_modules/node-forge/lib/log.mjs +241 -0
  137. package/dist/node_modules/.pnpm/node-forge@1.4.0/node_modules/node-forge/lib/md.all.mjs +24 -0
  138. package/dist/node_modules/.pnpm/node-forge@1.4.0/node_modules/node-forge/lib/md.mjs +18 -0
  139. package/dist/node_modules/.pnpm/node-forge@1.4.0/node_modules/node-forge/lib/md5.mjs +324 -0
  140. package/dist/node_modules/.pnpm/node-forge@1.4.0/node_modules/node-forge/lib/mgf.mjs +20 -0
  141. package/dist/node_modules/.pnpm/node-forge@1.4.0/node_modules/node-forge/lib/mgf1.mjs +44 -0
  142. package/dist/node_modules/.pnpm/node-forge@1.4.0/node_modules/node-forge/lib/oids.mjs +154 -0
  143. package/dist/node_modules/.pnpm/node-forge@1.4.0/node_modules/node-forge/lib/pbe.mjs +815 -0
  144. package/dist/node_modules/.pnpm/node-forge@1.4.0/node_modules/node-forge/lib/pbkdf2.mjs +125 -0
  145. package/dist/node_modules/.pnpm/node-forge@1.4.0/node_modules/node-forge/lib/pem.mjs +175 -0
  146. package/dist/node_modules/.pnpm/node-forge@1.4.0/node_modules/node-forge/lib/pkcs1.mjs +200 -0
  147. package/dist/node_modules/.pnpm/node-forge@1.4.0/node_modules/node-forge/lib/pkcs12.mjs +724 -0
  148. package/dist/node_modules/.pnpm/node-forge@1.4.0/node_modules/node-forge/lib/pkcs7.mjs +642 -0
  149. package/dist/node_modules/.pnpm/node-forge@1.4.0/node_modules/node-forge/lib/pkcs7asn1.mjs +405 -0
  150. package/dist/node_modules/.pnpm/node-forge@1.4.0/node_modules/node-forge/lib/pki.mjs +101 -0
  151. package/dist/node_modules/.pnpm/node-forge@1.4.0/node_modules/node-forge/lib/prime.mjs +193 -0
  152. package/dist/node_modules/.pnpm/node-forge@1.4.0/node_modules/node-forge/lib/prng.mjs +290 -0
  153. package/dist/node_modules/.pnpm/node-forge@1.4.0/node_modules/node-forge/lib/pss.mjs +141 -0
  154. package/dist/node_modules/.pnpm/node-forge@1.4.0/node_modules/node-forge/lib/random.mjs +141 -0
  155. package/dist/node_modules/.pnpm/node-forge@1.4.0/node_modules/node-forge/lib/rc2.mjs +538 -0
  156. package/dist/node_modules/.pnpm/node-forge@1.4.0/node_modules/node-forge/lib/rsa.mjs +1309 -0
  157. package/dist/node_modules/.pnpm/node-forge@1.4.0/node_modules/node-forge/lib/sha1.mjs +230 -0
  158. package/dist/node_modules/.pnpm/node-forge@1.4.0/node_modules/node-forge/lib/sha256.mjs +267 -0
  159. package/dist/node_modules/.pnpm/node-forge@1.4.0/node_modules/node-forge/lib/sha512.mjs +413 -0
  160. package/dist/node_modules/.pnpm/node-forge@1.4.0/node_modules/node-forge/lib/ssh.mjs +194 -0
  161. package/dist/node_modules/.pnpm/node-forge@1.4.0/node_modules/node-forge/lib/tls.mjs +3655 -0
  162. package/dist/node_modules/.pnpm/node-forge@1.4.0/node_modules/node-forge/lib/util.mjs +2117 -0
  163. package/dist/node_modules/.pnpm/node-forge@1.4.0/node_modules/node-forge/lib/x509.mjs +2168 -0
  164. package/dist/node_modules/.pnpm/npm-run-path@5.3.0/node_modules/npm-run-path/index.mjs +34 -0
  165. package/dist/node_modules/.pnpm/onetime@6.0.0/node_modules/onetime/index.mjs +26 -0
  166. package/dist/node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.mjs +14 -0
  167. package/dist/node_modules/.pnpm/path-key@4.0.0/node_modules/path-key/index.mjs +8 -0
  168. package/dist/node_modules/.pnpm/pathe@1.1.2/node_modules/pathe/dist/shared/pathe.ff20891b.mjs +176 -0
  169. package/dist/node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.mjs +17 -0
  170. package/dist/node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.mjs +8 -0
  171. package/dist/node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/index.mjs +169 -0
  172. package/dist/node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/signals.mjs +33 -0
  173. package/dist/node_modules/.pnpm/std-env@3.10.0/node_modules/std-env/dist/index.mjs +171 -0
  174. package/dist/node_modules/.pnpm/strip-final-newline@3.0.0/node_modules/strip-final-newline/index.mjs +10 -0
  175. package/dist/node_modules/.pnpm/system-architecture@0.1.0/node_modules/system-architecture/index.mjs +16 -0
  176. package/dist/node_modules/.pnpm/uncrypto@0.1.3/node_modules/uncrypto/dist/crypto.node.mjs +7 -0
  177. package/dist/node_modules/.pnpm/untun@0.1.3/node_modules/untun/dist/chunks/index.mjs +154 -0
  178. package/dist/node_modules/.pnpm/untun@0.1.3/node_modules/untun/dist/index.mjs +34 -0
  179. package/dist/node_modules/.pnpm/uqr@0.1.2/node_modules/uqr/dist/index.mjs +896 -0
  180. package/dist/node_modules/.pnpm/which@2.0.2/node_modules/which/which.mjs +76 -0
  181. package/dist/oauth2/errors.mjs +27 -0
  182. package/dist/oauth2/index.d.mts +2 -2
  183. package/dist/oauth2/index.mjs +3 -3
  184. package/dist/oauth2/link-account.d.mts +27 -1
  185. package/dist/oauth2/link-account.mjs +30 -5
  186. package/dist/oauth2/state.mjs +8 -2
  187. package/dist/{package.mjs → packages/better-auth/package.mjs} +1 -1
  188. package/dist/plugins/access/access.d.mts +3 -15
  189. package/dist/plugins/access/access.mjs +11 -6
  190. package/dist/plugins/access/index.d.mts +2 -2
  191. package/dist/plugins/access/types.d.mts +11 -4
  192. package/dist/plugins/admin/access/statement.d.mts +29 -93
  193. package/dist/plugins/admin/admin.mjs +0 -4
  194. package/dist/plugins/admin/client.d.mts +6 -1
  195. package/dist/plugins/admin/client.mjs +5 -0
  196. package/dist/plugins/admin/routes.mjs +3 -2
  197. package/dist/plugins/anonymous/client.d.mts +1 -0
  198. package/dist/plugins/anonymous/error-codes.d.mts +1 -0
  199. package/dist/plugins/anonymous/error-codes.mjs +1 -0
  200. package/dist/plugins/anonymous/index.d.mts +1 -0
  201. package/dist/plugins/anonymous/index.mjs +16 -2
  202. package/dist/plugins/bearer/index.mjs +5 -12
  203. package/dist/plugins/captcha/index.mjs +14 -1
  204. package/dist/plugins/device-authorization/error-codes.mjs +1 -0
  205. package/dist/plugins/device-authorization/index.d.mts +1 -0
  206. package/dist/plugins/device-authorization/routes.mjs +34 -3
  207. package/dist/plugins/email-otp/routes.mjs +4 -4
  208. package/dist/plugins/generic-oauth/error-codes.mjs +0 -1
  209. package/dist/plugins/generic-oauth/index.d.mts +2 -4
  210. package/dist/plugins/generic-oauth/index.mjs +23 -17
  211. package/dist/plugins/generic-oauth/providers/auth0.mjs +1 -0
  212. package/dist/plugins/generic-oauth/providers/gumroad.mjs +1 -0
  213. package/dist/plugins/generic-oauth/providers/hubspot.mjs +1 -0
  214. package/dist/plugins/generic-oauth/providers/keycloak.mjs +1 -0
  215. package/dist/plugins/generic-oauth/providers/line.mjs +1 -0
  216. package/dist/plugins/generic-oauth/providers/microsoft-entra-id.mjs +1 -0
  217. package/dist/plugins/generic-oauth/providers/okta.mjs +1 -0
  218. package/dist/plugins/generic-oauth/providers/patreon.mjs +1 -0
  219. package/dist/plugins/generic-oauth/providers/slack.mjs +1 -0
  220. package/dist/plugins/generic-oauth/types.d.mts +30 -8
  221. package/dist/plugins/index.d.mts +2 -2
  222. package/dist/plugins/jwt/utils.d.mts +1 -1
  223. package/dist/plugins/last-login-method/client.mjs +2 -2
  224. package/dist/plugins/magic-link/index.d.mts +8 -1
  225. package/dist/plugins/magic-link/index.mjs +4 -17
  226. package/dist/plugins/mcp/authorize.mjs +8 -2
  227. package/dist/plugins/mcp/index.mjs +75 -35
  228. package/dist/plugins/multi-session/index.mjs +2 -2
  229. package/dist/plugins/oauth-proxy/index.mjs +45 -32
  230. package/dist/plugins/oauth-proxy/utils.mjs +3 -10
  231. package/dist/plugins/oidc-provider/authorize.mjs +8 -2
  232. package/dist/plugins/oidc-provider/index.mjs +65 -38
  233. package/dist/plugins/one-tap/client.mjs +9 -2
  234. package/dist/plugins/one-tap/index.mjs +19 -36
  235. package/dist/plugins/open-api/generator.mjs +25 -5
  236. package/dist/plugins/organization/access/statement.d.mts +68 -201
  237. package/dist/plugins/organization/adapter.d.mts +1 -1
  238. package/dist/plugins/organization/adapter.mjs +65 -58
  239. package/dist/plugins/organization/client.d.mts +3 -1
  240. package/dist/plugins/organization/client.mjs +1 -1
  241. package/dist/plugins/organization/error-codes.d.mts +2 -0
  242. package/dist/plugins/organization/error-codes.mjs +3 -1
  243. package/dist/plugins/organization/routes/crud-access-control.d.mts +2 -2
  244. package/dist/plugins/organization/routes/crud-invites.d.mts +8 -1
  245. package/dist/plugins/organization/routes/crud-invites.mjs +8 -3
  246. package/dist/plugins/organization/routes/crud-org.d.mts +4 -4
  247. package/dist/plugins/organization/routes/crud-org.mjs +2 -2
  248. package/dist/plugins/organization/routes/crud-team.mjs +7 -2
  249. package/dist/plugins/organization/schema.d.mts +1 -1
  250. package/dist/plugins/organization/types.d.mts +15 -5
  251. package/dist/plugins/phone-number/routes.mjs +1 -1
  252. package/dist/plugins/siwe/client.d.mts +4 -0
  253. package/dist/plugins/siwe/client.mjs +5 -1
  254. package/dist/plugins/siwe/index.d.mts +13 -2
  255. package/dist/plugins/siwe/index.mjs +179 -165
  256. package/dist/plugins/two-factor/backup-codes/index.d.mts +4 -3
  257. package/dist/plugins/two-factor/client.mjs +2 -1
  258. package/dist/plugins/two-factor/index.mjs +3 -2
  259. package/dist/plugins/username/client.d.mts +1 -0
  260. package/dist/plugins/username/error-codes.d.mts +1 -0
  261. package/dist/plugins/username/error-codes.mjs +2 -1
  262. package/dist/plugins/username/index.d.mts +43 -2
  263. package/dist/plugins/username/index.mjs +73 -6
  264. package/dist/state.d.mts +2 -2
  265. package/dist/state.mjs +18 -4
  266. package/dist/test-utils/headers.mjs +2 -7
  267. package/dist/test-utils/http-test-instance.d.mts +397 -0
  268. package/dist/test-utils/http-test-instance.mjs +54 -0
  269. package/dist/test-utils/index.d.mts +2 -1
  270. package/dist/test-utils/index.mjs +2 -1
  271. package/dist/test-utils/test-instance.d.mts +4110 -224
  272. package/dist/test-utils/test-instance.mjs +11 -2
  273. package/dist/types/auth.d.mts +4 -0
  274. package/dist/utils/index.d.mts +1 -1
  275. package/dist/utils/url.d.mts +2 -1
  276. package/dist/utils/url.mjs +9 -3
  277. package/dist/version.mjs +1 -1
  278. package/package.json +14 -14
  279. package/dist/oauth2/error-codes.d.mts +0 -20
  280. package/dist/plugins/generic-oauth/client.d.mts +0 -32
  281. package/dist/plugins/generic-oauth/client.mjs +0 -19
  282. package/dist/plugins/generic-oauth/error-codes.d.mts +0 -10
@@ -122,6 +122,7 @@ declare function getTestInstance<O extends Partial<BetterAuthOptions>, C extends
122
122
  scopes: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
123
123
  requestSignUp: zod.ZodOptional<zod.ZodBoolean>;
124
124
  loginHint: zod.ZodOptional<zod.ZodString>;
125
+ additionalParams: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodString>>;
125
126
  additionalData: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodAny>>;
126
127
  }, zod_v4_core0.$strip>;
127
128
  metadata: {
@@ -149,6 +150,7 @@ declare function getTestInstance<O extends Partial<BetterAuthOptions>, C extends
149
150
  scopes: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
150
151
  requestSignUp: zod.ZodOptional<zod.ZodBoolean>;
151
152
  loginHint: zod.ZodOptional<zod.ZodString>;
153
+ additionalParams: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodString>>;
152
154
  additionalData: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodAny>>;
153
155
  }, zod_v4_core0.$strip>>;
154
156
  returned: {
@@ -190,7 +192,6 @@ declare function getTestInstance<O extends Partial<BetterAuthOptions>, C extends
190
192
  };
191
193
  redirect: {
192
194
  type: string;
193
- enum: boolean[];
194
195
  };
195
196
  };
196
197
  required: string[];
@@ -342,6 +343,7 @@ declare function getTestInstance<O extends Partial<BetterAuthOptions>, C extends
342
343
  callbackURL: zod.ZodOptional<zod.ZodString>;
343
344
  rememberMe: zod.ZodOptional<zod.ZodBoolean>;
344
345
  }, zod_v4_core0.$strip>, zod.ZodRecord<zod.ZodString, zod.ZodAny>>;
346
+ cloneRequest: true;
345
347
  metadata: {
346
348
  allowedMediaTypes: string[];
347
349
  $Infer: {
@@ -508,6 +510,7 @@ declare function getTestInstance<O extends Partial<BetterAuthOptions>, C extends
508
510
  method: "POST";
509
511
  operationId: string;
510
512
  use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<void>)[];
513
+ cloneRequest: true;
511
514
  body: zod.ZodObject<{
512
515
  email: zod.ZodString;
513
516
  password: zod.ZodString;
@@ -739,6 +742,7 @@ declare function getTestInstance<O extends Partial<BetterAuthOptions>, C extends
739
742
  readonly sendVerificationEmail: better_call0.StrictEndpoint<"/send-verification-email", {
740
743
  method: "POST";
741
744
  operationId: string;
745
+ cloneRequest: true;
742
746
  body: zod.ZodObject<{
743
747
  email: zod.ZodEmail;
744
748
  callbackURL: zod.ZodOptional<zod.ZodString>;
@@ -1595,6 +1599,8 @@ declare function getTestInstance<O extends Partial<BetterAuthOptions>, C extends
1595
1599
  scopes: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
1596
1600
  errorCallbackURL: zod.ZodOptional<zod.ZodString>;
1597
1601
  disableRedirect: zod.ZodOptional<zod.ZodBoolean>;
1602
+ loginHint: zod.ZodOptional<zod.ZodString>;
1603
+ additionalParams: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodString>>;
1598
1604
  additionalData: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodAny>>;
1599
1605
  }, zod_v4_core0.$strip>;
1600
1606
  use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
@@ -1943,29 +1949,6 @@ declare function getTestInstance<O extends Partial<BetterAuthOptions>, C extends
1943
1949
  }>;
1944
1950
  readonly accountInfo: better_call0.StrictEndpoint<"/account-info", {
1945
1951
  method: "GET";
1946
- use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
1947
- session: {
1948
- session: Record<string, any> & {
1949
- id: string;
1950
- createdAt: Date;
1951
- updatedAt: Date;
1952
- userId: string;
1953
- expiresAt: Date;
1954
- token: string;
1955
- ipAddress?: string | null | undefined;
1956
- userAgent?: string | null | undefined;
1957
- };
1958
- user: Record<string, any> & {
1959
- id: string;
1960
- createdAt: Date;
1961
- updatedAt: Date;
1962
- email: string;
1963
- emailVerified: boolean;
1964
- name: string;
1965
- image?: string | null | undefined;
1966
- };
1967
- };
1968
- }>)[];
1969
1952
  metadata: {
1970
1953
  openapi: {
1971
1954
  description: string;
@@ -2015,6 +1998,8 @@ declare function getTestInstance<O extends Partial<BetterAuthOptions>, C extends
2015
1998
  };
2016
1999
  query: zod.ZodOptional<zod.ZodObject<{
2017
2000
  accountId: zod.ZodOptional<zod.ZodString>;
2001
+ providerId: zod.ZodOptional<zod.ZodString>;
2002
+ userId: zod.ZodOptional<zod.ZodString>;
2018
2003
  }, zod_v4_core0.$strip>>;
2019
2004
  }, {
2020
2005
  user: _better_auth_core_oauth20.OAuth2UserInfo;
@@ -2127,6 +2112,7 @@ declare function getTestInstance<O extends Partial<BetterAuthOptions>, C extends
2127
2112
  scopes: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
2128
2113
  requestSignUp: zod.ZodOptional<zod.ZodBoolean>;
2129
2114
  loginHint: zod.ZodOptional<zod.ZodString>;
2115
+ additionalParams: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodString>>;
2130
2116
  additionalData: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodAny>>;
2131
2117
  }, zod_v4_core0.$strip>;
2132
2118
  metadata: {
@@ -2154,6 +2140,7 @@ declare function getTestInstance<O extends Partial<BetterAuthOptions>, C extends
2154
2140
  scopes: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
2155
2141
  requestSignUp: zod.ZodOptional<zod.ZodBoolean>;
2156
2142
  loginHint: zod.ZodOptional<zod.ZodString>;
2143
+ additionalParams: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodString>>;
2157
2144
  additionalData: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodAny>>;
2158
2145
  }, zod_v4_core0.$strip>>;
2159
2146
  returned: {
@@ -2195,7 +2182,6 @@ declare function getTestInstance<O extends Partial<BetterAuthOptions>, C extends
2195
2182
  };
2196
2183
  redirect: {
2197
2184
  type: string;
2198
- enum: boolean[];
2199
2185
  };
2200
2186
  };
2201
2187
  required: string[];
@@ -2347,6 +2333,7 @@ declare function getTestInstance<O extends Partial<BetterAuthOptions>, C extends
2347
2333
  callbackURL: zod.ZodOptional<zod.ZodString>;
2348
2334
  rememberMe: zod.ZodOptional<zod.ZodBoolean>;
2349
2335
  }, zod_v4_core0.$strip>, zod.ZodRecord<zod.ZodString, zod.ZodAny>>;
2336
+ cloneRequest: true;
2350
2337
  metadata: {
2351
2338
  allowedMediaTypes: string[];
2352
2339
  $Infer: {
@@ -2513,6 +2500,7 @@ declare function getTestInstance<O extends Partial<BetterAuthOptions>, C extends
2513
2500
  method: "POST";
2514
2501
  operationId: string;
2515
2502
  use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<void>)[];
2503
+ cloneRequest: true;
2516
2504
  body: zod.ZodObject<{
2517
2505
  email: zod.ZodString;
2518
2506
  password: zod.ZodString;
@@ -2744,6 +2732,7 @@ declare function getTestInstance<O extends Partial<BetterAuthOptions>, C extends
2744
2732
  readonly sendVerificationEmail: better_call0.StrictEndpoint<"/send-verification-email", {
2745
2733
  method: "POST";
2746
2734
  operationId: string;
2735
+ cloneRequest: true;
2747
2736
  body: zod.ZodObject<{
2748
2737
  email: zod.ZodEmail;
2749
2738
  callbackURL: zod.ZodOptional<zod.ZodString>;
@@ -3600,6 +3589,8 @@ declare function getTestInstance<O extends Partial<BetterAuthOptions>, C extends
3600
3589
  scopes: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
3601
3590
  errorCallbackURL: zod.ZodOptional<zod.ZodString>;
3602
3591
  disableRedirect: zod.ZodOptional<zod.ZodBoolean>;
3592
+ loginHint: zod.ZodOptional<zod.ZodString>;
3593
+ additionalParams: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodString>>;
3603
3594
  additionalData: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodAny>>;
3604
3595
  }, zod_v4_core0.$strip>;
3605
3596
  use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
@@ -3934,122 +3925,4076 @@ declare function getTestInstance<O extends Partial<BetterAuthOptions>, C extends
3934
3925
  };
3935
3926
  };
3936
3927
  };
3937
- 400: {
3938
- description: string;
3939
- };
3940
- };
3941
- };
3942
- };
3943
- }, {
3944
- accessToken: string;
3945
- accessTokenExpiresAt: Date | undefined;
3946
- scopes: string[];
3947
- idToken: string | undefined;
3948
- }>;
3949
- readonly accountInfo: better_call0.StrictEndpoint<"/account-info", {
3950
- method: "GET";
3951
- use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
3952
- session: {
3953
- session: Record<string, any> & {
3954
- id: string;
3955
- createdAt: Date;
3956
- updatedAt: Date;
3957
- userId: string;
3958
- expiresAt: Date;
3959
- token: string;
3960
- ipAddress?: string | null | undefined;
3961
- userAgent?: string | null | undefined;
3962
- };
3963
- user: Record<string, any> & {
3964
- id: string;
3965
- createdAt: Date;
3966
- updatedAt: Date;
3967
- email: string;
3968
- emailVerified: boolean;
3969
- name: string;
3970
- image?: string | null | undefined;
3928
+ 400: {
3929
+ description: string;
3930
+ };
3931
+ };
3932
+ };
3933
+ };
3934
+ }, {
3935
+ accessToken: string;
3936
+ accessTokenExpiresAt: Date | undefined;
3937
+ scopes: string[];
3938
+ idToken: string | undefined;
3939
+ }>;
3940
+ readonly accountInfo: better_call0.StrictEndpoint<"/account-info", {
3941
+ method: "GET";
3942
+ metadata: {
3943
+ openapi: {
3944
+ description: string;
3945
+ responses: {
3946
+ "200": {
3947
+ description: string;
3948
+ content: {
3949
+ "application/json": {
3950
+ schema: {
3951
+ type: "object";
3952
+ properties: {
3953
+ user: {
3954
+ type: string;
3955
+ properties: {
3956
+ id: {
3957
+ type: string;
3958
+ };
3959
+ name: {
3960
+ type: string;
3961
+ };
3962
+ email: {
3963
+ type: string;
3964
+ };
3965
+ image: {
3966
+ type: string;
3967
+ };
3968
+ emailVerified: {
3969
+ type: string;
3970
+ };
3971
+ };
3972
+ required: string[];
3973
+ };
3974
+ data: {
3975
+ type: string;
3976
+ properties: {};
3977
+ additionalProperties: boolean;
3978
+ };
3979
+ };
3980
+ required: string[];
3981
+ additionalProperties: boolean;
3982
+ };
3983
+ };
3984
+ };
3985
+ };
3986
+ };
3987
+ };
3988
+ };
3989
+ query: zod.ZodOptional<zod.ZodObject<{
3990
+ accountId: zod.ZodOptional<zod.ZodString>;
3991
+ providerId: zod.ZodOptional<zod.ZodString>;
3992
+ userId: zod.ZodOptional<zod.ZodString>;
3993
+ }, zod_v4_core0.$strip>>;
3994
+ }, {
3995
+ user: _better_auth_core_oauth20.OAuth2UserInfo;
3996
+ data: Record<string, any>;
3997
+ } | null>;
3998
+ }>>, (C extends undefined ? {} : C) & {
3999
+ baseURL: string | undefined;
4000
+ fetchOptions: {
4001
+ customFetchImpl: (url: string | URL | Request, init?: RequestInit | undefined) => Promise<Response>;
4002
+ };
4003
+ }>> & (((C extends undefined ? {} : C) & {
4004
+ baseURL: string | undefined;
4005
+ fetchOptions: {
4006
+ customFetchImpl: (url: string | URL | Request, init?: RequestInit | undefined) => Promise<Response>;
4007
+ };
4008
+ })["plugins"] extends (infer Plugin_1)[] ? UnionToIntersection<Plugin_1 extends _better_auth_core0.BetterAuthClientPlugin ? Plugin_1["getActions"] extends ((...args: any) => infer Actions) ? Actions : {} : {}> : {}) & UnionToIntersection<InferRoute<((C extends undefined ? {} : C) & {
4009
+ baseURL: string | undefined;
4010
+ fetchOptions: {
4011
+ customFetchImpl: (url: string | URL | Request, init?: RequestInit | undefined) => Promise<Response>;
4012
+ };
4013
+ })["$InferAuth"] extends {
4014
+ plugins: infer Plugins;
4015
+ } ? Plugins extends (infer Plugin_2)[] ? Plugin_2 extends {
4016
+ endpoints: infer Endpoints_1;
4017
+ } ? Endpoints_1 : {} : {} : {}, (C extends undefined ? {} : C) & {
4018
+ baseURL: string | undefined;
4019
+ fetchOptions: {
4020
+ customFetchImpl: (url: string | URL | Request, init?: RequestInit | undefined) => Promise<Response>;
4021
+ };
4022
+ }>> & {
4023
+ hydrateSession: (session: NonNullable<UnionToIntersection<InferRoute<((C extends undefined ? {} : C) & {
4024
+ baseURL: string | undefined;
4025
+ fetchOptions: {
4026
+ customFetchImpl: (url: string | URL | Request, init?: RequestInit | undefined) => Promise<Response>;
4027
+ };
4028
+ })["plugins"] extends any[] ? Omit<InferAPI<Prettify$1<{
4029
+ readonly ok: better_call0.StrictEndpoint<"/ok", {
4030
+ method: "GET";
4031
+ metadata: {
4032
+ openapi: {
4033
+ description: string;
4034
+ responses: {
4035
+ "200": {
4036
+ description: string;
4037
+ content: {
4038
+ "application/json": {
4039
+ schema: {
4040
+ type: "object";
4041
+ properties: {
4042
+ ok: {
4043
+ type: string;
4044
+ description: string;
4045
+ };
4046
+ };
4047
+ required: string[];
4048
+ };
4049
+ };
4050
+ };
4051
+ };
4052
+ };
4053
+ };
4054
+ scope: "server";
4055
+ };
4056
+ }, {
4057
+ ok: boolean;
4058
+ }>;
4059
+ readonly error: better_call0.StrictEndpoint<"/error", {
4060
+ method: "GET";
4061
+ metadata: {
4062
+ openapi: {
4063
+ description: string;
4064
+ responses: {
4065
+ "200": {
4066
+ description: string;
4067
+ content: {
4068
+ "text/html": {
4069
+ schema: {
4070
+ type: "string";
4071
+ description: string;
4072
+ };
4073
+ };
4074
+ };
4075
+ };
4076
+ };
4077
+ };
4078
+ scope: "server";
4079
+ };
4080
+ }, Response>;
4081
+ readonly signInSocial: better_call0.StrictEndpoint<"/sign-in/social", {
4082
+ method: "POST";
4083
+ operationId: string;
4084
+ body: zod.ZodObject<{
4085
+ callbackURL: zod.ZodOptional<zod.ZodString>;
4086
+ newUserCallbackURL: zod.ZodOptional<zod.ZodString>;
4087
+ errorCallbackURL: zod.ZodOptional<zod.ZodString>;
4088
+ provider: zod.ZodType<(string & {}) | "linear" | "huggingface" | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown, zod_v4_core0.$ZodTypeInternals<(string & {}) | "linear" | "huggingface" | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown>>;
4089
+ disableRedirect: zod.ZodOptional<zod.ZodBoolean>;
4090
+ idToken: zod.ZodOptional<zod.ZodObject<{
4091
+ token: zod.ZodString;
4092
+ nonce: zod.ZodOptional<zod.ZodString>;
4093
+ accessToken: zod.ZodOptional<zod.ZodString>;
4094
+ refreshToken: zod.ZodOptional<zod.ZodString>;
4095
+ expiresAt: zod.ZodOptional<zod.ZodNumber>;
4096
+ user: zod.ZodOptional<zod.ZodObject<{
4097
+ name: zod.ZodOptional<zod.ZodObject<{
4098
+ firstName: zod.ZodOptional<zod.ZodString>;
4099
+ lastName: zod.ZodOptional<zod.ZodString>;
4100
+ }, zod_v4_core0.$strip>>;
4101
+ email: zod.ZodOptional<zod.ZodString>;
4102
+ }, zod_v4_core0.$strip>>;
4103
+ }, zod_v4_core0.$strip>>;
4104
+ scopes: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
4105
+ requestSignUp: zod.ZodOptional<zod.ZodBoolean>;
4106
+ loginHint: zod.ZodOptional<zod.ZodString>;
4107
+ additionalParams: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodString>>;
4108
+ additionalData: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodAny>>;
4109
+ }, zod_v4_core0.$strip>;
4110
+ metadata: {
4111
+ $Infer: {
4112
+ body: zod.infer<zod.ZodObject<{
4113
+ callbackURL: zod.ZodOptional<zod.ZodString>;
4114
+ newUserCallbackURL: zod.ZodOptional<zod.ZodString>;
4115
+ errorCallbackURL: zod.ZodOptional<zod.ZodString>;
4116
+ provider: zod.ZodType<(string & {}) | "linear" | "huggingface" | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown, zod_v4_core0.$ZodTypeInternals<(string & {}) | "linear" | "huggingface" | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown>>;
4117
+ disableRedirect: zod.ZodOptional<zod.ZodBoolean>;
4118
+ idToken: zod.ZodOptional<zod.ZodObject<{
4119
+ token: zod.ZodString;
4120
+ nonce: zod.ZodOptional<zod.ZodString>;
4121
+ accessToken: zod.ZodOptional<zod.ZodString>;
4122
+ refreshToken: zod.ZodOptional<zod.ZodString>;
4123
+ expiresAt: zod.ZodOptional<zod.ZodNumber>;
4124
+ user: zod.ZodOptional<zod.ZodObject<{
4125
+ name: zod.ZodOptional<zod.ZodObject<{
4126
+ firstName: zod.ZodOptional<zod.ZodString>;
4127
+ lastName: zod.ZodOptional<zod.ZodString>;
4128
+ }, zod_v4_core0.$strip>>;
4129
+ email: zod.ZodOptional<zod.ZodString>;
4130
+ }, zod_v4_core0.$strip>>;
4131
+ }, zod_v4_core0.$strip>>;
4132
+ scopes: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
4133
+ requestSignUp: zod.ZodOptional<zod.ZodBoolean>;
4134
+ loginHint: zod.ZodOptional<zod.ZodString>;
4135
+ additionalParams: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodString>>;
4136
+ additionalData: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodAny>>;
4137
+ }, zod_v4_core0.$strip>>;
4138
+ returned: {
4139
+ redirect: boolean;
4140
+ token?: string | undefined;
4141
+ url?: string | undefined;
4142
+ user?: {
4143
+ id: string;
4144
+ createdAt: Date;
4145
+ updatedAt: Date;
4146
+ email: string;
4147
+ emailVerified: boolean;
4148
+ name: string;
4149
+ image?: string | null | undefined;
4150
+ } | undefined;
4151
+ };
4152
+ };
4153
+ openapi: {
4154
+ description: string;
4155
+ operationId: string;
4156
+ responses: {
4157
+ "200": {
4158
+ description: string;
4159
+ content: {
4160
+ "application/json": {
4161
+ schema: {
4162
+ type: "object";
4163
+ description: string;
4164
+ properties: {
4165
+ token: {
4166
+ type: string;
4167
+ };
4168
+ user: {
4169
+ type: string;
4170
+ $ref: string;
4171
+ };
4172
+ url: {
4173
+ type: string;
4174
+ };
4175
+ redirect: {
4176
+ type: string;
4177
+ };
4178
+ };
4179
+ required: string[];
4180
+ };
4181
+ };
4182
+ };
4183
+ };
4184
+ };
4185
+ };
4186
+ };
4187
+ }, {
4188
+ redirect: boolean;
4189
+ url: string;
4190
+ } | {
4191
+ redirect: boolean;
4192
+ token: string;
4193
+ url: undefined;
4194
+ user: {
4195
+ id: string;
4196
+ createdAt: Date;
4197
+ updatedAt: Date;
4198
+ email: string;
4199
+ emailVerified: boolean;
4200
+ name: string;
4201
+ image?: string | null | undefined;
4202
+ };
4203
+ }>;
4204
+ readonly callbackOAuth: better_call0.StrictEndpoint<"/callback/:id", {
4205
+ method: ("GET" | "POST")[];
4206
+ operationId: string;
4207
+ body: zod.ZodOptional<zod.ZodObject<{
4208
+ code: zod.ZodOptional<zod.ZodString>;
4209
+ error: zod.ZodOptional<zod.ZodString>;
4210
+ device_id: zod.ZodOptional<zod.ZodString>;
4211
+ error_description: zod.ZodOptional<zod.ZodString>;
4212
+ state: zod.ZodOptional<zod.ZodString>;
4213
+ user: zod.ZodOptional<zod.ZodString>;
4214
+ iss: zod.ZodOptional<zod.ZodString>;
4215
+ }, zod_v4_core0.$strip>>;
4216
+ query: zod.ZodOptional<zod.ZodObject<{
4217
+ code: zod.ZodOptional<zod.ZodString>;
4218
+ error: zod.ZodOptional<zod.ZodString>;
4219
+ device_id: zod.ZodOptional<zod.ZodString>;
4220
+ error_description: zod.ZodOptional<zod.ZodString>;
4221
+ state: zod.ZodOptional<zod.ZodString>;
4222
+ user: zod.ZodOptional<zod.ZodString>;
4223
+ iss: zod.ZodOptional<zod.ZodString>;
4224
+ }, zod_v4_core0.$strip>>;
4225
+ metadata: {
4226
+ allowedMediaTypes: string[];
4227
+ scope: "server";
4228
+ };
4229
+ }, void>;
4230
+ readonly getSession: better_call0.StrictEndpoint<"/get-session", {
4231
+ method: ("GET" | "POST")[];
4232
+ operationId: string;
4233
+ query: zod.ZodOptional<zod.ZodObject<{
4234
+ disableCookieCache: zod.ZodOptional<zod.ZodCoercedBoolean<unknown>>;
4235
+ disableRefresh: zod.ZodOptional<zod.ZodCoercedBoolean<unknown>>;
4236
+ }, zod_v4_core0.$strip>>;
4237
+ requireHeaders: true;
4238
+ metadata: {
4239
+ openapi: {
4240
+ operationId: string;
4241
+ description: string;
4242
+ responses: {
4243
+ "200": {
4244
+ description: string;
4245
+ content: {
4246
+ "application/json": {
4247
+ schema: {
4248
+ type: "object";
4249
+ properties: {
4250
+ session: {
4251
+ $ref: string;
4252
+ };
4253
+ user: {
4254
+ $ref: string;
4255
+ };
4256
+ };
4257
+ required: string[];
4258
+ };
4259
+ };
4260
+ };
4261
+ };
4262
+ };
4263
+ };
4264
+ };
4265
+ }, {
4266
+ session: {
4267
+ id: string;
4268
+ createdAt: Date;
4269
+ updatedAt: Date;
4270
+ userId: string;
4271
+ expiresAt: Date;
4272
+ token: string;
4273
+ ipAddress?: string | null | undefined;
4274
+ userAgent?: string | null | undefined;
4275
+ };
4276
+ user: {
4277
+ id: string;
4278
+ createdAt: Date;
4279
+ updatedAt: Date;
4280
+ email: string;
4281
+ emailVerified: boolean;
4282
+ name: string;
4283
+ image?: string | null | undefined;
4284
+ };
4285
+ } | null>;
4286
+ readonly signOut: better_call0.StrictEndpoint<"/sign-out", {
4287
+ method: "POST";
4288
+ operationId: string;
4289
+ requireHeaders: true;
4290
+ metadata: {
4291
+ openapi: {
4292
+ operationId: string;
4293
+ description: string;
4294
+ responses: {
4295
+ "200": {
4296
+ description: string;
4297
+ content: {
4298
+ "application/json": {
4299
+ schema: {
4300
+ type: "object";
4301
+ properties: {
4302
+ success: {
4303
+ type: string;
4304
+ };
4305
+ };
4306
+ };
4307
+ };
4308
+ };
4309
+ };
4310
+ };
4311
+ };
4312
+ };
4313
+ }, {
4314
+ success: boolean;
4315
+ }>;
4316
+ readonly signUpEmail: better_call0.StrictEndpoint<"/sign-up/email", {
4317
+ method: "POST";
4318
+ operationId: string;
4319
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<void>)[];
4320
+ body: zod.ZodIntersection<zod.ZodObject<{
4321
+ name: zod.ZodString;
4322
+ email: zod.ZodEmail;
4323
+ password: zod.ZodString;
4324
+ image: zod.ZodOptional<zod.ZodString>;
4325
+ callbackURL: zod.ZodOptional<zod.ZodString>;
4326
+ rememberMe: zod.ZodOptional<zod.ZodBoolean>;
4327
+ }, zod_v4_core0.$strip>, zod.ZodRecord<zod.ZodString, zod.ZodAny>>;
4328
+ cloneRequest: true;
4329
+ metadata: {
4330
+ allowedMediaTypes: string[];
4331
+ $Infer: {
4332
+ body: {
4333
+ name: string;
4334
+ email: string;
4335
+ password: string;
4336
+ image?: string | undefined;
4337
+ callbackURL?: string | undefined;
4338
+ rememberMe?: boolean | undefined;
4339
+ };
4340
+ returned: {
4341
+ token: string | null;
4342
+ user: {
4343
+ id: string;
4344
+ createdAt: Date;
4345
+ updatedAt: Date;
4346
+ email: string;
4347
+ emailVerified: boolean;
4348
+ name: string;
4349
+ image?: string | null | undefined;
4350
+ };
4351
+ };
4352
+ };
4353
+ openapi: {
4354
+ operationId: string;
4355
+ description: string;
4356
+ requestBody: {
4357
+ content: {
4358
+ "application/json": {
4359
+ schema: {
4360
+ type: "object";
4361
+ properties: {
4362
+ name: {
4363
+ type: string;
4364
+ description: string;
4365
+ };
4366
+ email: {
4367
+ type: string;
4368
+ description: string;
4369
+ };
4370
+ password: {
4371
+ type: string;
4372
+ description: string;
4373
+ };
4374
+ image: {
4375
+ type: string;
4376
+ description: string;
4377
+ };
4378
+ callbackURL: {
4379
+ type: string;
4380
+ description: string;
4381
+ };
4382
+ rememberMe: {
4383
+ type: string;
4384
+ description: string;
4385
+ };
4386
+ };
4387
+ required: string[];
4388
+ };
4389
+ };
4390
+ };
4391
+ };
4392
+ responses: {
4393
+ "200": {
4394
+ description: string;
4395
+ content: {
4396
+ "application/json": {
4397
+ schema: {
4398
+ type: "object";
4399
+ properties: {
4400
+ token: {
4401
+ type: string;
4402
+ nullable: boolean;
4403
+ description: string;
4404
+ };
4405
+ user: {
4406
+ type: string;
4407
+ properties: {
4408
+ id: {
4409
+ type: string;
4410
+ description: string;
4411
+ };
4412
+ email: {
4413
+ type: string;
4414
+ format: string;
4415
+ description: string;
4416
+ };
4417
+ name: {
4418
+ type: string;
4419
+ description: string;
4420
+ };
4421
+ image: {
4422
+ type: string;
4423
+ format: string;
4424
+ nullable: boolean;
4425
+ description: string;
4426
+ };
4427
+ emailVerified: {
4428
+ type: string;
4429
+ description: string;
4430
+ };
4431
+ createdAt: {
4432
+ type: string;
4433
+ format: string;
4434
+ description: string;
4435
+ };
4436
+ updatedAt: {
4437
+ type: string;
4438
+ format: string;
4439
+ description: string;
4440
+ };
4441
+ };
4442
+ required: string[];
4443
+ };
4444
+ };
4445
+ required: string[];
4446
+ };
4447
+ };
4448
+ };
4449
+ };
4450
+ "422": {
4451
+ description: string;
4452
+ content: {
4453
+ "application/json": {
4454
+ schema: {
4455
+ type: "object";
4456
+ properties: {
4457
+ message: {
4458
+ type: string;
4459
+ };
4460
+ };
4461
+ };
4462
+ };
4463
+ };
4464
+ };
4465
+ };
4466
+ };
4467
+ };
4468
+ }, {
4469
+ token: null;
4470
+ user: {
4471
+ id: string;
4472
+ createdAt: Date;
4473
+ updatedAt: Date;
4474
+ email: string;
4475
+ emailVerified: boolean;
4476
+ name: string;
4477
+ image?: string | null | undefined;
4478
+ };
4479
+ } | {
4480
+ token: string;
4481
+ user: {
4482
+ id: string;
4483
+ createdAt: Date;
4484
+ updatedAt: Date;
4485
+ email: string;
4486
+ emailVerified: boolean;
4487
+ name: string;
4488
+ image?: string | null | undefined;
4489
+ };
4490
+ }>;
4491
+ readonly signInEmail: better_call0.StrictEndpoint<"/sign-in/email", {
4492
+ method: "POST";
4493
+ operationId: string;
4494
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<void>)[];
4495
+ cloneRequest: true;
4496
+ body: zod.ZodObject<{
4497
+ email: zod.ZodString;
4498
+ password: zod.ZodString;
4499
+ callbackURL: zod.ZodOptional<zod.ZodString>;
4500
+ rememberMe: zod.ZodOptional<zod.ZodDefault<zod.ZodBoolean>>;
4501
+ }, zod_v4_core0.$strip>;
4502
+ metadata: {
4503
+ allowedMediaTypes: string[];
4504
+ $Infer: {
4505
+ body: {
4506
+ email: string;
4507
+ password: string;
4508
+ callbackURL?: string | undefined;
4509
+ rememberMe?: boolean | undefined;
4510
+ };
4511
+ returned: {
4512
+ redirect: boolean;
4513
+ token: string;
4514
+ url?: string | undefined;
4515
+ user: {
4516
+ id: string;
4517
+ createdAt: Date;
4518
+ updatedAt: Date;
4519
+ email: string;
4520
+ emailVerified: boolean;
4521
+ name: string;
4522
+ image?: string | null | undefined;
4523
+ };
4524
+ };
4525
+ };
4526
+ openapi: {
4527
+ operationId: string;
4528
+ description: string;
4529
+ responses: {
4530
+ "200": {
4531
+ description: string;
4532
+ content: {
4533
+ "application/json": {
4534
+ schema: {
4535
+ type: "object";
4536
+ description: string;
4537
+ properties: {
4538
+ redirect: {
4539
+ type: string;
4540
+ enum: boolean[];
4541
+ };
4542
+ token: {
4543
+ type: string;
4544
+ description: string;
4545
+ };
4546
+ url: {
4547
+ type: string;
4548
+ nullable: boolean;
4549
+ };
4550
+ user: {
4551
+ type: string;
4552
+ $ref: string;
4553
+ };
4554
+ };
4555
+ required: string[];
4556
+ };
4557
+ };
4558
+ };
4559
+ };
4560
+ };
4561
+ };
4562
+ };
4563
+ }, {
4564
+ redirect: boolean;
4565
+ token: string;
4566
+ url?: string | undefined;
4567
+ user: {
4568
+ id: string;
4569
+ createdAt: Date;
4570
+ updatedAt: Date;
4571
+ email: string;
4572
+ emailVerified: boolean;
4573
+ name: string;
4574
+ image?: string | null | undefined;
4575
+ };
4576
+ }>;
4577
+ readonly resetPassword: better_call0.StrictEndpoint<"/reset-password", {
4578
+ method: "POST";
4579
+ operationId: string;
4580
+ query: zod.ZodOptional<zod.ZodObject<{
4581
+ token: zod.ZodOptional<zod.ZodString>;
4582
+ }, zod_v4_core0.$strip>>;
4583
+ body: zod.ZodObject<{
4584
+ newPassword: zod.ZodString;
4585
+ token: zod.ZodOptional<zod.ZodString>;
4586
+ }, zod_v4_core0.$strip>;
4587
+ metadata: {
4588
+ openapi: {
4589
+ operationId: string;
4590
+ description: string;
4591
+ responses: {
4592
+ "200": {
4593
+ description: string;
4594
+ content: {
4595
+ "application/json": {
4596
+ schema: {
4597
+ type: "object";
4598
+ properties: {
4599
+ status: {
4600
+ type: string;
4601
+ };
4602
+ };
4603
+ };
4604
+ };
4605
+ };
4606
+ };
4607
+ };
4608
+ };
4609
+ };
4610
+ }, {
4611
+ status: boolean;
4612
+ }>;
4613
+ readonly verifyPassword: better_call0.StrictEndpoint<"/verify-password", {
4614
+ method: "POST";
4615
+ body: zod.ZodObject<{
4616
+ password: zod.ZodString;
4617
+ }, zod_v4_core0.$strip>;
4618
+ metadata: {
4619
+ scope: "server";
4620
+ openapi: {
4621
+ operationId: string;
4622
+ description: string;
4623
+ responses: {
4624
+ "200": {
4625
+ description: string;
4626
+ content: {
4627
+ "application/json": {
4628
+ schema: {
4629
+ type: "object";
4630
+ properties: {
4631
+ status: {
4632
+ type: string;
4633
+ };
4634
+ };
4635
+ };
4636
+ };
4637
+ };
4638
+ };
4639
+ };
4640
+ };
4641
+ };
4642
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
4643
+ session: {
4644
+ session: Record<string, any> & {
4645
+ id: string;
4646
+ createdAt: Date;
4647
+ updatedAt: Date;
4648
+ userId: string;
4649
+ expiresAt: Date;
4650
+ token: string;
4651
+ ipAddress?: string | null | undefined;
4652
+ userAgent?: string | null | undefined;
4653
+ };
4654
+ user: Record<string, any> & {
4655
+ id: string;
4656
+ createdAt: Date;
4657
+ updatedAt: Date;
4658
+ email: string;
4659
+ emailVerified: boolean;
4660
+ name: string;
4661
+ image?: string | null | undefined;
4662
+ };
4663
+ };
4664
+ }>)[];
4665
+ }, {
4666
+ status: boolean;
4667
+ }>;
4668
+ readonly verifyEmail: better_call0.StrictEndpoint<"/verify-email", {
4669
+ method: "GET";
4670
+ operationId: string;
4671
+ query: zod.ZodObject<{
4672
+ token: zod.ZodString;
4673
+ callbackURL: zod.ZodOptional<zod.ZodString>;
4674
+ }, zod_v4_core0.$strip>;
4675
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<void>)[];
4676
+ metadata: {
4677
+ openapi: {
4678
+ description: string;
4679
+ parameters: ({
4680
+ name: string;
4681
+ in: "query";
4682
+ description: string;
4683
+ required: true;
4684
+ schema: {
4685
+ type: "string";
4686
+ };
4687
+ } | {
4688
+ name: string;
4689
+ in: "query";
4690
+ description: string;
4691
+ required: false;
4692
+ schema: {
4693
+ type: "string";
4694
+ };
4695
+ })[];
4696
+ responses: {
4697
+ "200": {
4698
+ description: string;
4699
+ content: {
4700
+ "application/json": {
4701
+ schema: {
4702
+ type: "object";
4703
+ properties: {
4704
+ user: {
4705
+ type: string;
4706
+ $ref: string;
4707
+ };
4708
+ status: {
4709
+ type: string;
4710
+ description: string;
4711
+ };
4712
+ };
4713
+ required: string[];
4714
+ };
4715
+ };
4716
+ };
4717
+ };
4718
+ };
4719
+ };
4720
+ };
4721
+ }, void | {
4722
+ status: boolean;
4723
+ }>;
4724
+ readonly sendVerificationEmail: better_call0.StrictEndpoint<"/send-verification-email", {
4725
+ method: "POST";
4726
+ operationId: string;
4727
+ cloneRequest: true;
4728
+ body: zod.ZodObject<{
4729
+ email: zod.ZodEmail;
4730
+ callbackURL: zod.ZodOptional<zod.ZodString>;
4731
+ }, zod_v4_core0.$strip>;
4732
+ metadata: {
4733
+ openapi: {
4734
+ operationId: string;
4735
+ description: string;
4736
+ requestBody: {
4737
+ content: {
4738
+ "application/json": {
4739
+ schema: {
4740
+ type: "object";
4741
+ properties: {
4742
+ email: {
4743
+ type: string;
4744
+ description: string;
4745
+ example: string;
4746
+ };
4747
+ callbackURL: {
4748
+ type: string;
4749
+ description: string;
4750
+ example: string;
4751
+ nullable: boolean;
4752
+ };
4753
+ };
4754
+ required: string[];
4755
+ };
4756
+ };
4757
+ };
4758
+ };
4759
+ responses: {
4760
+ "200": {
4761
+ description: string;
4762
+ content: {
4763
+ "application/json": {
4764
+ schema: {
4765
+ type: "object";
4766
+ properties: {
4767
+ status: {
4768
+ type: string;
4769
+ description: string;
4770
+ example: boolean;
4771
+ };
4772
+ };
4773
+ };
4774
+ };
4775
+ };
4776
+ };
4777
+ "400": {
4778
+ description: string;
4779
+ content: {
4780
+ "application/json": {
4781
+ schema: {
4782
+ type: "object";
4783
+ properties: {
4784
+ message: {
4785
+ type: string;
4786
+ description: string;
4787
+ example: string;
4788
+ };
4789
+ };
4790
+ };
4791
+ };
4792
+ };
4793
+ };
4794
+ };
4795
+ };
4796
+ };
4797
+ }, {
4798
+ status: boolean;
4799
+ }>;
4800
+ readonly changeEmail: better_call0.StrictEndpoint<"/change-email", {
4801
+ method: "POST";
4802
+ body: zod.ZodObject<{
4803
+ newEmail: zod.ZodEmail;
4804
+ callbackURL: zod.ZodOptional<zod.ZodString>;
4805
+ }, zod_v4_core0.$strip>;
4806
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
4807
+ session: {
4808
+ session: Record<string, any> & {
4809
+ id: string;
4810
+ createdAt: Date;
4811
+ updatedAt: Date;
4812
+ userId: string;
4813
+ expiresAt: Date;
4814
+ token: string;
4815
+ ipAddress?: string | null | undefined;
4816
+ userAgent?: string | null | undefined;
4817
+ };
4818
+ user: Record<string, any> & {
4819
+ id: string;
4820
+ createdAt: Date;
4821
+ updatedAt: Date;
4822
+ email: string;
4823
+ emailVerified: boolean;
4824
+ name: string;
4825
+ image?: string | null | undefined;
4826
+ };
4827
+ };
4828
+ }>)[];
4829
+ metadata: {
4830
+ openapi: {
4831
+ operationId: string;
4832
+ responses: {
4833
+ "200": {
4834
+ description: string;
4835
+ content: {
4836
+ "application/json": {
4837
+ schema: {
4838
+ type: "object";
4839
+ properties: {
4840
+ user: {
4841
+ type: string;
4842
+ $ref: string;
4843
+ };
4844
+ status: {
4845
+ type: string;
4846
+ description: string;
4847
+ };
4848
+ message: {
4849
+ type: string;
4850
+ enum: string[];
4851
+ description: string;
4852
+ nullable: boolean;
4853
+ };
4854
+ };
4855
+ required: string[];
4856
+ };
4857
+ };
4858
+ };
4859
+ };
4860
+ };
4861
+ };
4862
+ };
4863
+ }, {
4864
+ status: boolean;
4865
+ }>;
4866
+ readonly changePassword: better_call0.StrictEndpoint<"/change-password", {
4867
+ method: "POST";
4868
+ operationId: string;
4869
+ body: zod.ZodObject<{
4870
+ newPassword: zod.ZodString;
4871
+ currentPassword: zod.ZodString;
4872
+ revokeOtherSessions: zod.ZodOptional<zod.ZodBoolean>;
4873
+ }, zod_v4_core0.$strip>;
4874
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
4875
+ session: {
4876
+ session: Record<string, any> & {
4877
+ id: string;
4878
+ createdAt: Date;
4879
+ updatedAt: Date;
4880
+ userId: string;
4881
+ expiresAt: Date;
4882
+ token: string;
4883
+ ipAddress?: string | null | undefined;
4884
+ userAgent?: string | null | undefined;
4885
+ };
4886
+ user: Record<string, any> & {
4887
+ id: string;
4888
+ createdAt: Date;
4889
+ updatedAt: Date;
4890
+ email: string;
4891
+ emailVerified: boolean;
4892
+ name: string;
4893
+ image?: string | null | undefined;
4894
+ };
4895
+ };
4896
+ }>)[];
4897
+ metadata: {
4898
+ openapi: {
4899
+ operationId: string;
4900
+ description: string;
4901
+ responses: {
4902
+ "200": {
4903
+ description: string;
4904
+ content: {
4905
+ "application/json": {
4906
+ schema: {
4907
+ type: "object";
4908
+ properties: {
4909
+ token: {
4910
+ type: string;
4911
+ nullable: boolean;
4912
+ description: string;
4913
+ };
4914
+ user: {
4915
+ type: string;
4916
+ properties: {
4917
+ id: {
4918
+ type: string;
4919
+ description: string;
4920
+ };
4921
+ email: {
4922
+ type: string;
4923
+ format: string;
4924
+ description: string;
4925
+ };
4926
+ name: {
4927
+ type: string;
4928
+ description: string;
4929
+ };
4930
+ image: {
4931
+ type: string;
4932
+ format: string;
4933
+ nullable: boolean;
4934
+ description: string;
4935
+ };
4936
+ emailVerified: {
4937
+ type: string;
4938
+ description: string;
4939
+ };
4940
+ createdAt: {
4941
+ type: string;
4942
+ format: string;
4943
+ description: string;
4944
+ };
4945
+ updatedAt: {
4946
+ type: string;
4947
+ format: string;
4948
+ description: string;
4949
+ };
4950
+ };
4951
+ required: string[];
4952
+ };
4953
+ };
4954
+ required: string[];
4955
+ };
4956
+ };
4957
+ };
4958
+ };
4959
+ };
4960
+ };
4961
+ };
4962
+ }, {
4963
+ token: string | null;
4964
+ user: {
4965
+ id: string;
4966
+ createdAt: Date;
4967
+ updatedAt: Date;
4968
+ email: string;
4969
+ emailVerified: boolean;
4970
+ name: string;
4971
+ image?: string | null | undefined;
4972
+ } & Record<string, any> & {
4973
+ id: string;
4974
+ createdAt: Date;
4975
+ updatedAt: Date;
4976
+ email: string;
4977
+ emailVerified: boolean;
4978
+ name: string;
4979
+ image?: string | null | undefined;
4980
+ };
4981
+ }>;
4982
+ readonly setPassword: better_call0.StrictEndpoint<string, {
4983
+ method: "POST";
4984
+ body: zod.ZodObject<{
4985
+ newPassword: zod.ZodString;
4986
+ }, zod_v4_core0.$strip>;
4987
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
4988
+ session: {
4989
+ session: Record<string, any> & {
4990
+ id: string;
4991
+ createdAt: Date;
4992
+ updatedAt: Date;
4993
+ userId: string;
4994
+ expiresAt: Date;
4995
+ token: string;
4996
+ ipAddress?: string | null | undefined;
4997
+ userAgent?: string | null | undefined;
4998
+ };
4999
+ user: Record<string, any> & {
5000
+ id: string;
5001
+ createdAt: Date;
5002
+ updatedAt: Date;
5003
+ email: string;
5004
+ emailVerified: boolean;
5005
+ name: string;
5006
+ image?: string | null | undefined;
5007
+ };
5008
+ };
5009
+ }>)[];
5010
+ }, {
5011
+ status: boolean;
5012
+ }>;
5013
+ readonly updateSession: better_call0.StrictEndpoint<"/update-session", {
5014
+ method: "POST";
5015
+ operationId: string;
5016
+ body: zod.ZodRecord<zod.ZodString, zod.ZodAny>;
5017
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
5018
+ session: {
5019
+ session: Record<string, any> & {
5020
+ id: string;
5021
+ createdAt: Date;
5022
+ updatedAt: Date;
5023
+ userId: string;
5024
+ expiresAt: Date;
5025
+ token: string;
5026
+ ipAddress?: string | null | undefined;
5027
+ userAgent?: string | null | undefined;
5028
+ };
5029
+ user: Record<string, any> & {
5030
+ id: string;
5031
+ createdAt: Date;
5032
+ updatedAt: Date;
5033
+ email: string;
5034
+ emailVerified: boolean;
5035
+ name: string;
5036
+ image?: string | null | undefined;
5037
+ };
5038
+ };
5039
+ }>)[];
5040
+ metadata: {
5041
+ $Infer: {
5042
+ body: Partial<{}>;
5043
+ };
5044
+ openapi: {
5045
+ operationId: string;
5046
+ description: string;
5047
+ responses: {
5048
+ "200": {
5049
+ description: string;
5050
+ content: {
5051
+ "application/json": {
5052
+ schema: {
5053
+ type: "object";
5054
+ properties: {
5055
+ session: {
5056
+ type: string;
5057
+ $ref: string;
5058
+ };
5059
+ };
5060
+ };
5061
+ };
5062
+ };
5063
+ };
5064
+ };
5065
+ };
5066
+ };
5067
+ }, {
5068
+ session: {
5069
+ id: string;
5070
+ createdAt: Date;
5071
+ updatedAt: Date;
5072
+ userId: string;
5073
+ expiresAt: Date;
5074
+ token: string;
5075
+ ipAddress?: string | null | undefined;
5076
+ userAgent?: string | null | undefined;
5077
+ };
5078
+ }>;
5079
+ readonly updateUser: better_call0.StrictEndpoint<"/update-user", {
5080
+ method: "POST";
5081
+ operationId: string;
5082
+ body: zod.ZodRecord<zod.ZodString, zod.ZodAny>;
5083
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
5084
+ session: {
5085
+ session: Record<string, any> & {
5086
+ id: string;
5087
+ createdAt: Date;
5088
+ updatedAt: Date;
5089
+ userId: string;
5090
+ expiresAt: Date;
5091
+ token: string;
5092
+ ipAddress?: string | null | undefined;
5093
+ userAgent?: string | null | undefined;
5094
+ };
5095
+ user: Record<string, any> & {
5096
+ id: string;
5097
+ createdAt: Date;
5098
+ updatedAt: Date;
5099
+ email: string;
5100
+ emailVerified: boolean;
5101
+ name: string;
5102
+ image?: string | null | undefined;
5103
+ };
5104
+ };
5105
+ }>)[];
5106
+ metadata: {
5107
+ $Infer: {
5108
+ body: Partial<{}> & {
5109
+ name?: string | undefined;
5110
+ image?: string | undefined | null;
5111
+ };
5112
+ };
5113
+ openapi: {
5114
+ operationId: string;
5115
+ description: string;
5116
+ requestBody: {
5117
+ content: {
5118
+ "application/json": {
5119
+ schema: {
5120
+ type: "object";
5121
+ properties: {
5122
+ name: {
5123
+ type: string;
5124
+ description: string;
5125
+ };
5126
+ image: {
5127
+ type: string;
5128
+ description: string;
5129
+ nullable: boolean;
5130
+ };
5131
+ };
5132
+ };
5133
+ };
5134
+ };
5135
+ };
5136
+ responses: {
5137
+ "200": {
5138
+ description: string;
5139
+ content: {
5140
+ "application/json": {
5141
+ schema: {
5142
+ type: "object";
5143
+ properties: {
5144
+ user: {
5145
+ type: string;
5146
+ $ref: string;
5147
+ };
5148
+ };
5149
+ };
5150
+ };
5151
+ };
5152
+ };
5153
+ };
5154
+ };
5155
+ };
5156
+ }, {
5157
+ status: boolean;
5158
+ }>;
5159
+ readonly deleteUser: better_call0.StrictEndpoint<"/delete-user", {
5160
+ method: "POST";
5161
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
5162
+ session: {
5163
+ session: Record<string, any> & {
5164
+ id: string;
5165
+ createdAt: Date;
5166
+ updatedAt: Date;
5167
+ userId: string;
5168
+ expiresAt: Date;
5169
+ token: string;
5170
+ ipAddress?: string | null | undefined;
5171
+ userAgent?: string | null | undefined;
5172
+ };
5173
+ user: Record<string, any> & {
5174
+ id: string;
5175
+ createdAt: Date;
5176
+ updatedAt: Date;
5177
+ email: string;
5178
+ emailVerified: boolean;
5179
+ name: string;
5180
+ image?: string | null | undefined;
5181
+ };
5182
+ };
5183
+ }>)[];
5184
+ body: zod.ZodObject<{
5185
+ callbackURL: zod.ZodOptional<zod.ZodString>;
5186
+ password: zod.ZodOptional<zod.ZodString>;
5187
+ token: zod.ZodOptional<zod.ZodString>;
5188
+ }, zod_v4_core0.$strip>;
5189
+ metadata: {
5190
+ openapi: {
5191
+ operationId: string;
5192
+ description: string;
5193
+ requestBody: {
5194
+ content: {
5195
+ "application/json": {
5196
+ schema: {
5197
+ type: "object";
5198
+ properties: {
5199
+ callbackURL: {
5200
+ type: string;
5201
+ description: string;
5202
+ };
5203
+ password: {
5204
+ type: string;
5205
+ description: string;
5206
+ };
5207
+ token: {
5208
+ type: string;
5209
+ description: string;
5210
+ };
5211
+ };
5212
+ };
5213
+ };
5214
+ };
5215
+ };
5216
+ responses: {
5217
+ "200": {
5218
+ description: string;
5219
+ content: {
5220
+ "application/json": {
5221
+ schema: {
5222
+ type: "object";
5223
+ properties: {
5224
+ success: {
5225
+ type: string;
5226
+ description: string;
5227
+ };
5228
+ message: {
5229
+ type: string;
5230
+ enum: string[];
5231
+ description: string;
5232
+ };
5233
+ };
5234
+ required: string[];
5235
+ };
5236
+ };
5237
+ };
5238
+ };
5239
+ };
5240
+ };
5241
+ };
5242
+ }, {
5243
+ success: boolean;
5244
+ message: string;
5245
+ }>;
5246
+ readonly requestPasswordReset: better_call0.StrictEndpoint<"/request-password-reset", {
5247
+ method: "POST";
5248
+ body: zod.ZodObject<{
5249
+ email: zod.ZodEmail;
5250
+ redirectTo: zod.ZodOptional<zod.ZodString>;
5251
+ }, zod_v4_core0.$strip>;
5252
+ metadata: {
5253
+ openapi: {
5254
+ operationId: string;
5255
+ description: string;
5256
+ responses: {
5257
+ "200": {
5258
+ description: string;
5259
+ content: {
5260
+ "application/json": {
5261
+ schema: {
5262
+ type: "object";
5263
+ properties: {
5264
+ status: {
5265
+ type: string;
5266
+ };
5267
+ message: {
5268
+ type: string;
5269
+ };
5270
+ };
5271
+ };
5272
+ };
5273
+ };
5274
+ };
5275
+ };
5276
+ };
5277
+ };
5278
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<void>)[];
5279
+ }, {
5280
+ status: boolean;
5281
+ message: string;
5282
+ }>;
5283
+ readonly requestPasswordResetCallback: better_call0.StrictEndpoint<"/reset-password/:token", {
5284
+ method: "GET";
5285
+ operationId: string;
5286
+ query: zod.ZodObject<{
5287
+ callbackURL: zod.ZodString;
5288
+ }, zod_v4_core0.$strip>;
5289
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<void>)[];
5290
+ metadata: {
5291
+ openapi: {
5292
+ operationId: string;
5293
+ description: string;
5294
+ parameters: ({
5295
+ name: string;
5296
+ in: "path";
5297
+ required: true;
5298
+ description: string;
5299
+ schema: {
5300
+ type: "string";
5301
+ };
5302
+ } | {
5303
+ name: string;
5304
+ in: "query";
5305
+ required: true;
5306
+ description: string;
5307
+ schema: {
5308
+ type: "string";
5309
+ };
5310
+ })[];
5311
+ responses: {
5312
+ "200": {
5313
+ description: string;
5314
+ content: {
5315
+ "application/json": {
5316
+ schema: {
5317
+ type: "object";
5318
+ properties: {
5319
+ token: {
5320
+ type: string;
5321
+ };
5322
+ };
5323
+ };
5324
+ };
5325
+ };
5326
+ };
5327
+ };
5328
+ };
5329
+ };
5330
+ }, never>;
5331
+ readonly listSessions: better_call0.StrictEndpoint<"/list-sessions", {
5332
+ method: "GET";
5333
+ operationId: string;
5334
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
5335
+ session: {
5336
+ session: Record<string, any> & {
5337
+ id: string;
5338
+ createdAt: Date;
5339
+ updatedAt: Date;
5340
+ userId: string;
5341
+ expiresAt: Date;
5342
+ token: string;
5343
+ ipAddress?: string | null | undefined;
5344
+ userAgent?: string | null | undefined;
5345
+ };
5346
+ user: Record<string, any> & {
5347
+ id: string;
5348
+ createdAt: Date;
5349
+ updatedAt: Date;
5350
+ email: string;
5351
+ emailVerified: boolean;
5352
+ name: string;
5353
+ image?: string | null | undefined;
5354
+ };
5355
+ };
5356
+ }>)[];
5357
+ requireHeaders: true;
5358
+ metadata: {
5359
+ openapi: {
5360
+ operationId: string;
5361
+ description: string;
5362
+ responses: {
5363
+ "200": {
5364
+ description: string;
5365
+ content: {
5366
+ "application/json": {
5367
+ schema: {
5368
+ type: "array";
5369
+ items: {
5370
+ $ref: string;
5371
+ };
5372
+ };
5373
+ };
5374
+ };
5375
+ };
5376
+ };
5377
+ };
5378
+ };
5379
+ }, Prettify$1<{
5380
+ id: string;
5381
+ createdAt: Date;
5382
+ updatedAt: Date;
5383
+ userId: string;
5384
+ expiresAt: Date;
5385
+ token: string;
5386
+ ipAddress?: string | null | undefined;
5387
+ userAgent?: string | null | undefined;
5388
+ }>[]>;
5389
+ readonly revokeSession: better_call0.StrictEndpoint<"/revoke-session", {
5390
+ method: "POST";
5391
+ body: zod.ZodObject<{
5392
+ token: zod.ZodString;
5393
+ }, zod_v4_core0.$strip>;
5394
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
5395
+ session: {
5396
+ session: Record<string, any> & {
5397
+ id: string;
5398
+ createdAt: Date;
5399
+ updatedAt: Date;
5400
+ userId: string;
5401
+ expiresAt: Date;
5402
+ token: string;
5403
+ ipAddress?: string | null | undefined;
5404
+ userAgent?: string | null | undefined;
5405
+ };
5406
+ user: Record<string, any> & {
5407
+ id: string;
5408
+ createdAt: Date;
5409
+ updatedAt: Date;
5410
+ email: string;
5411
+ emailVerified: boolean;
5412
+ name: string;
5413
+ image?: string | null | undefined;
5414
+ };
5415
+ };
5416
+ }>)[];
5417
+ requireHeaders: true;
5418
+ metadata: {
5419
+ openapi: {
5420
+ description: string;
5421
+ requestBody: {
5422
+ content: {
5423
+ "application/json": {
5424
+ schema: {
5425
+ type: "object";
5426
+ properties: {
5427
+ token: {
5428
+ type: string;
5429
+ description: string;
5430
+ };
5431
+ };
5432
+ required: string[];
5433
+ };
5434
+ };
5435
+ };
5436
+ };
5437
+ responses: {
5438
+ "200": {
5439
+ description: string;
5440
+ content: {
5441
+ "application/json": {
5442
+ schema: {
5443
+ type: "object";
5444
+ properties: {
5445
+ status: {
5446
+ type: string;
5447
+ description: string;
5448
+ };
5449
+ };
5450
+ required: string[];
5451
+ };
5452
+ };
5453
+ };
5454
+ };
5455
+ };
5456
+ };
5457
+ };
5458
+ }, {
5459
+ status: boolean;
5460
+ }>;
5461
+ readonly revokeSessions: better_call0.StrictEndpoint<"/revoke-sessions", {
5462
+ method: "POST";
5463
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
5464
+ session: {
5465
+ session: Record<string, any> & {
5466
+ id: string;
5467
+ createdAt: Date;
5468
+ updatedAt: Date;
5469
+ userId: string;
5470
+ expiresAt: Date;
5471
+ token: string;
5472
+ ipAddress?: string | null | undefined;
5473
+ userAgent?: string | null | undefined;
5474
+ };
5475
+ user: Record<string, any> & {
5476
+ id: string;
5477
+ createdAt: Date;
5478
+ updatedAt: Date;
5479
+ email: string;
5480
+ emailVerified: boolean;
5481
+ name: string;
5482
+ image?: string | null | undefined;
5483
+ };
5484
+ };
5485
+ }>)[];
5486
+ requireHeaders: true;
5487
+ metadata: {
5488
+ openapi: {
5489
+ description: string;
5490
+ responses: {
5491
+ "200": {
5492
+ description: string;
5493
+ content: {
5494
+ "application/json": {
5495
+ schema: {
5496
+ type: "object";
5497
+ properties: {
5498
+ status: {
5499
+ type: string;
5500
+ description: string;
5501
+ };
5502
+ };
5503
+ required: string[];
5504
+ };
5505
+ };
5506
+ };
5507
+ };
5508
+ };
5509
+ };
5510
+ };
5511
+ }, {
5512
+ status: boolean;
5513
+ }>;
5514
+ readonly revokeOtherSessions: better_call0.StrictEndpoint<"/revoke-other-sessions", {
5515
+ method: "POST";
5516
+ requireHeaders: true;
5517
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
5518
+ session: {
5519
+ session: Record<string, any> & {
5520
+ id: string;
5521
+ createdAt: Date;
5522
+ updatedAt: Date;
5523
+ userId: string;
5524
+ expiresAt: Date;
5525
+ token: string;
5526
+ ipAddress?: string | null | undefined;
5527
+ userAgent?: string | null | undefined;
5528
+ };
5529
+ user: Record<string, any> & {
5530
+ id: string;
5531
+ createdAt: Date;
5532
+ updatedAt: Date;
5533
+ email: string;
5534
+ emailVerified: boolean;
5535
+ name: string;
5536
+ image?: string | null | undefined;
5537
+ };
5538
+ };
5539
+ }>)[];
5540
+ metadata: {
5541
+ openapi: {
5542
+ description: string;
5543
+ responses: {
5544
+ "200": {
5545
+ description: string;
5546
+ content: {
5547
+ "application/json": {
5548
+ schema: {
5549
+ type: "object";
5550
+ properties: {
5551
+ status: {
5552
+ type: string;
5553
+ description: string;
5554
+ };
5555
+ };
5556
+ required: string[];
5557
+ };
5558
+ };
5559
+ };
5560
+ };
5561
+ };
5562
+ };
5563
+ };
5564
+ }, {
5565
+ status: boolean;
5566
+ }>;
5567
+ readonly linkSocialAccount: better_call0.StrictEndpoint<"/link-social", {
5568
+ method: "POST";
5569
+ requireHeaders: true;
5570
+ body: zod.ZodObject<{
5571
+ callbackURL: zod.ZodOptional<zod.ZodString>;
5572
+ provider: zod.ZodType<(string & {}) | "linear" | "huggingface" | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown, zod_v4_core0.$ZodTypeInternals<(string & {}) | "linear" | "huggingface" | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown>>;
5573
+ idToken: zod.ZodOptional<zod.ZodObject<{
5574
+ token: zod.ZodString;
5575
+ nonce: zod.ZodOptional<zod.ZodString>;
5576
+ accessToken: zod.ZodOptional<zod.ZodString>;
5577
+ refreshToken: zod.ZodOptional<zod.ZodString>;
5578
+ scopes: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
5579
+ }, zod_v4_core0.$strip>>;
5580
+ requestSignUp: zod.ZodOptional<zod.ZodBoolean>;
5581
+ scopes: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
5582
+ errorCallbackURL: zod.ZodOptional<zod.ZodString>;
5583
+ disableRedirect: zod.ZodOptional<zod.ZodBoolean>;
5584
+ loginHint: zod.ZodOptional<zod.ZodString>;
5585
+ additionalParams: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodString>>;
5586
+ additionalData: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodAny>>;
5587
+ }, zod_v4_core0.$strip>;
5588
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
5589
+ session: {
5590
+ session: Record<string, any> & {
5591
+ id: string;
5592
+ createdAt: Date;
5593
+ updatedAt: Date;
5594
+ userId: string;
5595
+ expiresAt: Date;
5596
+ token: string;
5597
+ ipAddress?: string | null | undefined;
5598
+ userAgent?: string | null | undefined;
5599
+ };
5600
+ user: Record<string, any> & {
5601
+ id: string;
5602
+ createdAt: Date;
5603
+ updatedAt: Date;
5604
+ email: string;
5605
+ emailVerified: boolean;
5606
+ name: string;
5607
+ image?: string | null | undefined;
5608
+ };
5609
+ };
5610
+ }>)[];
5611
+ metadata: {
5612
+ openapi: {
5613
+ description: string;
5614
+ operationId: string;
5615
+ responses: {
5616
+ "200": {
5617
+ description: string;
5618
+ content: {
5619
+ "application/json": {
5620
+ schema: {
5621
+ type: "object";
5622
+ properties: {
5623
+ url: {
5624
+ type: string;
5625
+ description: string;
5626
+ };
5627
+ redirect: {
5628
+ type: string;
5629
+ description: string;
5630
+ };
5631
+ status: {
5632
+ type: string;
5633
+ };
5634
+ };
5635
+ required: string[];
5636
+ };
5637
+ };
5638
+ };
5639
+ };
5640
+ };
5641
+ };
5642
+ };
5643
+ }, {
5644
+ url: string;
5645
+ redirect: boolean;
5646
+ }>;
5647
+ readonly listUserAccounts: better_call0.StrictEndpoint<"/list-accounts", {
5648
+ method: "GET";
5649
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
5650
+ session: {
5651
+ session: Record<string, any> & {
5652
+ id: string;
5653
+ createdAt: Date;
5654
+ updatedAt: Date;
5655
+ userId: string;
5656
+ expiresAt: Date;
5657
+ token: string;
5658
+ ipAddress?: string | null | undefined;
5659
+ userAgent?: string | null | undefined;
5660
+ };
5661
+ user: Record<string, any> & {
5662
+ id: string;
5663
+ createdAt: Date;
5664
+ updatedAt: Date;
5665
+ email: string;
5666
+ emailVerified: boolean;
5667
+ name: string;
5668
+ image?: string | null | undefined;
5669
+ };
5670
+ };
5671
+ }>)[];
5672
+ metadata: {
5673
+ openapi: {
5674
+ operationId: string;
5675
+ description: string;
5676
+ responses: {
5677
+ "200": {
5678
+ description: string;
5679
+ content: {
5680
+ "application/json": {
5681
+ schema: {
5682
+ type: "array";
5683
+ items: {
5684
+ type: string;
5685
+ properties: {
5686
+ id: {
5687
+ type: string;
5688
+ };
5689
+ providerId: {
5690
+ type: string;
5691
+ };
5692
+ createdAt: {
5693
+ type: string;
5694
+ format: string;
5695
+ };
5696
+ updatedAt: {
5697
+ type: string;
5698
+ format: string;
5699
+ };
5700
+ accountId: {
5701
+ type: string;
5702
+ };
5703
+ userId: {
5704
+ type: string;
5705
+ };
5706
+ scopes: {
5707
+ type: string;
5708
+ items: {
5709
+ type: string;
5710
+ };
5711
+ };
5712
+ };
5713
+ required: string[];
5714
+ };
5715
+ };
5716
+ };
5717
+ };
5718
+ };
5719
+ };
5720
+ };
5721
+ };
5722
+ }, {
5723
+ scopes: string[];
5724
+ id: string;
5725
+ createdAt: Date;
5726
+ updatedAt: Date;
5727
+ userId: string;
5728
+ providerId: string;
5729
+ accountId: string;
5730
+ }[]>;
5731
+ readonly deleteUserCallback: better_call0.StrictEndpoint<"/delete-user/callback", {
5732
+ method: "GET";
5733
+ query: zod.ZodObject<{
5734
+ token: zod.ZodString;
5735
+ callbackURL: zod.ZodOptional<zod.ZodString>;
5736
+ }, zod_v4_core0.$strip>;
5737
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<void>)[];
5738
+ metadata: {
5739
+ openapi: {
5740
+ description: string;
5741
+ responses: {
5742
+ "200": {
5743
+ description: string;
5744
+ content: {
5745
+ "application/json": {
5746
+ schema: {
5747
+ type: "object";
5748
+ properties: {
5749
+ success: {
5750
+ type: string;
5751
+ description: string;
5752
+ };
5753
+ message: {
5754
+ type: string;
5755
+ enum: string[];
5756
+ description: string;
5757
+ };
5758
+ };
5759
+ required: string[];
5760
+ };
5761
+ };
5762
+ };
5763
+ };
5764
+ };
5765
+ };
5766
+ };
5767
+ }, {
5768
+ success: boolean;
5769
+ message: string;
5770
+ }>;
5771
+ readonly unlinkAccount: better_call0.StrictEndpoint<"/unlink-account", {
5772
+ method: "POST";
5773
+ body: zod.ZodObject<{
5774
+ providerId: zod.ZodString;
5775
+ accountId: zod.ZodOptional<zod.ZodString>;
5776
+ }, zod_v4_core0.$strip>;
5777
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
5778
+ session: {
5779
+ session: Record<string, any> & {
5780
+ id: string;
5781
+ createdAt: Date;
5782
+ updatedAt: Date;
5783
+ userId: string;
5784
+ expiresAt: Date;
5785
+ token: string;
5786
+ ipAddress?: string | null | undefined;
5787
+ userAgent?: string | null | undefined;
5788
+ };
5789
+ user: Record<string, any> & {
5790
+ id: string;
5791
+ createdAt: Date;
5792
+ updatedAt: Date;
5793
+ email: string;
5794
+ emailVerified: boolean;
5795
+ name: string;
5796
+ image?: string | null | undefined;
5797
+ };
5798
+ };
5799
+ }>)[];
5800
+ metadata: {
5801
+ openapi: {
5802
+ description: string;
5803
+ responses: {
5804
+ "200": {
5805
+ description: string;
5806
+ content: {
5807
+ "application/json": {
5808
+ schema: {
5809
+ type: "object";
5810
+ properties: {
5811
+ status: {
5812
+ type: string;
5813
+ };
5814
+ };
5815
+ };
5816
+ };
5817
+ };
5818
+ };
5819
+ };
5820
+ };
5821
+ };
5822
+ }, {
5823
+ status: boolean;
5824
+ }>;
5825
+ readonly refreshToken: better_call0.StrictEndpoint<"/refresh-token", {
5826
+ method: "POST";
5827
+ body: zod.ZodObject<{
5828
+ providerId: zod.ZodString;
5829
+ accountId: zod.ZodOptional<zod.ZodString>;
5830
+ userId: zod.ZodOptional<zod.ZodString>;
5831
+ }, zod_v4_core0.$strip>;
5832
+ metadata: {
5833
+ openapi: {
5834
+ description: string;
5835
+ responses: {
5836
+ 200: {
5837
+ description: string;
5838
+ content: {
5839
+ "application/json": {
5840
+ schema: {
5841
+ type: "object";
5842
+ properties: {
5843
+ tokenType: {
5844
+ type: string;
5845
+ };
5846
+ idToken: {
5847
+ type: string;
5848
+ };
5849
+ accessToken: {
5850
+ type: string;
5851
+ };
5852
+ refreshToken: {
5853
+ type: string;
5854
+ };
5855
+ accessTokenExpiresAt: {
5856
+ type: string;
5857
+ format: string;
5858
+ };
5859
+ refreshTokenExpiresAt: {
5860
+ type: string;
5861
+ format: string;
5862
+ };
5863
+ };
5864
+ };
5865
+ };
5866
+ };
5867
+ };
5868
+ 400: {
5869
+ description: string;
5870
+ };
5871
+ };
5872
+ };
5873
+ };
5874
+ }, {
5875
+ accessToken: string | undefined;
5876
+ refreshToken: string;
5877
+ accessTokenExpiresAt: Date | undefined;
5878
+ refreshTokenExpiresAt: Date | null | undefined;
5879
+ scope: string | null | undefined;
5880
+ idToken: string | null | undefined;
5881
+ providerId: string;
5882
+ accountId: string;
5883
+ }>;
5884
+ readonly getAccessToken: better_call0.StrictEndpoint<"/get-access-token", {
5885
+ method: "POST";
5886
+ body: zod.ZodObject<{
5887
+ providerId: zod.ZodString;
5888
+ accountId: zod.ZodOptional<zod.ZodString>;
5889
+ userId: zod.ZodOptional<zod.ZodString>;
5890
+ }, zod_v4_core0.$strip>;
5891
+ metadata: {
5892
+ openapi: {
5893
+ description: string;
5894
+ responses: {
5895
+ 200: {
5896
+ description: string;
5897
+ content: {
5898
+ "application/json": {
5899
+ schema: {
5900
+ type: "object";
5901
+ properties: {
5902
+ tokenType: {
5903
+ type: string;
5904
+ };
5905
+ idToken: {
5906
+ type: string;
5907
+ };
5908
+ accessToken: {
5909
+ type: string;
5910
+ };
5911
+ accessTokenExpiresAt: {
5912
+ type: string;
5913
+ format: string;
5914
+ };
5915
+ };
5916
+ };
5917
+ };
5918
+ };
5919
+ };
5920
+ 400: {
5921
+ description: string;
5922
+ };
5923
+ };
5924
+ };
5925
+ };
5926
+ }, {
5927
+ accessToken: string;
5928
+ accessTokenExpiresAt: Date | undefined;
5929
+ scopes: string[];
5930
+ idToken: string | undefined;
5931
+ }>;
5932
+ readonly accountInfo: better_call0.StrictEndpoint<"/account-info", {
5933
+ method: "GET";
5934
+ metadata: {
5935
+ openapi: {
5936
+ description: string;
5937
+ responses: {
5938
+ "200": {
5939
+ description: string;
5940
+ content: {
5941
+ "application/json": {
5942
+ schema: {
5943
+ type: "object";
5944
+ properties: {
5945
+ user: {
5946
+ type: string;
5947
+ properties: {
5948
+ id: {
5949
+ type: string;
5950
+ };
5951
+ name: {
5952
+ type: string;
5953
+ };
5954
+ email: {
5955
+ type: string;
5956
+ };
5957
+ image: {
5958
+ type: string;
5959
+ };
5960
+ emailVerified: {
5961
+ type: string;
5962
+ };
5963
+ };
5964
+ required: string[];
5965
+ };
5966
+ data: {
5967
+ type: string;
5968
+ properties: {};
5969
+ additionalProperties: boolean;
5970
+ };
5971
+ };
5972
+ required: string[];
5973
+ additionalProperties: boolean;
5974
+ };
5975
+ };
5976
+ };
5977
+ };
5978
+ };
5979
+ };
5980
+ };
5981
+ query: zod.ZodOptional<zod.ZodObject<{
5982
+ accountId: zod.ZodOptional<zod.ZodString>;
5983
+ providerId: zod.ZodOptional<zod.ZodString>;
5984
+ userId: zod.ZodOptional<zod.ZodString>;
5985
+ }, zod_v4_core0.$strip>>;
5986
+ }, {
5987
+ user: _better_auth_core_oauth20.OAuth2UserInfo;
5988
+ data: Record<string, any>;
5989
+ } | null>;
5990
+ }>>, keyof (((C extends undefined ? {} : C) & {
5991
+ baseURL: string | undefined;
5992
+ fetchOptions: {
5993
+ customFetchImpl: (url: string | URL | Request, init?: RequestInit | undefined) => Promise<Response>;
5994
+ };
5995
+ })["plugins"] extends infer T_3 ? T_3 extends ((C extends undefined ? {} : C) & {
5996
+ baseURL: string | undefined;
5997
+ fetchOptions: {
5998
+ customFetchImpl: (url: string | URL | Request, init?: RequestInit | undefined) => Promise<Response>;
5999
+ };
6000
+ })["plugins"] ? T_3 extends (infer Pl)[] ? UnionToIntersection<Pl extends {
6001
+ $InferServerPlugin: infer Plug;
6002
+ } ? Plug extends {
6003
+ endpoints: infer Endpoints;
6004
+ } ? Endpoints : {} : {}> : {} : never : never)> & (((C extends undefined ? {} : C) & {
6005
+ baseURL: string | undefined;
6006
+ fetchOptions: {
6007
+ customFetchImpl: (url: string | URL | Request, init?: RequestInit | undefined) => Promise<Response>;
6008
+ };
6009
+ })["plugins"] extends infer T_4 ? T_4 extends ((C extends undefined ? {} : C) & {
6010
+ baseURL: string | undefined;
6011
+ fetchOptions: {
6012
+ customFetchImpl: (url: string | URL | Request, init?: RequestInit | undefined) => Promise<Response>;
6013
+ };
6014
+ })["plugins"] ? T_4 extends (infer Pl)[] ? UnionToIntersection<Pl extends {
6015
+ $InferServerPlugin: infer Plug;
6016
+ } ? Plug extends {
6017
+ endpoints: infer Endpoints;
6018
+ } ? Endpoints : {} : {}> : {} : never : never) : InferAPI<Prettify$1<{
6019
+ readonly ok: better_call0.StrictEndpoint<"/ok", {
6020
+ method: "GET";
6021
+ metadata: {
6022
+ openapi: {
6023
+ description: string;
6024
+ responses: {
6025
+ "200": {
6026
+ description: string;
6027
+ content: {
6028
+ "application/json": {
6029
+ schema: {
6030
+ type: "object";
6031
+ properties: {
6032
+ ok: {
6033
+ type: string;
6034
+ description: string;
6035
+ };
6036
+ };
6037
+ required: string[];
6038
+ };
6039
+ };
6040
+ };
6041
+ };
6042
+ };
6043
+ };
6044
+ scope: "server";
6045
+ };
6046
+ }, {
6047
+ ok: boolean;
6048
+ }>;
6049
+ readonly error: better_call0.StrictEndpoint<"/error", {
6050
+ method: "GET";
6051
+ metadata: {
6052
+ openapi: {
6053
+ description: string;
6054
+ responses: {
6055
+ "200": {
6056
+ description: string;
6057
+ content: {
6058
+ "text/html": {
6059
+ schema: {
6060
+ type: "string";
6061
+ description: string;
6062
+ };
6063
+ };
6064
+ };
6065
+ };
6066
+ };
6067
+ };
6068
+ scope: "server";
6069
+ };
6070
+ }, Response>;
6071
+ readonly signInSocial: better_call0.StrictEndpoint<"/sign-in/social", {
6072
+ method: "POST";
6073
+ operationId: string;
6074
+ body: zod.ZodObject<{
6075
+ callbackURL: zod.ZodOptional<zod.ZodString>;
6076
+ newUserCallbackURL: zod.ZodOptional<zod.ZodString>;
6077
+ errorCallbackURL: zod.ZodOptional<zod.ZodString>;
6078
+ provider: zod.ZodType<(string & {}) | "linear" | "huggingface" | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown, zod_v4_core0.$ZodTypeInternals<(string & {}) | "linear" | "huggingface" | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown>>;
6079
+ disableRedirect: zod.ZodOptional<zod.ZodBoolean>;
6080
+ idToken: zod.ZodOptional<zod.ZodObject<{
6081
+ token: zod.ZodString;
6082
+ nonce: zod.ZodOptional<zod.ZodString>;
6083
+ accessToken: zod.ZodOptional<zod.ZodString>;
6084
+ refreshToken: zod.ZodOptional<zod.ZodString>;
6085
+ expiresAt: zod.ZodOptional<zod.ZodNumber>;
6086
+ user: zod.ZodOptional<zod.ZodObject<{
6087
+ name: zod.ZodOptional<zod.ZodObject<{
6088
+ firstName: zod.ZodOptional<zod.ZodString>;
6089
+ lastName: zod.ZodOptional<zod.ZodString>;
6090
+ }, zod_v4_core0.$strip>>;
6091
+ email: zod.ZodOptional<zod.ZodString>;
6092
+ }, zod_v4_core0.$strip>>;
6093
+ }, zod_v4_core0.$strip>>;
6094
+ scopes: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
6095
+ requestSignUp: zod.ZodOptional<zod.ZodBoolean>;
6096
+ loginHint: zod.ZodOptional<zod.ZodString>;
6097
+ additionalParams: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodString>>;
6098
+ additionalData: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodAny>>;
6099
+ }, zod_v4_core0.$strip>;
6100
+ metadata: {
6101
+ $Infer: {
6102
+ body: zod.infer<zod.ZodObject<{
6103
+ callbackURL: zod.ZodOptional<zod.ZodString>;
6104
+ newUserCallbackURL: zod.ZodOptional<zod.ZodString>;
6105
+ errorCallbackURL: zod.ZodOptional<zod.ZodString>;
6106
+ provider: zod.ZodType<(string & {}) | "linear" | "huggingface" | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown, zod_v4_core0.$ZodTypeInternals<(string & {}) | "linear" | "huggingface" | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown>>;
6107
+ disableRedirect: zod.ZodOptional<zod.ZodBoolean>;
6108
+ idToken: zod.ZodOptional<zod.ZodObject<{
6109
+ token: zod.ZodString;
6110
+ nonce: zod.ZodOptional<zod.ZodString>;
6111
+ accessToken: zod.ZodOptional<zod.ZodString>;
6112
+ refreshToken: zod.ZodOptional<zod.ZodString>;
6113
+ expiresAt: zod.ZodOptional<zod.ZodNumber>;
6114
+ user: zod.ZodOptional<zod.ZodObject<{
6115
+ name: zod.ZodOptional<zod.ZodObject<{
6116
+ firstName: zod.ZodOptional<zod.ZodString>;
6117
+ lastName: zod.ZodOptional<zod.ZodString>;
6118
+ }, zod_v4_core0.$strip>>;
6119
+ email: zod.ZodOptional<zod.ZodString>;
6120
+ }, zod_v4_core0.$strip>>;
6121
+ }, zod_v4_core0.$strip>>;
6122
+ scopes: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
6123
+ requestSignUp: zod.ZodOptional<zod.ZodBoolean>;
6124
+ loginHint: zod.ZodOptional<zod.ZodString>;
6125
+ additionalParams: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodString>>;
6126
+ additionalData: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodAny>>;
6127
+ }, zod_v4_core0.$strip>>;
6128
+ returned: {
6129
+ redirect: boolean;
6130
+ token?: string | undefined;
6131
+ url?: string | undefined;
6132
+ user?: {
6133
+ id: string;
6134
+ createdAt: Date;
6135
+ updatedAt: Date;
6136
+ email: string;
6137
+ emailVerified: boolean;
6138
+ name: string;
6139
+ image?: string | null | undefined;
6140
+ } | undefined;
6141
+ };
6142
+ };
6143
+ openapi: {
6144
+ description: string;
6145
+ operationId: string;
6146
+ responses: {
6147
+ "200": {
6148
+ description: string;
6149
+ content: {
6150
+ "application/json": {
6151
+ schema: {
6152
+ type: "object";
6153
+ description: string;
6154
+ properties: {
6155
+ token: {
6156
+ type: string;
6157
+ };
6158
+ user: {
6159
+ type: string;
6160
+ $ref: string;
6161
+ };
6162
+ url: {
6163
+ type: string;
6164
+ };
6165
+ redirect: {
6166
+ type: string;
6167
+ };
6168
+ };
6169
+ required: string[];
6170
+ };
6171
+ };
6172
+ };
6173
+ };
6174
+ };
6175
+ };
6176
+ };
6177
+ }, {
6178
+ redirect: boolean;
6179
+ url: string;
6180
+ } | {
6181
+ redirect: boolean;
6182
+ token: string;
6183
+ url: undefined;
6184
+ user: {
6185
+ id: string;
6186
+ createdAt: Date;
6187
+ updatedAt: Date;
6188
+ email: string;
6189
+ emailVerified: boolean;
6190
+ name: string;
6191
+ image?: string | null | undefined;
6192
+ };
6193
+ }>;
6194
+ readonly callbackOAuth: better_call0.StrictEndpoint<"/callback/:id", {
6195
+ method: ("GET" | "POST")[];
6196
+ operationId: string;
6197
+ body: zod.ZodOptional<zod.ZodObject<{
6198
+ code: zod.ZodOptional<zod.ZodString>;
6199
+ error: zod.ZodOptional<zod.ZodString>;
6200
+ device_id: zod.ZodOptional<zod.ZodString>;
6201
+ error_description: zod.ZodOptional<zod.ZodString>;
6202
+ state: zod.ZodOptional<zod.ZodString>;
6203
+ user: zod.ZodOptional<zod.ZodString>;
6204
+ iss: zod.ZodOptional<zod.ZodString>;
6205
+ }, zod_v4_core0.$strip>>;
6206
+ query: zod.ZodOptional<zod.ZodObject<{
6207
+ code: zod.ZodOptional<zod.ZodString>;
6208
+ error: zod.ZodOptional<zod.ZodString>;
6209
+ device_id: zod.ZodOptional<zod.ZodString>;
6210
+ error_description: zod.ZodOptional<zod.ZodString>;
6211
+ state: zod.ZodOptional<zod.ZodString>;
6212
+ user: zod.ZodOptional<zod.ZodString>;
6213
+ iss: zod.ZodOptional<zod.ZodString>;
6214
+ }, zod_v4_core0.$strip>>;
6215
+ metadata: {
6216
+ allowedMediaTypes: string[];
6217
+ scope: "server";
6218
+ };
6219
+ }, void>;
6220
+ readonly getSession: better_call0.StrictEndpoint<"/get-session", {
6221
+ method: ("GET" | "POST")[];
6222
+ operationId: string;
6223
+ query: zod.ZodOptional<zod.ZodObject<{
6224
+ disableCookieCache: zod.ZodOptional<zod.ZodCoercedBoolean<unknown>>;
6225
+ disableRefresh: zod.ZodOptional<zod.ZodCoercedBoolean<unknown>>;
6226
+ }, zod_v4_core0.$strip>>;
6227
+ requireHeaders: true;
6228
+ metadata: {
6229
+ openapi: {
6230
+ operationId: string;
6231
+ description: string;
6232
+ responses: {
6233
+ "200": {
6234
+ description: string;
6235
+ content: {
6236
+ "application/json": {
6237
+ schema: {
6238
+ type: "object";
6239
+ properties: {
6240
+ session: {
6241
+ $ref: string;
6242
+ };
6243
+ user: {
6244
+ $ref: string;
6245
+ };
6246
+ };
6247
+ required: string[];
6248
+ };
6249
+ };
6250
+ };
6251
+ };
6252
+ };
6253
+ };
6254
+ };
6255
+ }, {
6256
+ session: {
6257
+ id: string;
6258
+ createdAt: Date;
6259
+ updatedAt: Date;
6260
+ userId: string;
6261
+ expiresAt: Date;
6262
+ token: string;
6263
+ ipAddress?: string | null | undefined;
6264
+ userAgent?: string | null | undefined;
6265
+ };
6266
+ user: {
6267
+ id: string;
6268
+ createdAt: Date;
6269
+ updatedAt: Date;
6270
+ email: string;
6271
+ emailVerified: boolean;
6272
+ name: string;
6273
+ image?: string | null | undefined;
6274
+ };
6275
+ } | null>;
6276
+ readonly signOut: better_call0.StrictEndpoint<"/sign-out", {
6277
+ method: "POST";
6278
+ operationId: string;
6279
+ requireHeaders: true;
6280
+ metadata: {
6281
+ openapi: {
6282
+ operationId: string;
6283
+ description: string;
6284
+ responses: {
6285
+ "200": {
6286
+ description: string;
6287
+ content: {
6288
+ "application/json": {
6289
+ schema: {
6290
+ type: "object";
6291
+ properties: {
6292
+ success: {
6293
+ type: string;
6294
+ };
6295
+ };
6296
+ };
6297
+ };
6298
+ };
6299
+ };
6300
+ };
6301
+ };
6302
+ };
6303
+ }, {
6304
+ success: boolean;
6305
+ }>;
6306
+ readonly signUpEmail: better_call0.StrictEndpoint<"/sign-up/email", {
6307
+ method: "POST";
6308
+ operationId: string;
6309
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<void>)[];
6310
+ body: zod.ZodIntersection<zod.ZodObject<{
6311
+ name: zod.ZodString;
6312
+ email: zod.ZodEmail;
6313
+ password: zod.ZodString;
6314
+ image: zod.ZodOptional<zod.ZodString>;
6315
+ callbackURL: zod.ZodOptional<zod.ZodString>;
6316
+ rememberMe: zod.ZodOptional<zod.ZodBoolean>;
6317
+ }, zod_v4_core0.$strip>, zod.ZodRecord<zod.ZodString, zod.ZodAny>>;
6318
+ cloneRequest: true;
6319
+ metadata: {
6320
+ allowedMediaTypes: string[];
6321
+ $Infer: {
6322
+ body: {
6323
+ name: string;
6324
+ email: string;
6325
+ password: string;
6326
+ image?: string | undefined;
6327
+ callbackURL?: string | undefined;
6328
+ rememberMe?: boolean | undefined;
6329
+ };
6330
+ returned: {
6331
+ token: string | null;
6332
+ user: {
6333
+ id: string;
6334
+ createdAt: Date;
6335
+ updatedAt: Date;
6336
+ email: string;
6337
+ emailVerified: boolean;
6338
+ name: string;
6339
+ image?: string | null | undefined;
6340
+ };
6341
+ };
6342
+ };
6343
+ openapi: {
6344
+ operationId: string;
6345
+ description: string;
6346
+ requestBody: {
6347
+ content: {
6348
+ "application/json": {
6349
+ schema: {
6350
+ type: "object";
6351
+ properties: {
6352
+ name: {
6353
+ type: string;
6354
+ description: string;
6355
+ };
6356
+ email: {
6357
+ type: string;
6358
+ description: string;
6359
+ };
6360
+ password: {
6361
+ type: string;
6362
+ description: string;
6363
+ };
6364
+ image: {
6365
+ type: string;
6366
+ description: string;
6367
+ };
6368
+ callbackURL: {
6369
+ type: string;
6370
+ description: string;
6371
+ };
6372
+ rememberMe: {
6373
+ type: string;
6374
+ description: string;
6375
+ };
6376
+ };
6377
+ required: string[];
6378
+ };
6379
+ };
6380
+ };
6381
+ };
6382
+ responses: {
6383
+ "200": {
6384
+ description: string;
6385
+ content: {
6386
+ "application/json": {
6387
+ schema: {
6388
+ type: "object";
6389
+ properties: {
6390
+ token: {
6391
+ type: string;
6392
+ nullable: boolean;
6393
+ description: string;
6394
+ };
6395
+ user: {
6396
+ type: string;
6397
+ properties: {
6398
+ id: {
6399
+ type: string;
6400
+ description: string;
6401
+ };
6402
+ email: {
6403
+ type: string;
6404
+ format: string;
6405
+ description: string;
6406
+ };
6407
+ name: {
6408
+ type: string;
6409
+ description: string;
6410
+ };
6411
+ image: {
6412
+ type: string;
6413
+ format: string;
6414
+ nullable: boolean;
6415
+ description: string;
6416
+ };
6417
+ emailVerified: {
6418
+ type: string;
6419
+ description: string;
6420
+ };
6421
+ createdAt: {
6422
+ type: string;
6423
+ format: string;
6424
+ description: string;
6425
+ };
6426
+ updatedAt: {
6427
+ type: string;
6428
+ format: string;
6429
+ description: string;
6430
+ };
6431
+ };
6432
+ required: string[];
6433
+ };
6434
+ };
6435
+ required: string[];
6436
+ };
6437
+ };
6438
+ };
6439
+ };
6440
+ "422": {
6441
+ description: string;
6442
+ content: {
6443
+ "application/json": {
6444
+ schema: {
6445
+ type: "object";
6446
+ properties: {
6447
+ message: {
6448
+ type: string;
6449
+ };
6450
+ };
6451
+ };
6452
+ };
6453
+ };
6454
+ };
6455
+ };
6456
+ };
6457
+ };
6458
+ }, {
6459
+ token: null;
6460
+ user: {
6461
+ id: string;
6462
+ createdAt: Date;
6463
+ updatedAt: Date;
6464
+ email: string;
6465
+ emailVerified: boolean;
6466
+ name: string;
6467
+ image?: string | null | undefined;
6468
+ };
6469
+ } | {
6470
+ token: string;
6471
+ user: {
6472
+ id: string;
6473
+ createdAt: Date;
6474
+ updatedAt: Date;
6475
+ email: string;
6476
+ emailVerified: boolean;
6477
+ name: string;
6478
+ image?: string | null | undefined;
6479
+ };
6480
+ }>;
6481
+ readonly signInEmail: better_call0.StrictEndpoint<"/sign-in/email", {
6482
+ method: "POST";
6483
+ operationId: string;
6484
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<void>)[];
6485
+ cloneRequest: true;
6486
+ body: zod.ZodObject<{
6487
+ email: zod.ZodString;
6488
+ password: zod.ZodString;
6489
+ callbackURL: zod.ZodOptional<zod.ZodString>;
6490
+ rememberMe: zod.ZodOptional<zod.ZodDefault<zod.ZodBoolean>>;
6491
+ }, zod_v4_core0.$strip>;
6492
+ metadata: {
6493
+ allowedMediaTypes: string[];
6494
+ $Infer: {
6495
+ body: {
6496
+ email: string;
6497
+ password: string;
6498
+ callbackURL?: string | undefined;
6499
+ rememberMe?: boolean | undefined;
6500
+ };
6501
+ returned: {
6502
+ redirect: boolean;
6503
+ token: string;
6504
+ url?: string | undefined;
6505
+ user: {
6506
+ id: string;
6507
+ createdAt: Date;
6508
+ updatedAt: Date;
6509
+ email: string;
6510
+ emailVerified: boolean;
6511
+ name: string;
6512
+ image?: string | null | undefined;
6513
+ };
6514
+ };
6515
+ };
6516
+ openapi: {
6517
+ operationId: string;
6518
+ description: string;
6519
+ responses: {
6520
+ "200": {
6521
+ description: string;
6522
+ content: {
6523
+ "application/json": {
6524
+ schema: {
6525
+ type: "object";
6526
+ description: string;
6527
+ properties: {
6528
+ redirect: {
6529
+ type: string;
6530
+ enum: boolean[];
6531
+ };
6532
+ token: {
6533
+ type: string;
6534
+ description: string;
6535
+ };
6536
+ url: {
6537
+ type: string;
6538
+ nullable: boolean;
6539
+ };
6540
+ user: {
6541
+ type: string;
6542
+ $ref: string;
6543
+ };
6544
+ };
6545
+ required: string[];
6546
+ };
6547
+ };
6548
+ };
6549
+ };
6550
+ };
6551
+ };
6552
+ };
6553
+ }, {
6554
+ redirect: boolean;
6555
+ token: string;
6556
+ url?: string | undefined;
6557
+ user: {
6558
+ id: string;
6559
+ createdAt: Date;
6560
+ updatedAt: Date;
6561
+ email: string;
6562
+ emailVerified: boolean;
6563
+ name: string;
6564
+ image?: string | null | undefined;
6565
+ };
6566
+ }>;
6567
+ readonly resetPassword: better_call0.StrictEndpoint<"/reset-password", {
6568
+ method: "POST";
6569
+ operationId: string;
6570
+ query: zod.ZodOptional<zod.ZodObject<{
6571
+ token: zod.ZodOptional<zod.ZodString>;
6572
+ }, zod_v4_core0.$strip>>;
6573
+ body: zod.ZodObject<{
6574
+ newPassword: zod.ZodString;
6575
+ token: zod.ZodOptional<zod.ZodString>;
6576
+ }, zod_v4_core0.$strip>;
6577
+ metadata: {
6578
+ openapi: {
6579
+ operationId: string;
6580
+ description: string;
6581
+ responses: {
6582
+ "200": {
6583
+ description: string;
6584
+ content: {
6585
+ "application/json": {
6586
+ schema: {
6587
+ type: "object";
6588
+ properties: {
6589
+ status: {
6590
+ type: string;
6591
+ };
6592
+ };
6593
+ };
6594
+ };
6595
+ };
6596
+ };
6597
+ };
6598
+ };
6599
+ };
6600
+ }, {
6601
+ status: boolean;
6602
+ }>;
6603
+ readonly verifyPassword: better_call0.StrictEndpoint<"/verify-password", {
6604
+ method: "POST";
6605
+ body: zod.ZodObject<{
6606
+ password: zod.ZodString;
6607
+ }, zod_v4_core0.$strip>;
6608
+ metadata: {
6609
+ scope: "server";
6610
+ openapi: {
6611
+ operationId: string;
6612
+ description: string;
6613
+ responses: {
6614
+ "200": {
6615
+ description: string;
6616
+ content: {
6617
+ "application/json": {
6618
+ schema: {
6619
+ type: "object";
6620
+ properties: {
6621
+ status: {
6622
+ type: string;
6623
+ };
6624
+ };
6625
+ };
6626
+ };
6627
+ };
6628
+ };
6629
+ };
6630
+ };
6631
+ };
6632
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
6633
+ session: {
6634
+ session: Record<string, any> & {
6635
+ id: string;
6636
+ createdAt: Date;
6637
+ updatedAt: Date;
6638
+ userId: string;
6639
+ expiresAt: Date;
6640
+ token: string;
6641
+ ipAddress?: string | null | undefined;
6642
+ userAgent?: string | null | undefined;
6643
+ };
6644
+ user: Record<string, any> & {
6645
+ id: string;
6646
+ createdAt: Date;
6647
+ updatedAt: Date;
6648
+ email: string;
6649
+ emailVerified: boolean;
6650
+ name: string;
6651
+ image?: string | null | undefined;
6652
+ };
6653
+ };
6654
+ }>)[];
6655
+ }, {
6656
+ status: boolean;
6657
+ }>;
6658
+ readonly verifyEmail: better_call0.StrictEndpoint<"/verify-email", {
6659
+ method: "GET";
6660
+ operationId: string;
6661
+ query: zod.ZodObject<{
6662
+ token: zod.ZodString;
6663
+ callbackURL: zod.ZodOptional<zod.ZodString>;
6664
+ }, zod_v4_core0.$strip>;
6665
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<void>)[];
6666
+ metadata: {
6667
+ openapi: {
6668
+ description: string;
6669
+ parameters: ({
6670
+ name: string;
6671
+ in: "query";
6672
+ description: string;
6673
+ required: true;
6674
+ schema: {
6675
+ type: "string";
6676
+ };
6677
+ } | {
6678
+ name: string;
6679
+ in: "query";
6680
+ description: string;
6681
+ required: false;
6682
+ schema: {
6683
+ type: "string";
6684
+ };
6685
+ })[];
6686
+ responses: {
6687
+ "200": {
6688
+ description: string;
6689
+ content: {
6690
+ "application/json": {
6691
+ schema: {
6692
+ type: "object";
6693
+ properties: {
6694
+ user: {
6695
+ type: string;
6696
+ $ref: string;
6697
+ };
6698
+ status: {
6699
+ type: string;
6700
+ description: string;
6701
+ };
6702
+ };
6703
+ required: string[];
6704
+ };
6705
+ };
6706
+ };
6707
+ };
6708
+ };
6709
+ };
6710
+ };
6711
+ }, void | {
6712
+ status: boolean;
6713
+ }>;
6714
+ readonly sendVerificationEmail: better_call0.StrictEndpoint<"/send-verification-email", {
6715
+ method: "POST";
6716
+ operationId: string;
6717
+ cloneRequest: true;
6718
+ body: zod.ZodObject<{
6719
+ email: zod.ZodEmail;
6720
+ callbackURL: zod.ZodOptional<zod.ZodString>;
6721
+ }, zod_v4_core0.$strip>;
6722
+ metadata: {
6723
+ openapi: {
6724
+ operationId: string;
6725
+ description: string;
6726
+ requestBody: {
6727
+ content: {
6728
+ "application/json": {
6729
+ schema: {
6730
+ type: "object";
6731
+ properties: {
6732
+ email: {
6733
+ type: string;
6734
+ description: string;
6735
+ example: string;
6736
+ };
6737
+ callbackURL: {
6738
+ type: string;
6739
+ description: string;
6740
+ example: string;
6741
+ nullable: boolean;
6742
+ };
6743
+ };
6744
+ required: string[];
6745
+ };
6746
+ };
6747
+ };
6748
+ };
6749
+ responses: {
6750
+ "200": {
6751
+ description: string;
6752
+ content: {
6753
+ "application/json": {
6754
+ schema: {
6755
+ type: "object";
6756
+ properties: {
6757
+ status: {
6758
+ type: string;
6759
+ description: string;
6760
+ example: boolean;
6761
+ };
6762
+ };
6763
+ };
6764
+ };
6765
+ };
6766
+ };
6767
+ "400": {
6768
+ description: string;
6769
+ content: {
6770
+ "application/json": {
6771
+ schema: {
6772
+ type: "object";
6773
+ properties: {
6774
+ message: {
6775
+ type: string;
6776
+ description: string;
6777
+ example: string;
6778
+ };
6779
+ };
6780
+ };
6781
+ };
6782
+ };
6783
+ };
6784
+ };
6785
+ };
6786
+ };
6787
+ }, {
6788
+ status: boolean;
6789
+ }>;
6790
+ readonly changeEmail: better_call0.StrictEndpoint<"/change-email", {
6791
+ method: "POST";
6792
+ body: zod.ZodObject<{
6793
+ newEmail: zod.ZodEmail;
6794
+ callbackURL: zod.ZodOptional<zod.ZodString>;
6795
+ }, zod_v4_core0.$strip>;
6796
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
6797
+ session: {
6798
+ session: Record<string, any> & {
6799
+ id: string;
6800
+ createdAt: Date;
6801
+ updatedAt: Date;
6802
+ userId: string;
6803
+ expiresAt: Date;
6804
+ token: string;
6805
+ ipAddress?: string | null | undefined;
6806
+ userAgent?: string | null | undefined;
6807
+ };
6808
+ user: Record<string, any> & {
6809
+ id: string;
6810
+ createdAt: Date;
6811
+ updatedAt: Date;
6812
+ email: string;
6813
+ emailVerified: boolean;
6814
+ name: string;
6815
+ image?: string | null | undefined;
6816
+ };
6817
+ };
6818
+ }>)[];
6819
+ metadata: {
6820
+ openapi: {
6821
+ operationId: string;
6822
+ responses: {
6823
+ "200": {
6824
+ description: string;
6825
+ content: {
6826
+ "application/json": {
6827
+ schema: {
6828
+ type: "object";
6829
+ properties: {
6830
+ user: {
6831
+ type: string;
6832
+ $ref: string;
6833
+ };
6834
+ status: {
6835
+ type: string;
6836
+ description: string;
6837
+ };
6838
+ message: {
6839
+ type: string;
6840
+ enum: string[];
6841
+ description: string;
6842
+ nullable: boolean;
6843
+ };
6844
+ };
6845
+ required: string[];
6846
+ };
6847
+ };
6848
+ };
6849
+ };
6850
+ };
6851
+ };
6852
+ };
6853
+ }, {
6854
+ status: boolean;
6855
+ }>;
6856
+ readonly changePassword: better_call0.StrictEndpoint<"/change-password", {
6857
+ method: "POST";
6858
+ operationId: string;
6859
+ body: zod.ZodObject<{
6860
+ newPassword: zod.ZodString;
6861
+ currentPassword: zod.ZodString;
6862
+ revokeOtherSessions: zod.ZodOptional<zod.ZodBoolean>;
6863
+ }, zod_v4_core0.$strip>;
6864
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
6865
+ session: {
6866
+ session: Record<string, any> & {
6867
+ id: string;
6868
+ createdAt: Date;
6869
+ updatedAt: Date;
6870
+ userId: string;
6871
+ expiresAt: Date;
6872
+ token: string;
6873
+ ipAddress?: string | null | undefined;
6874
+ userAgent?: string | null | undefined;
6875
+ };
6876
+ user: Record<string, any> & {
6877
+ id: string;
6878
+ createdAt: Date;
6879
+ updatedAt: Date;
6880
+ email: string;
6881
+ emailVerified: boolean;
6882
+ name: string;
6883
+ image?: string | null | undefined;
6884
+ };
6885
+ };
6886
+ }>)[];
6887
+ metadata: {
6888
+ openapi: {
6889
+ operationId: string;
6890
+ description: string;
6891
+ responses: {
6892
+ "200": {
6893
+ description: string;
6894
+ content: {
6895
+ "application/json": {
6896
+ schema: {
6897
+ type: "object";
6898
+ properties: {
6899
+ token: {
6900
+ type: string;
6901
+ nullable: boolean;
6902
+ description: string;
6903
+ };
6904
+ user: {
6905
+ type: string;
6906
+ properties: {
6907
+ id: {
6908
+ type: string;
6909
+ description: string;
6910
+ };
6911
+ email: {
6912
+ type: string;
6913
+ format: string;
6914
+ description: string;
6915
+ };
6916
+ name: {
6917
+ type: string;
6918
+ description: string;
6919
+ };
6920
+ image: {
6921
+ type: string;
6922
+ format: string;
6923
+ nullable: boolean;
6924
+ description: string;
6925
+ };
6926
+ emailVerified: {
6927
+ type: string;
6928
+ description: string;
6929
+ };
6930
+ createdAt: {
6931
+ type: string;
6932
+ format: string;
6933
+ description: string;
6934
+ };
6935
+ updatedAt: {
6936
+ type: string;
6937
+ format: string;
6938
+ description: string;
6939
+ };
6940
+ };
6941
+ required: string[];
6942
+ };
6943
+ };
6944
+ required: string[];
6945
+ };
6946
+ };
6947
+ };
6948
+ };
6949
+ };
6950
+ };
6951
+ };
6952
+ }, {
6953
+ token: string | null;
6954
+ user: {
6955
+ id: string;
6956
+ createdAt: Date;
6957
+ updatedAt: Date;
6958
+ email: string;
6959
+ emailVerified: boolean;
6960
+ name: string;
6961
+ image?: string | null | undefined;
6962
+ } & Record<string, any> & {
6963
+ id: string;
6964
+ createdAt: Date;
6965
+ updatedAt: Date;
6966
+ email: string;
6967
+ emailVerified: boolean;
6968
+ name: string;
6969
+ image?: string | null | undefined;
6970
+ };
6971
+ }>;
6972
+ readonly setPassword: better_call0.StrictEndpoint<string, {
6973
+ method: "POST";
6974
+ body: zod.ZodObject<{
6975
+ newPassword: zod.ZodString;
6976
+ }, zod_v4_core0.$strip>;
6977
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
6978
+ session: {
6979
+ session: Record<string, any> & {
6980
+ id: string;
6981
+ createdAt: Date;
6982
+ updatedAt: Date;
6983
+ userId: string;
6984
+ expiresAt: Date;
6985
+ token: string;
6986
+ ipAddress?: string | null | undefined;
6987
+ userAgent?: string | null | undefined;
6988
+ };
6989
+ user: Record<string, any> & {
6990
+ id: string;
6991
+ createdAt: Date;
6992
+ updatedAt: Date;
6993
+ email: string;
6994
+ emailVerified: boolean;
6995
+ name: string;
6996
+ image?: string | null | undefined;
6997
+ };
6998
+ };
6999
+ }>)[];
7000
+ }, {
7001
+ status: boolean;
7002
+ }>;
7003
+ readonly updateSession: better_call0.StrictEndpoint<"/update-session", {
7004
+ method: "POST";
7005
+ operationId: string;
7006
+ body: zod.ZodRecord<zod.ZodString, zod.ZodAny>;
7007
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
7008
+ session: {
7009
+ session: Record<string, any> & {
7010
+ id: string;
7011
+ createdAt: Date;
7012
+ updatedAt: Date;
7013
+ userId: string;
7014
+ expiresAt: Date;
7015
+ token: string;
7016
+ ipAddress?: string | null | undefined;
7017
+ userAgent?: string | null | undefined;
7018
+ };
7019
+ user: Record<string, any> & {
7020
+ id: string;
7021
+ createdAt: Date;
7022
+ updatedAt: Date;
7023
+ email: string;
7024
+ emailVerified: boolean;
7025
+ name: string;
7026
+ image?: string | null | undefined;
7027
+ };
7028
+ };
7029
+ }>)[];
7030
+ metadata: {
7031
+ $Infer: {
7032
+ body: Partial<{}>;
7033
+ };
7034
+ openapi: {
7035
+ operationId: string;
7036
+ description: string;
7037
+ responses: {
7038
+ "200": {
7039
+ description: string;
7040
+ content: {
7041
+ "application/json": {
7042
+ schema: {
7043
+ type: "object";
7044
+ properties: {
7045
+ session: {
7046
+ type: string;
7047
+ $ref: string;
7048
+ };
7049
+ };
7050
+ };
7051
+ };
7052
+ };
7053
+ };
7054
+ };
7055
+ };
7056
+ };
7057
+ }, {
7058
+ session: {
7059
+ id: string;
7060
+ createdAt: Date;
7061
+ updatedAt: Date;
7062
+ userId: string;
7063
+ expiresAt: Date;
7064
+ token: string;
7065
+ ipAddress?: string | null | undefined;
7066
+ userAgent?: string | null | undefined;
7067
+ };
7068
+ }>;
7069
+ readonly updateUser: better_call0.StrictEndpoint<"/update-user", {
7070
+ method: "POST";
7071
+ operationId: string;
7072
+ body: zod.ZodRecord<zod.ZodString, zod.ZodAny>;
7073
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
7074
+ session: {
7075
+ session: Record<string, any> & {
7076
+ id: string;
7077
+ createdAt: Date;
7078
+ updatedAt: Date;
7079
+ userId: string;
7080
+ expiresAt: Date;
7081
+ token: string;
7082
+ ipAddress?: string | null | undefined;
7083
+ userAgent?: string | null | undefined;
7084
+ };
7085
+ user: Record<string, any> & {
7086
+ id: string;
7087
+ createdAt: Date;
7088
+ updatedAt: Date;
7089
+ email: string;
7090
+ emailVerified: boolean;
7091
+ name: string;
7092
+ image?: string | null | undefined;
7093
+ };
7094
+ };
7095
+ }>)[];
7096
+ metadata: {
7097
+ $Infer: {
7098
+ body: Partial<{}> & {
7099
+ name?: string | undefined;
7100
+ image?: string | undefined | null;
7101
+ };
7102
+ };
7103
+ openapi: {
7104
+ operationId: string;
7105
+ description: string;
7106
+ requestBody: {
7107
+ content: {
7108
+ "application/json": {
7109
+ schema: {
7110
+ type: "object";
7111
+ properties: {
7112
+ name: {
7113
+ type: string;
7114
+ description: string;
7115
+ };
7116
+ image: {
7117
+ type: string;
7118
+ description: string;
7119
+ nullable: boolean;
7120
+ };
7121
+ };
7122
+ };
7123
+ };
7124
+ };
7125
+ };
7126
+ responses: {
7127
+ "200": {
7128
+ description: string;
7129
+ content: {
7130
+ "application/json": {
7131
+ schema: {
7132
+ type: "object";
7133
+ properties: {
7134
+ user: {
7135
+ type: string;
7136
+ $ref: string;
7137
+ };
7138
+ };
7139
+ };
7140
+ };
7141
+ };
7142
+ };
7143
+ };
7144
+ };
7145
+ };
7146
+ }, {
7147
+ status: boolean;
7148
+ }>;
7149
+ readonly deleteUser: better_call0.StrictEndpoint<"/delete-user", {
7150
+ method: "POST";
7151
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
7152
+ session: {
7153
+ session: Record<string, any> & {
7154
+ id: string;
7155
+ createdAt: Date;
7156
+ updatedAt: Date;
7157
+ userId: string;
7158
+ expiresAt: Date;
7159
+ token: string;
7160
+ ipAddress?: string | null | undefined;
7161
+ userAgent?: string | null | undefined;
7162
+ };
7163
+ user: Record<string, any> & {
7164
+ id: string;
7165
+ createdAt: Date;
7166
+ updatedAt: Date;
7167
+ email: string;
7168
+ emailVerified: boolean;
7169
+ name: string;
7170
+ image?: string | null | undefined;
7171
+ };
7172
+ };
7173
+ }>)[];
7174
+ body: zod.ZodObject<{
7175
+ callbackURL: zod.ZodOptional<zod.ZodString>;
7176
+ password: zod.ZodOptional<zod.ZodString>;
7177
+ token: zod.ZodOptional<zod.ZodString>;
7178
+ }, zod_v4_core0.$strip>;
7179
+ metadata: {
7180
+ openapi: {
7181
+ operationId: string;
7182
+ description: string;
7183
+ requestBody: {
7184
+ content: {
7185
+ "application/json": {
7186
+ schema: {
7187
+ type: "object";
7188
+ properties: {
7189
+ callbackURL: {
7190
+ type: string;
7191
+ description: string;
7192
+ };
7193
+ password: {
7194
+ type: string;
7195
+ description: string;
7196
+ };
7197
+ token: {
7198
+ type: string;
7199
+ description: string;
7200
+ };
7201
+ };
7202
+ };
7203
+ };
7204
+ };
7205
+ };
7206
+ responses: {
7207
+ "200": {
7208
+ description: string;
7209
+ content: {
7210
+ "application/json": {
7211
+ schema: {
7212
+ type: "object";
7213
+ properties: {
7214
+ success: {
7215
+ type: string;
7216
+ description: string;
7217
+ };
7218
+ message: {
7219
+ type: string;
7220
+ enum: string[];
7221
+ description: string;
7222
+ };
7223
+ };
7224
+ required: string[];
7225
+ };
7226
+ };
7227
+ };
7228
+ };
7229
+ };
7230
+ };
7231
+ };
7232
+ }, {
7233
+ success: boolean;
7234
+ message: string;
7235
+ }>;
7236
+ readonly requestPasswordReset: better_call0.StrictEndpoint<"/request-password-reset", {
7237
+ method: "POST";
7238
+ body: zod.ZodObject<{
7239
+ email: zod.ZodEmail;
7240
+ redirectTo: zod.ZodOptional<zod.ZodString>;
7241
+ }, zod_v4_core0.$strip>;
7242
+ metadata: {
7243
+ openapi: {
7244
+ operationId: string;
7245
+ description: string;
7246
+ responses: {
7247
+ "200": {
7248
+ description: string;
7249
+ content: {
7250
+ "application/json": {
7251
+ schema: {
7252
+ type: "object";
7253
+ properties: {
7254
+ status: {
7255
+ type: string;
7256
+ };
7257
+ message: {
7258
+ type: string;
7259
+ };
7260
+ };
7261
+ };
7262
+ };
7263
+ };
7264
+ };
7265
+ };
7266
+ };
7267
+ };
7268
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<void>)[];
7269
+ }, {
7270
+ status: boolean;
7271
+ message: string;
7272
+ }>;
7273
+ readonly requestPasswordResetCallback: better_call0.StrictEndpoint<"/reset-password/:token", {
7274
+ method: "GET";
7275
+ operationId: string;
7276
+ query: zod.ZodObject<{
7277
+ callbackURL: zod.ZodString;
7278
+ }, zod_v4_core0.$strip>;
7279
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<void>)[];
7280
+ metadata: {
7281
+ openapi: {
7282
+ operationId: string;
7283
+ description: string;
7284
+ parameters: ({
7285
+ name: string;
7286
+ in: "path";
7287
+ required: true;
7288
+ description: string;
7289
+ schema: {
7290
+ type: "string";
7291
+ };
7292
+ } | {
7293
+ name: string;
7294
+ in: "query";
7295
+ required: true;
7296
+ description: string;
7297
+ schema: {
7298
+ type: "string";
7299
+ };
7300
+ })[];
7301
+ responses: {
7302
+ "200": {
7303
+ description: string;
7304
+ content: {
7305
+ "application/json": {
7306
+ schema: {
7307
+ type: "object";
7308
+ properties: {
7309
+ token: {
7310
+ type: string;
7311
+ };
7312
+ };
7313
+ };
7314
+ };
7315
+ };
7316
+ };
7317
+ };
7318
+ };
7319
+ };
7320
+ }, never>;
7321
+ readonly listSessions: better_call0.StrictEndpoint<"/list-sessions", {
7322
+ method: "GET";
7323
+ operationId: string;
7324
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
7325
+ session: {
7326
+ session: Record<string, any> & {
7327
+ id: string;
7328
+ createdAt: Date;
7329
+ updatedAt: Date;
7330
+ userId: string;
7331
+ expiresAt: Date;
7332
+ token: string;
7333
+ ipAddress?: string | null | undefined;
7334
+ userAgent?: string | null | undefined;
7335
+ };
7336
+ user: Record<string, any> & {
7337
+ id: string;
7338
+ createdAt: Date;
7339
+ updatedAt: Date;
7340
+ email: string;
7341
+ emailVerified: boolean;
7342
+ name: string;
7343
+ image?: string | null | undefined;
7344
+ };
7345
+ };
7346
+ }>)[];
7347
+ requireHeaders: true;
7348
+ metadata: {
7349
+ openapi: {
7350
+ operationId: string;
7351
+ description: string;
7352
+ responses: {
7353
+ "200": {
7354
+ description: string;
7355
+ content: {
7356
+ "application/json": {
7357
+ schema: {
7358
+ type: "array";
7359
+ items: {
7360
+ $ref: string;
7361
+ };
7362
+ };
7363
+ };
7364
+ };
7365
+ };
7366
+ };
7367
+ };
7368
+ };
7369
+ }, Prettify$1<{
7370
+ id: string;
7371
+ createdAt: Date;
7372
+ updatedAt: Date;
7373
+ userId: string;
7374
+ expiresAt: Date;
7375
+ token: string;
7376
+ ipAddress?: string | null | undefined;
7377
+ userAgent?: string | null | undefined;
7378
+ }>[]>;
7379
+ readonly revokeSession: better_call0.StrictEndpoint<"/revoke-session", {
7380
+ method: "POST";
7381
+ body: zod.ZodObject<{
7382
+ token: zod.ZodString;
7383
+ }, zod_v4_core0.$strip>;
7384
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
7385
+ session: {
7386
+ session: Record<string, any> & {
7387
+ id: string;
7388
+ createdAt: Date;
7389
+ updatedAt: Date;
7390
+ userId: string;
7391
+ expiresAt: Date;
7392
+ token: string;
7393
+ ipAddress?: string | null | undefined;
7394
+ userAgent?: string | null | undefined;
7395
+ };
7396
+ user: Record<string, any> & {
7397
+ id: string;
7398
+ createdAt: Date;
7399
+ updatedAt: Date;
7400
+ email: string;
7401
+ emailVerified: boolean;
7402
+ name: string;
7403
+ image?: string | null | undefined;
7404
+ };
7405
+ };
7406
+ }>)[];
7407
+ requireHeaders: true;
7408
+ metadata: {
7409
+ openapi: {
7410
+ description: string;
7411
+ requestBody: {
7412
+ content: {
7413
+ "application/json": {
7414
+ schema: {
7415
+ type: "object";
7416
+ properties: {
7417
+ token: {
7418
+ type: string;
7419
+ description: string;
7420
+ };
7421
+ };
7422
+ required: string[];
7423
+ };
7424
+ };
7425
+ };
7426
+ };
7427
+ responses: {
7428
+ "200": {
7429
+ description: string;
7430
+ content: {
7431
+ "application/json": {
7432
+ schema: {
7433
+ type: "object";
7434
+ properties: {
7435
+ status: {
7436
+ type: string;
7437
+ description: string;
7438
+ };
7439
+ };
7440
+ required: string[];
7441
+ };
7442
+ };
7443
+ };
7444
+ };
7445
+ };
7446
+ };
7447
+ };
7448
+ }, {
7449
+ status: boolean;
7450
+ }>;
7451
+ readonly revokeSessions: better_call0.StrictEndpoint<"/revoke-sessions", {
7452
+ method: "POST";
7453
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
7454
+ session: {
7455
+ session: Record<string, any> & {
7456
+ id: string;
7457
+ createdAt: Date;
7458
+ updatedAt: Date;
7459
+ userId: string;
7460
+ expiresAt: Date;
7461
+ token: string;
7462
+ ipAddress?: string | null | undefined;
7463
+ userAgent?: string | null | undefined;
7464
+ };
7465
+ user: Record<string, any> & {
7466
+ id: string;
7467
+ createdAt: Date;
7468
+ updatedAt: Date;
7469
+ email: string;
7470
+ emailVerified: boolean;
7471
+ name: string;
7472
+ image?: string | null | undefined;
7473
+ };
7474
+ };
7475
+ }>)[];
7476
+ requireHeaders: true;
7477
+ metadata: {
7478
+ openapi: {
7479
+ description: string;
7480
+ responses: {
7481
+ "200": {
7482
+ description: string;
7483
+ content: {
7484
+ "application/json": {
7485
+ schema: {
7486
+ type: "object";
7487
+ properties: {
7488
+ status: {
7489
+ type: string;
7490
+ description: string;
7491
+ };
7492
+ };
7493
+ required: string[];
7494
+ };
7495
+ };
7496
+ };
7497
+ };
7498
+ };
7499
+ };
7500
+ };
7501
+ }, {
7502
+ status: boolean;
7503
+ }>;
7504
+ readonly revokeOtherSessions: better_call0.StrictEndpoint<"/revoke-other-sessions", {
7505
+ method: "POST";
7506
+ requireHeaders: true;
7507
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
7508
+ session: {
7509
+ session: Record<string, any> & {
7510
+ id: string;
7511
+ createdAt: Date;
7512
+ updatedAt: Date;
7513
+ userId: string;
7514
+ expiresAt: Date;
7515
+ token: string;
7516
+ ipAddress?: string | null | undefined;
7517
+ userAgent?: string | null | undefined;
7518
+ };
7519
+ user: Record<string, any> & {
7520
+ id: string;
7521
+ createdAt: Date;
7522
+ updatedAt: Date;
7523
+ email: string;
7524
+ emailVerified: boolean;
7525
+ name: string;
7526
+ image?: string | null | undefined;
7527
+ };
7528
+ };
7529
+ }>)[];
7530
+ metadata: {
7531
+ openapi: {
7532
+ description: string;
7533
+ responses: {
7534
+ "200": {
7535
+ description: string;
7536
+ content: {
7537
+ "application/json": {
7538
+ schema: {
7539
+ type: "object";
7540
+ properties: {
7541
+ status: {
7542
+ type: string;
7543
+ description: string;
7544
+ };
7545
+ };
7546
+ required: string[];
7547
+ };
7548
+ };
7549
+ };
7550
+ };
7551
+ };
7552
+ };
7553
+ };
7554
+ }, {
7555
+ status: boolean;
7556
+ }>;
7557
+ readonly linkSocialAccount: better_call0.StrictEndpoint<"/link-social", {
7558
+ method: "POST";
7559
+ requireHeaders: true;
7560
+ body: zod.ZodObject<{
7561
+ callbackURL: zod.ZodOptional<zod.ZodString>;
7562
+ provider: zod.ZodType<(string & {}) | "linear" | "huggingface" | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown, zod_v4_core0.$ZodTypeInternals<(string & {}) | "linear" | "huggingface" | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown>>;
7563
+ idToken: zod.ZodOptional<zod.ZodObject<{
7564
+ token: zod.ZodString;
7565
+ nonce: zod.ZodOptional<zod.ZodString>;
7566
+ accessToken: zod.ZodOptional<zod.ZodString>;
7567
+ refreshToken: zod.ZodOptional<zod.ZodString>;
7568
+ scopes: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
7569
+ }, zod_v4_core0.$strip>>;
7570
+ requestSignUp: zod.ZodOptional<zod.ZodBoolean>;
7571
+ scopes: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
7572
+ errorCallbackURL: zod.ZodOptional<zod.ZodString>;
7573
+ disableRedirect: zod.ZodOptional<zod.ZodBoolean>;
7574
+ loginHint: zod.ZodOptional<zod.ZodString>;
7575
+ additionalParams: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodString>>;
7576
+ additionalData: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodAny>>;
7577
+ }, zod_v4_core0.$strip>;
7578
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
7579
+ session: {
7580
+ session: Record<string, any> & {
7581
+ id: string;
7582
+ createdAt: Date;
7583
+ updatedAt: Date;
7584
+ userId: string;
7585
+ expiresAt: Date;
7586
+ token: string;
7587
+ ipAddress?: string | null | undefined;
7588
+ userAgent?: string | null | undefined;
7589
+ };
7590
+ user: Record<string, any> & {
7591
+ id: string;
7592
+ createdAt: Date;
7593
+ updatedAt: Date;
7594
+ email: string;
7595
+ emailVerified: boolean;
7596
+ name: string;
7597
+ image?: string | null | undefined;
7598
+ };
7599
+ };
7600
+ }>)[];
7601
+ metadata: {
7602
+ openapi: {
7603
+ description: string;
7604
+ operationId: string;
7605
+ responses: {
7606
+ "200": {
7607
+ description: string;
7608
+ content: {
7609
+ "application/json": {
7610
+ schema: {
7611
+ type: "object";
7612
+ properties: {
7613
+ url: {
7614
+ type: string;
7615
+ description: string;
7616
+ };
7617
+ redirect: {
7618
+ type: string;
7619
+ description: string;
7620
+ };
7621
+ status: {
7622
+ type: string;
7623
+ };
7624
+ };
7625
+ required: string[];
7626
+ };
7627
+ };
7628
+ };
7629
+ };
7630
+ };
7631
+ };
7632
+ };
7633
+ }, {
7634
+ url: string;
7635
+ redirect: boolean;
7636
+ }>;
7637
+ readonly listUserAccounts: better_call0.StrictEndpoint<"/list-accounts", {
7638
+ method: "GET";
7639
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
7640
+ session: {
7641
+ session: Record<string, any> & {
7642
+ id: string;
7643
+ createdAt: Date;
7644
+ updatedAt: Date;
7645
+ userId: string;
7646
+ expiresAt: Date;
7647
+ token: string;
7648
+ ipAddress?: string | null | undefined;
7649
+ userAgent?: string | null | undefined;
7650
+ };
7651
+ user: Record<string, any> & {
7652
+ id: string;
7653
+ createdAt: Date;
7654
+ updatedAt: Date;
7655
+ email: string;
7656
+ emailVerified: boolean;
7657
+ name: string;
7658
+ image?: string | null | undefined;
7659
+ };
7660
+ };
7661
+ }>)[];
7662
+ metadata: {
7663
+ openapi: {
7664
+ operationId: string;
7665
+ description: string;
7666
+ responses: {
7667
+ "200": {
7668
+ description: string;
7669
+ content: {
7670
+ "application/json": {
7671
+ schema: {
7672
+ type: "array";
7673
+ items: {
7674
+ type: string;
7675
+ properties: {
7676
+ id: {
7677
+ type: string;
7678
+ };
7679
+ providerId: {
7680
+ type: string;
7681
+ };
7682
+ createdAt: {
7683
+ type: string;
7684
+ format: string;
7685
+ };
7686
+ updatedAt: {
7687
+ type: string;
7688
+ format: string;
7689
+ };
7690
+ accountId: {
7691
+ type: string;
7692
+ };
7693
+ userId: {
7694
+ type: string;
7695
+ };
7696
+ scopes: {
7697
+ type: string;
7698
+ items: {
7699
+ type: string;
7700
+ };
7701
+ };
7702
+ };
7703
+ required: string[];
7704
+ };
7705
+ };
7706
+ };
7707
+ };
7708
+ };
7709
+ };
7710
+ };
7711
+ };
7712
+ }, {
7713
+ scopes: string[];
7714
+ id: string;
7715
+ createdAt: Date;
7716
+ updatedAt: Date;
7717
+ userId: string;
7718
+ providerId: string;
7719
+ accountId: string;
7720
+ }[]>;
7721
+ readonly deleteUserCallback: better_call0.StrictEndpoint<"/delete-user/callback", {
7722
+ method: "GET";
7723
+ query: zod.ZodObject<{
7724
+ token: zod.ZodString;
7725
+ callbackURL: zod.ZodOptional<zod.ZodString>;
7726
+ }, zod_v4_core0.$strip>;
7727
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<void>)[];
7728
+ metadata: {
7729
+ openapi: {
7730
+ description: string;
7731
+ responses: {
7732
+ "200": {
7733
+ description: string;
7734
+ content: {
7735
+ "application/json": {
7736
+ schema: {
7737
+ type: "object";
7738
+ properties: {
7739
+ success: {
7740
+ type: string;
7741
+ description: string;
7742
+ };
7743
+ message: {
7744
+ type: string;
7745
+ enum: string[];
7746
+ description: string;
7747
+ };
7748
+ };
7749
+ required: string[];
7750
+ };
7751
+ };
7752
+ };
7753
+ };
7754
+ };
7755
+ };
7756
+ };
7757
+ }, {
7758
+ success: boolean;
7759
+ message: string;
7760
+ }>;
7761
+ readonly unlinkAccount: better_call0.StrictEndpoint<"/unlink-account", {
7762
+ method: "POST";
7763
+ body: zod.ZodObject<{
7764
+ providerId: zod.ZodString;
7765
+ accountId: zod.ZodOptional<zod.ZodString>;
7766
+ }, zod_v4_core0.$strip>;
7767
+ use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
7768
+ session: {
7769
+ session: Record<string, any> & {
7770
+ id: string;
7771
+ createdAt: Date;
7772
+ updatedAt: Date;
7773
+ userId: string;
7774
+ expiresAt: Date;
7775
+ token: string;
7776
+ ipAddress?: string | null | undefined;
7777
+ userAgent?: string | null | undefined;
7778
+ };
7779
+ user: Record<string, any> & {
7780
+ id: string;
7781
+ createdAt: Date;
7782
+ updatedAt: Date;
7783
+ email: string;
7784
+ emailVerified: boolean;
7785
+ name: string;
7786
+ image?: string | null | undefined;
7787
+ };
7788
+ };
7789
+ }>)[];
7790
+ metadata: {
7791
+ openapi: {
7792
+ description: string;
7793
+ responses: {
7794
+ "200": {
7795
+ description: string;
7796
+ content: {
7797
+ "application/json": {
7798
+ schema: {
7799
+ type: "object";
7800
+ properties: {
7801
+ status: {
7802
+ type: string;
7803
+ };
7804
+ };
7805
+ };
7806
+ };
7807
+ };
7808
+ };
7809
+ };
7810
+ };
7811
+ };
7812
+ }, {
7813
+ status: boolean;
7814
+ }>;
7815
+ readonly refreshToken: better_call0.StrictEndpoint<"/refresh-token", {
7816
+ method: "POST";
7817
+ body: zod.ZodObject<{
7818
+ providerId: zod.ZodString;
7819
+ accountId: zod.ZodOptional<zod.ZodString>;
7820
+ userId: zod.ZodOptional<zod.ZodString>;
7821
+ }, zod_v4_core0.$strip>;
7822
+ metadata: {
7823
+ openapi: {
7824
+ description: string;
7825
+ responses: {
7826
+ 200: {
7827
+ description: string;
7828
+ content: {
7829
+ "application/json": {
7830
+ schema: {
7831
+ type: "object";
7832
+ properties: {
7833
+ tokenType: {
7834
+ type: string;
7835
+ };
7836
+ idToken: {
7837
+ type: string;
7838
+ };
7839
+ accessToken: {
7840
+ type: string;
7841
+ };
7842
+ refreshToken: {
7843
+ type: string;
7844
+ };
7845
+ accessTokenExpiresAt: {
7846
+ type: string;
7847
+ format: string;
7848
+ };
7849
+ refreshTokenExpiresAt: {
7850
+ type: string;
7851
+ format: string;
7852
+ };
7853
+ };
7854
+ };
7855
+ };
7856
+ };
7857
+ };
7858
+ 400: {
7859
+ description: string;
7860
+ };
7861
+ };
7862
+ };
7863
+ };
7864
+ }, {
7865
+ accessToken: string | undefined;
7866
+ refreshToken: string;
7867
+ accessTokenExpiresAt: Date | undefined;
7868
+ refreshTokenExpiresAt: Date | null | undefined;
7869
+ scope: string | null | undefined;
7870
+ idToken: string | null | undefined;
7871
+ providerId: string;
7872
+ accountId: string;
7873
+ }>;
7874
+ readonly getAccessToken: better_call0.StrictEndpoint<"/get-access-token", {
7875
+ method: "POST";
7876
+ body: zod.ZodObject<{
7877
+ providerId: zod.ZodString;
7878
+ accountId: zod.ZodOptional<zod.ZodString>;
7879
+ userId: zod.ZodOptional<zod.ZodString>;
7880
+ }, zod_v4_core0.$strip>;
7881
+ metadata: {
7882
+ openapi: {
7883
+ description: string;
7884
+ responses: {
7885
+ 200: {
7886
+ description: string;
7887
+ content: {
7888
+ "application/json": {
7889
+ schema: {
7890
+ type: "object";
7891
+ properties: {
7892
+ tokenType: {
7893
+ type: string;
7894
+ };
7895
+ idToken: {
7896
+ type: string;
7897
+ };
7898
+ accessToken: {
7899
+ type: string;
7900
+ };
7901
+ accessTokenExpiresAt: {
7902
+ type: string;
7903
+ format: string;
7904
+ };
7905
+ };
7906
+ };
7907
+ };
7908
+ };
7909
+ };
7910
+ 400: {
7911
+ description: string;
7912
+ };
7913
+ };
3971
7914
  };
3972
7915
  };
3973
- }>)[];
3974
- metadata: {
3975
- openapi: {
3976
- description: string;
3977
- responses: {
3978
- "200": {
3979
- description: string;
3980
- content: {
3981
- "application/json": {
3982
- schema: {
3983
- type: "object";
3984
- properties: {
3985
- user: {
3986
- type: string;
3987
- properties: {
3988
- id: {
3989
- type: string;
3990
- };
3991
- name: {
3992
- type: string;
3993
- };
3994
- email: {
3995
- type: string;
3996
- };
3997
- image: {
3998
- type: string;
3999
- };
4000
- emailVerified: {
4001
- type: string;
7916
+ }, {
7917
+ accessToken: string;
7918
+ accessTokenExpiresAt: Date | undefined;
7919
+ scopes: string[];
7920
+ idToken: string | undefined;
7921
+ }>;
7922
+ readonly accountInfo: better_call0.StrictEndpoint<"/account-info", {
7923
+ method: "GET";
7924
+ metadata: {
7925
+ openapi: {
7926
+ description: string;
7927
+ responses: {
7928
+ "200": {
7929
+ description: string;
7930
+ content: {
7931
+ "application/json": {
7932
+ schema: {
7933
+ type: "object";
7934
+ properties: {
7935
+ user: {
7936
+ type: string;
7937
+ properties: {
7938
+ id: {
7939
+ type: string;
7940
+ };
7941
+ name: {
7942
+ type: string;
7943
+ };
7944
+ email: {
7945
+ type: string;
7946
+ };
7947
+ image: {
7948
+ type: string;
7949
+ };
7950
+ emailVerified: {
7951
+ type: string;
7952
+ };
4002
7953
  };
7954
+ required: string[];
7955
+ };
7956
+ data: {
7957
+ type: string;
7958
+ properties: {};
7959
+ additionalProperties: boolean;
4003
7960
  };
4004
- required: string[];
4005
- };
4006
- data: {
4007
- type: string;
4008
- properties: {};
4009
- additionalProperties: boolean;
4010
7961
  };
7962
+ required: string[];
7963
+ additionalProperties: boolean;
4011
7964
  };
4012
- required: string[];
4013
- additionalProperties: boolean;
4014
7965
  };
4015
7966
  };
4016
7967
  };
4017
7968
  };
4018
7969
  };
4019
7970
  };
7971
+ query: zod.ZodOptional<zod.ZodObject<{
7972
+ accountId: zod.ZodOptional<zod.ZodString>;
7973
+ providerId: zod.ZodOptional<zod.ZodString>;
7974
+ userId: zod.ZodOptional<zod.ZodString>;
7975
+ }, zod_v4_core0.$strip>>;
7976
+ }, {
7977
+ user: _better_auth_core_oauth20.OAuth2UserInfo;
7978
+ data: Record<string, any>;
7979
+ } | null>;
7980
+ }>>, (C extends undefined ? {} : C) & {
7981
+ baseURL: string | undefined;
7982
+ fetchOptions: {
7983
+ customFetchImpl: (url: string | URL | Request, init?: RequestInit | undefined) => Promise<Response>;
4020
7984
  };
4021
- query: zod.ZodOptional<zod.ZodObject<{
4022
- accountId: zod.ZodOptional<zod.ZodString>;
4023
- }, zod_v4_core0.$strip>>;
4024
- }, {
4025
- user: _better_auth_core_oauth20.OAuth2UserInfo;
4026
- data: Record<string, any>;
4027
- } | null>;
4028
- }>>, (C extends undefined ? {} : C) & {
4029
- baseURL: string | undefined;
4030
- fetchOptions: {
4031
- customFetchImpl: (url: string | URL | Request, init?: RequestInit | undefined) => Promise<Response>;
4032
- };
4033
- }>> & (((C extends undefined ? {} : C) & {
4034
- baseURL: string | undefined;
4035
- fetchOptions: {
4036
- customFetchImpl: (url: string | URL | Request, init?: RequestInit | undefined) => Promise<Response>;
4037
- };
4038
- })["plugins"] extends (infer Plugin_1)[] ? UnionToIntersection<Plugin_1 extends _better_auth_core0.BetterAuthClientPlugin ? Plugin_1["getActions"] extends ((...args: any) => infer Actions) ? Actions : {} : {}> : {}) & UnionToIntersection<InferRoute<((C extends undefined ? {} : C) & {
4039
- baseURL: string | undefined;
4040
- fetchOptions: {
4041
- customFetchImpl: (url: string | URL | Request, init?: RequestInit | undefined) => Promise<Response>;
4042
- };
4043
- })["$InferAuth"] extends {
4044
- plugins: infer Plugins;
4045
- } ? Plugins extends (infer Plugin_2)[] ? Plugin_2 extends {
4046
- endpoints: infer Endpoints_1;
4047
- } ? Endpoints_1 : {} : {} : {}, (C extends undefined ? {} : C) & {
4048
- baseURL: string | undefined;
4049
- fetchOptions: {
4050
- customFetchImpl: (url: string | URL | Request, init?: RequestInit | undefined) => Promise<Response>;
4051
- };
4052
- }>> & {
7985
+ }>> extends {
7986
+ getSession: () => Promise<infer Res>;
7987
+ } ? Res extends {
7988
+ data: null;
7989
+ error: {
7990
+ message?: string | undefined;
7991
+ status: number;
7992
+ statusText: string;
7993
+ };
7994
+ } | {
7995
+ data: infer S;
7996
+ error: null;
7997
+ } ? S : Res extends Record<string, any> ? Res : never : never> | null) => void;
4053
7998
  useSession: nanostores.Atom<{
4054
7999
  data: UnionToIntersection<InferRoute<((C extends undefined ? {} : C) & {
4055
8000
  baseURL: string | undefined;
@@ -4135,6 +8080,7 @@ declare function getTestInstance<O extends Partial<BetterAuthOptions>, C extends
4135
8080
  scopes: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
4136
8081
  requestSignUp: zod.ZodOptional<zod.ZodBoolean>;
4137
8082
  loginHint: zod.ZodOptional<zod.ZodString>;
8083
+ additionalParams: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodString>>;
4138
8084
  additionalData: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodAny>>;
4139
8085
  }, zod_v4_core0.$strip>;
4140
8086
  metadata: {
@@ -4162,6 +8108,7 @@ declare function getTestInstance<O extends Partial<BetterAuthOptions>, C extends
4162
8108
  scopes: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
4163
8109
  requestSignUp: zod.ZodOptional<zod.ZodBoolean>;
4164
8110
  loginHint: zod.ZodOptional<zod.ZodString>;
8111
+ additionalParams: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodString>>;
4165
8112
  additionalData: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodAny>>;
4166
8113
  }, zod_v4_core0.$strip>>;
4167
8114
  returned: {
@@ -4203,7 +8150,6 @@ declare function getTestInstance<O extends Partial<BetterAuthOptions>, C extends
4203
8150
  };
4204
8151
  redirect: {
4205
8152
  type: string;
4206
- enum: boolean[];
4207
8153
  };
4208
8154
  };
4209
8155
  required: string[];
@@ -4355,6 +8301,7 @@ declare function getTestInstance<O extends Partial<BetterAuthOptions>, C extends
4355
8301
  callbackURL: zod.ZodOptional<zod.ZodString>;
4356
8302
  rememberMe: zod.ZodOptional<zod.ZodBoolean>;
4357
8303
  }, zod_v4_core0.$strip>, zod.ZodRecord<zod.ZodString, zod.ZodAny>>;
8304
+ cloneRequest: true;
4358
8305
  metadata: {
4359
8306
  allowedMediaTypes: string[];
4360
8307
  $Infer: {
@@ -4521,6 +8468,7 @@ declare function getTestInstance<O extends Partial<BetterAuthOptions>, C extends
4521
8468
  method: "POST";
4522
8469
  operationId: string;
4523
8470
  use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<void>)[];
8471
+ cloneRequest: true;
4524
8472
  body: zod.ZodObject<{
4525
8473
  email: zod.ZodString;
4526
8474
  password: zod.ZodString;
@@ -4752,6 +8700,7 @@ declare function getTestInstance<O extends Partial<BetterAuthOptions>, C extends
4752
8700
  readonly sendVerificationEmail: better_call0.StrictEndpoint<"/send-verification-email", {
4753
8701
  method: "POST";
4754
8702
  operationId: string;
8703
+ cloneRequest: true;
4755
8704
  body: zod.ZodObject<{
4756
8705
  email: zod.ZodEmail;
4757
8706
  callbackURL: zod.ZodOptional<zod.ZodString>;
@@ -5608,6 +9557,8 @@ declare function getTestInstance<O extends Partial<BetterAuthOptions>, C extends
5608
9557
  scopes: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
5609
9558
  errorCallbackURL: zod.ZodOptional<zod.ZodString>;
5610
9559
  disableRedirect: zod.ZodOptional<zod.ZodBoolean>;
9560
+ loginHint: zod.ZodOptional<zod.ZodString>;
9561
+ additionalParams: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodString>>;
5611
9562
  additionalData: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodAny>>;
5612
9563
  }, zod_v4_core0.$strip>;
5613
9564
  use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
@@ -5956,29 +9907,6 @@ declare function getTestInstance<O extends Partial<BetterAuthOptions>, C extends
5956
9907
  }>;
5957
9908
  readonly accountInfo: better_call0.StrictEndpoint<"/account-info", {
5958
9909
  method: "GET";
5959
- use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
5960
- session: {
5961
- session: Record<string, any> & {
5962
- id: string;
5963
- createdAt: Date;
5964
- updatedAt: Date;
5965
- userId: string;
5966
- expiresAt: Date;
5967
- token: string;
5968
- ipAddress?: string | null | undefined;
5969
- userAgent?: string | null | undefined;
5970
- };
5971
- user: Record<string, any> & {
5972
- id: string;
5973
- createdAt: Date;
5974
- updatedAt: Date;
5975
- email: string;
5976
- emailVerified: boolean;
5977
- name: string;
5978
- image?: string | null | undefined;
5979
- };
5980
- };
5981
- }>)[];
5982
9910
  metadata: {
5983
9911
  openapi: {
5984
9912
  description: string;
@@ -6028,6 +9956,8 @@ declare function getTestInstance<O extends Partial<BetterAuthOptions>, C extends
6028
9956
  };
6029
9957
  query: zod.ZodOptional<zod.ZodObject<{
6030
9958
  accountId: zod.ZodOptional<zod.ZodString>;
9959
+ providerId: zod.ZodOptional<zod.ZodString>;
9960
+ userId: zod.ZodOptional<zod.ZodString>;
6031
9961
  }, zod_v4_core0.$strip>>;
6032
9962
  }, {
6033
9963
  user: _better_auth_core_oauth20.OAuth2UserInfo;
@@ -6140,6 +10070,7 @@ declare function getTestInstance<O extends Partial<BetterAuthOptions>, C extends
6140
10070
  scopes: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
6141
10071
  requestSignUp: zod.ZodOptional<zod.ZodBoolean>;
6142
10072
  loginHint: zod.ZodOptional<zod.ZodString>;
10073
+ additionalParams: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodString>>;
6143
10074
  additionalData: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodAny>>;
6144
10075
  }, zod_v4_core0.$strip>;
6145
10076
  metadata: {
@@ -6167,6 +10098,7 @@ declare function getTestInstance<O extends Partial<BetterAuthOptions>, C extends
6167
10098
  scopes: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
6168
10099
  requestSignUp: zod.ZodOptional<zod.ZodBoolean>;
6169
10100
  loginHint: zod.ZodOptional<zod.ZodString>;
10101
+ additionalParams: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodString>>;
6170
10102
  additionalData: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodAny>>;
6171
10103
  }, zod_v4_core0.$strip>>;
6172
10104
  returned: {
@@ -6208,7 +10140,6 @@ declare function getTestInstance<O extends Partial<BetterAuthOptions>, C extends
6208
10140
  };
6209
10141
  redirect: {
6210
10142
  type: string;
6211
- enum: boolean[];
6212
10143
  };
6213
10144
  };
6214
10145
  required: string[];
@@ -6360,6 +10291,7 @@ declare function getTestInstance<O extends Partial<BetterAuthOptions>, C extends
6360
10291
  callbackURL: zod.ZodOptional<zod.ZodString>;
6361
10292
  rememberMe: zod.ZodOptional<zod.ZodBoolean>;
6362
10293
  }, zod_v4_core0.$strip>, zod.ZodRecord<zod.ZodString, zod.ZodAny>>;
10294
+ cloneRequest: true;
6363
10295
  metadata: {
6364
10296
  allowedMediaTypes: string[];
6365
10297
  $Infer: {
@@ -6526,6 +10458,7 @@ declare function getTestInstance<O extends Partial<BetterAuthOptions>, C extends
6526
10458
  method: "POST";
6527
10459
  operationId: string;
6528
10460
  use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<void>)[];
10461
+ cloneRequest: true;
6529
10462
  body: zod.ZodObject<{
6530
10463
  email: zod.ZodString;
6531
10464
  password: zod.ZodString;
@@ -6757,6 +10690,7 @@ declare function getTestInstance<O extends Partial<BetterAuthOptions>, C extends
6757
10690
  readonly sendVerificationEmail: better_call0.StrictEndpoint<"/send-verification-email", {
6758
10691
  method: "POST";
6759
10692
  operationId: string;
10693
+ cloneRequest: true;
6760
10694
  body: zod.ZodObject<{
6761
10695
  email: zod.ZodEmail;
6762
10696
  callbackURL: zod.ZodOptional<zod.ZodString>;
@@ -7613,6 +11547,8 @@ declare function getTestInstance<O extends Partial<BetterAuthOptions>, C extends
7613
11547
  scopes: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
7614
11548
  errorCallbackURL: zod.ZodOptional<zod.ZodString>;
7615
11549
  disableRedirect: zod.ZodOptional<zod.ZodBoolean>;
11550
+ loginHint: zod.ZodOptional<zod.ZodString>;
11551
+ additionalParams: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodString>>;
7616
11552
  additionalData: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodAny>>;
7617
11553
  }, zod_v4_core0.$strip>;
7618
11554
  use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
@@ -7961,29 +11897,6 @@ declare function getTestInstance<O extends Partial<BetterAuthOptions>, C extends
7961
11897
  }>;
7962
11898
  readonly accountInfo: better_call0.StrictEndpoint<"/account-info", {
7963
11899
  method: "GET";
7964
- use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
7965
- session: {
7966
- session: Record<string, any> & {
7967
- id: string;
7968
- createdAt: Date;
7969
- updatedAt: Date;
7970
- userId: string;
7971
- expiresAt: Date;
7972
- token: string;
7973
- ipAddress?: string | null | undefined;
7974
- userAgent?: string | null | undefined;
7975
- };
7976
- user: Record<string, any> & {
7977
- id: string;
7978
- createdAt: Date;
7979
- updatedAt: Date;
7980
- email: string;
7981
- emailVerified: boolean;
7982
- name: string;
7983
- image?: string | null | undefined;
7984
- };
7985
- };
7986
- }>)[];
7987
11900
  metadata: {
7988
11901
  openapi: {
7989
11902
  description: string;
@@ -8033,6 +11946,8 @@ declare function getTestInstance<O extends Partial<BetterAuthOptions>, C extends
8033
11946
  };
8034
11947
  query: zod.ZodOptional<zod.ZodObject<{
8035
11948
  accountId: zod.ZodOptional<zod.ZodString>;
11949
+ providerId: zod.ZodOptional<zod.ZodString>;
11950
+ userId: zod.ZodOptional<zod.ZodString>;
8036
11951
  }, zod_v4_core0.$strip>>;
8037
11952
  }, {
8038
11953
  user: _better_auth_core_oauth20.OAuth2UserInfo;
@@ -8219,6 +12134,7 @@ declare function getTestInstance<O extends Partial<BetterAuthOptions>, C extends
8219
12134
  scopes: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
8220
12135
  requestSignUp: zod.ZodOptional<zod.ZodBoolean>;
8221
12136
  loginHint: zod.ZodOptional<zod.ZodString>;
12137
+ additionalParams: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodString>>;
8222
12138
  additionalData: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodAny>>;
8223
12139
  }, zod_v4_core0.$strip>;
8224
12140
  metadata: {
@@ -8246,6 +12162,7 @@ declare function getTestInstance<O extends Partial<BetterAuthOptions>, C extends
8246
12162
  scopes: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
8247
12163
  requestSignUp: zod.ZodOptional<zod.ZodBoolean>;
8248
12164
  loginHint: zod.ZodOptional<zod.ZodString>;
12165
+ additionalParams: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodString>>;
8249
12166
  additionalData: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodAny>>;
8250
12167
  }, zod_v4_core0.$strip>>;
8251
12168
  returned: {
@@ -8287,7 +12204,6 @@ declare function getTestInstance<O extends Partial<BetterAuthOptions>, C extends
8287
12204
  };
8288
12205
  redirect: {
8289
12206
  type: string;
8290
- enum: boolean[];
8291
12207
  };
8292
12208
  };
8293
12209
  required: string[];
@@ -8439,6 +12355,7 @@ declare function getTestInstance<O extends Partial<BetterAuthOptions>, C extends
8439
12355
  callbackURL: zod.ZodOptional<zod.ZodString>;
8440
12356
  rememberMe: zod.ZodOptional<zod.ZodBoolean>;
8441
12357
  }, zod_v4_core0.$strip>, zod.ZodRecord<zod.ZodString, zod.ZodAny>>;
12358
+ cloneRequest: true;
8442
12359
  metadata: {
8443
12360
  allowedMediaTypes: string[];
8444
12361
  $Infer: {
@@ -8605,6 +12522,7 @@ declare function getTestInstance<O extends Partial<BetterAuthOptions>, C extends
8605
12522
  method: "POST";
8606
12523
  operationId: string;
8607
12524
  use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<void>)[];
12525
+ cloneRequest: true;
8608
12526
  body: zod.ZodObject<{
8609
12527
  email: zod.ZodString;
8610
12528
  password: zod.ZodString;
@@ -8836,6 +12754,7 @@ declare function getTestInstance<O extends Partial<BetterAuthOptions>, C extends
8836
12754
  readonly sendVerificationEmail: better_call0.StrictEndpoint<"/send-verification-email", {
8837
12755
  method: "POST";
8838
12756
  operationId: string;
12757
+ cloneRequest: true;
8839
12758
  body: zod.ZodObject<{
8840
12759
  email: zod.ZodEmail;
8841
12760
  callbackURL: zod.ZodOptional<zod.ZodString>;
@@ -9692,6 +13611,8 @@ declare function getTestInstance<O extends Partial<BetterAuthOptions>, C extends
9692
13611
  scopes: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
9693
13612
  errorCallbackURL: zod.ZodOptional<zod.ZodString>;
9694
13613
  disableRedirect: zod.ZodOptional<zod.ZodBoolean>;
13614
+ loginHint: zod.ZodOptional<zod.ZodString>;
13615
+ additionalParams: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodString>>;
9695
13616
  additionalData: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodAny>>;
9696
13617
  }, zod_v4_core0.$strip>;
9697
13618
  use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
@@ -10040,29 +13961,6 @@ declare function getTestInstance<O extends Partial<BetterAuthOptions>, C extends
10040
13961
  }>;
10041
13962
  readonly accountInfo: better_call0.StrictEndpoint<"/account-info", {
10042
13963
  method: "GET";
10043
- use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
10044
- session: {
10045
- session: Record<string, any> & {
10046
- id: string;
10047
- createdAt: Date;
10048
- updatedAt: Date;
10049
- userId: string;
10050
- expiresAt: Date;
10051
- token: string;
10052
- ipAddress?: string | null | undefined;
10053
- userAgent?: string | null | undefined;
10054
- };
10055
- user: Record<string, any> & {
10056
- id: string;
10057
- createdAt: Date;
10058
- updatedAt: Date;
10059
- email: string;
10060
- emailVerified: boolean;
10061
- name: string;
10062
- image?: string | null | undefined;
10063
- };
10064
- };
10065
- }>)[];
10066
13964
  metadata: {
10067
13965
  openapi: {
10068
13966
  description: string;
@@ -10112,6 +14010,8 @@ declare function getTestInstance<O extends Partial<BetterAuthOptions>, C extends
10112
14010
  };
10113
14011
  query: zod.ZodOptional<zod.ZodObject<{
10114
14012
  accountId: zod.ZodOptional<zod.ZodString>;
14013
+ providerId: zod.ZodOptional<zod.ZodString>;
14014
+ userId: zod.ZodOptional<zod.ZodString>;
10115
14015
  }, zod_v4_core0.$strip>>;
10116
14016
  }, {
10117
14017
  user: _better_auth_core_oauth20.OAuth2UserInfo;
@@ -10224,6 +14124,7 @@ declare function getTestInstance<O extends Partial<BetterAuthOptions>, C extends
10224
14124
  scopes: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
10225
14125
  requestSignUp: zod.ZodOptional<zod.ZodBoolean>;
10226
14126
  loginHint: zod.ZodOptional<zod.ZodString>;
14127
+ additionalParams: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodString>>;
10227
14128
  additionalData: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodAny>>;
10228
14129
  }, zod_v4_core0.$strip>;
10229
14130
  metadata: {
@@ -10251,6 +14152,7 @@ declare function getTestInstance<O extends Partial<BetterAuthOptions>, C extends
10251
14152
  scopes: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
10252
14153
  requestSignUp: zod.ZodOptional<zod.ZodBoolean>;
10253
14154
  loginHint: zod.ZodOptional<zod.ZodString>;
14155
+ additionalParams: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodString>>;
10254
14156
  additionalData: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodAny>>;
10255
14157
  }, zod_v4_core0.$strip>>;
10256
14158
  returned: {
@@ -10292,7 +14194,6 @@ declare function getTestInstance<O extends Partial<BetterAuthOptions>, C extends
10292
14194
  };
10293
14195
  redirect: {
10294
14196
  type: string;
10295
- enum: boolean[];
10296
14197
  };
10297
14198
  };
10298
14199
  required: string[];
@@ -10444,6 +14345,7 @@ declare function getTestInstance<O extends Partial<BetterAuthOptions>, C extends
10444
14345
  callbackURL: zod.ZodOptional<zod.ZodString>;
10445
14346
  rememberMe: zod.ZodOptional<zod.ZodBoolean>;
10446
14347
  }, zod_v4_core0.$strip>, zod.ZodRecord<zod.ZodString, zod.ZodAny>>;
14348
+ cloneRequest: true;
10447
14349
  metadata: {
10448
14350
  allowedMediaTypes: string[];
10449
14351
  $Infer: {
@@ -10610,6 +14512,7 @@ declare function getTestInstance<O extends Partial<BetterAuthOptions>, C extends
10610
14512
  method: "POST";
10611
14513
  operationId: string;
10612
14514
  use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<void>)[];
14515
+ cloneRequest: true;
10613
14516
  body: zod.ZodObject<{
10614
14517
  email: zod.ZodString;
10615
14518
  password: zod.ZodString;
@@ -10841,6 +14744,7 @@ declare function getTestInstance<O extends Partial<BetterAuthOptions>, C extends
10841
14744
  readonly sendVerificationEmail: better_call0.StrictEndpoint<"/send-verification-email", {
10842
14745
  method: "POST";
10843
14746
  operationId: string;
14747
+ cloneRequest: true;
10844
14748
  body: zod.ZodObject<{
10845
14749
  email: zod.ZodEmail;
10846
14750
  callbackURL: zod.ZodOptional<zod.ZodString>;
@@ -11697,6 +15601,8 @@ declare function getTestInstance<O extends Partial<BetterAuthOptions>, C extends
11697
15601
  scopes: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
11698
15602
  errorCallbackURL: zod.ZodOptional<zod.ZodString>;
11699
15603
  disableRedirect: zod.ZodOptional<zod.ZodBoolean>;
15604
+ loginHint: zod.ZodOptional<zod.ZodString>;
15605
+ additionalParams: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodString>>;
11700
15606
  additionalData: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodAny>>;
11701
15607
  }, zod_v4_core0.$strip>;
11702
15608
  use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
@@ -12045,29 +15951,6 @@ declare function getTestInstance<O extends Partial<BetterAuthOptions>, C extends
12045
15951
  }>;
12046
15952
  readonly accountInfo: better_call0.StrictEndpoint<"/account-info", {
12047
15953
  method: "GET";
12048
- use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
12049
- session: {
12050
- session: Record<string, any> & {
12051
- id: string;
12052
- createdAt: Date;
12053
- updatedAt: Date;
12054
- userId: string;
12055
- expiresAt: Date;
12056
- token: string;
12057
- ipAddress?: string | null | undefined;
12058
- userAgent?: string | null | undefined;
12059
- };
12060
- user: Record<string, any> & {
12061
- id: string;
12062
- createdAt: Date;
12063
- updatedAt: Date;
12064
- email: string;
12065
- emailVerified: boolean;
12066
- name: string;
12067
- image?: string | null | undefined;
12068
- };
12069
- };
12070
- }>)[];
12071
15954
  metadata: {
12072
15955
  openapi: {
12073
15956
  description: string;
@@ -12117,6 +16000,8 @@ declare function getTestInstance<O extends Partial<BetterAuthOptions>, C extends
12117
16000
  };
12118
16001
  query: zod.ZodOptional<zod.ZodObject<{
12119
16002
  accountId: zod.ZodOptional<zod.ZodString>;
16003
+ providerId: zod.ZodOptional<zod.ZodString>;
16004
+ userId: zod.ZodOptional<zod.ZodString>;
12120
16005
  }, zod_v4_core0.$strip>>;
12121
16006
  }, {
12122
16007
  user: _better_auth_core_oauth20.OAuth2UserInfo;
@@ -12169,6 +16054,7 @@ declare function getTestInstance<O extends Partial<BetterAuthOptions>, C extends
12169
16054
  USER_ALREADY_EXISTS: _better_auth_core_utils_error_codes0.RawError<"USER_ALREADY_EXISTS">;
12170
16055
  USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL: _better_auth_core_utils_error_codes0.RawError<"USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL">;
12171
16056
  EMAIL_CAN_NOT_BE_UPDATED: _better_auth_core_utils_error_codes0.RawError<"EMAIL_CAN_NOT_BE_UPDATED">;
16057
+ CHANGE_EMAIL_DISABLED: _better_auth_core_utils_error_codes0.RawError<"CHANGE_EMAIL_DISABLED">;
12172
16058
  CREDENTIAL_ACCOUNT_NOT_FOUND: _better_auth_core_utils_error_codes0.RawError<"CREDENTIAL_ACCOUNT_NOT_FOUND">;
12173
16059
  ACCOUNT_NOT_FOUND: _better_auth_core_utils_error_codes0.RawError<"ACCOUNT_NOT_FOUND">;
12174
16060
  SESSION_EXPIRED: _better_auth_core_utils_error_codes0.RawError<"SESSION_EXPIRED">;