@better-auth-ui/react 1.6.3 → 1.6.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 (346) hide show
  1. package/dist/components/auth/auth-provider.d.ts +23 -8
  2. package/dist/components/auth/auth-provider.js +32 -17
  3. package/dist/components/{email → auth/email}/email-changed.js +2 -2
  4. package/dist/components/{email → auth/email}/email-localization.js +1 -1
  5. package/dist/components/{email → auth/email}/email-styles.js +1 -1
  6. package/dist/components/{email → auth/email}/email-verification.js +2 -2
  7. package/dist/components/{email → auth/email}/magic-link.js +2 -2
  8. package/dist/components/{email → auth/email}/new-device.js +2 -2
  9. package/dist/components/{email → auth/email}/otp-email.js +2 -2
  10. package/dist/components/{email → auth/email}/password-changed.js +2 -2
  11. package/dist/components/{email → auth/email}/reset-password.js +2 -2
  12. package/dist/email.d.ts +1 -0
  13. package/dist/email.js +11 -0
  14. package/dist/hooks/auth/use-authenticate.d.ts +5 -28
  15. package/dist/hooks/auth/use-authenticate.js +12 -12
  16. package/dist/hooks/auth/use-user.d.ts +19 -314
  17. package/dist/hooks/auth/use-user.js +5 -5
  18. package/dist/hooks/use-auth-mutation.d.ts +12 -7
  19. package/dist/hooks/use-auth-plugin.d.ts +31 -0
  20. package/dist/hooks/use-auth-plugin.js +10 -0
  21. package/dist/hooks/use-auth-query.d.ts +3 -3
  22. package/dist/index.d.ts +33 -32
  23. package/dist/index.js +74 -83
  24. package/dist/lib/auth-client.d.ts +23 -3687
  25. package/dist/lib/auth-plugin.d.ts +59 -0
  26. package/dist/lib/auth-server.d.ts +16 -0
  27. package/dist/mutations/auth/request-password-reset-mutation.d.ts +26 -0
  28. package/dist/mutations/auth/request-password-reset-mutation.js +24 -0
  29. package/dist/mutations/auth/reset-password-mutation.d.ts +25 -0
  30. package/dist/mutations/auth/reset-password-mutation.js +24 -0
  31. package/dist/mutations/auth/send-verification-email-mutation.d.ts +24 -0
  32. package/dist/mutations/auth/send-verification-email-mutation.js +24 -0
  33. package/dist/mutations/auth/sign-in-email-mutation.d.ts +71 -0
  34. package/dist/mutations/auth/sign-in-email-mutation.js +29 -0
  35. package/dist/mutations/auth/sign-in-social-mutation.d.ts +77 -0
  36. package/dist/mutations/auth/sign-in-social-mutation.js +24 -0
  37. package/dist/mutations/auth/sign-out-mutation.d.ts +25 -0
  38. package/dist/mutations/auth/sign-out-mutation.js +28 -0
  39. package/dist/mutations/auth/sign-up-email-mutation.d.ts +105 -0
  40. package/dist/mutations/auth/sign-up-email-mutation.js +29 -0
  41. package/dist/mutations/auth-mutation-options.d.ts +37 -20
  42. package/dist/mutations/auth-mutation-options.js +2 -2
  43. package/dist/mutations/magic-link/sign-in-magic-link-mutation.d.ts +24 -0
  44. package/dist/mutations/magic-link/sign-in-magic-link-mutation.js +24 -0
  45. package/dist/mutations/multi-session/revoke-multi-session-mutation.d.ts +25 -0
  46. package/dist/mutations/multi-session/revoke-multi-session-mutation.js +29 -0
  47. package/dist/mutations/multi-session/set-active-session-mutation.d.ts +62 -0
  48. package/dist/mutations/multi-session/set-active-session-mutation.js +31 -0
  49. package/dist/mutations/passkey/add-passkey-mutation.d.ts +71 -0
  50. package/dist/mutations/passkey/add-passkey-mutation.js +29 -0
  51. package/dist/mutations/passkey/delete-passkey-mutation.d.ts +25 -0
  52. package/dist/mutations/passkey/delete-passkey-mutation.js +29 -0
  53. package/dist/mutations/passkey/sign-in-passkey-mutation.d.ts +105 -0
  54. package/dist/mutations/passkey/sign-in-passkey-mutation.js +29 -0
  55. package/dist/mutations/settings/change-email-mutation.d.ts +25 -0
  56. package/dist/mutations/settings/change-email-mutation.js +29 -0
  57. package/dist/mutations/settings/change-password-mutation.d.ts +78 -0
  58. package/dist/mutations/settings/change-password-mutation.js +24 -0
  59. package/dist/mutations/settings/delete-user-mutation.d.ts +26 -0
  60. package/dist/mutations/settings/delete-user-mutation.js +24 -0
  61. package/dist/mutations/settings/link-social-mutation.d.ts +26 -0
  62. package/dist/mutations/settings/link-social-mutation.js +24 -0
  63. package/dist/mutations/settings/revoke-session-mutation.d.ts +25 -0
  64. package/dist/mutations/settings/revoke-session-mutation.js +29 -0
  65. package/dist/mutations/settings/unlink-account-mutation.d.ts +25 -0
  66. package/dist/mutations/settings/unlink-account-mutation.js +29 -0
  67. package/dist/mutations/settings/update-user-mutation.d.ts +25 -0
  68. package/dist/mutations/settings/update-user-mutation.js +35 -0
  69. package/dist/mutations/username/is-username-available-mutation.d.ts +27 -0
  70. package/dist/mutations/username/is-username-available-mutation.js +24 -0
  71. package/dist/mutations/username/sign-in-username-mutation.d.ts +75 -0
  72. package/dist/mutations/username/sign-in-username-mutation.js +29 -0
  73. package/dist/queries/auth/session-query.d.ts +71 -0
  74. package/dist/queries/auth/session-query.js +30 -0
  75. package/dist/queries/auth-query-options.d.ts +26 -15
  76. package/dist/queries/multi-session/list-device-sessions-query.d.ts +76 -0
  77. package/dist/queries/multi-session/list-device-sessions-query.js +31 -0
  78. package/dist/queries/passkey/list-passkeys-query.d.ts +74 -0
  79. package/dist/queries/passkey/list-passkeys-query.js +31 -0
  80. package/dist/queries/settings/account-info-query.d.ts +85 -0
  81. package/dist/queries/settings/account-info-query.js +31 -0
  82. package/dist/queries/settings/list-accounts-query.d.ts +76 -0
  83. package/dist/queries/settings/list-accounts-query.js +31 -0
  84. package/dist/queries/settings/list-sessions-query.d.ts +74 -0
  85. package/dist/queries/settings/list-sessions-query.js +31 -0
  86. package/dist/server/queries/auth/session-query.d.ts +57 -0
  87. package/dist/server/queries/auth/session-query.js +13 -0
  88. package/dist/server/queries/multi-session/list-device-sessions-query.d.ts +60 -0
  89. package/dist/server/queries/multi-session/list-device-sessions-query.js +12 -0
  90. package/dist/server/queries/passkey/list-passkeys-query.d.ts +60 -0
  91. package/dist/server/queries/passkey/list-passkeys-query.js +12 -0
  92. package/dist/server/queries/settings/account-info-query.d.ts +68 -0
  93. package/dist/server/queries/settings/account-info-query.js +12 -0
  94. package/dist/server/queries/settings/list-accounts-query.d.ts +60 -0
  95. package/dist/server/queries/settings/list-accounts-query.js +12 -0
  96. package/dist/server/queries/settings/list-sessions-query.d.ts +60 -0
  97. package/dist/server/queries/settings/list-sessions-query.js +12 -0
  98. package/dist/server.d.ts +7 -0
  99. package/dist/server.js +7 -0
  100. package/package.json +24 -22
  101. package/src/components/auth/auth-provider.tsx +87 -24
  102. package/src/components/{email → auth/email}/email-changed.tsx +1 -1
  103. package/src/components/{email → auth/email}/email-verification.tsx +1 -1
  104. package/src/components/{email → auth/email}/magic-link.tsx +1 -1
  105. package/src/components/{email → auth/email}/new-device.tsx +1 -1
  106. package/src/components/{email → auth/email}/otp-email.tsx +1 -1
  107. package/src/components/{email → auth/email}/password-changed.tsx +1 -1
  108. package/src/components/{email → auth/email}/reset-password.tsx +1 -1
  109. package/src/email.ts +1 -0
  110. package/src/hooks/auth/use-authenticate.ts +12 -6
  111. package/src/hooks/auth/use-user.ts +14 -9
  112. package/src/hooks/use-auth-mutation.ts +30 -12
  113. package/src/hooks/use-auth-plugin.ts +50 -0
  114. package/src/hooks/use-auth-query.ts +11 -7
  115. package/src/index.ts +33 -32
  116. package/src/lib/auth-client.ts +33 -31
  117. package/src/lib/auth-plugin.ts +75 -0
  118. package/src/lib/auth-server.ts +30 -0
  119. package/src/mutations/auth/request-password-reset-mutation.ts +58 -0
  120. package/src/mutations/auth/reset-password-mutation.ts +60 -0
  121. package/src/mutations/auth/send-verification-email-mutation.ts +58 -0
  122. package/src/mutations/auth/sign-in-email-mutation.ts +78 -0
  123. package/src/mutations/auth/sign-in-social-mutation.ts +64 -0
  124. package/src/mutations/auth/sign-out-mutation.ts +71 -0
  125. package/src/mutations/auth/sign-up-email-mutation.ts +74 -0
  126. package/src/mutations/auth-mutation-options.ts +83 -38
  127. package/src/mutations/magic-link/sign-in-magic-link-mutation.ts +59 -0
  128. package/src/mutations/multi-session/revoke-multi-session-mutation.ts +70 -0
  129. package/src/mutations/multi-session/set-active-session-mutation.ts +98 -0
  130. package/src/mutations/passkey/add-passkey-mutation.ts +66 -0
  131. package/src/mutations/passkey/delete-passkey-mutation.ts +66 -0
  132. package/src/mutations/passkey/sign-in-passkey-mutation.ts +74 -0
  133. package/src/mutations/settings/change-email-mutation.ts +67 -0
  134. package/src/mutations/settings/change-password-mutation.ts +59 -0
  135. package/src/mutations/settings/delete-user-mutation.ts +59 -0
  136. package/src/mutations/settings/link-social-mutation.ts +59 -0
  137. package/src/mutations/settings/revoke-session-mutation.ts +69 -0
  138. package/src/mutations/settings/unlink-account-mutation.ts +67 -0
  139. package/src/mutations/settings/update-user-mutation.ts +82 -0
  140. package/src/mutations/username/is-username-available-mutation.ts +62 -0
  141. package/src/mutations/username/sign-in-username-mutation.ts +74 -0
  142. package/src/queries/auth/session-query.ts +135 -0
  143. package/src/queries/auth-query-options.ts +61 -12
  144. package/src/queries/multi-session/list-device-sessions-query.ts +177 -0
  145. package/src/queries/passkey/list-passkeys-query.ts +154 -0
  146. package/src/queries/settings/account-info-query.ts +158 -0
  147. package/src/queries/settings/list-accounts-query.ts +156 -0
  148. package/src/queries/settings/list-sessions-query.ts +154 -0
  149. package/src/server/queries/auth/session-query.ts +94 -0
  150. package/src/server/queries/multi-session/list-device-sessions-query.ts +102 -0
  151. package/src/server/queries/passkey/list-passkeys-query.ts +100 -0
  152. package/src/server/queries/settings/account-info-query.ts +101 -0
  153. package/src/server/queries/settings/list-accounts-query.ts +101 -0
  154. package/src/server/queries/settings/list-sessions-query.ts +101 -0
  155. package/src/server.ts +7 -0
  156. package/dist/core.d.ts +0 -1
  157. package/dist/core.js +0 -1
  158. package/dist/hooks/auth/use-is-username-available.d.ts +0 -20
  159. package/dist/hooks/auth/use-is-username-available.js +0 -13
  160. package/dist/hooks/auth/use-request-password-reset.d.ts +0 -21
  161. package/dist/hooks/auth/use-request-password-reset.js +0 -13
  162. package/dist/hooks/auth/use-reset-password.d.ts +0 -23
  163. package/dist/hooks/auth/use-reset-password.js +0 -13
  164. package/dist/hooks/auth/use-send-verification-email.d.ts +0 -19
  165. package/dist/hooks/auth/use-send-verification-email.js +0 -13
  166. package/dist/hooks/auth/use-session.d.ts +0 -35
  167. package/dist/hooks/auth/use-session.js +0 -16
  168. package/dist/hooks/auth/use-sign-in-email.d.ts +0 -26
  169. package/dist/hooks/auth/use-sign-in-email.js +0 -17
  170. package/dist/hooks/auth/use-sign-in-magic-link.d.ts +0 -27
  171. package/dist/hooks/auth/use-sign-in-magic-link.js +0 -13
  172. package/dist/hooks/auth/use-sign-in-passkey.d.ts +0 -21
  173. package/dist/hooks/auth/use-sign-in-passkey.js +0 -17
  174. package/dist/hooks/auth/use-sign-in-social.d.ts +0 -63
  175. package/dist/hooks/auth/use-sign-in-social.js +0 -13
  176. package/dist/hooks/auth/use-sign-in-username.d.ts +0 -25
  177. package/dist/hooks/auth/use-sign-in-username.js +0 -17
  178. package/dist/hooks/auth/use-sign-out.d.ts +0 -18
  179. package/dist/hooks/auth/use-sign-out.js +0 -16
  180. package/dist/hooks/auth/use-sign-up-email.d.ts +0 -1186
  181. package/dist/hooks/auth/use-sign-up-email.js +0 -17
  182. package/dist/hooks/settings/use-account-info.d.ts +0 -17
  183. package/dist/hooks/settings/use-account-info.js +0 -18
  184. package/dist/hooks/settings/use-add-passkey.d.ts +0 -21
  185. package/dist/hooks/settings/use-add-passkey.js +0 -17
  186. package/dist/hooks/settings/use-change-email.d.ts +0 -21
  187. package/dist/hooks/settings/use-change-email.js +0 -17
  188. package/dist/hooks/settings/use-change-password.d.ts +0 -21
  189. package/dist/hooks/settings/use-change-password.js +0 -13
  190. package/dist/hooks/settings/use-delete-passkey.d.ts +0 -19
  191. package/dist/hooks/settings/use-delete-passkey.js +0 -17
  192. package/dist/hooks/settings/use-delete-user.d.ts +0 -24
  193. package/dist/hooks/settings/use-delete-user.js +0 -13
  194. package/dist/hooks/settings/use-link-social.d.ts +0 -43
  195. package/dist/hooks/settings/use-link-social.js +0 -13
  196. package/dist/hooks/settings/use-list-accounts.d.ts +0 -22
  197. package/dist/hooks/settings/use-list-accounts.js +0 -15
  198. package/dist/hooks/settings/use-list-device-sessions.d.ts +0 -34
  199. package/dist/hooks/settings/use-list-device-sessions.js +0 -15
  200. package/dist/hooks/settings/use-list-sessions.d.ts +0 -23
  201. package/dist/hooks/settings/use-list-sessions.js +0 -15
  202. package/dist/hooks/settings/use-list-user-passkeys.d.ts +0 -14
  203. package/dist/hooks/settings/use-list-user-passkeys.js +0 -15
  204. package/dist/hooks/settings/use-revoke-multi-session.d.ts +0 -19
  205. package/dist/hooks/settings/use-revoke-multi-session.js +0 -17
  206. package/dist/hooks/settings/use-revoke-session.d.ts +0 -19
  207. package/dist/hooks/settings/use-revoke-session.js +0 -17
  208. package/dist/hooks/settings/use-set-active-session.d.ts +0 -20
  209. package/dist/hooks/settings/use-set-active-session.js +0 -20
  210. package/dist/hooks/settings/use-unlink-account.d.ts +0 -21
  211. package/dist/hooks/settings/use-unlink-account.js +0 -17
  212. package/dist/hooks/settings/use-update-user.d.ts +0 -1185
  213. package/dist/hooks/settings/use-update-user.js +0 -24
  214. package/dist/lib/auth-client.js +0 -11
  215. package/dist/lib/auth-config.d.ts +0 -43
  216. package/dist/lib/auth-context.d.ts +0 -2
  217. package/dist/lib/auth-context.js +0 -6
  218. package/dist/mutations/auth/is-username-available-options.d.ts +0 -19
  219. package/dist/mutations/auth/is-username-available-options.js +0 -7
  220. package/dist/mutations/auth/request-password-reset-options.d.ts +0 -15
  221. package/dist/mutations/auth/request-password-reset-options.js +0 -7
  222. package/dist/mutations/auth/reset-password-options.d.ts +0 -17
  223. package/dist/mutations/auth/reset-password-options.js +0 -7
  224. package/dist/mutations/auth/send-verification-email-options.d.ts +0 -15
  225. package/dist/mutations/auth/send-verification-email-options.js +0 -7
  226. package/dist/mutations/auth/sign-in-email-options.d.ts +0 -23
  227. package/dist/mutations/auth/sign-in-email-options.js +0 -11
  228. package/dist/mutations/auth/sign-in-magic-link-options.d.ts +0 -23
  229. package/dist/mutations/auth/sign-in-magic-link-options.js +0 -11
  230. package/dist/mutations/auth/sign-in-passkey-options.d.ts +0 -15
  231. package/dist/mutations/auth/sign-in-passkey-options.js +0 -11
  232. package/dist/mutations/auth/sign-in-social-options.d.ts +0 -61
  233. package/dist/mutations/auth/sign-in-social-options.js +0 -11
  234. package/dist/mutations/auth/sign-in-username-options.d.ts +0 -19
  235. package/dist/mutations/auth/sign-in-username-options.js +0 -11
  236. package/dist/mutations/auth/sign-out-options.d.ts +0 -12
  237. package/dist/mutations/auth/sign-out-options.js +0 -7
  238. package/dist/mutations/auth/sign-up-email-options.d.ts +0 -1180
  239. package/dist/mutations/auth/sign-up-email-options.js +0 -11
  240. package/dist/mutations/settings/add-passkey-options.d.ts +0 -15
  241. package/dist/mutations/settings/add-passkey-options.js +0 -11
  242. package/dist/mutations/settings/change-email-options.d.ts +0 -15
  243. package/dist/mutations/settings/change-email-options.js +0 -7
  244. package/dist/mutations/settings/change-password-options.d.ts +0 -17
  245. package/dist/mutations/settings/change-password-options.js +0 -7
  246. package/dist/mutations/settings/delete-passkey-options.d.ts +0 -13
  247. package/dist/mutations/settings/delete-passkey-options.js +0 -11
  248. package/dist/mutations/settings/delete-user-options.d.ts +0 -20
  249. package/dist/mutations/settings/delete-user-options.js +0 -7
  250. package/dist/mutations/settings/link-social-options.d.ts +0 -39
  251. package/dist/mutations/settings/link-social-options.js +0 -7
  252. package/dist/mutations/settings/revoke-multi-session-options.d.ts +0 -13
  253. package/dist/mutations/settings/revoke-multi-session-options.js +0 -11
  254. package/dist/mutations/settings/revoke-session-options.d.ts +0 -13
  255. package/dist/mutations/settings/revoke-session-options.js +0 -7
  256. package/dist/mutations/settings/set-active-session-options.d.ts +0 -13
  257. package/dist/mutations/settings/set-active-session-options.js +0 -11
  258. package/dist/mutations/settings/unlink-account-options.d.ts +0 -15
  259. package/dist/mutations/settings/unlink-account-options.js +0 -7
  260. package/dist/mutations/settings/update-user-options.d.ts +0 -1182
  261. package/dist/mutations/settings/update-user-options.js +0 -7
  262. package/dist/queries/auth/session-options.d.ts +0 -110
  263. package/dist/queries/auth/session-options.js +0 -7
  264. package/dist/queries/settings/account-info-options.d.ts +0 -32
  265. package/dist/queries/settings/account-info-options.js +0 -12
  266. package/dist/queries/settings/list-accounts-options.d.ts +0 -53
  267. package/dist/queries/settings/list-accounts-options.js +0 -12
  268. package/dist/queries/settings/list-device-sessions-options.d.ts +0 -99
  269. package/dist/queries/settings/list-device-sessions-options.js +0 -12
  270. package/dist/queries/settings/list-sessions-options.d.ts +0 -54
  271. package/dist/queries/settings/list-sessions-options.js +0 -12
  272. package/dist/queries/settings/list-user-passkeys-options.d.ts +0 -18
  273. package/dist/queries/settings/list-user-passkeys-options.js +0 -12
  274. package/src/core.ts +0 -1
  275. package/src/hooks/auth/use-is-username-available.ts +0 -31
  276. package/src/hooks/auth/use-request-password-reset.ts +0 -33
  277. package/src/hooks/auth/use-reset-password.ts +0 -31
  278. package/src/hooks/auth/use-send-verification-email.ts +0 -31
  279. package/src/hooks/auth/use-session.ts +0 -31
  280. package/src/hooks/auth/use-sign-in-email.ts +0 -41
  281. package/src/hooks/auth/use-sign-in-magic-link.ts +0 -29
  282. package/src/hooks/auth/use-sign-in-passkey.ts +0 -40
  283. package/src/hooks/auth/use-sign-in-social.ts +0 -31
  284. package/src/hooks/auth/use-sign-in-username.ts +0 -40
  285. package/src/hooks/auth/use-sign-out.ts +0 -34
  286. package/src/hooks/auth/use-sign-up-email.ts +0 -40
  287. package/src/hooks/settings/use-account-info.ts +0 -40
  288. package/src/hooks/settings/use-add-passkey.ts +0 -37
  289. package/src/hooks/settings/use-change-email.ts +0 -37
  290. package/src/hooks/settings/use-change-password.ts +0 -29
  291. package/src/hooks/settings/use-delete-passkey.ts +0 -37
  292. package/src/hooks/settings/use-delete-user.ts +0 -29
  293. package/src/hooks/settings/use-link-social.ts +0 -29
  294. package/src/hooks/settings/use-list-accounts.ts +0 -39
  295. package/src/hooks/settings/use-list-device-sessions.ts +0 -39
  296. package/src/hooks/settings/use-list-sessions.ts +0 -39
  297. package/src/hooks/settings/use-list-user-passkeys.ts +0 -39
  298. package/src/hooks/settings/use-revoke-multi-session.ts +0 -39
  299. package/src/hooks/settings/use-revoke-session.ts +0 -39
  300. package/src/hooks/settings/use-set-active-session.ts +0 -58
  301. package/src/hooks/settings/use-unlink-account.ts +0 -37
  302. package/src/hooks/settings/use-update-user.ts +0 -50
  303. package/src/lib/auth-config.ts +0 -48
  304. package/src/lib/auth-context.ts +0 -6
  305. package/src/mutations/auth/is-username-available-options.ts +0 -18
  306. package/src/mutations/auth/request-password-reset-options.ts +0 -14
  307. package/src/mutations/auth/reset-password-options.ts +0 -14
  308. package/src/mutations/auth/send-verification-email-options.ts +0 -14
  309. package/src/mutations/auth/sign-in-email-options.ts +0 -19
  310. package/src/mutations/auth/sign-in-magic-link-options.ts +0 -15
  311. package/src/mutations/auth/sign-in-passkey-options.ts +0 -15
  312. package/src/mutations/auth/sign-in-social-options.ts +0 -19
  313. package/src/mutations/auth/sign-in-username-options.ts +0 -15
  314. package/src/mutations/auth/sign-out-options.ts +0 -11
  315. package/src/mutations/auth/sign-up-email-options.ts +0 -15
  316. package/src/mutations/settings/add-passkey-options.ts +0 -15
  317. package/src/mutations/settings/change-email-options.ts +0 -11
  318. package/src/mutations/settings/change-password-options.ts +0 -14
  319. package/src/mutations/settings/delete-passkey-options.ts +0 -15
  320. package/src/mutations/settings/delete-user-options.ts +0 -11
  321. package/src/mutations/settings/link-social-options.ts +0 -11
  322. package/src/mutations/settings/revoke-multi-session-options.ts +0 -15
  323. package/src/mutations/settings/revoke-session-options.ts +0 -14
  324. package/src/mutations/settings/set-active-session-options.ts +0 -15
  325. package/src/mutations/settings/unlink-account-options.ts +0 -14
  326. package/src/mutations/settings/update-user-options.ts +0 -15
  327. package/src/queries/auth/session-options.ts +0 -18
  328. package/src/queries/settings/account-info-options.ts +0 -25
  329. package/src/queries/settings/list-accounts-options.ts +0 -26
  330. package/src/queries/settings/list-device-sessions-options.ts +0 -24
  331. package/src/queries/settings/list-sessions-options.ts +0 -23
  332. package/src/queries/settings/list-user-passkeys-options.ts +0 -23
  333. /package/dist/components/{email → auth/email}/email-changed.d.ts +0 -0
  334. /package/dist/components/{email → auth/email}/email-localization.d.ts +0 -0
  335. /package/dist/components/{email → auth/email}/email-styles.d.ts +0 -0
  336. /package/dist/components/{email → auth/email}/email-verification.d.ts +0 -0
  337. /package/dist/components/{email → auth/email}/index.d.ts +0 -0
  338. /package/dist/components/{email → auth/email}/index.js +0 -0
  339. /package/dist/components/{email → auth/email}/magic-link.d.ts +0 -0
  340. /package/dist/components/{email → auth/email}/new-device.d.ts +0 -0
  341. /package/dist/components/{email → auth/email}/otp-email.d.ts +0 -0
  342. /package/dist/components/{email → auth/email}/password-changed.d.ts +0 -0
  343. /package/dist/components/{email → auth/email}/reset-password.d.ts +0 -0
  344. /package/src/components/{email → auth/email}/email-localization.tsx +0 -0
  345. /package/src/components/{email → auth/email}/email-styles.tsx +0 -0
  346. /package/src/components/{email → auth/email}/index.ts +0 -0
@@ -1,1180 +0,0 @@
1
- import { AuthClient } from '../../lib/auth-client';
2
- /**
3
- * Mutation options factory for email/password sign-up.
4
- *
5
- * @param authClient - The Better Auth client.
6
- */
7
- export declare function signUpEmailOptions(authClient: AuthClient): import('@tanstack/react-query').WithRequired<import('@tanstack/react-query').UseMutationOptions<never, import('better-auth/client').BetterFetchError, import('better-auth').Prettify<import('better-auth/client').InferSignUpEmailCtx<{
8
- plugins: ({
9
- id: "magic-link";
10
- version: string;
11
- $InferServerPlugin: ReturnType<(options: import('better-auth/plugins/magic-link').MagicLinkOptions) => {
12
- id: "magic-link";
13
- version: string;
14
- endpoints: {
15
- signInMagicLink: import('better-auth').StrictEndpoint<"/sign-in/magic-link", {
16
- method: "POST";
17
- requireHeaders: true;
18
- body: import('zod').ZodObject<{
19
- email: import('zod').ZodEmail;
20
- name: import('zod').ZodOptional<import('zod').ZodString>;
21
- callbackURL: import('zod').ZodOptional<import('zod').ZodString>;
22
- newUserCallbackURL: import('zod').ZodOptional<import('zod').ZodString>;
23
- errorCallbackURL: import('zod').ZodOptional<import('zod').ZodString>;
24
- metadata: import('zod').ZodOptional<import('zod').ZodRecord<import('zod').ZodString, import('zod').ZodAny>>;
25
- }, import('zod/v4/core').$strip>;
26
- metadata: {
27
- openapi: {
28
- operationId: string;
29
- description: string;
30
- responses: {
31
- 200: {
32
- description: string;
33
- content: {
34
- "application/json": {
35
- schema: {
36
- type: "object";
37
- properties: {
38
- status: {
39
- type: string;
40
- };
41
- };
42
- };
43
- };
44
- };
45
- };
46
- };
47
- };
48
- };
49
- }, {
50
- status: boolean;
51
- }>;
52
- magicLinkVerify: import('better-auth').StrictEndpoint<"/magic-link/verify", {
53
- method: "GET";
54
- query: import('zod').ZodObject<{
55
- token: import('zod').ZodString;
56
- callbackURL: import('zod').ZodOptional<import('zod').ZodString>;
57
- errorCallbackURL: import('zod').ZodOptional<import('zod').ZodString>;
58
- newUserCallbackURL: import('zod').ZodOptional<import('zod').ZodString>;
59
- }, import('zod/v4/core').$strip>;
60
- use: ((inputContext: import('better-auth').MiddlewareInputContext<import('better-auth').MiddlewareOptions>) => Promise<void>)[];
61
- requireHeaders: true;
62
- metadata: {
63
- openapi: {
64
- operationId: string;
65
- description: string;
66
- responses: {
67
- 200: {
68
- description: string;
69
- content: {
70
- "application/json": {
71
- schema: {
72
- type: "object";
73
- properties: {
74
- session: {
75
- $ref: string;
76
- };
77
- user: {
78
- $ref: string;
79
- };
80
- };
81
- };
82
- };
83
- };
84
- };
85
- };
86
- };
87
- };
88
- }, {
89
- token: string;
90
- user: {
91
- id: string;
92
- createdAt: Date;
93
- updatedAt: Date;
94
- email: string;
95
- emailVerified: boolean;
96
- name: string;
97
- image?: string | null | undefined;
98
- };
99
- session: {
100
- id: string;
101
- createdAt: Date;
102
- updatedAt: Date;
103
- userId: string;
104
- expiresAt: Date;
105
- token: string;
106
- ipAddress?: string | null | undefined;
107
- userAgent?: string | null | undefined;
108
- };
109
- }>;
110
- };
111
- rateLimit: {
112
- pathMatcher(path: string): boolean;
113
- window: number;
114
- max: number;
115
- }[];
116
- options: import('better-auth/plugins/magic-link').MagicLinkOptions;
117
- }>;
118
- } | {
119
- id: "multi-session";
120
- version: string;
121
- $InferServerPlugin: ReturnType<(options?: import('better-auth/plugins/multi-session').MultiSessionConfig | undefined) => {
122
- id: "multi-session";
123
- version: string;
124
- endpoints: {
125
- listDeviceSessions: import('better-auth').StrictEndpoint<"/multi-session/list-device-sessions", {
126
- method: "GET";
127
- requireHeaders: true;
128
- }, {
129
- session: {
130
- id: string;
131
- createdAt: Date;
132
- updatedAt: Date;
133
- userId: string;
134
- expiresAt: Date;
135
- token: string;
136
- ipAddress?: string | null | undefined;
137
- userAgent?: string | null | undefined;
138
- };
139
- user: {
140
- id: string;
141
- createdAt: Date;
142
- updatedAt: Date;
143
- email: string;
144
- emailVerified: boolean;
145
- name: string;
146
- image?: string | null | undefined;
147
- };
148
- }[]>;
149
- setActiveSession: import('better-auth').StrictEndpoint<"/multi-session/set-active", {
150
- method: "POST";
151
- body: import('zod').ZodObject<{
152
- sessionToken: import('zod').ZodString;
153
- }, import('zod/v4/core').$strip>;
154
- requireHeaders: true;
155
- metadata: {
156
- openapi: {
157
- description: string;
158
- responses: {
159
- 200: {
160
- description: string;
161
- content: {
162
- "application/json": {
163
- schema: {
164
- type: "object";
165
- properties: {
166
- session: {
167
- $ref: string;
168
- };
169
- };
170
- };
171
- };
172
- };
173
- };
174
- };
175
- };
176
- };
177
- }, {
178
- session: {
179
- id: string;
180
- createdAt: Date;
181
- updatedAt: Date;
182
- userId: string;
183
- expiresAt: Date;
184
- token: string;
185
- ipAddress?: string | null | undefined;
186
- userAgent?: string | null | undefined;
187
- } & Record<string, any>;
188
- user: {
189
- id: string;
190
- createdAt: Date;
191
- updatedAt: Date;
192
- email: string;
193
- emailVerified: boolean;
194
- name: string;
195
- image?: string | null | undefined;
196
- } & Record<string, any>;
197
- }>;
198
- revokeDeviceSession: import('better-auth').StrictEndpoint<"/multi-session/revoke", {
199
- method: "POST";
200
- body: import('zod').ZodObject<{
201
- sessionToken: import('zod').ZodString;
202
- }, import('zod/v4/core').$strip>;
203
- requireHeaders: true;
204
- use: ((inputContext: import('better-auth').MiddlewareInputContext<import('better-auth').MiddlewareOptions>) => Promise<{
205
- session: {
206
- session: Record<string, any> & {
207
- id: string;
208
- createdAt: Date;
209
- updatedAt: Date;
210
- userId: string;
211
- expiresAt: Date;
212
- token: string;
213
- ipAddress?: string | null | undefined;
214
- userAgent?: string | null | undefined;
215
- };
216
- user: Record<string, any> & {
217
- id: string;
218
- createdAt: Date;
219
- updatedAt: Date;
220
- email: string;
221
- emailVerified: boolean;
222
- name: string;
223
- image?: string | null | undefined;
224
- };
225
- };
226
- }>)[];
227
- metadata: {
228
- openapi: {
229
- description: string;
230
- responses: {
231
- 200: {
232
- description: string;
233
- content: {
234
- "application/json": {
235
- schema: {
236
- type: "object";
237
- properties: {
238
- status: {
239
- type: string;
240
- };
241
- };
242
- };
243
- };
244
- };
245
- };
246
- };
247
- };
248
- };
249
- }, {
250
- status: boolean;
251
- }>;
252
- };
253
- hooks: {
254
- after: {
255
- matcher: (context: import('better-auth').HookEndpointContext) => boolean;
256
- handler: (inputContext: import('better-auth').MiddlewareInputContext<import('better-auth').MiddlewareOptions>) => Promise<void>;
257
- }[];
258
- };
259
- options: import('better-auth/plugins/multi-session').MultiSessionConfig | undefined;
260
- $ERROR_CODES: {
261
- INVALID_SESSION_TOKEN: import('better-auth').RawError<"INVALID_SESSION_TOKEN">;
262
- };
263
- }>;
264
- atomListeners: {
265
- matcher(path: string): path is "/multi-session/set-active";
266
- signal: "$sessionSignal";
267
- }[];
268
- $ERROR_CODES: {
269
- INVALID_SESSION_TOKEN: import('better-auth').RawError<"INVALID_SESSION_TOKEN">;
270
- };
271
- } | {
272
- id: "passkey";
273
- version: string;
274
- $InferServerPlugin: ReturnType<(options?: import('@better-auth/passkey/client').PasskeyOptions | undefined) => {
275
- id: "passkey";
276
- version: string;
277
- endpoints: {
278
- generatePasskeyRegistrationOptions: import('better-auth').StrictEndpoint<"/passkey/generate-register-options", {
279
- method: "GET";
280
- use: ((inputContext: import('better-auth').MiddlewareInputContext<import('better-auth').MiddlewareOptions>) => Promise<{
281
- session: {
282
- session: Record<string, any> & {
283
- id: string;
284
- createdAt: Date;
285
- updatedAt: Date;
286
- userId: string;
287
- expiresAt: Date;
288
- token: string;
289
- ipAddress?: string | null | undefined;
290
- userAgent?: string | null | undefined;
291
- };
292
- user: Record<string, any> & {
293
- id: string;
294
- createdAt: Date;
295
- updatedAt: Date;
296
- email: string;
297
- emailVerified: boolean;
298
- name: string;
299
- image?: string | null | undefined;
300
- };
301
- };
302
- }>)[] | undefined;
303
- query: import('zod').ZodOptional<import('zod').ZodObject<{
304
- authenticatorAttachment: import('zod').ZodOptional<import('zod').ZodEnum<{
305
- platform: "platform";
306
- "cross-platform": "cross-platform";
307
- }>>;
308
- name: import('zod').ZodOptional<import('zod').ZodString>;
309
- context: import('zod').ZodOptional<import('zod').ZodString>;
310
- }, import('zod/v4/core').$strip>>;
311
- metadata: {
312
- openapi: {
313
- operationId: string;
314
- description: string;
315
- responses: {
316
- 200: {
317
- description: string;
318
- parameters: {
319
- query: {
320
- authenticatorAttachment: {
321
- description: string;
322
- required: boolean;
323
- };
324
- name: {
325
- description: string;
326
- required: boolean;
327
- };
328
- context: {
329
- description: string;
330
- required: boolean;
331
- };
332
- };
333
- };
334
- content: {
335
- "application/json": {
336
- schema: {
337
- type: "object";
338
- properties: {
339
- challenge: {
340
- type: string;
341
- };
342
- rp: {
343
- type: string;
344
- properties: {
345
- name: {
346
- type: string;
347
- };
348
- id: {
349
- type: string;
350
- };
351
- };
352
- };
353
- user: {
354
- type: string;
355
- properties: {
356
- id: {
357
- type: string;
358
- };
359
- name: {
360
- type: string;
361
- };
362
- displayName: {
363
- type: string;
364
- };
365
- };
366
- };
367
- pubKeyCredParams: {
368
- type: string;
369
- items: {
370
- type: string;
371
- properties: {
372
- type: {
373
- type: string;
374
- };
375
- alg: {
376
- type: string;
377
- };
378
- };
379
- };
380
- };
381
- timeout: {
382
- type: string;
383
- };
384
- excludeCredentials: {
385
- type: string;
386
- items: {
387
- type: string;
388
- properties: {
389
- id: {
390
- type: string;
391
- };
392
- type: {
393
- type: string;
394
- };
395
- transports: {
396
- type: string;
397
- items: {
398
- type: string;
399
- };
400
- };
401
- };
402
- };
403
- };
404
- authenticatorSelection: {
405
- type: string;
406
- properties: {
407
- authenticatorAttachment: {
408
- type: string;
409
- };
410
- requireResidentKey: {
411
- type: string;
412
- };
413
- userVerification: {
414
- type: string;
415
- };
416
- };
417
- };
418
- attestation: {
419
- type: string;
420
- };
421
- extensions: {
422
- type: string;
423
- };
424
- };
425
- };
426
- };
427
- };
428
- };
429
- };
430
- };
431
- };
432
- }, import('@better-auth/passkey/client').PublicKeyCredentialCreationOptionsJSON>;
433
- generatePasskeyAuthenticationOptions: import('better-auth').StrictEndpoint<"/passkey/generate-authenticate-options", {
434
- method: "GET";
435
- metadata: {
436
- openapi: {
437
- operationId: string;
438
- description: string;
439
- responses: {
440
- 200: {
441
- description: string;
442
- content: {
443
- "application/json": {
444
- schema: {
445
- type: "object";
446
- properties: {
447
- challenge: {
448
- type: string;
449
- };
450
- rp: {
451
- type: string;
452
- properties: {
453
- name: {
454
- type: string;
455
- };
456
- id: {
457
- type: string;
458
- };
459
- };
460
- };
461
- user: {
462
- type: string;
463
- properties: {
464
- id: {
465
- type: string;
466
- };
467
- name: {
468
- type: string;
469
- };
470
- displayName: {
471
- type: string;
472
- };
473
- };
474
- };
475
- timeout: {
476
- type: string;
477
- };
478
- allowCredentials: {
479
- type: string;
480
- items: {
481
- type: string;
482
- properties: {
483
- id: {
484
- type: string;
485
- };
486
- type: {
487
- type: string;
488
- };
489
- transports: {
490
- type: string;
491
- items: {
492
- type: string;
493
- };
494
- };
495
- };
496
- };
497
- };
498
- userVerification: {
499
- type: string;
500
- };
501
- authenticatorSelection: {
502
- type: string;
503
- properties: {
504
- authenticatorAttachment: {
505
- type: string;
506
- };
507
- requireResidentKey: {
508
- type: string;
509
- };
510
- userVerification: {
511
- type: string;
512
- };
513
- };
514
- };
515
- extensions: {
516
- type: string;
517
- };
518
- };
519
- };
520
- };
521
- };
522
- };
523
- };
524
- };
525
- };
526
- }, import('@better-auth/passkey/client').PublicKeyCredentialRequestOptionsJSON>;
527
- verifyPasskeyRegistration: import('better-auth').StrictEndpoint<"/passkey/verify-registration", {
528
- method: "POST";
529
- body: import('zod').ZodObject<{
530
- response: import('zod').ZodAny;
531
- name: import('zod').ZodOptional<import('zod').ZodString>;
532
- }, import('zod/v4/core').$strip>;
533
- use: ((inputContext: import('better-auth').MiddlewareInputContext<import('better-auth').MiddlewareOptions>) => Promise<{
534
- session: {
535
- session: Record<string, any> & {
536
- id: string;
537
- createdAt: Date;
538
- updatedAt: Date;
539
- userId: string;
540
- expiresAt: Date;
541
- token: string;
542
- ipAddress?: string | null | undefined;
543
- userAgent?: string | null | undefined;
544
- };
545
- user: Record<string, any> & {
546
- id: string;
547
- createdAt: Date;
548
- updatedAt: Date;
549
- email: string;
550
- emailVerified: boolean;
551
- name: string;
552
- image?: string | null | undefined;
553
- };
554
- };
555
- }>)[] | undefined;
556
- metadata: {
557
- openapi: {
558
- operationId: string;
559
- description: string;
560
- responses: {
561
- 200: {
562
- description: string;
563
- content: {
564
- "application/json": {
565
- schema: {
566
- $ref: string;
567
- };
568
- };
569
- };
570
- };
571
- 400: {
572
- description: string;
573
- };
574
- };
575
- };
576
- };
577
- }, import('@better-auth/passkey/client').Passkey>;
578
- verifyPasskeyAuthentication: import('better-auth').StrictEndpoint<"/passkey/verify-authentication", {
579
- method: "POST";
580
- body: import('zod').ZodObject<{
581
- response: import('zod').ZodRecord<import('zod').ZodAny, import('zod').ZodAny>;
582
- }, import('zod/v4/core').$strip>;
583
- metadata: {
584
- openapi: {
585
- operationId: string;
586
- description: string;
587
- responses: {
588
- 200: {
589
- description: string;
590
- content: {
591
- "application/json": {
592
- schema: {
593
- type: "object";
594
- properties: {
595
- session: {
596
- $ref: string;
597
- };
598
- user: {
599
- $ref: string;
600
- };
601
- };
602
- };
603
- };
604
- };
605
- };
606
- };
607
- };
608
- $Infer: {
609
- body: {
610
- response: import('@better-auth/passkey/client').AuthenticationResponseJSON;
611
- };
612
- };
613
- };
614
- }, {
615
- session: {
616
- id: string;
617
- createdAt: Date;
618
- updatedAt: Date;
619
- userId: string;
620
- expiresAt: Date;
621
- token: string;
622
- ipAddress?: string | null | undefined;
623
- userAgent?: string | null | undefined;
624
- };
625
- }>;
626
- listPasskeys: import('better-auth').StrictEndpoint<"/passkey/list-user-passkeys", {
627
- method: "GET";
628
- use: ((inputContext: import('better-auth').MiddlewareInputContext<import('better-auth').MiddlewareOptions>) => Promise<{
629
- session: {
630
- session: Record<string, any> & {
631
- id: string;
632
- createdAt: Date;
633
- updatedAt: Date;
634
- userId: string;
635
- expiresAt: Date;
636
- token: string;
637
- ipAddress?: string | null | undefined;
638
- userAgent?: string | null | undefined;
639
- };
640
- user: Record<string, any> & {
641
- id: string;
642
- createdAt: Date;
643
- updatedAt: Date;
644
- email: string;
645
- emailVerified: boolean;
646
- name: string;
647
- image?: string | null | undefined;
648
- };
649
- };
650
- }>)[];
651
- metadata: {
652
- openapi: {
653
- description: string;
654
- responses: {
655
- "200": {
656
- description: string;
657
- content: {
658
- "application/json": {
659
- schema: {
660
- type: "array";
661
- items: {
662
- $ref: string;
663
- required: string[];
664
- };
665
- description: string;
666
- };
667
- };
668
- };
669
- };
670
- };
671
- };
672
- };
673
- }, import('@better-auth/passkey/client').Passkey[]>;
674
- deletePasskey: import('better-auth').StrictEndpoint<"/passkey/delete-passkey", {
675
- method: "POST";
676
- body: import('zod').ZodObject<{
677
- id: import('zod').ZodString;
678
- }, import('zod/v4/core').$strip>;
679
- use: (((inputContext: import('better-auth').MiddlewareInputContext<import('better-auth').MiddlewareOptions>) => Promise<{
680
- session: {
681
- session: Record<string, any> & {
682
- id: string;
683
- createdAt: Date;
684
- updatedAt: Date;
685
- userId: string;
686
- expiresAt: Date;
687
- token: string;
688
- ipAddress?: string | null | undefined;
689
- userAgent?: string | null | undefined;
690
- };
691
- user: Record<string, any> & {
692
- id: string;
693
- createdAt: Date;
694
- updatedAt: Date;
695
- email: string;
696
- emailVerified: boolean;
697
- name: string;
698
- image?: string | null | undefined;
699
- };
700
- };
701
- }>) | ((inputContext: import('better-auth').MiddlewareInputContext<import('better-auth').MiddlewareOptions>) => Promise<{
702
- verifiedResource: {};
703
- }>))[];
704
- metadata: {
705
- openapi: {
706
- description: string;
707
- responses: {
708
- "200": {
709
- description: string;
710
- content: {
711
- "application/json": {
712
- schema: {
713
- type: "object";
714
- properties: {
715
- status: {
716
- type: string;
717
- description: string;
718
- };
719
- };
720
- required: string[];
721
- };
722
- };
723
- };
724
- };
725
- };
726
- };
727
- };
728
- }, {
729
- status: boolean;
730
- }>;
731
- updatePasskey: import('better-auth').StrictEndpoint<"/passkey/update-passkey", {
732
- method: "POST";
733
- body: import('zod').ZodObject<{
734
- id: import('zod').ZodString;
735
- name: import('zod').ZodString;
736
- }, import('zod/v4/core').$strip>;
737
- use: (((inputContext: import('better-auth').MiddlewareInputContext<import('better-auth').MiddlewareOptions>) => Promise<{
738
- session: {
739
- session: Record<string, any> & {
740
- id: string;
741
- createdAt: Date;
742
- updatedAt: Date;
743
- userId: string;
744
- expiresAt: Date;
745
- token: string;
746
- ipAddress?: string | null | undefined;
747
- userAgent?: string | null | undefined;
748
- };
749
- user: Record<string, any> & {
750
- id: string;
751
- createdAt: Date;
752
- updatedAt: Date;
753
- email: string;
754
- emailVerified: boolean;
755
- name: string;
756
- image?: string | null | undefined;
757
- };
758
- };
759
- }>) | ((inputContext: import('better-auth').MiddlewareInputContext<import('better-auth').MiddlewareOptions>) => Promise<{
760
- verifiedResource: {};
761
- }>))[];
762
- metadata: {
763
- openapi: {
764
- description: string;
765
- responses: {
766
- "200": {
767
- description: string;
768
- content: {
769
- "application/json": {
770
- schema: {
771
- type: "object";
772
- properties: {
773
- passkey: {
774
- $ref: string;
775
- };
776
- };
777
- required: string[];
778
- };
779
- };
780
- };
781
- };
782
- };
783
- };
784
- };
785
- }, {
786
- passkey: import('@better-auth/passkey/client').Passkey;
787
- }>;
788
- };
789
- schema: {
790
- passkey: {
791
- fields: {
792
- name: {
793
- type: "string";
794
- required: false;
795
- };
796
- publicKey: {
797
- type: "string";
798
- required: true;
799
- };
800
- userId: {
801
- type: "string";
802
- references: {
803
- model: string;
804
- field: string;
805
- };
806
- required: true;
807
- index: true;
808
- };
809
- credentialID: {
810
- type: "string";
811
- required: true;
812
- index: true;
813
- };
814
- counter: {
815
- type: "number";
816
- required: true;
817
- };
818
- deviceType: {
819
- type: "string";
820
- required: true;
821
- };
822
- backedUp: {
823
- type: "boolean";
824
- required: true;
825
- };
826
- transports: {
827
- type: "string";
828
- required: false;
829
- };
830
- createdAt: {
831
- type: "date";
832
- required: false;
833
- };
834
- aaguid: {
835
- type: "string";
836
- required: false;
837
- };
838
- };
839
- };
840
- };
841
- $ERROR_CODES: {
842
- CHALLENGE_NOT_FOUND: import('better-auth').RawError<"CHALLENGE_NOT_FOUND">;
843
- YOU_ARE_NOT_ALLOWED_TO_REGISTER_THIS_PASSKEY: import('better-auth').RawError<"YOU_ARE_NOT_ALLOWED_TO_REGISTER_THIS_PASSKEY">;
844
- FAILED_TO_VERIFY_REGISTRATION: import('better-auth').RawError<"FAILED_TO_VERIFY_REGISTRATION">;
845
- PASSKEY_NOT_FOUND: import('better-auth').RawError<"PASSKEY_NOT_FOUND">;
846
- AUTHENTICATION_FAILED: import('better-auth').RawError<"AUTHENTICATION_FAILED">;
847
- UNABLE_TO_CREATE_SESSION: import('better-auth').RawError<"UNABLE_TO_CREATE_SESSION">;
848
- FAILED_TO_UPDATE_PASSKEY: import('better-auth').RawError<"FAILED_TO_UPDATE_PASSKEY">;
849
- PREVIOUSLY_REGISTERED: import('better-auth').RawError<"PREVIOUSLY_REGISTERED">;
850
- REGISTRATION_CANCELLED: import('better-auth').RawError<"REGISTRATION_CANCELLED">;
851
- AUTH_CANCELLED: import('better-auth').RawError<"AUTH_CANCELLED">;
852
- UNKNOWN_ERROR: import('better-auth').RawError<"UNKNOWN_ERROR">;
853
- SESSION_REQUIRED: import('better-auth').RawError<"SESSION_REQUIRED">;
854
- RESOLVE_USER_REQUIRED: import('better-auth').RawError<"RESOLVE_USER_REQUIRED">;
855
- RESOLVED_USER_INVALID: import('better-auth').RawError<"RESOLVED_USER_INVALID">;
856
- };
857
- options: import('@better-auth/passkey/client').PasskeyOptions | undefined;
858
- }>;
859
- getActions: ($fetch: import('better-auth/client').BetterFetch, $store: import('better-auth').ClientStore) => {
860
- signIn: {
861
- passkey: (opts?: {
862
- autoFill?: boolean;
863
- extensions?: import('@better-auth/passkey/client').AuthenticationExtensionsClientInputs;
864
- returnWebAuthnResponse?: boolean;
865
- fetchOptions?: import('better-auth').ClientFetchOption;
866
- } | undefined, options?: import('better-auth').ClientFetchOption | undefined) => Promise<{
867
- data: null;
868
- error: {
869
- message?: string | undefined;
870
- status: number;
871
- statusText: string;
872
- };
873
- } | {
874
- data: {
875
- session: import('better-auth').Session;
876
- user: import('better-auth').User;
877
- };
878
- error: null;
879
- } | {
880
- webauthn: {
881
- response: import('@better-auth/passkey/client').AuthenticationResponseJSON;
882
- clientExtensionResults: import('@better-auth/passkey/client').AuthenticationExtensionsClientOutputs;
883
- };
884
- data: null;
885
- error: {
886
- message?: string | undefined;
887
- status: number;
888
- statusText: string;
889
- };
890
- } | {
891
- webauthn: {
892
- response: import('@better-auth/passkey/client').AuthenticationResponseJSON;
893
- clientExtensionResults: import('@better-auth/passkey/client').AuthenticationExtensionsClientOutputs;
894
- };
895
- data: {
896
- session: import('better-auth').Session;
897
- user: import('better-auth').User;
898
- };
899
- error: null;
900
- } | {
901
- data: null;
902
- error: {
903
- code: string;
904
- message: string;
905
- status: number;
906
- statusText: string;
907
- };
908
- }>;
909
- };
910
- passkey: {
911
- addPasskey: (opts?: {
912
- fetchOptions?: import('better-auth').ClientFetchOption;
913
- name?: string;
914
- authenticatorAttachment?: "platform" | "cross-platform";
915
- context?: string | null;
916
- extensions?: import('@better-auth/passkey/client').AuthenticationExtensionsClientInputs;
917
- useAutoRegister?: boolean;
918
- returnWebAuthnResponse?: boolean;
919
- } | undefined, fetchOpts?: import('better-auth').ClientFetchOption | undefined) => Promise<{
920
- data: null;
921
- error: {
922
- message?: string | undefined;
923
- status: number;
924
- statusText: string;
925
- };
926
- } | {
927
- data: import('@better-auth/passkey/client').Passkey;
928
- error: null;
929
- } | {
930
- webauthn: {
931
- response: import('@better-auth/passkey/client').RegistrationResponseJSON;
932
- clientExtensionResults: import('@better-auth/passkey/client').AuthenticationExtensionsClientOutputs;
933
- };
934
- data: import('@better-auth/passkey/client').Passkey;
935
- error: null;
936
- } | {
937
- data: null;
938
- error: {
939
- code: string;
940
- message: string;
941
- status: number;
942
- statusText: string;
943
- };
944
- }>;
945
- };
946
- $Infer: {
947
- Passkey: import('@better-auth/passkey/client').Passkey;
948
- };
949
- };
950
- getAtoms($fetch: import('better-auth/client').BetterFetch): {
951
- listPasskeys: import('better-auth/client').AuthQueryAtom<import('@better-auth/passkey/client').Passkey[]>;
952
- $listPasskeys: import('better-auth/client').PreinitializedWritableAtom<any> & object;
953
- };
954
- pathMethods: {
955
- "/passkey/register": "POST";
956
- "/passkey/authenticate": "POST";
957
- };
958
- atomListeners: ({
959
- matcher(path: string): path is "/passkey/delete-passkey" | "/passkey/update-passkey" | "/passkey/verify-registration" | "/sign-out";
960
- signal: "$listPasskeys";
961
- } | {
962
- matcher: (path: string) => path is "/passkey/verify-authentication";
963
- signal: "$sessionSignal";
964
- })[];
965
- $ERROR_CODES: {
966
- CHALLENGE_NOT_FOUND: import('better-auth').RawError<"CHALLENGE_NOT_FOUND">;
967
- YOU_ARE_NOT_ALLOWED_TO_REGISTER_THIS_PASSKEY: import('better-auth').RawError<"YOU_ARE_NOT_ALLOWED_TO_REGISTER_THIS_PASSKEY">;
968
- FAILED_TO_VERIFY_REGISTRATION: import('better-auth').RawError<"FAILED_TO_VERIFY_REGISTRATION">;
969
- PASSKEY_NOT_FOUND: import('better-auth').RawError<"PASSKEY_NOT_FOUND">;
970
- AUTHENTICATION_FAILED: import('better-auth').RawError<"AUTHENTICATION_FAILED">;
971
- UNABLE_TO_CREATE_SESSION: import('better-auth').RawError<"UNABLE_TO_CREATE_SESSION">;
972
- FAILED_TO_UPDATE_PASSKEY: import('better-auth').RawError<"FAILED_TO_UPDATE_PASSKEY">;
973
- PREVIOUSLY_REGISTERED: import('better-auth').RawError<"PREVIOUSLY_REGISTERED">;
974
- REGISTRATION_CANCELLED: import('better-auth').RawError<"REGISTRATION_CANCELLED">;
975
- AUTH_CANCELLED: import('better-auth').RawError<"AUTH_CANCELLED">;
976
- UNKNOWN_ERROR: import('better-auth').RawError<"UNKNOWN_ERROR">;
977
- SESSION_REQUIRED: import('better-auth').RawError<"SESSION_REQUIRED">;
978
- RESOLVE_USER_REQUIRED: import('better-auth').RawError<"RESOLVE_USER_REQUIRED">;
979
- RESOLVED_USER_INVALID: import('better-auth').RawError<"RESOLVED_USER_INVALID">;
980
- };
981
- } | {
982
- id: "username";
983
- version: string;
984
- $InferServerPlugin: ReturnType<(options?: import('better-auth/plugins/username').UsernameOptions | undefined) => {
985
- id: "username";
986
- version: string;
987
- init(ctx: import('better-auth').AuthContext): {
988
- options: {
989
- databaseHooks: {
990
- user: {
991
- create: {
992
- before(user: {
993
- id: string;
994
- createdAt: Date;
995
- updatedAt: Date;
996
- email: string;
997
- emailVerified: boolean;
998
- name: string;
999
- image?: string | null | undefined;
1000
- } & Record<string, unknown>, context: import('better-auth').GenericEndpointContext | null): Promise<{
1001
- data: {
1002
- displayUsername?: string | undefined;
1003
- username?: string | undefined;
1004
- id: string;
1005
- createdAt: Date;
1006
- updatedAt: Date;
1007
- email: string;
1008
- emailVerified: boolean;
1009
- name: string;
1010
- image?: string | null | undefined;
1011
- };
1012
- }>;
1013
- };
1014
- update: {
1015
- before(user: Partial<{
1016
- id: string;
1017
- createdAt: Date;
1018
- updatedAt: Date;
1019
- email: string;
1020
- emailVerified: boolean;
1021
- name: string;
1022
- image?: string | null | undefined;
1023
- }> & Record<string, unknown>, context: import('better-auth').GenericEndpointContext | null): Promise<{
1024
- data: {
1025
- displayUsername?: string | undefined;
1026
- username?: string | undefined;
1027
- id?: string | undefined;
1028
- createdAt?: Date | undefined;
1029
- updatedAt?: Date | undefined;
1030
- email?: string | undefined;
1031
- emailVerified?: boolean | undefined;
1032
- name?: string | undefined;
1033
- image?: string | null | undefined;
1034
- };
1035
- }>;
1036
- };
1037
- };
1038
- };
1039
- };
1040
- };
1041
- endpoints: {
1042
- signInUsername: import('better-auth').StrictEndpoint<"/sign-in/username", {
1043
- method: "POST";
1044
- body: import('zod').ZodObject<{
1045
- username: import('zod').ZodString;
1046
- password: import('zod').ZodString;
1047
- rememberMe: import('zod').ZodOptional<import('zod').ZodBoolean>;
1048
- callbackURL: import('zod').ZodOptional<import('zod').ZodString>;
1049
- }, import('zod/v4/core').$strip>;
1050
- metadata: {
1051
- openapi: {
1052
- summary: string;
1053
- description: string;
1054
- responses: {
1055
- 200: {
1056
- description: string;
1057
- content: {
1058
- "application/json": {
1059
- schema: {
1060
- type: "object";
1061
- properties: {
1062
- token: {
1063
- type: string;
1064
- description: string;
1065
- };
1066
- user: {
1067
- $ref: string;
1068
- };
1069
- };
1070
- required: string[];
1071
- };
1072
- };
1073
- };
1074
- };
1075
- 422: {
1076
- description: string;
1077
- content: {
1078
- "application/json": {
1079
- schema: {
1080
- type: "object";
1081
- properties: {
1082
- message: {
1083
- type: string;
1084
- };
1085
- };
1086
- };
1087
- };
1088
- };
1089
- };
1090
- };
1091
- };
1092
- };
1093
- }, {
1094
- token: string;
1095
- user: {
1096
- id: string;
1097
- createdAt: Date;
1098
- updatedAt: Date;
1099
- email: string;
1100
- emailVerified: boolean;
1101
- name: string;
1102
- image?: string | null | undefined;
1103
- } & {
1104
- username: string;
1105
- displayUsername: string;
1106
- };
1107
- }>;
1108
- isUsernameAvailable: import('better-auth').StrictEndpoint<"/is-username-available", {
1109
- method: "POST";
1110
- body: import('zod').ZodObject<{
1111
- username: import('zod').ZodString;
1112
- }, import('zod/v4/core').$strip>;
1113
- }, {
1114
- available: boolean;
1115
- }>;
1116
- };
1117
- schema: {
1118
- user: {
1119
- fields: {
1120
- username: {
1121
- type: "string";
1122
- required: false;
1123
- sortable: true;
1124
- unique: true;
1125
- returned: true;
1126
- transform: {
1127
- input(value: import('better-auth').DBPrimitive): string | number | boolean | Date | Record<string, unknown> | unknown[] | null | undefined;
1128
- };
1129
- };
1130
- displayUsername: {
1131
- type: "string";
1132
- required: false;
1133
- transform: {
1134
- input(value: import('better-auth').DBPrimitive): string | number | boolean | Date | Record<string, unknown> | unknown[] | null | undefined;
1135
- };
1136
- };
1137
- };
1138
- };
1139
- };
1140
- hooks: {
1141
- before: {
1142
- matcher(context: import('better-auth').HookEndpointContext): boolean;
1143
- handler: (inputContext: import('better-auth').MiddlewareInputContext<import('better-auth').MiddlewareOptions>) => Promise<void>;
1144
- }[];
1145
- };
1146
- options: import('better-auth/plugins/username').UsernameOptions | undefined;
1147
- $ERROR_CODES: {
1148
- EMAIL_NOT_VERIFIED: import('better-auth').RawError<"EMAIL_NOT_VERIFIED">;
1149
- UNEXPECTED_ERROR: import('better-auth').RawError<"UNEXPECTED_ERROR">;
1150
- INVALID_USERNAME_OR_PASSWORD: import('better-auth').RawError<"INVALID_USERNAME_OR_PASSWORD">;
1151
- USERNAME_IS_ALREADY_TAKEN: import('better-auth').RawError<"USERNAME_IS_ALREADY_TAKEN">;
1152
- USERNAME_TOO_SHORT: import('better-auth').RawError<"USERNAME_TOO_SHORT">;
1153
- USERNAME_TOO_LONG: import('better-auth').RawError<"USERNAME_TOO_LONG">;
1154
- INVALID_USERNAME: import('better-auth').RawError<"INVALID_USERNAME">;
1155
- INVALID_DISPLAY_USERNAME: import('better-auth').RawError<"INVALID_DISPLAY_USERNAME">;
1156
- };
1157
- }>;
1158
- atomListeners: {
1159
- matcher: (path: string) => path is "/sign-in/username";
1160
- signal: "$sessionSignal";
1161
- }[];
1162
- $ERROR_CODES: {
1163
- EMAIL_NOT_VERIFIED: import('better-auth').RawError<"EMAIL_NOT_VERIFIED">;
1164
- UNEXPECTED_ERROR: import('better-auth').RawError<"UNEXPECTED_ERROR">;
1165
- INVALID_USERNAME_OR_PASSWORD: import('better-auth').RawError<"INVALID_USERNAME_OR_PASSWORD">;
1166
- USERNAME_IS_ALREADY_TAKEN: import('better-auth').RawError<"USERNAME_IS_ALREADY_TAKEN">;
1167
- USERNAME_TOO_SHORT: import('better-auth').RawError<"USERNAME_TOO_SHORT">;
1168
- USERNAME_TOO_LONG: import('better-auth').RawError<"USERNAME_TOO_LONG">;
1169
- INVALID_USERNAME: import('better-auth').RawError<"INVALID_USERNAME">;
1170
- INVALID_DISPLAY_USERNAME: import('better-auth').RawError<"INVALID_DISPLAY_USERNAME">;
1171
- };
1172
- })[];
1173
- }, import('better-auth').ClientFetchOption<Partial<{
1174
- name: string;
1175
- email: string;
1176
- password: string;
1177
- image?: string | undefined;
1178
- callbackURL?: string | undefined;
1179
- rememberMe?: boolean | undefined;
1180
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>>, unknown>, "mutationKey">;