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