@payez/next-mvp 4.4.6 → 4.4.8

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 (54) hide show
  1. package/dist/api-handlers/account/change-password.js +28 -6
  2. package/dist/auth/better-auth.d.ts +62 -15
  3. package/dist/auth/better-auth.js +180 -19
  4. package/dist/client/better-auth-client.d.ts +101 -956
  5. package/dist/config/env.d.ts +0 -2
  6. package/dist/config/env.js +0 -2
  7. package/dist/index.d.ts +1 -0
  8. package/dist/index.js +8 -1
  9. package/dist/lib/idp-client-config.js +8 -1
  10. package/dist/lib/never-in-response.d.ts +30 -0
  11. package/dist/lib/never-in-response.js +71 -0
  12. package/dist/lib/nextauth-secret.d.ts +51 -0
  13. package/dist/lib/nextauth-secret.js +141 -0
  14. package/dist/lib/safe-error-response.d.ts +6 -6
  15. package/dist/lib/safe-error-response.js +6 -6
  16. package/dist/lib/two-factor-verify-failure.d.ts +36 -3
  17. package/dist/lib/two-factor-verify-failure.js +79 -2
  18. package/dist/middleware/create-middleware.d.ts +2 -0
  19. package/dist/middleware/create-middleware.js +36 -0
  20. package/dist/pages/login/page.js +5 -0
  21. package/dist/pages/verify-code/page.js +4 -2
  22. package/dist/routes/auth/settings.js +4 -1
  23. package/dist/server/auth.d.ts +36 -294
  24. package/dist/server/auth.js +22 -25
  25. package/dist/vibe/client.d.ts +132 -16
  26. package/dist/vibe/client.js +288 -82
  27. package/dist/vibe/document-unwrap.d.ts +50 -0
  28. package/dist/vibe/document-unwrap.js +78 -0
  29. package/dist/vibe/errors.d.ts +17 -0
  30. package/dist/vibe/errors.js +21 -1
  31. package/dist/vibe/generic.d.ts +2 -49
  32. package/dist/vibe/generic.js +17 -78
  33. package/dist/vibe/index.d.ts +1 -1
  34. package/dist/vibe/index.js +2 -1
  35. package/package.json +17 -2
  36. package/src/api-handlers/account/change-password.ts +31 -6
  37. package/src/auth/better-auth.ts +188 -21
  38. package/src/config/env.ts +0 -2
  39. package/src/index.ts +4 -0
  40. package/src/lib/idp-client-config.ts +8 -1
  41. package/src/lib/never-in-response.ts +64 -0
  42. package/src/lib/nextauth-secret.ts +168 -0
  43. package/src/lib/safe-error-response.ts +6 -6
  44. package/src/lib/two-factor-verify-failure.ts +86 -5
  45. package/src/middleware/create-middleware.ts +42 -0
  46. package/src/pages/login/page.tsx +4 -0
  47. package/src/pages/verify-code/page.tsx +4 -2
  48. package/src/routes/auth/settings.ts +5 -1
  49. package/src/server/auth.ts +23 -29
  50. package/src/vibe/client.ts +378 -91
  51. package/src/vibe/document-unwrap.ts +103 -0
  52. package/src/vibe/errors.ts +24 -0
  53. package/src/vibe/generic.ts +8 -100
  54. package/src/vibe/index.ts +1 -0
@@ -6,431 +6,40 @@
6
6
  * Includes useSessionCompat() — returns a { data, status } shape so existing
7
7
  * components written against the legacy hook don't need destructure changes.
8
8
  */
9
- export declare const authClient: {
10
- signIn: {
11
- magicLink: <FetchOptions extends import("@better-auth/core").ClientFetchOption<Partial<{
12
- email: string;
13
- name?: string | undefined;
14
- callbackURL?: string | undefined;
15
- newUserCallbackURL?: string | undefined;
16
- errorCallbackURL?: string | undefined;
17
- metadata?: Record<string, any> | undefined;
18
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth/react").Prettify<{
19
- email: string;
20
- name?: string | undefined;
21
- callbackURL?: string | undefined;
22
- newUserCallbackURL?: string | undefined;
23
- errorCallbackURL?: string | undefined;
24
- metadata?: Record<string, any> | undefined;
25
- } & {
26
- fetchOptions?: FetchOptions | undefined;
27
- }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
28
- status: boolean;
29
- }, {
30
- code?: string | undefined;
31
- message?: string | undefined;
32
- }, FetchOptions["throw"] extends true ? true : false>>;
33
- };
34
- } & {
35
- magicLink: {
36
- verify: <FetchOptions extends import("@better-auth/core").ClientFetchOption<never, Partial<{
37
- token: string;
38
- callbackURL?: string | undefined;
39
- errorCallbackURL?: string | undefined;
40
- newUserCallbackURL?: string | undefined;
41
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth/react").Prettify<{
42
- query: {
43
- token: string;
44
- callbackURL?: string | undefined;
45
- errorCallbackURL?: string | undefined;
46
- newUserCallbackURL?: string | undefined;
47
- };
48
- fetchOptions?: FetchOptions | undefined;
49
- }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<Omit<{
50
- token: string;
51
- user: {
52
- id: string;
53
- createdAt: Date;
54
- updatedAt: Date;
55
- email: string;
56
- emailVerified: boolean;
57
- name: string;
58
- image?: string | null | undefined;
59
- };
60
- }, "user"> & {
61
- user: import("better-auth/react").StripEmptyObjects<{
62
- id: string;
63
- createdAt: Date;
64
- updatedAt: Date;
65
- email: string;
66
- emailVerified: boolean;
67
- name: string;
68
- image?: string | null | undefined;
69
- }>;
70
- }, {
71
- code?: string | undefined;
72
- message?: string | undefined;
73
- }, FetchOptions["throw"] extends true ? true : false>>;
74
- };
75
- } & {
76
- signIn: {
77
- social: <FetchOptions extends import("@better-auth/core").ClientFetchOption<Partial<{
78
- provider: (string & {}) | "linear" | "huggingface" | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat";
79
- callbackURL?: string | undefined;
80
- newUserCallbackURL?: string | undefined;
81
- errorCallbackURL?: string | undefined;
82
- disableRedirect?: boolean | undefined;
83
- idToken?: {
84
- token: string;
85
- nonce?: string | undefined;
86
- accessToken?: string | undefined;
87
- refreshToken?: string | undefined;
88
- expiresAt?: number | undefined;
89
- user?: {
90
- name?: {
91
- firstName?: string | undefined;
92
- lastName?: string | undefined;
93
- } | undefined;
94
- email?: string | undefined;
95
- } | undefined;
96
- } | undefined;
97
- scopes?: string[] | undefined;
98
- requestSignUp?: boolean | undefined;
99
- loginHint?: string | undefined;
100
- additionalData?: Record<string, any> | undefined;
101
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth/react").Prettify<{
102
- provider: (string & {}) | "linear" | "huggingface" | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat";
103
- callbackURL?: string | undefined;
104
- newUserCallbackURL?: string | undefined;
105
- errorCallbackURL?: string | undefined;
106
- disableRedirect?: boolean | undefined;
107
- idToken?: {
108
- token: string;
109
- nonce?: string | undefined;
110
- accessToken?: string | undefined;
111
- refreshToken?: string | undefined;
112
- expiresAt?: number | undefined;
113
- user?: {
114
- name?: {
115
- firstName?: string | undefined;
116
- lastName?: string | undefined;
117
- } | undefined;
118
- email?: string | undefined;
119
- } | undefined;
120
- } | undefined;
121
- scopes?: string[] | undefined;
122
- requestSignUp?: boolean | undefined;
123
- loginHint?: string | undefined;
124
- additionalData?: Record<string, any> | undefined;
125
- } & {
126
- fetchOptions?: FetchOptions | undefined;
127
- }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
128
- redirect: boolean;
129
- url: string;
130
- } | (Omit<{
131
- redirect: boolean;
132
- token: string;
133
- url: undefined;
134
- user: {
135
- id: string;
136
- createdAt: Date;
137
- updatedAt: Date;
138
- email: string;
139
- emailVerified: boolean;
140
- name: string;
141
- image?: string | null | undefined | undefined;
142
- };
143
- }, "user"> & {
144
- user: import("better-auth/react").StripEmptyObjects<{
145
- id: string;
146
- createdAt: Date;
147
- updatedAt: Date;
148
- email: string;
149
- emailVerified: boolean;
150
- name: string;
151
- image?: string | null | undefined;
152
- }>;
153
- }), {
154
- code?: string | undefined;
155
- message?: string | undefined;
156
- }, FetchOptions["throw"] extends true ? true : false>>;
157
- };
158
- } & {
159
- signOut: <FetchOptions extends import("@better-auth/core").ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth/react").Prettify<{
160
- query?: Record<string, any> | undefined;
161
- fetchOptions?: FetchOptions | undefined;
162
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
163
- success: boolean;
164
- }, {
165
- code?: string | undefined;
166
- message?: string | undefined;
167
- }, FetchOptions["throw"] extends true ? true : false>>;
168
- } & {
169
- signUp: {
170
- email: <FetchOptions extends import("@better-auth/core").ClientFetchOption<Partial<{
171
- name: string;
172
- email: string;
173
- password: string;
174
- image?: string | undefined;
175
- callbackURL?: string | undefined;
176
- rememberMe?: boolean | undefined;
177
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth/react").Prettify<{
178
- email: string;
179
- name: string;
180
- password: string;
181
- image?: string | undefined;
182
- callbackURL?: string | undefined;
183
- fetchOptions?: FetchOptions | undefined;
184
- }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<(Omit<{
185
- token: null;
186
- user: {
187
- id: string;
188
- createdAt: Date;
189
- updatedAt: Date;
190
- email: string;
191
- emailVerified: boolean;
192
- name: string;
193
- image?: string | null | undefined | undefined;
194
- };
195
- }, "user"> & {
196
- user: import("better-auth/react").StripEmptyObjects<{
197
- id: string;
198
- createdAt: Date;
199
- updatedAt: Date;
200
- email: string;
201
- emailVerified: boolean;
202
- name: string;
203
- image?: string | null | undefined;
204
- }>;
205
- }) | (Omit<{
206
- token: string;
207
- user: {
208
- id: string;
209
- createdAt: Date;
210
- updatedAt: Date;
211
- email: string;
212
- emailVerified: boolean;
213
- name: string;
214
- image?: string | null | undefined | undefined;
215
- };
216
- }, "user"> & {
217
- user: import("better-auth/react").StripEmptyObjects<{
218
- id: string;
219
- createdAt: Date;
220
- updatedAt: Date;
221
- email: string;
222
- emailVerified: boolean;
223
- name: string;
224
- image?: string | null | undefined;
225
- }>;
226
- }), {
227
- code?: string | undefined;
228
- message?: string | undefined;
229
- }, FetchOptions["throw"] extends true ? true : false>>;
230
- };
231
- } & {
232
- signIn: {
233
- email: <FetchOptions extends import("@better-auth/core").ClientFetchOption<Partial<{
234
- email: string;
235
- password: string;
236
- callbackURL?: string | undefined;
237
- rememberMe?: boolean | undefined;
238
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth/react").Prettify<{
239
- email: string;
240
- password: string;
241
- callbackURL?: string | undefined;
242
- rememberMe?: boolean | undefined;
243
- } & {
244
- fetchOptions?: FetchOptions | undefined;
245
- }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<Omit<{
246
- redirect: boolean;
247
- token: string;
248
- url?: string | undefined;
249
- user: {
250
- id: string;
251
- createdAt: Date;
252
- updatedAt: Date;
253
- email: string;
254
- emailVerified: boolean;
255
- name: string;
256
- image?: string | null | undefined | undefined;
257
- };
258
- }, "user"> & {
259
- user: import("better-auth/react").StripEmptyObjects<{
260
- id: string;
261
- createdAt: Date;
262
- updatedAt: Date;
263
- email: string;
264
- emailVerified: boolean;
265
- name: string;
266
- image?: string | null | undefined;
267
- }>;
268
- }, {
269
- code?: string | undefined;
270
- message?: string | undefined;
271
- }, FetchOptions["throw"] extends true ? true : false>>;
272
- };
273
- } & {
274
- resetPassword: <FetchOptions extends import("@better-auth/core").ClientFetchOption<Partial<{
275
- newPassword: string;
276
- token?: string | undefined;
277
- }> & Record<string, any>, Partial<{
278
- token?: string | undefined;
279
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth/react").Prettify<{
280
- newPassword: string;
281
- token?: string | undefined;
282
- } & {
283
- fetchOptions?: FetchOptions | undefined;
284
- }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
285
- status: boolean;
286
- }, {
287
- code?: string | undefined;
288
- message?: string | undefined;
289
- }, FetchOptions["throw"] extends true ? true : false>>;
290
- } & {
291
- verifyEmail: <FetchOptions extends import("@better-auth/core").ClientFetchOption<never, Partial<{
292
- token: string;
293
- callbackURL?: string | undefined;
294
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth/react").Prettify<{
295
- query: {
296
- token: string;
297
- callbackURL?: string | undefined;
298
- };
299
- fetchOptions?: FetchOptions | undefined;
300
- }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<NonNullable<void | {
301
- status: boolean;
302
- }>, {
303
- code?: string | undefined;
304
- message?: string | undefined;
305
- }, FetchOptions["throw"] extends true ? true : false>>;
306
- } & {
307
- sendVerificationEmail: <FetchOptions extends import("@better-auth/core").ClientFetchOption<Partial<{
308
- email: string;
309
- callbackURL?: string | undefined;
310
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth/react").Prettify<{
311
- email: string;
312
- callbackURL?: string | undefined;
313
- } & {
314
- fetchOptions?: FetchOptions | undefined;
315
- }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
316
- status: boolean;
317
- }, {
318
- code?: string | undefined;
319
- message?: string | undefined;
320
- }, FetchOptions["throw"] extends true ? true : false>>;
321
- } & {
322
- changeEmail: <FetchOptions extends import("@better-auth/core").ClientFetchOption<Partial<{
323
- newEmail: string;
324
- callbackURL?: string | undefined;
325
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth/react").Prettify<{
326
- newEmail: string;
327
- callbackURL?: string | undefined;
328
- } & {
329
- fetchOptions?: FetchOptions | undefined;
330
- }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
331
- status: boolean;
332
- }, {
333
- code?: string | undefined;
334
- message?: string | undefined;
335
- }, FetchOptions["throw"] extends true ? true : false>>;
336
- } & {
337
- changePassword: <FetchOptions extends import("@better-auth/core").ClientFetchOption<Partial<{
338
- newPassword: string;
339
- currentPassword: string;
340
- revokeOtherSessions?: boolean | undefined;
341
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth/react").Prettify<{
342
- newPassword: string;
343
- currentPassword: string;
344
- revokeOtherSessions?: boolean | undefined;
345
- } & {
346
- fetchOptions?: FetchOptions | undefined;
347
- }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<Omit<{
348
- token: string | null;
349
- user: {
350
- id: string;
351
- createdAt: Date;
352
- updatedAt: Date;
353
- email: string;
354
- emailVerified: boolean;
355
- name: string;
356
- image?: string | null | undefined;
357
- } & Record<string, any> & {
358
- id: string;
359
- createdAt: Date;
360
- updatedAt: Date;
361
- email: string;
362
- emailVerified: boolean;
363
- name: string;
364
- image?: string | null | undefined;
365
- };
366
- }, "user"> & {
367
- user: import("better-auth/react").StripEmptyObjects<{
368
- id: string;
369
- createdAt: Date;
370
- updatedAt: Date;
371
- email: string;
372
- emailVerified: boolean;
373
- name: string;
374
- image?: string | null | undefined;
375
- }>;
376
- }, {
377
- code?: string | undefined;
378
- message?: string | undefined;
379
- }, FetchOptions["throw"] extends true ? true : false>>;
380
- } & {
381
- updateSession: <FetchOptions extends import("@better-auth/core").ClientFetchOption<Partial<Partial<{}>> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth/react").Prettify<Partial<{}> & {
382
- fetchOptions?: FetchOptions | undefined;
383
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
384
- session: {
385
- id: string;
386
- createdAt: Date;
387
- updatedAt: Date;
388
- userId: string;
389
- expiresAt: Date;
390
- token: string;
391
- ipAddress?: string | null | undefined;
392
- userAgent?: string | null | undefined;
393
- };
394
- }, {
395
- code?: string | undefined;
396
- message?: string | undefined;
397
- }, FetchOptions["throw"] extends true ? true : false>>;
398
- } & {
399
- updateUser: <FetchOptions extends import("@better-auth/core").ClientFetchOption<Partial<Partial<{}> & {
400
- name?: string | undefined;
401
- image?: string | undefined | null;
402
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth/react").Prettify<import("better-auth/dist/client/path-to-object.mjs").InferUserUpdateCtx<{
403
- plugins: {
9
+ export declare const authClient: import("better-auth/react").ReactAuthClient<{
10
+ plugins: {
11
+ id: "magic-link";
12
+ version: string;
13
+ $InferServerPlugin: ReturnType<(options: import("better-auth/plugins/magic-link").MagicLinkOptions) => {
404
14
  id: "magic-link";
405
- $InferServerPlugin: ReturnType<(options: import("better-auth/plugins/magic-link").MagicLinkOptions) => {
406
- id: "magic-link";
407
- endpoints: {
408
- signInMagicLink: import("better-call").StrictEndpoint<"/sign-in/magic-link", {
409
- method: "POST";
410
- requireHeaders: true;
411
- body: import("zod").ZodObject<{
412
- email: import("zod").ZodEmail;
413
- name: import("zod").ZodOptional<import("zod").ZodString>;
414
- callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
415
- newUserCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
416
- errorCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
417
- metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
418
- }, import("better-auth/*").$strip>;
419
- metadata: {
420
- openapi: {
421
- operationId: string;
422
- description: string;
423
- responses: {
424
- 200: {
425
- description: string;
426
- content: {
427
- "application/json": {
428
- schema: {
429
- type: "object";
430
- properties: {
431
- status: {
432
- type: string;
433
- };
15
+ version: string;
16
+ endpoints: {
17
+ signInMagicLink: import("better-call").StrictEndpoint<"/sign-in/magic-link", {
18
+ method: "POST";
19
+ requireHeaders: true;
20
+ use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>>[];
21
+ body: import("zod").ZodObject<{
22
+ email: import("zod").ZodEmail;
23
+ name: import("zod").ZodOptional<import("zod").ZodString>;
24
+ callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
25
+ newUserCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
26
+ errorCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
27
+ metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
28
+ }, import("zod/v4/core").$strip>;
29
+ metadata: {
30
+ openapi: {
31
+ operationId: string;
32
+ description: string;
33
+ responses: {
34
+ 200: {
35
+ description: string;
36
+ content: {
37
+ "application/json": {
38
+ schema: {
39
+ type: "object";
40
+ properties: {
41
+ status: {
42
+ type: string;
434
43
  };
435
44
  };
436
45
  };
@@ -439,37 +48,37 @@ export declare const authClient: {
439
48
  };
440
49
  };
441
50
  };
442
- }, {
443
- status: boolean;
444
- }>;
445
- magicLinkVerify: import("better-call").StrictEndpoint<"/magic-link/verify", {
446
- method: "GET";
447
- query: import("zod").ZodObject<{
448
- token: import("zod").ZodString;
449
- callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
450
- errorCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
451
- newUserCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
452
- }, import("better-auth/*").$strip>;
453
- use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>)[];
454
- requireHeaders: true;
455
- metadata: {
456
- openapi: {
457
- operationId: string;
458
- description: string;
459
- responses: {
460
- 200: {
461
- description: string;
462
- content: {
463
- "application/json": {
464
- schema: {
465
- type: "object";
466
- properties: {
467
- session: {
468
- $ref: string;
469
- };
470
- user: {
471
- $ref: string;
472
- };
51
+ };
52
+ }, {
53
+ status: boolean;
54
+ }>;
55
+ magicLinkVerify: import("better-call").StrictEndpoint<"/magic-link/verify", {
56
+ method: "GET";
57
+ query: import("zod").ZodObject<{
58
+ token: import("zod").ZodString;
59
+ callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
60
+ errorCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
61
+ newUserCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
62
+ }, import("zod/v4/core").$strip>;
63
+ use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>>[];
64
+ requireHeaders: true;
65
+ metadata: {
66
+ openapi: {
67
+ operationId: string;
68
+ description: string;
69
+ responses: {
70
+ 200: {
71
+ description: string;
72
+ content: {
73
+ "application/json": {
74
+ schema: {
75
+ type: "object";
76
+ properties: {
77
+ session: {
78
+ $ref: string;
79
+ };
80
+ user: {
81
+ $ref: string;
473
82
  };
474
83
  };
475
84
  };
@@ -478,497 +87,39 @@ export declare const authClient: {
478
87
  };
479
88
  };
480
89
  };
481
- }, {
90
+ };
91
+ }, {
92
+ token: string;
93
+ user: {
94
+ id: string;
95
+ createdAt: Date;
96
+ updatedAt: Date;
97
+ email: string;
98
+ emailVerified: boolean;
99
+ name: string;
100
+ image?: string | null | undefined;
101
+ };
102
+ session: {
103
+ id: string;
104
+ createdAt: Date;
105
+ updatedAt: Date;
106
+ userId: string;
107
+ expiresAt: Date;
482
108
  token: string;
483
- user: {
484
- id: string;
485
- createdAt: Date;
486
- updatedAt: Date;
487
- email: string;
488
- emailVerified: boolean;
489
- name: string;
490
- image?: string | null | undefined;
491
- };
492
- }>;
493
- };
494
- rateLimit: {
495
- pathMatcher(path: string): boolean;
496
- window: number;
497
- max: number;
498
- }[];
499
- options: import("better-auth/plugins/magic-link").MagicLinkOptions;
500
- }>;
501
- }[];
502
- }, FetchOptions>> | undefined, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
503
- status: boolean;
504
- }, {
505
- code?: string | undefined;
506
- message?: string | undefined;
507
- }, FetchOptions["throw"] extends true ? true : false>>;
508
- } & {
509
- deleteUser: <FetchOptions extends import("@better-auth/core").ClientFetchOption<Partial<{
510
- callbackURL?: string | undefined;
511
- password?: string | undefined;
512
- token?: string | undefined;
513
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth/react").Prettify<{
514
- callbackURL?: string | undefined;
515
- password?: string | undefined;
516
- token?: string | undefined;
517
- } & {
518
- fetchOptions?: FetchOptions | undefined;
519
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
520
- success: boolean;
521
- message: string;
522
- }, {
523
- code?: string | undefined;
524
- message?: string | undefined;
525
- }, FetchOptions["throw"] extends true ? true : false>>;
526
- } & {
527
- requestPasswordReset: <FetchOptions extends import("@better-auth/core").ClientFetchOption<Partial<{
528
- email: string;
529
- redirectTo?: string | undefined;
530
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth/react").Prettify<{
531
- email: string;
532
- redirectTo?: string | undefined;
533
- } & {
534
- fetchOptions?: FetchOptions | undefined;
535
- }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
536
- status: boolean;
537
- message: string;
538
- }, {
539
- code?: string | undefined;
540
- message?: string | undefined;
541
- }, FetchOptions["throw"] extends true ? true : false>>;
542
- } & {
543
- resetPassword: {
544
- ":token": <FetchOptions extends import("@better-auth/core").ClientFetchOption<never, Partial<{
545
- callbackURL: string;
546
- }> & Record<string, any>, {
547
- token: string;
548
- }>>(data_0: import("better-auth/react").Prettify<{
549
- query: {
550
- callbackURL: string;
109
+ ipAddress?: string | null | undefined;
110
+ userAgent?: string | null | undefined;
111
+ };
112
+ }>;
551
113
  };
552
- fetchOptions?: FetchOptions | undefined;
553
- }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<never, {
554
- code?: string | undefined;
555
- message?: string | undefined;
556
- }, FetchOptions["throw"] extends true ? true : false>>;
557
- };
558
- } & {
559
- listSessions: <FetchOptions extends import("@better-auth/core").ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth/react").Prettify<{
560
- query?: Record<string, any> | undefined;
561
- fetchOptions?: FetchOptions | undefined;
562
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<import("better-auth/react").Prettify<{
563
- id: string;
564
- createdAt: Date;
565
- updatedAt: Date;
566
- userId: string;
567
- expiresAt: Date;
568
- token: string;
569
- ipAddress?: string | null | undefined | undefined;
570
- userAgent?: string | null | undefined | undefined;
571
- }>[], {
572
- code?: string | undefined;
573
- message?: string | undefined;
574
- }, FetchOptions["throw"] extends true ? true : false>>;
575
- } & {
576
- revokeSession: <FetchOptions extends import("@better-auth/core").ClientFetchOption<Partial<{
577
- token: string;
578
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth/react").Prettify<{
579
- token: string;
580
- } & {
581
- fetchOptions?: FetchOptions | undefined;
582
- }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
583
- status: boolean;
584
- }, {
585
- code?: string | undefined;
586
- message?: string | undefined;
587
- }, FetchOptions["throw"] extends true ? true : false>>;
588
- } & {
589
- revokeSessions: <FetchOptions extends import("@better-auth/core").ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth/react").Prettify<{
590
- query?: Record<string, any> | undefined;
591
- fetchOptions?: FetchOptions | undefined;
592
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
593
- status: boolean;
594
- }, {
595
- code?: string | undefined;
596
- message?: string | undefined;
597
- }, FetchOptions["throw"] extends true ? true : false>>;
598
- } & {
599
- revokeOtherSessions: <FetchOptions extends import("@better-auth/core").ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth/react").Prettify<{
600
- query?: Record<string, any> | undefined;
601
- fetchOptions?: FetchOptions | undefined;
602
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
603
- status: boolean;
604
- }, {
605
- code?: string | undefined;
606
- message?: string | undefined;
607
- }, FetchOptions["throw"] extends true ? true : false>>;
608
- } & {
609
- linkSocial: <FetchOptions extends import("@better-auth/core").ClientFetchOption<Partial<{
610
- provider: unknown;
611
- callbackURL?: string | undefined;
612
- idToken?: {
613
- token: string;
614
- nonce?: string | undefined;
615
- accessToken?: string | undefined;
616
- refreshToken?: string | undefined;
617
- scopes?: string[] | undefined;
618
- } | undefined;
619
- requestSignUp?: boolean | undefined;
620
- scopes?: string[] | undefined;
621
- errorCallbackURL?: string | undefined;
622
- disableRedirect?: boolean | undefined;
623
- additionalData?: Record<string, any> | undefined;
624
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth/react").Prettify<{
625
- provider: unknown;
626
- callbackURL?: string | undefined;
627
- idToken?: {
628
- token: string;
629
- nonce?: string | undefined;
630
- accessToken?: string | undefined;
631
- refreshToken?: string | undefined;
632
- scopes?: string[] | undefined;
633
- } | undefined;
634
- requestSignUp?: boolean | undefined;
635
- scopes?: string[] | undefined;
636
- errorCallbackURL?: string | undefined;
637
- disableRedirect?: boolean | undefined;
638
- additionalData?: Record<string, any> | undefined;
639
- } & {
640
- fetchOptions?: FetchOptions | undefined;
641
- }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
642
- url: string;
643
- redirect: boolean;
644
- }, {
645
- code?: string | undefined;
646
- message?: string | undefined;
647
- }, FetchOptions["throw"] extends true ? true : false>>;
648
- } & {
649
- listAccounts: <FetchOptions extends import("@better-auth/core").ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth/react").Prettify<{
650
- query?: Record<string, any> | undefined;
651
- fetchOptions?: FetchOptions | undefined;
652
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
653
- scopes: string[];
654
- id: string;
655
- createdAt: Date;
656
- updatedAt: Date;
657
- userId: string;
658
- providerId: string;
659
- accountId: string;
660
- }[], {
661
- code?: string | undefined;
662
- message?: string | undefined;
663
- }, FetchOptions["throw"] extends true ? true : false>>;
664
- } & {
665
- deleteUser: {
666
- callback: <FetchOptions extends import("@better-auth/core").ClientFetchOption<never, Partial<{
667
- token: string;
668
- callbackURL?: string | undefined;
669
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth/react").Prettify<{
670
- query: {
671
- token: string;
672
- callbackURL?: string | undefined;
673
- };
674
- fetchOptions?: FetchOptions | undefined;
675
- }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
676
- success: boolean;
677
- message: string;
678
- }, {
679
- code?: string | undefined;
680
- message?: string | undefined;
681
- }, FetchOptions["throw"] extends true ? true : false>>;
682
- };
683
- } & {
684
- unlinkAccount: <FetchOptions extends import("@better-auth/core").ClientFetchOption<Partial<{
685
- providerId: string;
686
- accountId?: string | undefined;
687
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth/react").Prettify<{
688
- providerId: string;
689
- accountId?: string | undefined;
690
- } & {
691
- fetchOptions?: FetchOptions | undefined;
692
- }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
693
- status: boolean;
694
- }, {
695
- code?: string | undefined;
696
- message?: string | undefined;
697
- }, FetchOptions["throw"] extends true ? true : false>>;
698
- } & {
699
- refreshToken: <FetchOptions extends import("@better-auth/core").ClientFetchOption<Partial<{
700
- providerId: string;
701
- accountId?: string | undefined;
702
- userId?: string | undefined;
703
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth/react").Prettify<{
704
- providerId: string;
705
- accountId?: string | undefined;
706
- userId?: string | undefined;
707
- } & {
708
- fetchOptions?: FetchOptions | undefined;
709
- }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
710
- accessToken: string | undefined;
711
- refreshToken: string;
712
- accessTokenExpiresAt: Date | undefined;
713
- refreshTokenExpiresAt: Date | null | undefined;
714
- scope: string | null | undefined;
715
- idToken: string | null | undefined;
716
- providerId: string;
717
- accountId: string;
718
- }, {
719
- code?: string | undefined;
720
- message?: string | undefined;
721
- }, FetchOptions["throw"] extends true ? true : false>>;
722
- } & {
723
- getAccessToken: <FetchOptions extends import("@better-auth/core").ClientFetchOption<Partial<{
724
- providerId: string;
725
- accountId?: string | undefined;
726
- userId?: string | undefined;
727
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth/react").Prettify<{
728
- providerId: string;
729
- accountId?: string | undefined;
730
- userId?: string | undefined;
731
- } & {
732
- fetchOptions?: FetchOptions | undefined;
733
- }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
734
- accessToken: string;
735
- accessTokenExpiresAt: Date | undefined;
736
- scopes: string[];
737
- idToken: string | undefined;
738
- }, {
739
- code?: string | undefined;
740
- message?: string | undefined;
741
- }, FetchOptions["throw"] extends true ? true : false>>;
742
- } & {
743
- accountInfo: <FetchOptions extends import("@better-auth/core").ClientFetchOption<never, Partial<{
744
- accountId?: string | undefined;
745
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth/react").Prettify<{
746
- query?: {
747
- accountId?: string | undefined;
748
- } | undefined;
749
- fetchOptions?: FetchOptions | undefined;
750
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
751
- user: import("better-auth/*").OAuth2UserInfo;
752
- data: Record<string, any>;
753
- }, {
754
- code?: string | undefined;
755
- message?: string | undefined;
756
- }, FetchOptions["throw"] extends true ? true : false>>;
757
- } & {
758
- getSession: <FetchOptions extends import("@better-auth/core").ClientFetchOption<never, Partial<{
759
- disableCookieCache?: unknown;
760
- disableRefresh?: unknown;
761
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth/react").Prettify<{
762
- query?: {
763
- disableCookieCache?: unknown;
764
- disableRefresh?: unknown;
765
- } | undefined;
766
- fetchOptions?: FetchOptions | undefined;
767
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
768
- user: import("better-auth/react").StripEmptyObjects<{
769
- id: string;
770
- createdAt: Date;
771
- updatedAt: Date;
772
- email: string;
773
- emailVerified: boolean;
774
- name: string;
775
- image?: string | null | undefined;
776
- }>;
777
- session: import("better-auth/react").StripEmptyObjects<{
778
- id: string;
779
- createdAt: Date;
780
- updatedAt: Date;
781
- userId: string;
782
- expiresAt: Date;
783
- token: string;
784
- ipAddress?: string | null | undefined;
785
- userAgent?: string | null | undefined;
114
+ rateLimit: {
115
+ pathMatcher(path: string): boolean;
116
+ window: number;
117
+ max: number;
118
+ }[];
119
+ options: import("better-auth/plugins/magic-link").MagicLinkOptions;
786
120
  }>;
787
- } | null, {
788
- code?: string | undefined;
789
- message?: string | undefined;
790
- }, FetchOptions["throw"] extends true ? true : false>>;
791
- } & {
792
- useSession: () => {
793
- data: {
794
- user: import("better-auth/react").StripEmptyObjects<{
795
- id: string;
796
- createdAt: Date;
797
- updatedAt: Date;
798
- email: string;
799
- emailVerified: boolean;
800
- name: string;
801
- image?: string | null | undefined;
802
- }>;
803
- session: import("better-auth/react").StripEmptyObjects<{
804
- id: string;
805
- createdAt: Date;
806
- updatedAt: Date;
807
- userId: string;
808
- expiresAt: Date;
809
- token: string;
810
- ipAddress?: string | null | undefined;
811
- userAgent?: string | null | undefined;
812
- }>;
813
- } | null;
814
- isPending: boolean;
815
- isRefetching: boolean;
816
- error: import("@better-fetch/fetch").BetterFetchError | null;
817
- refetch: (queryParams
818
- /**
819
- * NextAuth-compatible signOut wrapper.
820
- *
821
- * Maps NextAuth signOut({ redirect, callbackUrl }) to Better Auth.
822
- */
823
- ?: {
824
- query?: import("better-auth/types").SessionQueryParams;
825
- } | undefined) => Promise<void>;
826
- };
827
- $Infer: {
828
- Session: {
829
- user: import("better-auth/react").StripEmptyObjects<{
830
- id: string;
831
- createdAt: Date;
832
- updatedAt: Date;
833
- email: string;
834
- emailVerified: boolean;
835
- name: string;
836
- image?: string | null | undefined;
837
- }>;
838
- session: import("better-auth/react").StripEmptyObjects<{
839
- id: string;
840
- createdAt: Date;
841
- updatedAt: Date;
842
- userId: string;
843
- expiresAt: Date;
844
- token: string;
845
- ipAddress?: string | null | undefined;
846
- userAgent?: string | null | undefined;
847
- }>;
848
- };
849
- };
850
- $fetch: import("@better-fetch/fetch").BetterFetch<{
851
- plugins: (import("@better-fetch/fetch").BetterFetchPlugin<Record<string, any>> | {
852
- id: string;
853
- name: string;
854
- hooks: {
855
- onSuccess(context: import("@better-fetch/fetch").SuccessContext<any>): void;
856
- };
857
- } | {
858
- id: string;
859
- name: string;
860
- hooks: {
861
- onSuccess: ((context: import("@better-fetch/fetch").SuccessContext<any>) => Promise<void> | void) | undefined;
862
- onError: ((context: import("@better-fetch/fetch").ErrorContext) => Promise<void> | void) | undefined;
863
- onRequest: (<T extends Record<string, any>>(context: import("@better-fetch/fetch").RequestContext<T>) => Promise<import("@better-fetch/fetch").RequestContext | void> | import("@better-fetch/fetch").RequestContext | void) | undefined;
864
- onResponse: ((context: import("@better-fetch/fetch").ResponseContext) => Promise<Response | void | import("@better-fetch/fetch").ResponseContext> | Response | import("@better-fetch/fetch").ResponseContext | void) | undefined;
865
- };
866
- })[];
867
- cache?: RequestCache | undefined;
868
- priority?: RequestPriority | undefined;
869
- credentials?: RequestCredentials;
870
- headers?: (HeadersInit & (HeadersInit | {
871
- accept: "application/json" | "text/plain" | "application/octet-stream";
872
- "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
873
- authorization: "Bearer" | "Basic";
874
- })) | undefined;
875
- integrity?: string | undefined;
876
- keepalive?: boolean | undefined;
877
- method: string;
878
- mode?: RequestMode | undefined;
879
- redirect?: RequestRedirect | undefined;
880
- referrer?: string | undefined;
881
- referrerPolicy?: ReferrerPolicy | undefined;
882
- signal?: (AbortSignal | null) | undefined;
883
- window?: null | undefined;
884
- onRetry?: ((response: import("@better-fetch/fetch").ResponseContext) => Promise<void> | void) | undefined;
885
- hookOptions?: {
886
- cloneResponse?: boolean;
887
- } | undefined;
888
- timeout?: number | undefined;
889
- customFetchImpl: import("@better-fetch/fetch").FetchEsque;
890
- baseURL: string;
891
- throw?: boolean | undefined;
892
- auth?: ({
893
- type: "Bearer";
894
- token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
895
- } | {
896
- type: "Basic";
897
- username: string | (() => string | undefined) | undefined;
898
- password: string | (() => string | undefined) | undefined;
899
- } | {
900
- type: "Custom";
901
- prefix: string | (() => string | undefined) | undefined;
902
- value: string | (() => string | undefined) | undefined;
903
- }) | undefined;
904
- body?: any;
905
- query?: any;
906
- params?: any;
907
- duplex?: "full" | "half" | undefined;
908
- jsonParser: (text: string) => Promise<any> | any;
909
- retry?: import("@better-fetch/fetch").RetryOptions | undefined;
910
- retryAttempt?: number | undefined;
911
- output?: (import("@better-fetch/fetch").StandardSchemaV1 | typeof Blob | typeof File) | undefined;
912
- errorSchema?: import("@better-fetch/fetch").StandardSchemaV1 | undefined;
913
- disableValidation?: boolean | undefined;
914
- disableSignal?: boolean | undefined;
915
- }, unknown, unknown, {}>;
916
- $store: {
917
- notify: (signal?: (Omit<string, "$sessionSignal"> | "$sessionSignal") | undefined) => void;
918
- listen: (signal: Omit<string, "$sessionSignal"> | "$sessionSignal", listener: (value: boolean, oldValue?: boolean | undefined) => void) => void;
919
- atoms: Record<string, import("nanostores/atom").WritableAtom<any>>;
920
- };
921
- $ERROR_CODES: {
922
- USER_NOT_FOUND: import("better-auth/*").RawError<"USER_NOT_FOUND">;
923
- FAILED_TO_CREATE_USER: import("better-auth/*").RawError<"FAILED_TO_CREATE_USER">;
924
- FAILED_TO_CREATE_SESSION: import("better-auth/*").RawError<"FAILED_TO_CREATE_SESSION">;
925
- FAILED_TO_UPDATE_USER: import("better-auth/*").RawError<"FAILED_TO_UPDATE_USER">;
926
- FAILED_TO_GET_SESSION: import("better-auth/*").RawError<"FAILED_TO_GET_SESSION">;
927
- INVALID_PASSWORD: import("better-auth/*").RawError<"INVALID_PASSWORD">;
928
- INVALID_EMAIL: import("better-auth/*").RawError<"INVALID_EMAIL">;
929
- INVALID_EMAIL_OR_PASSWORD: import("better-auth/*").RawError<"INVALID_EMAIL_OR_PASSWORD">;
930
- INVALID_USER: import("better-auth/*").RawError<"INVALID_USER">;
931
- SOCIAL_ACCOUNT_ALREADY_LINKED: import("better-auth/*").RawError<"SOCIAL_ACCOUNT_ALREADY_LINKED">;
932
- PROVIDER_NOT_FOUND: import("better-auth/*").RawError<"PROVIDER_NOT_FOUND">;
933
- INVALID_TOKEN: import("better-auth/*").RawError<"INVALID_TOKEN">;
934
- TOKEN_EXPIRED: import("better-auth/*").RawError<"TOKEN_EXPIRED">;
935
- ID_TOKEN_NOT_SUPPORTED: import("better-auth/*").RawError<"ID_TOKEN_NOT_SUPPORTED">;
936
- FAILED_TO_GET_USER_INFO: import("better-auth/*").RawError<"FAILED_TO_GET_USER_INFO">;
937
- USER_EMAIL_NOT_FOUND: import("better-auth/*").RawError<"USER_EMAIL_NOT_FOUND">;
938
- EMAIL_NOT_VERIFIED: import("better-auth/*").RawError<"EMAIL_NOT_VERIFIED">;
939
- PASSWORD_TOO_SHORT: import("better-auth/*").RawError<"PASSWORD_TOO_SHORT">;
940
- PASSWORD_TOO_LONG: import("better-auth/*").RawError<"PASSWORD_TOO_LONG">;
941
- USER_ALREADY_EXISTS: import("better-auth/*").RawError<"USER_ALREADY_EXISTS">;
942
- USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL: import("better-auth/*").RawError<"USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL">;
943
- EMAIL_CAN_NOT_BE_UPDATED: import("better-auth/*").RawError<"EMAIL_CAN_NOT_BE_UPDATED">;
944
- CREDENTIAL_ACCOUNT_NOT_FOUND: import("better-auth/*").RawError<"CREDENTIAL_ACCOUNT_NOT_FOUND">;
945
- ACCOUNT_NOT_FOUND: import("better-auth/*").RawError<"ACCOUNT_NOT_FOUND">;
946
- SESSION_EXPIRED: import("better-auth/*").RawError<"SESSION_EXPIRED">;
947
- FAILED_TO_UNLINK_LAST_ACCOUNT: import("better-auth/*").RawError<"FAILED_TO_UNLINK_LAST_ACCOUNT">;
948
- USER_ALREADY_HAS_PASSWORD: import("better-auth/*").RawError<"USER_ALREADY_HAS_PASSWORD">;
949
- CROSS_SITE_NAVIGATION_LOGIN_BLOCKED: import("better-auth/*").RawError<"CROSS_SITE_NAVIGATION_LOGIN_BLOCKED">;
950
- VERIFICATION_EMAIL_NOT_ENABLED: import("better-auth/*").RawError<"VERIFICATION_EMAIL_NOT_ENABLED">;
951
- EMAIL_ALREADY_VERIFIED: import("better-auth/*").RawError<"EMAIL_ALREADY_VERIFIED">;
952
- EMAIL_MISMATCH: import("better-auth/*").RawError<"EMAIL_MISMATCH">;
953
- SESSION_NOT_FRESH: import("better-auth/*").RawError<"SESSION_NOT_FRESH">;
954
- LINKED_ACCOUNT_ALREADY_EXISTS: import("better-auth/*").RawError<"LINKED_ACCOUNT_ALREADY_EXISTS">;
955
- INVALID_ORIGIN: import("better-auth/*").RawError<"INVALID_ORIGIN">;
956
- INVALID_CALLBACK_URL: import("better-auth/*").RawError<"INVALID_CALLBACK_URL">;
957
- INVALID_REDIRECT_URL: import("better-auth/*").RawError<"INVALID_REDIRECT_URL">;
958
- INVALID_ERROR_CALLBACK_URL: import("better-auth/*").RawError<"INVALID_ERROR_CALLBACK_URL">;
959
- INVALID_NEW_USER_CALLBACK_URL: import("better-auth/*").RawError<"INVALID_NEW_USER_CALLBACK_URL">;
960
- MISSING_OR_NULL_ORIGIN: import("better-auth/*").RawError<"MISSING_OR_NULL_ORIGIN">;
961
- CALLBACK_URL_REQUIRED: import("better-auth/*").RawError<"CALLBACK_URL_REQUIRED">;
962
- FAILED_TO_CREATE_VERIFICATION: import("better-auth/*").RawError<"FAILED_TO_CREATE_VERIFICATION">;
963
- FIELD_NOT_ALLOWED: import("better-auth/*").RawError<"FIELD_NOT_ALLOWED">;
964
- ASYNC_VALIDATION_NOT_SUPPORTED: import("better-auth/*").RawError<"ASYNC_VALIDATION_NOT_SUPPORTED">;
965
- VALIDATION_ERROR: import("better-auth/*").RawError<"VALIDATION_ERROR">;
966
- MISSING_FIELD: import("better-auth/*").RawError<"MISSING_FIELD">;
967
- METHOD_NOT_ALLOWED_DEFER_SESSION_REQUIRED: import("better-auth/*").RawError<"METHOD_NOT_ALLOWED_DEFER_SESSION_REQUIRED">;
968
- BODY_MUST_BE_AN_OBJECT: import("better-auth/*").RawError<"BODY_MUST_BE_AN_OBJECT">;
969
- PASSWORD_ALREADY_SET: import("better-auth/*").RawError<"PASSWORD_ALREADY_SET">;
970
- };
971
- };
121
+ }[];
122
+ }>;
972
123
  export declare const useSession: () => {
973
124
  data: {
974
125
  user: import("better-auth/react").StripEmptyObjects<{
@@ -994,13 +145,7 @@ export declare const useSession: () => {
994
145
  isPending: boolean;
995
146
  isRefetching: boolean;
996
147
  error: import("@better-fetch/fetch").BetterFetchError | null;
997
- refetch: (queryParams
998
- /**
999
- * NextAuth-compatible signOut wrapper.
1000
- *
1001
- * Maps NextAuth signOut({ redirect, callbackUrl }) to Better Auth.
1002
- */
1003
- ?: {
148
+ refetch: (queryParams?: {
1004
149
  query?: import("better-auth/types").SessionQueryParams;
1005
150
  } | undefined) => Promise<void>;
1006
151
  }, signIn: {
@@ -1011,7 +156,7 @@ export declare const useSession: () => {
1011
156
  newUserCallbackURL?: string | undefined;
1012
157
  errorCallbackURL?: string | undefined;
1013
158
  metadata?: Record<string, any> | undefined;
1014
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth/react").Prettify<{
159
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, string | undefined> | undefined>>(data_0: import("better-auth/react").Prettify<{
1015
160
  email: string;
1016
161
  name?: string | undefined;
1017
162
  callbackURL?: string | undefined;
@@ -1028,7 +173,7 @@ export declare const useSession: () => {
1028
173
  }, FetchOptions["throw"] extends true ? true : false>>;
1029
174
  } & {
1030
175
  social: <FetchOptions extends import("@better-auth/core").ClientFetchOption<Partial<{
1031
- provider: (string & {}) | "linear" | "huggingface" | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat";
176
+ provider: (string & {}) | "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";
1032
177
  callbackURL?: string | undefined;
1033
178
  newUserCallbackURL?: string | undefined;
1034
179
  errorCallbackURL?: string | undefined;
@@ -1051,8 +196,8 @@ export declare const useSession: () => {
1051
196
  requestSignUp?: boolean | undefined;
1052
197
  loginHint?: string | undefined;
1053
198
  additionalData?: Record<string, any> | undefined;
1054
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth/react").Prettify<{
1055
- provider: (string & {}) | "linear" | "huggingface" | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat";
199
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, string | undefined> | undefined>>(data_0: import("better-auth/react").Prettify<{
200
+ provider: (string & {}) | "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";
1056
201
  callbackURL?: string | undefined;
1057
202
  newUserCallbackURL?: string | undefined;
1058
203
  errorCallbackURL?: string | undefined;
@@ -1113,7 +258,7 @@ export declare const useSession: () => {
1113
258
  password: string;
1114
259
  callbackURL?: string | undefined;
1115
260
  rememberMe?: boolean | undefined;
1116
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth/react").Prettify<{
261
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, string | undefined> | undefined>>(data_0: import("better-auth/react").Prettify<{
1117
262
  email: string;
1118
263
  password: string;
1119
264
  callbackURL?: string | undefined;
@@ -1147,7 +292,7 @@ export declare const useSession: () => {
1147
292
  code?: string | undefined;
1148
293
  message?: string | undefined;
1149
294
  }, FetchOptions["throw"] extends true ? true : false>>;
1150
- }, signOut: <FetchOptions extends import("@better-auth/core").ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth/react").Prettify<{
295
+ }, signOut: <FetchOptions extends import("@better-auth/core").ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, string | undefined> | undefined>>(data_0?: import("better-auth/react").Prettify<{
1151
296
  query?: Record<string, any> | undefined;
1152
297
  fetchOptions?: FetchOptions | undefined;
1153
298
  }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{