@better-auth-ui/react 1.6.2 → 1.6.3

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