@choiceform/shared-auth 0.1.13 → 0.1.14

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