@better-auth-ui/react 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (250) hide show
  1. package/dist/components/auth/auth-provider.d.ts +32 -0
  2. package/dist/components/auth/auth-provider.js +44 -0
  3. package/dist/components/email/email-changed.d.ts +97 -0
  4. package/dist/components/email/email-changed.js +70 -0
  5. package/dist/components/email/email-localization.d.ts +61 -0
  6. package/dist/components/email/email-localization.js +24 -0
  7. package/dist/components/email/email-styles.d.ts +89 -0
  8. package/dist/components/email/email-styles.js +129 -0
  9. package/dist/components/email/email-verification.d.ts +97 -0
  10. package/dist/components/email/email-verification.js +75 -0
  11. package/dist/components/email/index.d.ts +9 -0
  12. package/dist/components/email/index.js +9 -0
  13. package/dist/components/email/magic-link.d.ts +93 -0
  14. package/dist/components/email/magic-link.js +72 -0
  15. package/dist/components/email/new-device.d.ts +123 -0
  16. package/dist/components/email/new-device.js +90 -0
  17. package/dist/components/email/otp-email.d.ts +88 -0
  18. package/dist/components/email/otp-email.js +65 -0
  19. package/dist/components/email/password-changed.d.ts +96 -0
  20. package/dist/components/email/password-changed.js +76 -0
  21. package/dist/components/email/reset-password.d.ts +90 -0
  22. package/dist/components/email/reset-password.js +68 -0
  23. package/dist/components/icons/apple.d.ts +8 -0
  24. package/dist/components/icons/apple.js +10 -0
  25. package/dist/components/icons/atlassian.d.ts +10 -0
  26. package/dist/components/icons/atlassian.js +14 -0
  27. package/dist/components/icons/cognito.d.ts +8 -0
  28. package/dist/components/icons/cognito.js +10 -0
  29. package/dist/components/icons/discord.d.ts +8 -0
  30. package/dist/components/icons/discord.js +10 -0
  31. package/dist/components/icons/dropbox.d.ts +8 -0
  32. package/dist/components/icons/dropbox.js +10 -0
  33. package/dist/components/icons/facebook.d.ts +10 -0
  34. package/dist/components/icons/facebook.js +12 -0
  35. package/dist/components/icons/figma.d.ts +11 -0
  36. package/dist/components/icons/figma.js +13 -0
  37. package/dist/components/icons/github.d.ts +10 -0
  38. package/dist/components/icons/github.js +12 -0
  39. package/dist/components/icons/gitlab.d.ts +8 -0
  40. package/dist/components/icons/gitlab.js +10 -0
  41. package/dist/components/icons/google.d.ts +8 -0
  42. package/dist/components/icons/google.js +10 -0
  43. package/dist/components/icons/huggingface.d.ts +8 -0
  44. package/dist/components/icons/huggingface.js +10 -0
  45. package/dist/components/icons/index.d.ts +35 -0
  46. package/dist/components/icons/index.js +35 -0
  47. package/dist/components/icons/kakao.d.ts +10 -0
  48. package/dist/components/icons/kakao.js +12 -0
  49. package/dist/components/icons/kick.d.ts +10 -0
  50. package/dist/components/icons/kick.js +12 -0
  51. package/dist/components/icons/line.d.ts +8 -0
  52. package/dist/components/icons/line.js +10 -0
  53. package/dist/components/icons/linear.d.ts +8 -0
  54. package/dist/components/icons/linear.js +10 -0
  55. package/dist/components/icons/linkedin.d.ts +8 -0
  56. package/dist/components/icons/linkedin.js +10 -0
  57. package/dist/components/icons/microsoft.d.ts +8 -0
  58. package/dist/components/icons/microsoft.js +10 -0
  59. package/dist/components/icons/naver.d.ts +8 -0
  60. package/dist/components/icons/naver.js +10 -0
  61. package/dist/components/icons/notion.d.ts +8 -0
  62. package/dist/components/icons/notion.js +10 -0
  63. package/dist/components/icons/paybin.d.ts +7 -0
  64. package/dist/components/icons/paybin.js +9 -0
  65. package/dist/components/icons/paypal.d.ts +8 -0
  66. package/dist/components/icons/paypal.js +10 -0
  67. package/dist/components/icons/polar.d.ts +8 -0
  68. package/dist/components/icons/polar.js +10 -0
  69. package/dist/components/icons/railway.d.ts +8 -0
  70. package/dist/components/icons/railway.js +10 -0
  71. package/dist/components/icons/reddit.d.ts +8 -0
  72. package/dist/components/icons/reddit.js +10 -0
  73. package/dist/components/icons/roblox.d.ts +11 -0
  74. package/dist/components/icons/roblox.js +13 -0
  75. package/dist/components/icons/salesforce.d.ts +8 -0
  76. package/dist/components/icons/salesforce.js +10 -0
  77. package/dist/components/icons/slack.d.ts +8 -0
  78. package/dist/components/icons/slack.js +10 -0
  79. package/dist/components/icons/spotify.d.ts +8 -0
  80. package/dist/components/icons/spotify.js +10 -0
  81. package/dist/components/icons/tiktok.d.ts +9 -0
  82. package/dist/components/icons/tiktok.js +11 -0
  83. package/dist/components/icons/twitch.d.ts +8 -0
  84. package/dist/components/icons/twitch.js +13 -0
  85. package/dist/components/icons/vercel.d.ts +8 -0
  86. package/dist/components/icons/vercel.js +10 -0
  87. package/dist/components/icons/vk.d.ts +8 -0
  88. package/dist/components/icons/vk.js +10 -0
  89. package/dist/components/icons/wechat.d.ts +8 -0
  90. package/dist/components/icons/wechat.js +10 -0
  91. package/dist/components/icons/x.d.ts +8 -0
  92. package/dist/components/icons/x.js +10 -0
  93. package/dist/components/icons/zoom.d.ts +8 -0
  94. package/dist/components/icons/zoom.js +12 -0
  95. package/dist/components/settings/account/theme-preview.d.ts +3 -0
  96. package/dist/components/settings/account/theme-preview.js +10 -0
  97. package/dist/core.d.ts +1 -0
  98. package/dist/core.js +1 -0
  99. package/dist/hooks/auth/use-auth-mutation.d.ts +18 -0
  100. package/dist/hooks/auth/use-auth-mutation.js +10 -0
  101. package/dist/hooks/auth/use-auth-query.d.ts +24 -0
  102. package/dist/hooks/auth/use-auth-query.js +10 -0
  103. package/dist/hooks/auth/use-authenticate.d.ts +9 -0
  104. package/dist/hooks/auth/use-authenticate.js +28 -0
  105. package/dist/hooks/auth/use-forgot-password.d.ts +20 -0
  106. package/dist/hooks/auth/use-forgot-password.js +14 -0
  107. package/dist/hooks/auth/use-request-password-reset.d.ts +26 -0
  108. package/dist/hooks/auth/use-request-password-reset.js +14 -0
  109. package/dist/hooks/auth/use-reset-password.d.ts +40 -0
  110. package/dist/hooks/auth/use-reset-password.js +13 -0
  111. package/dist/hooks/auth/use-send-verification-email.d.ts +24 -0
  112. package/dist/hooks/auth/use-send-verification-email.js +13 -0
  113. package/dist/hooks/auth/use-session.d.ts +9 -0
  114. package/dist/hooks/auth/use-session.js +18 -0
  115. package/dist/hooks/auth/use-sign-in-email.d.ts +53 -0
  116. package/dist/hooks/auth/use-sign-in-email.js +24 -0
  117. package/dist/hooks/auth/use-sign-in-magic-link.d.ts +32 -0
  118. package/dist/hooks/auth/use-sign-in-magic-link.js +13 -0
  119. package/dist/hooks/auth/use-sign-in-social.d.ts +93 -0
  120. package/dist/hooks/auth/use-sign-in-social.js +13 -0
  121. package/dist/hooks/auth/use-sign-out.d.ts +19 -0
  122. package/dist/hooks/auth/use-sign-out.js +24 -0
  123. package/dist/hooks/auth/use-sign-up-email.d.ts +526 -0
  124. package/dist/hooks/auth/use-sign-up-email.js +24 -0
  125. package/dist/hooks/auth/use-user.d.ts +513 -0
  126. package/dist/hooks/auth/use-user.js +14 -0
  127. package/dist/hooks/settings/use-account-info.d.ts +17 -0
  128. package/dist/hooks/settings/use-account-info.js +25 -0
  129. package/dist/hooks/settings/use-change-email.d.ts +24 -0
  130. package/dist/hooks/settings/use-change-email.js +23 -0
  131. package/dist/hooks/settings/use-change-password.d.ts +54 -0
  132. package/dist/hooks/settings/use-change-password.js +11 -0
  133. package/dist/hooks/settings/use-delete-user.d.ts +42 -0
  134. package/dist/hooks/settings/use-delete-user.js +11 -0
  135. package/dist/hooks/settings/use-link-social.d.ts +46 -0
  136. package/dist/hooks/settings/use-link-social.js +10 -0
  137. package/dist/hooks/settings/use-list-accounts.d.ts +20 -0
  138. package/dist/hooks/settings/use-list-accounts.js +23 -0
  139. package/dist/hooks/settings/use-list-device-sessions.d.ts +11 -0
  140. package/dist/hooks/settings/use-list-device-sessions.js +22 -0
  141. package/dist/hooks/settings/use-list-sessions.d.ts +20 -0
  142. package/dist/hooks/settings/use-list-sessions.js +22 -0
  143. package/dist/hooks/settings/use-revoke-multi-session.d.ts +19 -0
  144. package/dist/hooks/settings/use-revoke-multi-session.js +20 -0
  145. package/dist/hooks/settings/use-revoke-session.d.ts +19 -0
  146. package/dist/hooks/settings/use-revoke-session.js +21 -0
  147. package/dist/hooks/settings/use-set-active-session.d.ts +37 -0
  148. package/dist/hooks/settings/use-set-active-session.js +28 -0
  149. package/dist/hooks/settings/use-unlink-account.d.ts +21 -0
  150. package/dist/hooks/settings/use-unlink-account.js +21 -0
  151. package/dist/hooks/settings/use-update-user.d.ts +11 -0
  152. package/dist/hooks/settings/use-update-user.js +29 -0
  153. package/dist/hooks/use-hydrated.d.ts +6 -0
  154. package/dist/hooks/use-hydrated.js +18 -0
  155. package/dist/index.d.ts +32 -0
  156. package/dist/index.js +33 -0
  157. package/dist/lib/auth-client.d.ts +1979 -0
  158. package/dist/lib/auth-client.js +5 -0
  159. package/dist/lib/auth-config.d.ts +43 -0
  160. package/dist/lib/auth-config.js +1 -0
  161. package/dist/lib/auth-context.d.ts +2 -0
  162. package/dist/lib/auth-context.js +3 -0
  163. package/dist/lib/auth-hook-options.d.ts +8 -0
  164. package/dist/lib/auth-hook-options.js +1 -0
  165. package/dist/lib/provider-icons.d.ts +13 -0
  166. package/dist/lib/provider-icons.js +48 -0
  167. package/dist/lib/utils.d.ts +2 -0
  168. package/dist/lib/utils.js +5 -0
  169. package/package.json +64 -0
  170. package/src/components/auth/auth-provider.tsx +82 -0
  171. package/src/components/email/email-changed.tsx +381 -0
  172. package/src/components/email/email-localization.tsx +33 -0
  173. package/src/components/email/email-styles.tsx +175 -0
  174. package/src/components/email/email-verification.tsx +350 -0
  175. package/src/components/email/index.ts +9 -0
  176. package/src/components/email/magic-link.tsx +349 -0
  177. package/src/components/email/new-device.tsx +452 -0
  178. package/src/components/email/otp-email.tsx +321 -0
  179. package/src/components/email/password-changed.tsx +380 -0
  180. package/src/components/email/reset-password.tsx +343 -0
  181. package/src/components/icons/apple.tsx +24 -0
  182. package/src/components/icons/atlassian.tsx +43 -0
  183. package/src/components/icons/cognito.tsx +25 -0
  184. package/src/components/icons/discord.tsx +24 -0
  185. package/src/components/icons/dropbox.tsx +24 -0
  186. package/src/components/icons/facebook.tsx +30 -0
  187. package/src/components/icons/figma.tsx +43 -0
  188. package/src/components/icons/github.tsx +26 -0
  189. package/src/components/icons/gitlab.tsx +36 -0
  190. package/src/components/icons/google.tsx +42 -0
  191. package/src/components/icons/huggingface.tsx +44 -0
  192. package/src/components/icons/index.ts +35 -0
  193. package/src/components/icons/kakao.tsx +26 -0
  194. package/src/components/icons/kick.tsx +30 -0
  195. package/src/components/icons/line.tsx +24 -0
  196. package/src/components/icons/linear.tsx +24 -0
  197. package/src/components/icons/linkedin.tsx +28 -0
  198. package/src/components/icons/microsoft.tsx +24 -0
  199. package/src/components/icons/naver.tsx +24 -0
  200. package/src/components/icons/notion.tsx +25 -0
  201. package/src/components/icons/paybin.tsx +37 -0
  202. package/src/components/icons/paypal.tsx +36 -0
  203. package/src/components/icons/polar.tsx +31 -0
  204. package/src/components/icons/railway.tsx +24 -0
  205. package/src/components/icons/reddit.tsx +25 -0
  206. package/src/components/icons/roblox.tsx +28 -0
  207. package/src/components/icons/salesforce.tsx +24 -0
  208. package/src/components/icons/slack.tsx +36 -0
  209. package/src/components/icons/spotify.tsx +24 -0
  210. package/src/components/icons/tiktok.tsx +32 -0
  211. package/src/components/icons/twitch.tsx +50 -0
  212. package/src/components/icons/vercel.tsx +21 -0
  213. package/src/components/icons/vk.tsx +24 -0
  214. package/src/components/icons/wechat.tsx +24 -0
  215. package/src/components/icons/x.tsx +24 -0
  216. package/src/components/icons/zoom.tsx +48 -0
  217. package/src/components/settings/account/theme-preview.tsx +271 -0
  218. package/src/core.ts +1 -0
  219. package/src/hooks/auth/use-auth-mutation.ts +56 -0
  220. package/src/hooks/auth/use-auth-query.ts +50 -0
  221. package/src/hooks/auth/use-authenticate.ts +35 -0
  222. package/src/hooks/auth/use-request-password-reset.ts +24 -0
  223. package/src/hooks/auth/use-reset-password.ts +23 -0
  224. package/src/hooks/auth/use-send-verification-email.ts +23 -0
  225. package/src/hooks/auth/use-session.ts +26 -0
  226. package/src/hooks/auth/use-sign-in-email.ts +35 -0
  227. package/src/hooks/auth/use-sign-in-magic-link.ts +23 -0
  228. package/src/hooks/auth/use-sign-in-social.ts +23 -0
  229. package/src/hooks/auth/use-sign-out.ts +34 -0
  230. package/src/hooks/auth/use-sign-up-email.ts +35 -0
  231. package/src/hooks/auth/use-user.ts +21 -0
  232. package/src/hooks/settings/use-account-info.ts +30 -0
  233. package/src/hooks/settings/use-change-email.ts +33 -0
  234. package/src/hooks/settings/use-change-password.ts +21 -0
  235. package/src/hooks/settings/use-delete-user.ts +21 -0
  236. package/src/hooks/settings/use-link-social.ts +19 -0
  237. package/src/hooks/settings/use-list-accounts.ts +27 -0
  238. package/src/hooks/settings/use-list-device-sessions.ts +32 -0
  239. package/src/hooks/settings/use-list-sessions.ts +26 -0
  240. package/src/hooks/settings/use-revoke-multi-session.ts +30 -0
  241. package/src/hooks/settings/use-revoke-session.ts +31 -0
  242. package/src/hooks/settings/use-set-active-session.ts +46 -0
  243. package/src/hooks/settings/use-unlink-account.ts +31 -0
  244. package/src/hooks/settings/use-update-user.ts +44 -0
  245. package/src/index.ts +34 -0
  246. package/src/lib/auth-client.ts +37 -0
  247. package/src/lib/auth-config.ts +48 -0
  248. package/src/lib/auth-context.ts +6 -0
  249. package/src/lib/provider-icons.ts +90 -0
  250. package/src/lib/utils.ts +6 -0
@@ -0,0 +1,1979 @@
1
+ import { createAuthClient } from "better-auth/react";
2
+ import type { AuthConfig } from "./auth-config";
3
+ export type { PathToObject } from "better-auth/client";
4
+ /**
5
+ * Type representing any auth client created with `createAuthClient`.
6
+ *
7
+ * Used for type flexibility when accepting auth clients that may have different
8
+ * plugin configurations or feature sets.
9
+ */
10
+ export type AnyAuthClient = Omit<ReturnType<typeof createAuthClient>, "signUp">;
11
+ declare const authClient: {
12
+ deleteUser: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
13
+ callbackURL?: string | undefined;
14
+ password?: string | undefined;
15
+ token?: string | undefined;
16
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
17
+ callbackURL?: string | undefined;
18
+ password?: string | undefined;
19
+ token?: string | undefined;
20
+ } & {
21
+ fetchOptions?: FetchOptions | undefined;
22
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
23
+ success: boolean;
24
+ message: string;
25
+ }, {
26
+ code?: string | undefined;
27
+ message?: string | undefined;
28
+ }, FetchOptions["throw"] extends true ? true : false>>;
29
+ } & {
30
+ resetPassword: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
31
+ newPassword: string;
32
+ token?: string | undefined;
33
+ }> & Record<string, any>, Partial<{
34
+ token?: string | undefined;
35
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
36
+ newPassword: string;
37
+ token?: string | undefined;
38
+ } & {
39
+ fetchOptions?: FetchOptions | undefined;
40
+ }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
41
+ status: boolean;
42
+ }, {
43
+ code?: string | undefined;
44
+ message?: string | undefined;
45
+ }, FetchOptions["throw"] extends true ? true : false>>;
46
+ } & {
47
+ signOut: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
48
+ query?: Record<string, any> | undefined;
49
+ fetchOptions?: FetchOptions | undefined;
50
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
51
+ success: boolean;
52
+ }, {
53
+ code?: string | undefined;
54
+ message?: string | undefined;
55
+ }, FetchOptions["throw"] extends true ? true : false>>;
56
+ } & {
57
+ changeEmail: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
58
+ newEmail: string;
59
+ callbackURL?: string | undefined;
60
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
61
+ newEmail: string;
62
+ callbackURL?: string | undefined;
63
+ } & {
64
+ fetchOptions?: FetchOptions | undefined;
65
+ }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
66
+ status: boolean;
67
+ }, {
68
+ code?: string | undefined;
69
+ message?: string | undefined;
70
+ }, FetchOptions["throw"] extends true ? true : false>>;
71
+ } & {
72
+ changePassword: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
73
+ newPassword: string;
74
+ currentPassword: string;
75
+ revokeOtherSessions?: boolean | undefined;
76
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
77
+ newPassword: string;
78
+ currentPassword: string;
79
+ revokeOtherSessions?: boolean | undefined;
80
+ } & {
81
+ fetchOptions?: FetchOptions | undefined;
82
+ }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<Omit<{
83
+ token: string | null;
84
+ user: {
85
+ id: string;
86
+ createdAt: Date;
87
+ updatedAt: Date;
88
+ email: string;
89
+ emailVerified: boolean;
90
+ name: string;
91
+ image?: string | null | undefined;
92
+ } & Record<string, any> & {
93
+ id: string;
94
+ createdAt: Date;
95
+ updatedAt: Date;
96
+ email: string;
97
+ emailVerified: boolean;
98
+ name: string;
99
+ image?: string | null | undefined;
100
+ };
101
+ }, "user"> & {
102
+ user: import("better-auth").StripEmptyObjects<{
103
+ id: string;
104
+ createdAt: Date;
105
+ updatedAt: Date;
106
+ email: string;
107
+ emailVerified: boolean;
108
+ name: string;
109
+ image?: string | null | undefined;
110
+ } & {} & {
111
+ username?: string | null | undefined;
112
+ displayUsername?: string | null | undefined;
113
+ }>;
114
+ }, {
115
+ code?: string | undefined;
116
+ message?: string | undefined;
117
+ }, FetchOptions["throw"] extends true ? true : false>>;
118
+ } & {
119
+ revokeSession: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
120
+ token: string;
121
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
122
+ token: string;
123
+ } & {
124
+ fetchOptions?: FetchOptions | undefined;
125
+ }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
126
+ status: boolean;
127
+ }, {
128
+ code?: string | undefined;
129
+ message?: string | undefined;
130
+ }, FetchOptions["throw"] extends true ? true : false>>;
131
+ } & {
132
+ signIn: {
133
+ social: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
134
+ provider: "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat" | (string & {});
135
+ callbackURL?: string | undefined;
136
+ newUserCallbackURL?: string | undefined;
137
+ errorCallbackURL?: string | undefined;
138
+ disableRedirect?: boolean | undefined;
139
+ idToken?: {
140
+ token: string;
141
+ nonce?: string | undefined;
142
+ accessToken?: string | undefined;
143
+ refreshToken?: string | undefined;
144
+ expiresAt?: number | undefined;
145
+ user?: {
146
+ name?: {
147
+ firstName?: string | undefined;
148
+ lastName?: string | undefined;
149
+ } | undefined;
150
+ email?: string | undefined;
151
+ } | undefined;
152
+ } | undefined;
153
+ scopes?: string[] | undefined;
154
+ requestSignUp?: boolean | undefined;
155
+ loginHint?: string | undefined;
156
+ additionalData?: Record<string, any> | undefined;
157
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
158
+ provider: "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat" | (string & {});
159
+ callbackURL?: string | undefined;
160
+ newUserCallbackURL?: string | undefined;
161
+ errorCallbackURL?: string | undefined;
162
+ disableRedirect?: boolean | undefined;
163
+ idToken?: {
164
+ token: string;
165
+ nonce?: string | undefined;
166
+ accessToken?: string | undefined;
167
+ refreshToken?: string | undefined;
168
+ expiresAt?: number | undefined;
169
+ user?: {
170
+ name?: {
171
+ firstName?: string | undefined;
172
+ lastName?: string | undefined;
173
+ } | undefined;
174
+ email?: string | undefined;
175
+ } | undefined;
176
+ } | undefined;
177
+ scopes?: string[] | undefined;
178
+ requestSignUp?: boolean | undefined;
179
+ loginHint?: string | undefined;
180
+ additionalData?: Record<string, any> | undefined;
181
+ } & {
182
+ fetchOptions?: FetchOptions | undefined;
183
+ }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
184
+ redirect: boolean;
185
+ url: string;
186
+ } | (Omit<{
187
+ redirect: boolean;
188
+ token: string;
189
+ url: undefined;
190
+ user: {
191
+ id: string;
192
+ createdAt: Date;
193
+ updatedAt: Date;
194
+ email: string;
195
+ emailVerified: boolean;
196
+ name: string;
197
+ image?: string | null | undefined | undefined;
198
+ };
199
+ }, "user"> & {
200
+ user: import("better-auth").StripEmptyObjects<{
201
+ id: string;
202
+ createdAt: Date;
203
+ updatedAt: Date;
204
+ email: string;
205
+ emailVerified: boolean;
206
+ name: string;
207
+ image?: string | null | undefined;
208
+ } & {} & {
209
+ username?: string | null | undefined;
210
+ displayUsername?: string | null | undefined;
211
+ }>;
212
+ }), {
213
+ code?: string | undefined;
214
+ message?: string | undefined;
215
+ }, FetchOptions["throw"] extends true ? true : false>>;
216
+ };
217
+ } & {
218
+ signUp: {
219
+ email: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
220
+ name: string;
221
+ email: string;
222
+ password: string;
223
+ image?: string | undefined;
224
+ callbackURL?: string | undefined;
225
+ rememberMe?: boolean | undefined;
226
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<import("better-auth/client").InferSignUpEmailCtx<{
227
+ plugins: ({
228
+ id: "magic-link";
229
+ version: string;
230
+ $InferServerPlugin: ReturnType<(options: import("better-auth/plugins/magic-link").MagicLinkOptions) => {
231
+ id: "magic-link";
232
+ version: string;
233
+ endpoints: {
234
+ signInMagicLink: import("better-auth").StrictEndpoint<"/sign-in/magic-link", {
235
+ method: "POST";
236
+ requireHeaders: true;
237
+ body: import("zod").ZodObject<{
238
+ email: import("zod").ZodEmail;
239
+ name: import("zod").ZodOptional<import("zod").ZodString>;
240
+ callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
241
+ newUserCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
242
+ errorCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
243
+ metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
244
+ }, import("zod/v4/core").$strip>;
245
+ metadata: {
246
+ openapi: {
247
+ operationId: string;
248
+ description: string;
249
+ responses: {
250
+ 200: {
251
+ description: string;
252
+ content: {
253
+ "application/json": {
254
+ schema: {
255
+ type: "object";
256
+ properties: {
257
+ status: {
258
+ type: string;
259
+ };
260
+ };
261
+ };
262
+ };
263
+ };
264
+ };
265
+ };
266
+ };
267
+ };
268
+ }, {
269
+ status: boolean;
270
+ }>;
271
+ magicLinkVerify: import("better-auth").StrictEndpoint<"/magic-link/verify", {
272
+ method: "GET";
273
+ query: import("zod").ZodObject<{
274
+ token: import("zod").ZodString;
275
+ callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
276
+ errorCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
277
+ newUserCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
278
+ }, import("zod/v4/core").$strip>;
279
+ use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<void>)[];
280
+ requireHeaders: true;
281
+ metadata: {
282
+ openapi: {
283
+ operationId: string;
284
+ description: string;
285
+ responses: {
286
+ 200: {
287
+ description: string;
288
+ content: {
289
+ "application/json": {
290
+ schema: {
291
+ type: "object";
292
+ properties: {
293
+ session: {
294
+ $ref: string;
295
+ };
296
+ user: {
297
+ $ref: string;
298
+ };
299
+ };
300
+ };
301
+ };
302
+ };
303
+ };
304
+ };
305
+ };
306
+ };
307
+ }, {
308
+ token: string;
309
+ user: {
310
+ id: string;
311
+ createdAt: Date;
312
+ updatedAt: Date;
313
+ email: string;
314
+ emailVerified: boolean;
315
+ name: string;
316
+ image?: string | null | undefined;
317
+ };
318
+ session: {
319
+ id: string;
320
+ createdAt: Date;
321
+ updatedAt: Date;
322
+ userId: string;
323
+ expiresAt: Date;
324
+ token: string;
325
+ ipAddress?: string | null | undefined;
326
+ userAgent?: string | null | undefined;
327
+ };
328
+ }>;
329
+ };
330
+ rateLimit: {
331
+ pathMatcher(path: string): boolean;
332
+ window: number;
333
+ max: number;
334
+ }[];
335
+ options: import("better-auth/plugins/magic-link").MagicLinkOptions;
336
+ }>;
337
+ } | {
338
+ id: "multi-session";
339
+ version: string;
340
+ $InferServerPlugin: ReturnType<(options?: import("better-auth/plugins/multi-session").MultiSessionConfig | undefined) => {
341
+ id: "multi-session";
342
+ version: string;
343
+ endpoints: {
344
+ listDeviceSessions: import("better-auth").StrictEndpoint<"/multi-session/list-device-sessions", {
345
+ method: "GET";
346
+ requireHeaders: true;
347
+ }, {
348
+ session: {
349
+ id: string;
350
+ createdAt: Date;
351
+ updatedAt: Date;
352
+ userId: string;
353
+ expiresAt: Date;
354
+ token: string;
355
+ ipAddress?: string | null | undefined;
356
+ userAgent?: string | null | undefined;
357
+ };
358
+ user: {
359
+ id: string;
360
+ createdAt: Date;
361
+ updatedAt: Date;
362
+ email: string;
363
+ emailVerified: boolean;
364
+ name: string;
365
+ image?: string | null | undefined;
366
+ };
367
+ }[]>;
368
+ setActiveSession: import("better-auth").StrictEndpoint<"/multi-session/set-active", {
369
+ method: "POST";
370
+ body: import("zod").ZodObject<{
371
+ sessionToken: import("zod").ZodString;
372
+ }, import("zod/v4/core").$strip>;
373
+ requireHeaders: true;
374
+ metadata: {
375
+ openapi: {
376
+ description: string;
377
+ responses: {
378
+ 200: {
379
+ description: string;
380
+ content: {
381
+ "application/json": {
382
+ schema: {
383
+ type: "object";
384
+ properties: {
385
+ session: {
386
+ $ref: string;
387
+ };
388
+ };
389
+ };
390
+ };
391
+ };
392
+ };
393
+ };
394
+ };
395
+ };
396
+ }, {
397
+ session: {
398
+ id: string;
399
+ createdAt: Date;
400
+ updatedAt: Date;
401
+ userId: string;
402
+ expiresAt: Date;
403
+ token: string;
404
+ ipAddress?: string | null | undefined;
405
+ userAgent?: string | null | undefined;
406
+ } & Record<string, any>;
407
+ user: {
408
+ id: string;
409
+ createdAt: Date;
410
+ updatedAt: Date;
411
+ email: string;
412
+ emailVerified: boolean;
413
+ name: string;
414
+ image?: string | null | undefined;
415
+ } & Record<string, any>;
416
+ }>;
417
+ revokeDeviceSession: import("better-auth").StrictEndpoint<"/multi-session/revoke", {
418
+ method: "POST";
419
+ body: import("zod").ZodObject<{
420
+ sessionToken: import("zod").ZodString;
421
+ }, import("zod/v4/core").$strip>;
422
+ requireHeaders: true;
423
+ use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
424
+ session: {
425
+ session: Record<string, any> & {
426
+ id: string;
427
+ createdAt: Date;
428
+ updatedAt: Date;
429
+ userId: string;
430
+ expiresAt: Date;
431
+ token: string;
432
+ ipAddress?: string | null | undefined;
433
+ userAgent?: string | null | undefined;
434
+ };
435
+ user: Record<string, any> & {
436
+ id: string;
437
+ createdAt: Date;
438
+ updatedAt: Date;
439
+ email: string;
440
+ emailVerified: boolean;
441
+ name: string;
442
+ image?: string | null | undefined;
443
+ };
444
+ };
445
+ }>)[];
446
+ metadata: {
447
+ openapi: {
448
+ description: string;
449
+ responses: {
450
+ 200: {
451
+ description: string;
452
+ content: {
453
+ "application/json": {
454
+ schema: {
455
+ type: "object";
456
+ properties: {
457
+ status: {
458
+ type: string;
459
+ };
460
+ };
461
+ };
462
+ };
463
+ };
464
+ };
465
+ };
466
+ };
467
+ };
468
+ }, {
469
+ status: boolean;
470
+ }>;
471
+ };
472
+ hooks: {
473
+ after: {
474
+ matcher: (context: import("better-auth").HookEndpointContext) => boolean;
475
+ handler: (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<void>;
476
+ }[];
477
+ };
478
+ options: import("better-auth/plugins/multi-session").MultiSessionConfig | undefined;
479
+ $ERROR_CODES: {
480
+ INVALID_SESSION_TOKEN: import("better-auth").RawError<"INVALID_SESSION_TOKEN">;
481
+ };
482
+ }>;
483
+ atomListeners: {
484
+ matcher(path: string): path is "/multi-session/set-active";
485
+ signal: "$sessionSignal";
486
+ }[];
487
+ $ERROR_CODES: {
488
+ INVALID_SESSION_TOKEN: import("better-auth").RawError<"INVALID_SESSION_TOKEN">;
489
+ };
490
+ } | {
491
+ id: "username";
492
+ version: string;
493
+ $InferServerPlugin: ReturnType<(options?: import("better-auth/plugins/username").UsernameOptions | undefined) => {
494
+ id: "username";
495
+ version: string;
496
+ init(ctx: import("better-auth").AuthContext): {
497
+ options: {
498
+ databaseHooks: {
499
+ user: {
500
+ create: {
501
+ before(user: {
502
+ id: string;
503
+ createdAt: Date;
504
+ updatedAt: Date;
505
+ email: string;
506
+ emailVerified: boolean;
507
+ name: string;
508
+ image?: string | null | undefined;
509
+ } & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null): Promise<{
510
+ data: {
511
+ displayUsername?: string | undefined;
512
+ username?: string | undefined;
513
+ id: string;
514
+ createdAt: Date;
515
+ updatedAt: Date;
516
+ email: string;
517
+ emailVerified: boolean;
518
+ name: string;
519
+ image?: string | null | undefined;
520
+ };
521
+ }>;
522
+ };
523
+ update: {
524
+ before(user: Partial<{
525
+ id: string;
526
+ createdAt: Date;
527
+ updatedAt: Date;
528
+ email: string;
529
+ emailVerified: boolean;
530
+ name: string;
531
+ image?: string | null | undefined;
532
+ }> & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null): Promise<{
533
+ data: {
534
+ displayUsername?: string | undefined;
535
+ username?: string | undefined;
536
+ id?: string | undefined;
537
+ createdAt?: Date | undefined;
538
+ updatedAt?: Date | undefined;
539
+ email?: string | undefined;
540
+ emailVerified?: boolean | undefined;
541
+ name?: string | undefined;
542
+ image?: string | null | undefined;
543
+ };
544
+ }>;
545
+ };
546
+ };
547
+ };
548
+ };
549
+ };
550
+ endpoints: {
551
+ signInUsername: import("better-auth").StrictEndpoint<"/sign-in/username", {
552
+ method: "POST";
553
+ body: import("zod").ZodObject<{
554
+ username: import("zod").ZodString;
555
+ password: import("zod").ZodString;
556
+ rememberMe: import("zod").ZodOptional<import("zod").ZodBoolean>;
557
+ callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
558
+ }, import("zod/v4/core").$strip>;
559
+ metadata: {
560
+ openapi: {
561
+ summary: string;
562
+ description: string;
563
+ responses: {
564
+ 200: {
565
+ description: string;
566
+ content: {
567
+ "application/json": {
568
+ schema: {
569
+ type: "object";
570
+ properties: {
571
+ token: {
572
+ type: string;
573
+ description: string;
574
+ };
575
+ user: {
576
+ $ref: string;
577
+ };
578
+ };
579
+ required: string[];
580
+ };
581
+ };
582
+ };
583
+ };
584
+ 422: {
585
+ description: string;
586
+ content: {
587
+ "application/json": {
588
+ schema: {
589
+ type: "object";
590
+ properties: {
591
+ message: {
592
+ type: string;
593
+ };
594
+ };
595
+ };
596
+ };
597
+ };
598
+ };
599
+ };
600
+ };
601
+ };
602
+ }, {
603
+ token: string;
604
+ user: {
605
+ id: string;
606
+ createdAt: Date;
607
+ updatedAt: Date;
608
+ email: string;
609
+ emailVerified: boolean;
610
+ name: string;
611
+ image?: string | null | undefined;
612
+ } & {
613
+ username: string;
614
+ displayUsername: string;
615
+ };
616
+ }>;
617
+ isUsernameAvailable: import("better-auth").StrictEndpoint<"/is-username-available", {
618
+ method: "POST";
619
+ body: import("zod").ZodObject<{
620
+ username: import("zod").ZodString;
621
+ }, import("zod/v4/core").$strip>;
622
+ }, {
623
+ available: boolean;
624
+ }>;
625
+ };
626
+ schema: {
627
+ user: {
628
+ fields: {
629
+ username: {
630
+ type: "string";
631
+ required: false;
632
+ sortable: true;
633
+ unique: true;
634
+ returned: true;
635
+ transform: {
636
+ input(value: import("better-auth").DBPrimitive): string | number | boolean | Date | Record<string, unknown> | unknown[] | null | undefined;
637
+ };
638
+ };
639
+ displayUsername: {
640
+ type: "string";
641
+ required: false;
642
+ transform: {
643
+ input(value: import("better-auth").DBPrimitive): string | number | boolean | Date | Record<string, unknown> | unknown[] | null | undefined;
644
+ };
645
+ };
646
+ };
647
+ };
648
+ };
649
+ hooks: {
650
+ before: {
651
+ matcher(context: import("better-auth").HookEndpointContext): boolean;
652
+ handler: (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<void>;
653
+ }[];
654
+ };
655
+ options: import("better-auth/plugins/username").UsernameOptions | undefined;
656
+ $ERROR_CODES: {
657
+ EMAIL_NOT_VERIFIED: import("better-auth").RawError<"EMAIL_NOT_VERIFIED">;
658
+ UNEXPECTED_ERROR: import("better-auth").RawError<"UNEXPECTED_ERROR">;
659
+ INVALID_USERNAME_OR_PASSWORD: import("better-auth").RawError<"INVALID_USERNAME_OR_PASSWORD">;
660
+ USERNAME_IS_ALREADY_TAKEN: import("better-auth").RawError<"USERNAME_IS_ALREADY_TAKEN">;
661
+ USERNAME_TOO_SHORT: import("better-auth").RawError<"USERNAME_TOO_SHORT">;
662
+ USERNAME_TOO_LONG: import("better-auth").RawError<"USERNAME_TOO_LONG">;
663
+ INVALID_USERNAME: import("better-auth").RawError<"INVALID_USERNAME">;
664
+ INVALID_DISPLAY_USERNAME: import("better-auth").RawError<"INVALID_DISPLAY_USERNAME">;
665
+ };
666
+ }>;
667
+ atomListeners: {
668
+ matcher: (path: string) => path is "/sign-in/username";
669
+ signal: "$sessionSignal";
670
+ }[];
671
+ $ERROR_CODES: {
672
+ EMAIL_NOT_VERIFIED: import("better-auth").RawError<"EMAIL_NOT_VERIFIED">;
673
+ UNEXPECTED_ERROR: import("better-auth").RawError<"UNEXPECTED_ERROR">;
674
+ INVALID_USERNAME_OR_PASSWORD: import("better-auth").RawError<"INVALID_USERNAME_OR_PASSWORD">;
675
+ USERNAME_IS_ALREADY_TAKEN: import("better-auth").RawError<"USERNAME_IS_ALREADY_TAKEN">;
676
+ USERNAME_TOO_SHORT: import("better-auth").RawError<"USERNAME_TOO_SHORT">;
677
+ USERNAME_TOO_LONG: import("better-auth").RawError<"USERNAME_TOO_LONG">;
678
+ INVALID_USERNAME: import("better-auth").RawError<"INVALID_USERNAME">;
679
+ INVALID_DISPLAY_USERNAME: import("better-auth").RawError<"INVALID_DISPLAY_USERNAME">;
680
+ };
681
+ })[];
682
+ }, FetchOptions>>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<(Omit<{
683
+ token: null;
684
+ user: {
685
+ id: string;
686
+ createdAt: Date;
687
+ updatedAt: Date;
688
+ email: string;
689
+ emailVerified: boolean;
690
+ name: string;
691
+ image?: string | null | undefined | undefined;
692
+ };
693
+ }, "user"> & {
694
+ user: import("better-auth").StripEmptyObjects<{
695
+ id: string;
696
+ createdAt: Date;
697
+ updatedAt: Date;
698
+ email: string;
699
+ emailVerified: boolean;
700
+ name: string;
701
+ image?: string | null | undefined;
702
+ } & {} & {
703
+ username?: string | null | undefined;
704
+ displayUsername?: string | null | undefined;
705
+ }>;
706
+ }) | (Omit<{
707
+ token: string;
708
+ user: {
709
+ id: string;
710
+ createdAt: Date;
711
+ updatedAt: Date;
712
+ email: string;
713
+ emailVerified: boolean;
714
+ name: string;
715
+ image?: string | null | undefined | undefined;
716
+ };
717
+ }, "user"> & {
718
+ user: import("better-auth").StripEmptyObjects<{
719
+ id: string;
720
+ createdAt: Date;
721
+ updatedAt: Date;
722
+ email: string;
723
+ emailVerified: boolean;
724
+ name: string;
725
+ image?: string | null | undefined;
726
+ } & {} & {
727
+ username?: string | null | undefined;
728
+ displayUsername?: string | null | undefined;
729
+ }>;
730
+ }), {
731
+ code?: string | undefined;
732
+ message?: string | undefined;
733
+ }, FetchOptions["throw"] extends true ? true : false>>;
734
+ };
735
+ } & {
736
+ signIn: {
737
+ email: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
738
+ email: string;
739
+ password: string;
740
+ callbackURL?: string | undefined;
741
+ rememberMe?: boolean | undefined;
742
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
743
+ email: string;
744
+ password: string;
745
+ callbackURL?: string | undefined;
746
+ rememberMe?: boolean | undefined;
747
+ } & {
748
+ fetchOptions?: FetchOptions | undefined;
749
+ }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<Omit<{
750
+ redirect: boolean;
751
+ token: string;
752
+ url?: string | undefined;
753
+ user: {
754
+ id: string;
755
+ createdAt: Date;
756
+ updatedAt: Date;
757
+ email: string;
758
+ emailVerified: boolean;
759
+ name: string;
760
+ image?: string | null | undefined | undefined;
761
+ };
762
+ }, "user"> & {
763
+ user: import("better-auth").StripEmptyObjects<{
764
+ id: string;
765
+ createdAt: Date;
766
+ updatedAt: Date;
767
+ email: string;
768
+ emailVerified: boolean;
769
+ name: string;
770
+ image?: string | null | undefined;
771
+ } & {} & {
772
+ username?: string | null | undefined;
773
+ displayUsername?: string | null | undefined;
774
+ }>;
775
+ }, {
776
+ code?: string | undefined;
777
+ message?: string | undefined;
778
+ }, FetchOptions["throw"] extends true ? true : false>>;
779
+ };
780
+ } & {
781
+ verifyEmail: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<{
782
+ token: string;
783
+ callbackURL?: string | undefined;
784
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
785
+ query: {
786
+ token: string;
787
+ callbackURL?: string | undefined;
788
+ };
789
+ fetchOptions?: FetchOptions | undefined;
790
+ }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<NonNullable<void | {
791
+ status: boolean;
792
+ }>, {
793
+ code?: string | undefined;
794
+ message?: string | undefined;
795
+ }, FetchOptions["throw"] extends true ? true : false>>;
796
+ } & {
797
+ sendVerificationEmail: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
798
+ email: string;
799
+ callbackURL?: string | undefined;
800
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
801
+ email: string;
802
+ callbackURL?: string | undefined;
803
+ } & {
804
+ fetchOptions?: FetchOptions | undefined;
805
+ }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
806
+ status: boolean;
807
+ }, {
808
+ code?: string | undefined;
809
+ message?: string | undefined;
810
+ }, FetchOptions["throw"] extends true ? true : false>>;
811
+ } & {
812
+ updateSession: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<Partial<{}>> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<Partial<{}> & {
813
+ fetchOptions?: FetchOptions | undefined;
814
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
815
+ session: {
816
+ id: string;
817
+ createdAt: Date;
818
+ updatedAt: Date;
819
+ userId: string;
820
+ expiresAt: Date;
821
+ token: string;
822
+ ipAddress?: string | null | undefined;
823
+ userAgent?: string | null | undefined;
824
+ };
825
+ }, {
826
+ code?: string | undefined;
827
+ message?: string | undefined;
828
+ }, FetchOptions["throw"] extends true ? true : false>>;
829
+ } & {
830
+ updateUser: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<Partial<{}> & {
831
+ name?: string | undefined;
832
+ image?: string | undefined | null;
833
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<import("better-auth/client").InferUserUpdateCtx<{
834
+ plugins: ({
835
+ id: "magic-link";
836
+ version: string;
837
+ $InferServerPlugin: ReturnType<(options: import("better-auth/plugins/magic-link").MagicLinkOptions) => {
838
+ id: "magic-link";
839
+ version: string;
840
+ endpoints: {
841
+ signInMagicLink: import("better-auth").StrictEndpoint<"/sign-in/magic-link", {
842
+ method: "POST";
843
+ requireHeaders: true;
844
+ body: import("zod").ZodObject<{
845
+ email: import("zod").ZodEmail;
846
+ name: import("zod").ZodOptional<import("zod").ZodString>;
847
+ callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
848
+ newUserCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
849
+ errorCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
850
+ metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
851
+ }, import("zod/v4/core").$strip>;
852
+ metadata: {
853
+ openapi: {
854
+ operationId: string;
855
+ description: string;
856
+ responses: {
857
+ 200: {
858
+ description: string;
859
+ content: {
860
+ "application/json": {
861
+ schema: {
862
+ type: "object";
863
+ properties: {
864
+ status: {
865
+ type: string;
866
+ };
867
+ };
868
+ };
869
+ };
870
+ };
871
+ };
872
+ };
873
+ };
874
+ };
875
+ }, {
876
+ status: boolean;
877
+ }>;
878
+ magicLinkVerify: import("better-auth").StrictEndpoint<"/magic-link/verify", {
879
+ method: "GET";
880
+ query: import("zod").ZodObject<{
881
+ token: import("zod").ZodString;
882
+ callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
883
+ errorCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
884
+ newUserCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
885
+ }, import("zod/v4/core").$strip>;
886
+ use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<void>)[];
887
+ requireHeaders: true;
888
+ metadata: {
889
+ openapi: {
890
+ operationId: string;
891
+ description: string;
892
+ responses: {
893
+ 200: {
894
+ description: string;
895
+ content: {
896
+ "application/json": {
897
+ schema: {
898
+ type: "object";
899
+ properties: {
900
+ session: {
901
+ $ref: string;
902
+ };
903
+ user: {
904
+ $ref: string;
905
+ };
906
+ };
907
+ };
908
+ };
909
+ };
910
+ };
911
+ };
912
+ };
913
+ };
914
+ }, {
915
+ token: string;
916
+ user: {
917
+ id: string;
918
+ createdAt: Date;
919
+ updatedAt: Date;
920
+ email: string;
921
+ emailVerified: boolean;
922
+ name: string;
923
+ image?: string | null | undefined;
924
+ };
925
+ session: {
926
+ id: string;
927
+ createdAt: Date;
928
+ updatedAt: Date;
929
+ userId: string;
930
+ expiresAt: Date;
931
+ token: string;
932
+ ipAddress?: string | null | undefined;
933
+ userAgent?: string | null | undefined;
934
+ };
935
+ }>;
936
+ };
937
+ rateLimit: {
938
+ pathMatcher(path: string): boolean;
939
+ window: number;
940
+ max: number;
941
+ }[];
942
+ options: import("better-auth/plugins/magic-link").MagicLinkOptions;
943
+ }>;
944
+ } | {
945
+ id: "multi-session";
946
+ version: string;
947
+ $InferServerPlugin: ReturnType<(options?: import("better-auth/plugins/multi-session").MultiSessionConfig | undefined) => {
948
+ id: "multi-session";
949
+ version: string;
950
+ endpoints: {
951
+ listDeviceSessions: import("better-auth").StrictEndpoint<"/multi-session/list-device-sessions", {
952
+ method: "GET";
953
+ requireHeaders: true;
954
+ }, {
955
+ session: {
956
+ id: string;
957
+ createdAt: Date;
958
+ updatedAt: Date;
959
+ userId: string;
960
+ expiresAt: Date;
961
+ token: string;
962
+ ipAddress?: string | null | undefined;
963
+ userAgent?: string | null | undefined;
964
+ };
965
+ user: {
966
+ id: string;
967
+ createdAt: Date;
968
+ updatedAt: Date;
969
+ email: string;
970
+ emailVerified: boolean;
971
+ name: string;
972
+ image?: string | null | undefined;
973
+ };
974
+ }[]>;
975
+ setActiveSession: import("better-auth").StrictEndpoint<"/multi-session/set-active", {
976
+ method: "POST";
977
+ body: import("zod").ZodObject<{
978
+ sessionToken: import("zod").ZodString;
979
+ }, import("zod/v4/core").$strip>;
980
+ requireHeaders: true;
981
+ metadata: {
982
+ openapi: {
983
+ description: string;
984
+ responses: {
985
+ 200: {
986
+ description: string;
987
+ content: {
988
+ "application/json": {
989
+ schema: {
990
+ type: "object";
991
+ properties: {
992
+ session: {
993
+ $ref: string;
994
+ };
995
+ };
996
+ };
997
+ };
998
+ };
999
+ };
1000
+ };
1001
+ };
1002
+ };
1003
+ }, {
1004
+ session: {
1005
+ id: string;
1006
+ createdAt: Date;
1007
+ updatedAt: Date;
1008
+ userId: string;
1009
+ expiresAt: Date;
1010
+ token: string;
1011
+ ipAddress?: string | null | undefined;
1012
+ userAgent?: string | null | undefined;
1013
+ } & Record<string, any>;
1014
+ user: {
1015
+ id: string;
1016
+ createdAt: Date;
1017
+ updatedAt: Date;
1018
+ email: string;
1019
+ emailVerified: boolean;
1020
+ name: string;
1021
+ image?: string | null | undefined;
1022
+ } & Record<string, any>;
1023
+ }>;
1024
+ revokeDeviceSession: import("better-auth").StrictEndpoint<"/multi-session/revoke", {
1025
+ method: "POST";
1026
+ body: import("zod").ZodObject<{
1027
+ sessionToken: import("zod").ZodString;
1028
+ }, import("zod/v4/core").$strip>;
1029
+ requireHeaders: true;
1030
+ use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
1031
+ session: {
1032
+ session: Record<string, any> & {
1033
+ id: string;
1034
+ createdAt: Date;
1035
+ updatedAt: Date;
1036
+ userId: string;
1037
+ expiresAt: Date;
1038
+ token: string;
1039
+ ipAddress?: string | null | undefined;
1040
+ userAgent?: string | null | undefined;
1041
+ };
1042
+ user: Record<string, any> & {
1043
+ id: string;
1044
+ createdAt: Date;
1045
+ updatedAt: Date;
1046
+ email: string;
1047
+ emailVerified: boolean;
1048
+ name: string;
1049
+ image?: string | null | undefined;
1050
+ };
1051
+ };
1052
+ }>)[];
1053
+ metadata: {
1054
+ openapi: {
1055
+ description: string;
1056
+ responses: {
1057
+ 200: {
1058
+ description: string;
1059
+ content: {
1060
+ "application/json": {
1061
+ schema: {
1062
+ type: "object";
1063
+ properties: {
1064
+ status: {
1065
+ type: string;
1066
+ };
1067
+ };
1068
+ };
1069
+ };
1070
+ };
1071
+ };
1072
+ };
1073
+ };
1074
+ };
1075
+ }, {
1076
+ status: boolean;
1077
+ }>;
1078
+ };
1079
+ hooks: {
1080
+ after: {
1081
+ matcher: (context: import("better-auth").HookEndpointContext) => boolean;
1082
+ handler: (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<void>;
1083
+ }[];
1084
+ };
1085
+ options: import("better-auth/plugins/multi-session").MultiSessionConfig | undefined;
1086
+ $ERROR_CODES: {
1087
+ INVALID_SESSION_TOKEN: import("better-auth").RawError<"INVALID_SESSION_TOKEN">;
1088
+ };
1089
+ }>;
1090
+ atomListeners: {
1091
+ matcher(path: string): path is "/multi-session/set-active";
1092
+ signal: "$sessionSignal";
1093
+ }[];
1094
+ $ERROR_CODES: {
1095
+ INVALID_SESSION_TOKEN: import("better-auth").RawError<"INVALID_SESSION_TOKEN">;
1096
+ };
1097
+ } | {
1098
+ id: "username";
1099
+ version: string;
1100
+ $InferServerPlugin: ReturnType<(options?: import("better-auth/plugins/username").UsernameOptions | undefined) => {
1101
+ id: "username";
1102
+ version: string;
1103
+ init(ctx: import("better-auth").AuthContext): {
1104
+ options: {
1105
+ databaseHooks: {
1106
+ user: {
1107
+ create: {
1108
+ before(user: {
1109
+ id: string;
1110
+ createdAt: Date;
1111
+ updatedAt: Date;
1112
+ email: string;
1113
+ emailVerified: boolean;
1114
+ name: string;
1115
+ image?: string | null | undefined;
1116
+ } & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null): Promise<{
1117
+ data: {
1118
+ displayUsername?: string | undefined;
1119
+ username?: string | undefined;
1120
+ id: string;
1121
+ createdAt: Date;
1122
+ updatedAt: Date;
1123
+ email: string;
1124
+ emailVerified: boolean;
1125
+ name: string;
1126
+ image?: string | null | undefined;
1127
+ };
1128
+ }>;
1129
+ };
1130
+ update: {
1131
+ before(user: Partial<{
1132
+ id: string;
1133
+ createdAt: Date;
1134
+ updatedAt: Date;
1135
+ email: string;
1136
+ emailVerified: boolean;
1137
+ name: string;
1138
+ image?: string | null | undefined;
1139
+ }> & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null): Promise<{
1140
+ data: {
1141
+ displayUsername?: string | undefined;
1142
+ username?: string | undefined;
1143
+ id?: string | undefined;
1144
+ createdAt?: Date | undefined;
1145
+ updatedAt?: Date | undefined;
1146
+ email?: string | undefined;
1147
+ emailVerified?: boolean | undefined;
1148
+ name?: string | undefined;
1149
+ image?: string | null | undefined;
1150
+ };
1151
+ }>;
1152
+ };
1153
+ };
1154
+ };
1155
+ };
1156
+ };
1157
+ endpoints: {
1158
+ signInUsername: import("better-auth").StrictEndpoint<"/sign-in/username", {
1159
+ method: "POST";
1160
+ body: import("zod").ZodObject<{
1161
+ username: import("zod").ZodString;
1162
+ password: import("zod").ZodString;
1163
+ rememberMe: import("zod").ZodOptional<import("zod").ZodBoolean>;
1164
+ callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
1165
+ }, import("zod/v4/core").$strip>;
1166
+ metadata: {
1167
+ openapi: {
1168
+ summary: string;
1169
+ description: string;
1170
+ responses: {
1171
+ 200: {
1172
+ description: string;
1173
+ content: {
1174
+ "application/json": {
1175
+ schema: {
1176
+ type: "object";
1177
+ properties: {
1178
+ token: {
1179
+ type: string;
1180
+ description: string;
1181
+ };
1182
+ user: {
1183
+ $ref: string;
1184
+ };
1185
+ };
1186
+ required: string[];
1187
+ };
1188
+ };
1189
+ };
1190
+ };
1191
+ 422: {
1192
+ description: string;
1193
+ content: {
1194
+ "application/json": {
1195
+ schema: {
1196
+ type: "object";
1197
+ properties: {
1198
+ message: {
1199
+ type: string;
1200
+ };
1201
+ };
1202
+ };
1203
+ };
1204
+ };
1205
+ };
1206
+ };
1207
+ };
1208
+ };
1209
+ }, {
1210
+ token: string;
1211
+ user: {
1212
+ id: string;
1213
+ createdAt: Date;
1214
+ updatedAt: Date;
1215
+ email: string;
1216
+ emailVerified: boolean;
1217
+ name: string;
1218
+ image?: string | null | undefined;
1219
+ } & {
1220
+ username: string;
1221
+ displayUsername: string;
1222
+ };
1223
+ }>;
1224
+ isUsernameAvailable: import("better-auth").StrictEndpoint<"/is-username-available", {
1225
+ method: "POST";
1226
+ body: import("zod").ZodObject<{
1227
+ username: import("zod").ZodString;
1228
+ }, import("zod/v4/core").$strip>;
1229
+ }, {
1230
+ available: boolean;
1231
+ }>;
1232
+ };
1233
+ schema: {
1234
+ user: {
1235
+ fields: {
1236
+ username: {
1237
+ type: "string";
1238
+ required: false;
1239
+ sortable: true;
1240
+ unique: true;
1241
+ returned: true;
1242
+ transform: {
1243
+ input(value: import("better-auth").DBPrimitive): string | number | boolean | Date | Record<string, unknown> | unknown[] | null | undefined;
1244
+ };
1245
+ };
1246
+ displayUsername: {
1247
+ type: "string";
1248
+ required: false;
1249
+ transform: {
1250
+ input(value: import("better-auth").DBPrimitive): string | number | boolean | Date | Record<string, unknown> | unknown[] | null | undefined;
1251
+ };
1252
+ };
1253
+ };
1254
+ };
1255
+ };
1256
+ hooks: {
1257
+ before: {
1258
+ matcher(context: import("better-auth").HookEndpointContext): boolean;
1259
+ handler: (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<void>;
1260
+ }[];
1261
+ };
1262
+ options: import("better-auth/plugins/username").UsernameOptions | undefined;
1263
+ $ERROR_CODES: {
1264
+ EMAIL_NOT_VERIFIED: import("better-auth").RawError<"EMAIL_NOT_VERIFIED">;
1265
+ UNEXPECTED_ERROR: import("better-auth").RawError<"UNEXPECTED_ERROR">;
1266
+ INVALID_USERNAME_OR_PASSWORD: import("better-auth").RawError<"INVALID_USERNAME_OR_PASSWORD">;
1267
+ USERNAME_IS_ALREADY_TAKEN: import("better-auth").RawError<"USERNAME_IS_ALREADY_TAKEN">;
1268
+ USERNAME_TOO_SHORT: import("better-auth").RawError<"USERNAME_TOO_SHORT">;
1269
+ USERNAME_TOO_LONG: import("better-auth").RawError<"USERNAME_TOO_LONG">;
1270
+ INVALID_USERNAME: import("better-auth").RawError<"INVALID_USERNAME">;
1271
+ INVALID_DISPLAY_USERNAME: import("better-auth").RawError<"INVALID_DISPLAY_USERNAME">;
1272
+ };
1273
+ }>;
1274
+ atomListeners: {
1275
+ matcher: (path: string) => path is "/sign-in/username";
1276
+ signal: "$sessionSignal";
1277
+ }[];
1278
+ $ERROR_CODES: {
1279
+ EMAIL_NOT_VERIFIED: import("better-auth").RawError<"EMAIL_NOT_VERIFIED">;
1280
+ UNEXPECTED_ERROR: import("better-auth").RawError<"UNEXPECTED_ERROR">;
1281
+ INVALID_USERNAME_OR_PASSWORD: import("better-auth").RawError<"INVALID_USERNAME_OR_PASSWORD">;
1282
+ USERNAME_IS_ALREADY_TAKEN: import("better-auth").RawError<"USERNAME_IS_ALREADY_TAKEN">;
1283
+ USERNAME_TOO_SHORT: import("better-auth").RawError<"USERNAME_TOO_SHORT">;
1284
+ USERNAME_TOO_LONG: import("better-auth").RawError<"USERNAME_TOO_LONG">;
1285
+ INVALID_USERNAME: import("better-auth").RawError<"INVALID_USERNAME">;
1286
+ INVALID_DISPLAY_USERNAME: import("better-auth").RawError<"INVALID_DISPLAY_USERNAME">;
1287
+ };
1288
+ })[];
1289
+ }, FetchOptions>> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
1290
+ status: boolean;
1291
+ }, {
1292
+ code?: string | undefined;
1293
+ message?: string | undefined;
1294
+ }, FetchOptions["throw"] extends true ? true : false>>;
1295
+ } & {
1296
+ requestPasswordReset: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
1297
+ email: string;
1298
+ redirectTo?: string | undefined;
1299
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
1300
+ email: string;
1301
+ redirectTo?: string | undefined;
1302
+ } & {
1303
+ fetchOptions?: FetchOptions | undefined;
1304
+ }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
1305
+ status: boolean;
1306
+ message: string;
1307
+ }, {
1308
+ code?: string | undefined;
1309
+ message?: string | undefined;
1310
+ }, FetchOptions["throw"] extends true ? true : false>>;
1311
+ } & {
1312
+ resetPassword: {
1313
+ ":token": <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<{
1314
+ callbackURL: string;
1315
+ }> & Record<string, any>, {
1316
+ token: string;
1317
+ }>>(data_0: import("better-auth").Prettify<{
1318
+ query: {
1319
+ callbackURL: string;
1320
+ };
1321
+ fetchOptions?: FetchOptions | undefined;
1322
+ }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<never, {
1323
+ code?: string | undefined;
1324
+ message?: string | undefined;
1325
+ }, FetchOptions["throw"] extends true ? true : false>>;
1326
+ };
1327
+ } & {
1328
+ listSessions: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
1329
+ query?: Record<string, any> | undefined;
1330
+ fetchOptions?: FetchOptions | undefined;
1331
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<import("better-auth").Prettify<{
1332
+ id: string;
1333
+ createdAt: Date;
1334
+ updatedAt: Date;
1335
+ userId: string;
1336
+ expiresAt: Date;
1337
+ token: string;
1338
+ ipAddress?: string | null | undefined | undefined;
1339
+ userAgent?: string | null | undefined | undefined;
1340
+ }>[], {
1341
+ code?: string | undefined;
1342
+ message?: string | undefined;
1343
+ }, FetchOptions["throw"] extends true ? true : false>>;
1344
+ } & {
1345
+ revokeSessions: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
1346
+ query?: Record<string, any> | undefined;
1347
+ fetchOptions?: FetchOptions | undefined;
1348
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
1349
+ status: boolean;
1350
+ }, {
1351
+ code?: string | undefined;
1352
+ message?: string | undefined;
1353
+ }, FetchOptions["throw"] extends true ? true : false>>;
1354
+ } & {
1355
+ revokeOtherSessions: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
1356
+ query?: Record<string, any> | undefined;
1357
+ fetchOptions?: FetchOptions | undefined;
1358
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
1359
+ status: boolean;
1360
+ }, {
1361
+ code?: string | undefined;
1362
+ message?: string | undefined;
1363
+ }, FetchOptions["throw"] extends true ? true : false>>;
1364
+ } & {
1365
+ linkSocial: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
1366
+ provider: unknown;
1367
+ callbackURL?: string | undefined;
1368
+ idToken?: {
1369
+ token: string;
1370
+ nonce?: string | undefined;
1371
+ accessToken?: string | undefined;
1372
+ refreshToken?: string | undefined;
1373
+ scopes?: string[] | undefined;
1374
+ } | undefined;
1375
+ requestSignUp?: boolean | undefined;
1376
+ scopes?: string[] | undefined;
1377
+ errorCallbackURL?: string | undefined;
1378
+ disableRedirect?: boolean | undefined;
1379
+ additionalData?: Record<string, any> | undefined;
1380
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
1381
+ provider: unknown;
1382
+ callbackURL?: string | undefined;
1383
+ idToken?: {
1384
+ token: string;
1385
+ nonce?: string | undefined;
1386
+ accessToken?: string | undefined;
1387
+ refreshToken?: string | undefined;
1388
+ scopes?: string[] | undefined;
1389
+ } | undefined;
1390
+ requestSignUp?: boolean | undefined;
1391
+ scopes?: string[] | undefined;
1392
+ errorCallbackURL?: string | undefined;
1393
+ disableRedirect?: boolean | undefined;
1394
+ additionalData?: Record<string, any> | undefined;
1395
+ } & {
1396
+ fetchOptions?: FetchOptions | undefined;
1397
+ }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
1398
+ url: string;
1399
+ redirect: boolean;
1400
+ }, {
1401
+ code?: string | undefined;
1402
+ message?: string | undefined;
1403
+ }, FetchOptions["throw"] extends true ? true : false>>;
1404
+ } & {
1405
+ listAccounts: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
1406
+ query?: Record<string, any> | undefined;
1407
+ fetchOptions?: FetchOptions | undefined;
1408
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
1409
+ scopes: string[];
1410
+ id: string;
1411
+ createdAt: Date;
1412
+ updatedAt: Date;
1413
+ userId: string;
1414
+ providerId: string;
1415
+ accountId: string;
1416
+ }[], {
1417
+ code?: string | undefined;
1418
+ message?: string | undefined;
1419
+ }, FetchOptions["throw"] extends true ? true : false>>;
1420
+ } & {
1421
+ deleteUser: {
1422
+ callback: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<{
1423
+ token: string;
1424
+ callbackURL?: string | undefined;
1425
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
1426
+ query: {
1427
+ token: string;
1428
+ callbackURL?: string | undefined;
1429
+ };
1430
+ fetchOptions?: FetchOptions | undefined;
1431
+ }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
1432
+ success: boolean;
1433
+ message: string;
1434
+ }, {
1435
+ code?: string | undefined;
1436
+ message?: string | undefined;
1437
+ }, FetchOptions["throw"] extends true ? true : false>>;
1438
+ };
1439
+ } & {
1440
+ unlinkAccount: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
1441
+ providerId: string;
1442
+ accountId?: string | undefined;
1443
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
1444
+ providerId: string;
1445
+ accountId?: string | undefined;
1446
+ } & {
1447
+ fetchOptions?: FetchOptions | undefined;
1448
+ }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
1449
+ status: boolean;
1450
+ }, {
1451
+ code?: string | undefined;
1452
+ message?: string | undefined;
1453
+ }, FetchOptions["throw"] extends true ? true : false>>;
1454
+ } & {
1455
+ refreshToken: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
1456
+ providerId: string;
1457
+ accountId?: string | undefined;
1458
+ userId?: string | undefined;
1459
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
1460
+ providerId: string;
1461
+ accountId?: string | undefined;
1462
+ userId?: string | undefined;
1463
+ } & {
1464
+ fetchOptions?: FetchOptions | undefined;
1465
+ }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
1466
+ accessToken: string | undefined;
1467
+ refreshToken: string;
1468
+ accessTokenExpiresAt: Date | undefined;
1469
+ refreshTokenExpiresAt: Date | null | undefined;
1470
+ scope: string | null | undefined;
1471
+ idToken: string | null | undefined;
1472
+ providerId: string;
1473
+ accountId: string;
1474
+ }, {
1475
+ code?: string | undefined;
1476
+ message?: string | undefined;
1477
+ }, FetchOptions["throw"] extends true ? true : false>>;
1478
+ } & {
1479
+ getAccessToken: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
1480
+ providerId: string;
1481
+ accountId?: string | undefined;
1482
+ userId?: string | undefined;
1483
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
1484
+ providerId: string;
1485
+ accountId?: string | undefined;
1486
+ userId?: string | undefined;
1487
+ } & {
1488
+ fetchOptions?: FetchOptions | undefined;
1489
+ }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
1490
+ accessToken: string;
1491
+ accessTokenExpiresAt: Date | undefined;
1492
+ scopes: string[];
1493
+ idToken: string | undefined;
1494
+ }, {
1495
+ code?: string | undefined;
1496
+ message?: string | undefined;
1497
+ }, FetchOptions["throw"] extends true ? true : false>>;
1498
+ } & {
1499
+ accountInfo: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<{
1500
+ accountId?: string | undefined;
1501
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
1502
+ query?: {
1503
+ accountId?: string | undefined;
1504
+ } | undefined;
1505
+ fetchOptions?: FetchOptions | undefined;
1506
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
1507
+ user: import("better-auth").OAuth2UserInfo;
1508
+ data: Record<string, any>;
1509
+ }, {
1510
+ code?: string | undefined;
1511
+ message?: string | undefined;
1512
+ }, FetchOptions["throw"] extends true ? true : false>>;
1513
+ } & {
1514
+ getSession: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<{
1515
+ disableCookieCache?: unknown;
1516
+ disableRefresh?: unknown;
1517
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
1518
+ query?: {
1519
+ disableCookieCache?: unknown;
1520
+ disableRefresh?: unknown;
1521
+ } | undefined;
1522
+ fetchOptions?: FetchOptions | undefined;
1523
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
1524
+ user: import("better-auth").StripEmptyObjects<{
1525
+ id: string;
1526
+ createdAt: Date;
1527
+ updatedAt: Date;
1528
+ email: string;
1529
+ emailVerified: boolean;
1530
+ name: string;
1531
+ image?: string | null | undefined;
1532
+ } & {} & {
1533
+ username?: string | null | undefined;
1534
+ displayUsername?: string | null | undefined;
1535
+ }>;
1536
+ session: import("better-auth").StripEmptyObjects<{
1537
+ id: string;
1538
+ createdAt: Date;
1539
+ updatedAt: Date;
1540
+ userId: string;
1541
+ expiresAt: Date;
1542
+ token: string;
1543
+ ipAddress?: string | null | undefined;
1544
+ userAgent?: string | null | undefined;
1545
+ }>;
1546
+ } | null, {
1547
+ code?: string | undefined;
1548
+ message?: string | undefined;
1549
+ }, FetchOptions["throw"] extends true ? true : false>>;
1550
+ } & {
1551
+ signIn: {
1552
+ magicLink: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
1553
+ email: string;
1554
+ name?: string | undefined;
1555
+ callbackURL?: string | undefined;
1556
+ newUserCallbackURL?: string | undefined;
1557
+ errorCallbackURL?: string | undefined;
1558
+ metadata?: Record<string, any> | undefined;
1559
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
1560
+ email: string;
1561
+ name?: string | undefined;
1562
+ callbackURL?: string | undefined;
1563
+ newUserCallbackURL?: string | undefined;
1564
+ errorCallbackURL?: string | undefined;
1565
+ metadata?: Record<string, any> | undefined;
1566
+ } & {
1567
+ fetchOptions?: FetchOptions | undefined;
1568
+ }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
1569
+ status: boolean;
1570
+ }, {
1571
+ code?: string | undefined;
1572
+ message?: string | undefined;
1573
+ }, FetchOptions["throw"] extends true ? true : false>>;
1574
+ };
1575
+ } & {
1576
+ magicLink: {
1577
+ verify: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<{
1578
+ token: string;
1579
+ callbackURL?: string | undefined;
1580
+ errorCallbackURL?: string | undefined;
1581
+ newUserCallbackURL?: string | undefined;
1582
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
1583
+ query: {
1584
+ token: string;
1585
+ callbackURL?: string | undefined;
1586
+ errorCallbackURL?: string | undefined;
1587
+ newUserCallbackURL?: string | undefined;
1588
+ };
1589
+ fetchOptions?: FetchOptions | undefined;
1590
+ }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<Omit<Omit<{
1591
+ token: string;
1592
+ user: {
1593
+ id: string;
1594
+ createdAt: Date;
1595
+ updatedAt: Date;
1596
+ email: string;
1597
+ emailVerified: boolean;
1598
+ name: string;
1599
+ image?: string | null | undefined;
1600
+ };
1601
+ session: {
1602
+ id: string;
1603
+ createdAt: Date;
1604
+ updatedAt: Date;
1605
+ userId: string;
1606
+ expiresAt: Date;
1607
+ token: string;
1608
+ ipAddress?: string | null | undefined;
1609
+ userAgent?: string | null | undefined;
1610
+ };
1611
+ }, "user"> & {
1612
+ user: import("better-auth").StripEmptyObjects<{
1613
+ id: string;
1614
+ createdAt: Date;
1615
+ updatedAt: Date;
1616
+ email: string;
1617
+ emailVerified: boolean;
1618
+ name: string;
1619
+ image?: string | null | undefined;
1620
+ } & {} & {
1621
+ username?: string | null | undefined;
1622
+ displayUsername?: string | null | undefined;
1623
+ }>;
1624
+ }, "session"> & {
1625
+ session: import("better-auth").StripEmptyObjects<{
1626
+ id: string;
1627
+ createdAt: Date;
1628
+ updatedAt: Date;
1629
+ userId: string;
1630
+ expiresAt: Date;
1631
+ token: string;
1632
+ ipAddress?: string | null | undefined;
1633
+ userAgent?: string | null | undefined;
1634
+ }>;
1635
+ }, {
1636
+ code?: string | undefined;
1637
+ message?: string | undefined;
1638
+ }, FetchOptions["throw"] extends true ? true : false>>;
1639
+ };
1640
+ } & {
1641
+ multiSession: {
1642
+ listDeviceSessions: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
1643
+ query?: Record<string, any> | undefined;
1644
+ fetchOptions?: FetchOptions | undefined;
1645
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
1646
+ session: {
1647
+ id: string;
1648
+ createdAt: Date;
1649
+ updatedAt: Date;
1650
+ userId: string;
1651
+ expiresAt: Date;
1652
+ token: string;
1653
+ ipAddress?: string | null | undefined;
1654
+ userAgent?: string | null | undefined;
1655
+ };
1656
+ user: {
1657
+ id: string;
1658
+ createdAt: Date;
1659
+ updatedAt: Date;
1660
+ email: string;
1661
+ emailVerified: boolean;
1662
+ name: string;
1663
+ image?: string | null | undefined;
1664
+ };
1665
+ }[], {
1666
+ code?: string | undefined;
1667
+ message?: string | undefined;
1668
+ }, FetchOptions["throw"] extends true ? true : false>>;
1669
+ };
1670
+ } & {
1671
+ multiSession: {
1672
+ setActive: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
1673
+ sessionToken: string;
1674
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
1675
+ sessionToken: string;
1676
+ } & {
1677
+ fetchOptions?: FetchOptions | undefined;
1678
+ }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
1679
+ session: {
1680
+ id: string;
1681
+ createdAt: Date;
1682
+ updatedAt: Date;
1683
+ userId: string;
1684
+ expiresAt: Date;
1685
+ token: string;
1686
+ ipAddress?: string | null | undefined;
1687
+ userAgent?: string | null | undefined;
1688
+ } & Record<string, any>;
1689
+ user: {
1690
+ id: string;
1691
+ createdAt: Date;
1692
+ updatedAt: Date;
1693
+ email: string;
1694
+ emailVerified: boolean;
1695
+ name: string;
1696
+ image?: string | null | undefined;
1697
+ } & Record<string, any>;
1698
+ }, {
1699
+ code?: string | undefined;
1700
+ message?: string | undefined;
1701
+ }, FetchOptions["throw"] extends true ? true : false>>;
1702
+ };
1703
+ } & {
1704
+ multiSession: {
1705
+ revoke: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
1706
+ sessionToken: string;
1707
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
1708
+ sessionToken: string;
1709
+ } & {
1710
+ fetchOptions?: FetchOptions | undefined;
1711
+ }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
1712
+ status: boolean;
1713
+ }, {
1714
+ code?: string | undefined;
1715
+ message?: string | undefined;
1716
+ }, FetchOptions["throw"] extends true ? true : false>>;
1717
+ };
1718
+ } & {
1719
+ signIn: {
1720
+ username: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
1721
+ username: string;
1722
+ password: string;
1723
+ rememberMe?: boolean | undefined;
1724
+ callbackURL?: string | undefined;
1725
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
1726
+ username: string;
1727
+ password: string;
1728
+ rememberMe?: boolean | undefined;
1729
+ callbackURL?: string | undefined;
1730
+ } & {
1731
+ fetchOptions?: FetchOptions | undefined;
1732
+ }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<Omit<{
1733
+ token: string;
1734
+ user: {
1735
+ id: string;
1736
+ createdAt: Date;
1737
+ updatedAt: Date;
1738
+ email: string;
1739
+ emailVerified: boolean;
1740
+ name: string;
1741
+ image?: string | null | undefined;
1742
+ } & {
1743
+ username: string;
1744
+ displayUsername: string;
1745
+ };
1746
+ }, "user"> & {
1747
+ user: import("better-auth").StripEmptyObjects<{
1748
+ id: string;
1749
+ createdAt: Date;
1750
+ updatedAt: Date;
1751
+ email: string;
1752
+ emailVerified: boolean;
1753
+ name: string;
1754
+ image?: string | null | undefined;
1755
+ } & {} & {
1756
+ username?: string | null | undefined;
1757
+ displayUsername?: string | null | undefined;
1758
+ }>;
1759
+ }, {
1760
+ code?: string | undefined;
1761
+ message?: string | undefined;
1762
+ }, FetchOptions["throw"] extends true ? true : false>>;
1763
+ };
1764
+ } & {
1765
+ isUsernameAvailable: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
1766
+ username: string;
1767
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
1768
+ username: string;
1769
+ } & {
1770
+ fetchOptions?: FetchOptions | undefined;
1771
+ }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
1772
+ available: boolean;
1773
+ }, {
1774
+ code?: string | undefined;
1775
+ message?: string | undefined;
1776
+ }, FetchOptions["throw"] extends true ? true : false>>;
1777
+ } & {
1778
+ useSession: () => {
1779
+ data: {
1780
+ user: import("better-auth").StripEmptyObjects<{
1781
+ id: string;
1782
+ createdAt: Date;
1783
+ updatedAt: Date;
1784
+ email: string;
1785
+ emailVerified: boolean;
1786
+ name: string;
1787
+ image?: string | null | undefined;
1788
+ } & {} & {
1789
+ username?: string | null | undefined;
1790
+ displayUsername?: string | null | undefined;
1791
+ }>;
1792
+ session: import("better-auth").StripEmptyObjects<{
1793
+ id: string;
1794
+ createdAt: Date;
1795
+ updatedAt: Date;
1796
+ userId: string;
1797
+ expiresAt: Date;
1798
+ token: string;
1799
+ ipAddress?: string | null | undefined;
1800
+ userAgent?: string | null | undefined;
1801
+ }>;
1802
+ } | null;
1803
+ isPending: boolean;
1804
+ isRefetching: boolean;
1805
+ error: import("better-auth/react").BetterFetchError | null;
1806
+ refetch: (queryParams?: {
1807
+ query?: import("better-auth").SessionQueryParams;
1808
+ } | undefined) => Promise<void>;
1809
+ };
1810
+ $Infer: {
1811
+ Session: {
1812
+ user: import("better-auth").StripEmptyObjects<{
1813
+ id: string;
1814
+ createdAt: Date;
1815
+ updatedAt: Date;
1816
+ email: string;
1817
+ emailVerified: boolean;
1818
+ name: string;
1819
+ image?: string | null | undefined;
1820
+ } & {} & {
1821
+ username?: string | null | undefined;
1822
+ displayUsername?: string | null | undefined;
1823
+ }>;
1824
+ session: import("better-auth").StripEmptyObjects<{
1825
+ id: string;
1826
+ createdAt: Date;
1827
+ updatedAt: Date;
1828
+ userId: string;
1829
+ expiresAt: Date;
1830
+ token: string;
1831
+ ipAddress?: string | null | undefined;
1832
+ userAgent?: string | null | undefined;
1833
+ }>;
1834
+ };
1835
+ };
1836
+ $fetch: import("better-auth/react").BetterFetch<{
1837
+ plugins: (import("better-auth/react").BetterFetchPlugin<Record<string, any>> | {
1838
+ id: string;
1839
+ name: string;
1840
+ hooks: {
1841
+ onSuccess(context: import("better-auth/react").SuccessContext<any>): void;
1842
+ };
1843
+ } | {
1844
+ id: string;
1845
+ name: string;
1846
+ hooks: {
1847
+ onSuccess: ((context: import("better-auth/react").SuccessContext<any>) => Promise<void> | void) | undefined;
1848
+ onError: ((context: import("better-auth/react").ErrorContext) => Promise<void> | void) | undefined;
1849
+ onRequest: (<T extends Record<string, any>>(context: import("better-auth/react").RequestContext<T>) => Promise<import("better-auth/react").RequestContext | void> | import("better-auth/react").RequestContext | void) | undefined;
1850
+ onResponse: ((context: import("better-auth/react").ResponseContext) => Promise<Response | void | import("better-auth/react").ResponseContext> | Response | import("better-auth/react").ResponseContext | void) | undefined;
1851
+ };
1852
+ })[];
1853
+ priority?: RequestPriority | undefined;
1854
+ cache?: RequestCache | undefined;
1855
+ credentials?: RequestCredentials;
1856
+ headers?: (HeadersInit & (HeadersInit | {
1857
+ accept: "application/json" | "text/plain" | "application/octet-stream";
1858
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
1859
+ authorization: "Bearer" | "Basic";
1860
+ })) | undefined;
1861
+ integrity?: string | undefined;
1862
+ keepalive?: boolean | undefined;
1863
+ method: string;
1864
+ mode?: RequestMode | undefined;
1865
+ redirect?: RequestRedirect | undefined;
1866
+ referrer?: string | undefined;
1867
+ referrerPolicy?: ReferrerPolicy | undefined;
1868
+ signal?: (AbortSignal | null) | undefined;
1869
+ window?: null | undefined;
1870
+ onRetry?: ((response: import("better-auth/react").ResponseContext) => Promise<void> | void) | undefined;
1871
+ hookOptions?: {
1872
+ cloneResponse?: boolean;
1873
+ } | undefined;
1874
+ timeout?: number | undefined;
1875
+ customFetchImpl: import("better-auth/react").FetchEsque;
1876
+ baseURL: string;
1877
+ throw?: boolean | undefined;
1878
+ auth?: ({
1879
+ type: "Bearer";
1880
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1881
+ } | {
1882
+ type: "Basic";
1883
+ username: string | (() => string | undefined) | undefined;
1884
+ password: string | (() => string | undefined) | undefined;
1885
+ } | {
1886
+ type: "Custom";
1887
+ prefix: string | (() => string | undefined) | undefined;
1888
+ value: string | (() => string | undefined) | undefined;
1889
+ }) | undefined;
1890
+ body?: any;
1891
+ query?: any;
1892
+ params?: any;
1893
+ duplex?: "full" | "half" | undefined;
1894
+ jsonParser: (text: string) => Promise<any> | any;
1895
+ retry?: import("better-auth/react").RetryOptions | undefined;
1896
+ retryAttempt?: number | undefined;
1897
+ output?: (import("better-auth/react").StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1898
+ errorSchema?: import("better-auth/react").StandardSchemaV1 | undefined;
1899
+ disableValidation?: boolean | undefined;
1900
+ disableSignal?: boolean | undefined;
1901
+ }, unknown, unknown, {}>;
1902
+ $store: {
1903
+ notify: (signal?: (Omit<string, "$sessionSignal"> | "$sessionSignal") | undefined) => void;
1904
+ listen: (signal: Omit<string, "$sessionSignal"> | "$sessionSignal", listener: (value: boolean, oldValue?: boolean | undefined) => void) => void;
1905
+ atoms: Record<string, import("better-auth/react").WritableAtom<any>>;
1906
+ };
1907
+ $ERROR_CODES: {
1908
+ INVALID_SESSION_TOKEN: import("better-auth").RawError<"INVALID_SESSION_TOKEN">;
1909
+ } & {
1910
+ EMAIL_NOT_VERIFIED: import("better-auth").RawError<"EMAIL_NOT_VERIFIED">;
1911
+ UNEXPECTED_ERROR: import("better-auth").RawError<"UNEXPECTED_ERROR">;
1912
+ INVALID_USERNAME_OR_PASSWORD: import("better-auth").RawError<"INVALID_USERNAME_OR_PASSWORD">;
1913
+ USERNAME_IS_ALREADY_TAKEN: import("better-auth").RawError<"USERNAME_IS_ALREADY_TAKEN">;
1914
+ USERNAME_TOO_SHORT: import("better-auth").RawError<"USERNAME_TOO_SHORT">;
1915
+ USERNAME_TOO_LONG: import("better-auth").RawError<"USERNAME_TOO_LONG">;
1916
+ INVALID_USERNAME: import("better-auth").RawError<"INVALID_USERNAME">;
1917
+ INVALID_DISPLAY_USERNAME: import("better-auth").RawError<"INVALID_DISPLAY_USERNAME">;
1918
+ } & {
1919
+ USER_NOT_FOUND: import("better-auth").RawError<"USER_NOT_FOUND">;
1920
+ FAILED_TO_CREATE_USER: import("better-auth").RawError<"FAILED_TO_CREATE_USER">;
1921
+ FAILED_TO_CREATE_SESSION: import("better-auth").RawError<"FAILED_TO_CREATE_SESSION">;
1922
+ FAILED_TO_UPDATE_USER: import("better-auth").RawError<"FAILED_TO_UPDATE_USER">;
1923
+ FAILED_TO_GET_SESSION: import("better-auth").RawError<"FAILED_TO_GET_SESSION">;
1924
+ INVALID_PASSWORD: import("better-auth").RawError<"INVALID_PASSWORD">;
1925
+ INVALID_EMAIL: import("better-auth").RawError<"INVALID_EMAIL">;
1926
+ INVALID_EMAIL_OR_PASSWORD: import("better-auth").RawError<"INVALID_EMAIL_OR_PASSWORD">;
1927
+ INVALID_USER: import("better-auth").RawError<"INVALID_USER">;
1928
+ SOCIAL_ACCOUNT_ALREADY_LINKED: import("better-auth").RawError<"SOCIAL_ACCOUNT_ALREADY_LINKED">;
1929
+ PROVIDER_NOT_FOUND: import("better-auth").RawError<"PROVIDER_NOT_FOUND">;
1930
+ INVALID_TOKEN: import("better-auth").RawError<"INVALID_TOKEN">;
1931
+ TOKEN_EXPIRED: import("better-auth").RawError<"TOKEN_EXPIRED">;
1932
+ ID_TOKEN_NOT_SUPPORTED: import("better-auth").RawError<"ID_TOKEN_NOT_SUPPORTED">;
1933
+ FAILED_TO_GET_USER_INFO: import("better-auth").RawError<"FAILED_TO_GET_USER_INFO">;
1934
+ USER_EMAIL_NOT_FOUND: import("better-auth").RawError<"USER_EMAIL_NOT_FOUND">;
1935
+ EMAIL_NOT_VERIFIED: import("better-auth").RawError<"EMAIL_NOT_VERIFIED">;
1936
+ PASSWORD_TOO_SHORT: import("better-auth").RawError<"PASSWORD_TOO_SHORT">;
1937
+ PASSWORD_TOO_LONG: import("better-auth").RawError<"PASSWORD_TOO_LONG">;
1938
+ USER_ALREADY_EXISTS: import("better-auth").RawError<"USER_ALREADY_EXISTS">;
1939
+ USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL: import("better-auth").RawError<"USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL">;
1940
+ EMAIL_CAN_NOT_BE_UPDATED: import("better-auth").RawError<"EMAIL_CAN_NOT_BE_UPDATED">;
1941
+ CREDENTIAL_ACCOUNT_NOT_FOUND: import("better-auth").RawError<"CREDENTIAL_ACCOUNT_NOT_FOUND">;
1942
+ ACCOUNT_NOT_FOUND: import("better-auth").RawError<"ACCOUNT_NOT_FOUND">;
1943
+ SESSION_EXPIRED: import("better-auth").RawError<"SESSION_EXPIRED">;
1944
+ FAILED_TO_UNLINK_LAST_ACCOUNT: import("better-auth").RawError<"FAILED_TO_UNLINK_LAST_ACCOUNT">;
1945
+ USER_ALREADY_HAS_PASSWORD: import("better-auth").RawError<"USER_ALREADY_HAS_PASSWORD">;
1946
+ CROSS_SITE_NAVIGATION_LOGIN_BLOCKED: import("better-auth").RawError<"CROSS_SITE_NAVIGATION_LOGIN_BLOCKED">;
1947
+ VERIFICATION_EMAIL_NOT_ENABLED: import("better-auth").RawError<"VERIFICATION_EMAIL_NOT_ENABLED">;
1948
+ EMAIL_ALREADY_VERIFIED: import("better-auth").RawError<"EMAIL_ALREADY_VERIFIED">;
1949
+ EMAIL_MISMATCH: import("better-auth").RawError<"EMAIL_MISMATCH">;
1950
+ SESSION_NOT_FRESH: import("better-auth").RawError<"SESSION_NOT_FRESH">;
1951
+ LINKED_ACCOUNT_ALREADY_EXISTS: import("better-auth").RawError<"LINKED_ACCOUNT_ALREADY_EXISTS">;
1952
+ INVALID_ORIGIN: import("better-auth").RawError<"INVALID_ORIGIN">;
1953
+ INVALID_CALLBACK_URL: import("better-auth").RawError<"INVALID_CALLBACK_URL">;
1954
+ INVALID_REDIRECT_URL: import("better-auth").RawError<"INVALID_REDIRECT_URL">;
1955
+ INVALID_ERROR_CALLBACK_URL: import("better-auth").RawError<"INVALID_ERROR_CALLBACK_URL">;
1956
+ INVALID_NEW_USER_CALLBACK_URL: import("better-auth").RawError<"INVALID_NEW_USER_CALLBACK_URL">;
1957
+ MISSING_OR_NULL_ORIGIN: import("better-auth").RawError<"MISSING_OR_NULL_ORIGIN">;
1958
+ CALLBACK_URL_REQUIRED: import("better-auth").RawError<"CALLBACK_URL_REQUIRED">;
1959
+ FAILED_TO_CREATE_VERIFICATION: import("better-auth").RawError<"FAILED_TO_CREATE_VERIFICATION">;
1960
+ FIELD_NOT_ALLOWED: import("better-auth").RawError<"FIELD_NOT_ALLOWED">;
1961
+ ASYNC_VALIDATION_NOT_SUPPORTED: import("better-auth").RawError<"ASYNC_VALIDATION_NOT_SUPPORTED">;
1962
+ VALIDATION_ERROR: import("better-auth").RawError<"VALIDATION_ERROR">;
1963
+ MISSING_FIELD: import("better-auth").RawError<"MISSING_FIELD">;
1964
+ METHOD_NOT_ALLOWED_DEFER_SESSION_REQUIRED: import("better-auth").RawError<"METHOD_NOT_ALLOWED_DEFER_SESSION_REQUIRED">;
1965
+ BODY_MUST_BE_AN_OBJECT: import("better-auth").RawError<"BODY_MUST_BE_AN_OBJECT">;
1966
+ PASSWORD_ALREADY_SET: import("better-auth").RawError<"PASSWORD_ALREADY_SET">;
1967
+ };
1968
+ };
1969
+ /**
1970
+ * Type representing the default auth client with plugins enabled.
1971
+ *
1972
+ * This is the standard auth client type used throughout the React package
1973
+ * and includes all required plugins enabled.
1974
+ */
1975
+ type ResolveAuthClient<T> = "AuthClient" extends keyof T ? T["AuthClient"] : typeof authClient;
1976
+ /**
1977
+ * The resolved auth client type, either from user augmentation or the default.
1978
+ */
1979
+ export type AuthClient = ResolveAuthClient<AuthConfig>;