@uninspired/auth-client 0.0.9 → 0.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/types/index.d.ts +3407 -0
  2. package/package.json +2 -2
@@ -0,0 +1,3407 @@
1
+ import * as nanostores from 'nanostores';
2
+ import * as inspector from 'inspector';
3
+ import * as _simplewebauthn_server from '@simplewebauthn/server';
4
+ import * as undici_types from 'undici-types';
5
+ import * as better_auth from 'better-auth';
6
+ import * as _better_fetch_fetch from '@better-fetch/fetch';
7
+ import * as better_auth_plugins_passkey from 'better-auth/plugins/passkey';
8
+ import * as hono_hono_base from 'hono/hono-base';
9
+ import * as hono_utils_http_status from 'hono/utils/http-status';
10
+ import { hc, ClientRequestOptions } from 'hono/client';
11
+
12
+ declare const checkoutRouter: hono_hono_base.HonoBase<{
13
+ Variables: {
14
+ user: {
15
+ id: string;
16
+ createdAt: Date;
17
+ updatedAt: Date;
18
+ email: string;
19
+ emailVerified: boolean;
20
+ name: string;
21
+ image?: string | null | undefined;
22
+ };
23
+ session: {
24
+ id: string;
25
+ createdAt: Date;
26
+ updatedAt: Date;
27
+ userId: string;
28
+ expiresAt: Date;
29
+ token: string;
30
+ ipAddress?: string | null | undefined;
31
+ userAgent?: string | null | undefined;
32
+ };
33
+ };
34
+ }, {
35
+ "/validate": {
36
+ $get: {
37
+ input: {
38
+ query: {
39
+ priceId: string;
40
+ discountCode?: string | undefined;
41
+ };
42
+ };
43
+ output: {
44
+ price: {
45
+ id: string;
46
+ name: string | null;
47
+ productName: string;
48
+ customData: {
49
+ [x: `benefit_${number}`]: string;
50
+ sort_index: string;
51
+ button_text: string;
52
+ button_variant: "primary" | "secondary";
53
+ } | null;
54
+ billingCycleInterval: "day" | "week" | "month" | "year" | null;
55
+ unitPriceAmount: string;
56
+ unitPriceCurrencyCode: "USD" | "EUR" | "GBP" | "JPY" | "AUD" | "CAD" | "CHF" | "HKD" | "SGD" | "SEK" | "ARS" | "BRL" | "CNY" | "COP" | "CZK" | "DKK" | "HUF" | "ILS" | "INR" | "KRW" | "MXN" | "NOK" | "NZD" | "PLN" | "RUB" | "THB" | "TRY" | "TWD" | "UAH" | "VND" | "ZAR";
57
+ } | undefined;
58
+ discountValid: boolean;
59
+ discountId: string | undefined;
60
+ };
61
+ outputFormat: "json";
62
+ status: hono_utils_http_status.ContentfulStatusCode;
63
+ };
64
+ };
65
+ }, "/">;
66
+ type CheckoutRouter = typeof checkoutRouter;
67
+
68
+ declare const appRouter: hono_hono_base.HonoBase<{
69
+ Variables: {
70
+ user: {
71
+ id: string;
72
+ createdAt: Date;
73
+ updatedAt: Date;
74
+ email: string;
75
+ emailVerified: boolean;
76
+ name: string;
77
+ image?: string | null | undefined;
78
+ };
79
+ session: {
80
+ id: string;
81
+ createdAt: Date;
82
+ updatedAt: Date;
83
+ userId: string;
84
+ expiresAt: Date;
85
+ token: string;
86
+ ipAddress?: string | null | undefined;
87
+ userAgent?: string | null | undefined;
88
+ };
89
+ };
90
+ }, {
91
+ "/portal/:subscriptionId/:action": {
92
+ $get: {
93
+ input: {
94
+ param: {
95
+ subscriptionId: string;
96
+ action: "update" | "cancel";
97
+ };
98
+ };
99
+ output: undefined;
100
+ outputFormat: "redirect";
101
+ status: 302;
102
+ };
103
+ };
104
+ }, "/">;
105
+ type AppRouter = typeof appRouter;
106
+
107
+ declare const publicRouter: hono_hono_base.HonoBase<{
108
+ Variables: {
109
+ user: {
110
+ id: string;
111
+ createdAt: Date;
112
+ updatedAt: Date;
113
+ email: string;
114
+ emailVerified: boolean;
115
+ name: string;
116
+ image?: string | null | undefined;
117
+ } | null;
118
+ };
119
+ }, {
120
+ "/products": {
121
+ $get: {
122
+ input: {};
123
+ output: {
124
+ id: string;
125
+ name: string;
126
+ description: string | null;
127
+ customData: {
128
+ [x: `benefit_heading_${number}`]: string;
129
+ [x: `benefit_body_${number}`]: string;
130
+ slug: string;
131
+ sort_index: string;
132
+ detail_description: string;
133
+ hero_video?: string | undefined;
134
+ goto_button_url: string;
135
+ goto_button_label: string;
136
+ } | null;
137
+ status: string;
138
+ createdAt: string | null;
139
+ updatedAt: string | null;
140
+ owned: boolean;
141
+ prices: {
142
+ id: string;
143
+ owned: boolean;
144
+ name: string | null;
145
+ description: string | null;
146
+ customData: {
147
+ [x: `benefit_${number}`]: string;
148
+ sort_index: string;
149
+ button_text: string;
150
+ button_variant: "primary" | "secondary";
151
+ } | null;
152
+ status: string;
153
+ createdAt: string | null;
154
+ updatedAt: string | null;
155
+ billingCycle: {
156
+ frequency: number | null;
157
+ interval: string | null;
158
+ };
159
+ unitPrice: {
160
+ amount: string | null;
161
+ currencyCode: string | null;
162
+ };
163
+ }[];
164
+ }[];
165
+ outputFormat: "json";
166
+ status: hono_utils_http_status.ContentfulStatusCode;
167
+ };
168
+ };
169
+ } & {
170
+ "/products/:productId": {
171
+ $get: {
172
+ input: {
173
+ param: {
174
+ productId: string;
175
+ };
176
+ };
177
+ output: {
178
+ id: string;
179
+ name: string;
180
+ description: string | null;
181
+ customData: {
182
+ [x: `benefit_heading_${number}`]: string;
183
+ [x: `benefit_body_${number}`]: string;
184
+ slug: string;
185
+ sort_index: string;
186
+ detail_description: string;
187
+ hero_video?: string | undefined;
188
+ goto_button_url: string;
189
+ goto_button_label: string;
190
+ } | null;
191
+ status: string;
192
+ createdAt: string | null;
193
+ updatedAt: string | null;
194
+ owned: boolean;
195
+ prices: {
196
+ id: string;
197
+ owned: boolean;
198
+ name: string | null;
199
+ description: string | null;
200
+ customData: {
201
+ [x: `benefit_${number}`]: string;
202
+ sort_index: string;
203
+ button_text: string;
204
+ button_variant: "primary" | "secondary";
205
+ } | null;
206
+ status: string;
207
+ createdAt: string | null;
208
+ updatedAt: string | null;
209
+ billingCycle: {
210
+ frequency: number | null;
211
+ interval: string | null;
212
+ };
213
+ unitPrice: {
214
+ amount: string | null;
215
+ currencyCode: string | null;
216
+ };
217
+ }[];
218
+ };
219
+ outputFormat: "json";
220
+ status: hono_utils_http_status.ContentfulStatusCode;
221
+ };
222
+ };
223
+ }, "/">;
224
+ type PublicRouter = typeof publicRouter;
225
+
226
+ declare const makeUsBetterAuthClient: (baseURL: string) => {
227
+ useListPasskeys: () => {
228
+ data: better_auth_plugins_passkey.Passkey[] | null;
229
+ error: null | _better_fetch_fetch.BetterFetchError;
230
+ isPending: boolean;
231
+ isRefetching: boolean;
232
+ refetch: (queryParams?: {
233
+ query?: better_auth.SessionQueryParams;
234
+ } | undefined) => void;
235
+ };
236
+ } & {
237
+ signIn: {
238
+ magicLink: <FetchOptions extends {
239
+ mode?: undici_types.RequestMode | undefined;
240
+ method?: string | undefined;
241
+ headers?: any;
242
+ keepalive?: boolean | undefined;
243
+ redirect?: undici_types.RequestRedirect | undefined;
244
+ integrity?: string | undefined;
245
+ signal?: (AbortSignal | null) | undefined;
246
+ credentials?: undici_types.RequestCredentials | undefined;
247
+ referrer?: string | undefined;
248
+ referrerPolicy?: undici_types.ReferrerPolicy | undefined;
249
+ window?: null | undefined;
250
+ dispatcher?: undici_types.Dispatcher | undefined;
251
+ duplex?: undici_types.RequestDuplex | undefined;
252
+ onRequest?: (<T extends Record<string, any>>(context: _better_fetch_fetch.RequestContext<T>) => Promise<_better_fetch_fetch.RequestContext | void> | _better_fetch_fetch.RequestContext | void) | undefined;
253
+ onResponse?: ((context: _better_fetch_fetch.ResponseContext) => Promise<Response | void | _better_fetch_fetch.ResponseContext> | Response | _better_fetch_fetch.ResponseContext | void) | undefined;
254
+ onSuccess?: ((context: _better_fetch_fetch.SuccessContext<any>) => Promise<void> | void) | undefined;
255
+ onError?: ((context: _better_fetch_fetch.ErrorContext) => Promise<void> | void) | undefined;
256
+ onRetry?: ((response: _better_fetch_fetch.ResponseContext) => Promise<void> | void) | undefined;
257
+ hookOptions?: {
258
+ cloneResponse?: boolean;
259
+ } | undefined;
260
+ timeout?: number | undefined;
261
+ customFetchImpl?: _better_fetch_fetch.FetchEsque | undefined;
262
+ plugins?: _better_fetch_fetch.BetterFetchPlugin[] | undefined;
263
+ baseURL?: string | undefined;
264
+ throw?: boolean | undefined;
265
+ auth?: ({
266
+ type: "Bearer";
267
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
268
+ } | {
269
+ type: "Basic";
270
+ username: string | (() => string | undefined) | undefined;
271
+ password: string | (() => string | undefined) | undefined;
272
+ } | {
273
+ type: "Custom";
274
+ prefix: string | (() => string | undefined) | undefined;
275
+ value: string | (() => string | undefined) | undefined;
276
+ }) | undefined;
277
+ body?: (Partial<{
278
+ email: string;
279
+ name?: string | undefined;
280
+ callbackURL?: string | undefined;
281
+ newUserCallbackURL?: string | undefined;
282
+ errorCallbackURL?: string | undefined;
283
+ }> & Record<string, any>) | undefined;
284
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
285
+ params?: Record<string, any> | undefined;
286
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
287
+ retry?: _better_fetch_fetch.RetryOptions | undefined;
288
+ retryAttempt?: number | undefined;
289
+ output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
290
+ errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined;
291
+ disableValidation?: boolean | undefined;
292
+ }>(data_0: better_auth.Prettify<{
293
+ email: string;
294
+ name?: string | undefined;
295
+ callbackURL?: string | undefined;
296
+ newUserCallbackURL?: string | undefined;
297
+ errorCallbackURL?: string | undefined;
298
+ } & {
299
+ fetchOptions?: FetchOptions | undefined;
300
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
301
+ status: boolean;
302
+ }, {
303
+ code?: string;
304
+ message?: string;
305
+ }, FetchOptions["throw"] extends true ? true : false>>;
306
+ };
307
+ } & {
308
+ magicLink: {
309
+ verify: <FetchOptions extends {
310
+ mode?: undici_types.RequestMode | undefined;
311
+ method?: string | undefined;
312
+ headers?: any;
313
+ keepalive?: boolean | undefined;
314
+ redirect?: undici_types.RequestRedirect | undefined;
315
+ integrity?: string | undefined;
316
+ signal?: (AbortSignal | null) | undefined;
317
+ credentials?: undici_types.RequestCredentials | undefined;
318
+ referrer?: string | undefined;
319
+ referrerPolicy?: undici_types.ReferrerPolicy | undefined;
320
+ window?: null | undefined;
321
+ dispatcher?: undici_types.Dispatcher | undefined;
322
+ duplex?: undici_types.RequestDuplex | undefined;
323
+ onRequest?: (<T extends Record<string, any>>(context: _better_fetch_fetch.RequestContext<T>) => Promise<_better_fetch_fetch.RequestContext | void> | _better_fetch_fetch.RequestContext | void) | undefined;
324
+ onResponse?: ((context: _better_fetch_fetch.ResponseContext) => Promise<Response | void | _better_fetch_fetch.ResponseContext> | Response | _better_fetch_fetch.ResponseContext | void) | undefined;
325
+ onSuccess?: ((context: _better_fetch_fetch.SuccessContext<any>) => Promise<void> | void) | undefined;
326
+ onError?: ((context: _better_fetch_fetch.ErrorContext) => Promise<void> | void) | undefined;
327
+ onRetry?: ((response: _better_fetch_fetch.ResponseContext) => Promise<void> | void) | undefined;
328
+ hookOptions?: {
329
+ cloneResponse?: boolean;
330
+ } | undefined;
331
+ timeout?: number | undefined;
332
+ customFetchImpl?: _better_fetch_fetch.FetchEsque | undefined;
333
+ plugins?: _better_fetch_fetch.BetterFetchPlugin[] | undefined;
334
+ baseURL?: string | undefined;
335
+ throw?: boolean | undefined;
336
+ auth?: ({
337
+ type: "Bearer";
338
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
339
+ } | {
340
+ type: "Basic";
341
+ username: string | (() => string | undefined) | undefined;
342
+ password: string | (() => string | undefined) | undefined;
343
+ } | {
344
+ type: "Custom";
345
+ prefix: string | (() => string | undefined) | undefined;
346
+ value: string | (() => string | undefined) | undefined;
347
+ }) | undefined;
348
+ body?: undefined;
349
+ query?: (Partial<{
350
+ token: string;
351
+ callbackURL?: string | undefined;
352
+ errorCallbackURL?: string | undefined;
353
+ newUserCallbackURL?: string | undefined;
354
+ }> & Record<string, any>) | undefined;
355
+ params?: Record<string, any> | undefined;
356
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
357
+ retry?: _better_fetch_fetch.RetryOptions | undefined;
358
+ retryAttempt?: number | undefined;
359
+ output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
360
+ errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined;
361
+ disableValidation?: boolean | undefined;
362
+ }>(data_0: better_auth.Prettify<{
363
+ query: {
364
+ token: string;
365
+ callbackURL?: string | undefined;
366
+ errorCallbackURL?: string | undefined;
367
+ newUserCallbackURL?: string | undefined;
368
+ };
369
+ fetchOptions?: FetchOptions | undefined;
370
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
371
+ token: string;
372
+ user: {
373
+ id: string;
374
+ email: string;
375
+ emailVerified: boolean;
376
+ name: string;
377
+ image: string | null | undefined;
378
+ createdAt: Date;
379
+ updatedAt: Date;
380
+ };
381
+ }, {
382
+ code?: string;
383
+ message?: string;
384
+ }, FetchOptions["throw"] extends true ? true : false>>;
385
+ };
386
+ } & {
387
+ emailOtp: {
388
+ checkVerificationOtp: <FetchOptions extends {
389
+ mode?: undici_types.RequestMode | undefined;
390
+ method?: string | undefined;
391
+ headers?: any;
392
+ keepalive?: boolean | undefined;
393
+ redirect?: undici_types.RequestRedirect | undefined;
394
+ integrity?: string | undefined;
395
+ signal?: (AbortSignal | null) | undefined;
396
+ credentials?: undici_types.RequestCredentials | undefined;
397
+ referrer?: string | undefined;
398
+ referrerPolicy?: undici_types.ReferrerPolicy | undefined;
399
+ window?: null | undefined;
400
+ dispatcher?: undici_types.Dispatcher | undefined;
401
+ duplex?: undici_types.RequestDuplex | undefined;
402
+ onRequest?: (<T extends Record<string, any>>(context: _better_fetch_fetch.RequestContext<T>) => Promise<_better_fetch_fetch.RequestContext | void> | _better_fetch_fetch.RequestContext | void) | undefined;
403
+ onResponse?: ((context: _better_fetch_fetch.ResponseContext) => Promise<Response | void | _better_fetch_fetch.ResponseContext> | Response | _better_fetch_fetch.ResponseContext | void) | undefined;
404
+ onSuccess?: ((context: _better_fetch_fetch.SuccessContext<any>) => Promise<void> | void) | undefined;
405
+ onError?: ((context: _better_fetch_fetch.ErrorContext) => Promise<void> | void) | undefined;
406
+ onRetry?: ((response: _better_fetch_fetch.ResponseContext) => Promise<void> | void) | undefined;
407
+ hookOptions?: {
408
+ cloneResponse?: boolean;
409
+ } | undefined;
410
+ timeout?: number | undefined;
411
+ customFetchImpl?: _better_fetch_fetch.FetchEsque | undefined;
412
+ plugins?: _better_fetch_fetch.BetterFetchPlugin[] | undefined;
413
+ baseURL?: string | undefined;
414
+ throw?: boolean | undefined;
415
+ auth?: ({
416
+ type: "Bearer";
417
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
418
+ } | {
419
+ type: "Basic";
420
+ username: string | (() => string | undefined) | undefined;
421
+ password: string | (() => string | undefined) | undefined;
422
+ } | {
423
+ type: "Custom";
424
+ prefix: string | (() => string | undefined) | undefined;
425
+ value: string | (() => string | undefined) | undefined;
426
+ }) | undefined;
427
+ body?: (Partial<{
428
+ email: string;
429
+ type: "sign-in" | "forget-password" | "email-verification";
430
+ otp: string;
431
+ }> & Record<string, any>) | undefined;
432
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
433
+ params?: Record<string, any> | undefined;
434
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
435
+ retry?: _better_fetch_fetch.RetryOptions | undefined;
436
+ retryAttempt?: number | undefined;
437
+ output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
438
+ errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined;
439
+ disableValidation?: boolean | undefined;
440
+ }>(data_0: better_auth.Prettify<{
441
+ email: string;
442
+ type: "sign-in" | "forget-password" | "email-verification";
443
+ otp: string;
444
+ } & {
445
+ fetchOptions?: FetchOptions | undefined;
446
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
447
+ success: boolean;
448
+ }, {
449
+ code?: string;
450
+ message?: string;
451
+ }, FetchOptions["throw"] extends true ? true : false>>;
452
+ };
453
+ } & {
454
+ emailOtp: {
455
+ verifyEmail: <FetchOptions extends {
456
+ mode?: undici_types.RequestMode | undefined;
457
+ method?: string | undefined;
458
+ headers?: any;
459
+ keepalive?: boolean | undefined;
460
+ redirect?: undici_types.RequestRedirect | undefined;
461
+ integrity?: string | undefined;
462
+ signal?: (AbortSignal | null) | undefined;
463
+ credentials?: undici_types.RequestCredentials | undefined;
464
+ referrer?: string | undefined;
465
+ referrerPolicy?: undici_types.ReferrerPolicy | undefined;
466
+ window?: null | undefined;
467
+ dispatcher?: undici_types.Dispatcher | undefined;
468
+ duplex?: undici_types.RequestDuplex | undefined;
469
+ onRequest?: (<T extends Record<string, any>>(context: _better_fetch_fetch.RequestContext<T>) => Promise<_better_fetch_fetch.RequestContext | void> | _better_fetch_fetch.RequestContext | void) | undefined;
470
+ onResponse?: ((context: _better_fetch_fetch.ResponseContext) => Promise<Response | void | _better_fetch_fetch.ResponseContext> | Response | _better_fetch_fetch.ResponseContext | void) | undefined;
471
+ onSuccess?: ((context: _better_fetch_fetch.SuccessContext<any>) => Promise<void> | void) | undefined;
472
+ onError?: ((context: _better_fetch_fetch.ErrorContext) => Promise<void> | void) | undefined;
473
+ onRetry?: ((response: _better_fetch_fetch.ResponseContext) => Promise<void> | void) | undefined;
474
+ hookOptions?: {
475
+ cloneResponse?: boolean;
476
+ } | undefined;
477
+ timeout?: number | undefined;
478
+ customFetchImpl?: _better_fetch_fetch.FetchEsque | undefined;
479
+ plugins?: _better_fetch_fetch.BetterFetchPlugin[] | undefined;
480
+ baseURL?: string | undefined;
481
+ throw?: boolean | undefined;
482
+ auth?: ({
483
+ type: "Bearer";
484
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
485
+ } | {
486
+ type: "Basic";
487
+ username: string | (() => string | undefined) | undefined;
488
+ password: string | (() => string | undefined) | undefined;
489
+ } | {
490
+ type: "Custom";
491
+ prefix: string | (() => string | undefined) | undefined;
492
+ value: string | (() => string | undefined) | undefined;
493
+ }) | undefined;
494
+ body?: (Partial<{
495
+ email: string;
496
+ otp: string;
497
+ }> & Record<string, any>) | undefined;
498
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
499
+ params?: Record<string, any> | undefined;
500
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
501
+ retry?: _better_fetch_fetch.RetryOptions | undefined;
502
+ retryAttempt?: number | undefined;
503
+ output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
504
+ errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined;
505
+ disableValidation?: boolean | undefined;
506
+ }>(data_0: better_auth.Prettify<{
507
+ email: string;
508
+ otp: string;
509
+ } & {
510
+ fetchOptions?: FetchOptions | undefined;
511
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<NonNullable<{
512
+ status: boolean;
513
+ token: string;
514
+ user: {
515
+ id: any;
516
+ email: any;
517
+ emailVerified: any;
518
+ name: any;
519
+ image: any;
520
+ createdAt: any;
521
+ updatedAt: any;
522
+ };
523
+ } | {
524
+ status: boolean;
525
+ token: null;
526
+ user: {
527
+ id: any;
528
+ email: any;
529
+ emailVerified: any;
530
+ name: any;
531
+ image: any;
532
+ createdAt: any;
533
+ updatedAt: any;
534
+ };
535
+ }>, {
536
+ code?: string;
537
+ message?: string;
538
+ }, FetchOptions["throw"] extends true ? true : false>>;
539
+ };
540
+ } & {
541
+ signIn: {
542
+ emailOtp: <FetchOptions extends {
543
+ mode?: undici_types.RequestMode | undefined;
544
+ method?: string | undefined;
545
+ headers?: any;
546
+ keepalive?: boolean | undefined;
547
+ redirect?: undici_types.RequestRedirect | undefined;
548
+ integrity?: string | undefined;
549
+ signal?: (AbortSignal | null) | undefined;
550
+ credentials?: undici_types.RequestCredentials | undefined;
551
+ referrer?: string | undefined;
552
+ referrerPolicy?: undici_types.ReferrerPolicy | undefined;
553
+ window?: null | undefined;
554
+ dispatcher?: undici_types.Dispatcher | undefined;
555
+ duplex?: undici_types.RequestDuplex | undefined;
556
+ onRequest?: (<T extends Record<string, any>>(context: _better_fetch_fetch.RequestContext<T>) => Promise<_better_fetch_fetch.RequestContext | void> | _better_fetch_fetch.RequestContext | void) | undefined;
557
+ onResponse?: ((context: _better_fetch_fetch.ResponseContext) => Promise<Response | void | _better_fetch_fetch.ResponseContext> | Response | _better_fetch_fetch.ResponseContext | void) | undefined;
558
+ onSuccess?: ((context: _better_fetch_fetch.SuccessContext<any>) => Promise<void> | void) | undefined;
559
+ onError?: ((context: _better_fetch_fetch.ErrorContext) => Promise<void> | void) | undefined;
560
+ onRetry?: ((response: _better_fetch_fetch.ResponseContext) => Promise<void> | void) | undefined;
561
+ hookOptions?: {
562
+ cloneResponse?: boolean;
563
+ } | undefined;
564
+ timeout?: number | undefined;
565
+ customFetchImpl?: _better_fetch_fetch.FetchEsque | undefined;
566
+ plugins?: _better_fetch_fetch.BetterFetchPlugin[] | undefined;
567
+ baseURL?: string | undefined;
568
+ throw?: boolean | undefined;
569
+ auth?: ({
570
+ type: "Bearer";
571
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
572
+ } | {
573
+ type: "Basic";
574
+ username: string | (() => string | undefined) | undefined;
575
+ password: string | (() => string | undefined) | undefined;
576
+ } | {
577
+ type: "Custom";
578
+ prefix: string | (() => string | undefined) | undefined;
579
+ value: string | (() => string | undefined) | undefined;
580
+ }) | undefined;
581
+ body?: (Partial<{
582
+ email: string;
583
+ otp: string;
584
+ }> & Record<string, any>) | undefined;
585
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
586
+ params?: Record<string, any> | undefined;
587
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
588
+ retry?: _better_fetch_fetch.RetryOptions | undefined;
589
+ retryAttempt?: number | undefined;
590
+ output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
591
+ errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined;
592
+ disableValidation?: boolean | undefined;
593
+ }>(data_0: better_auth.Prettify<{
594
+ email: string;
595
+ otp: string;
596
+ } & {
597
+ fetchOptions?: FetchOptions | undefined;
598
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
599
+ token: string;
600
+ user: {
601
+ id: string;
602
+ email: string;
603
+ emailVerified: boolean;
604
+ name: string;
605
+ image: string | null | undefined;
606
+ createdAt: Date;
607
+ updatedAt: Date;
608
+ };
609
+ }, {
610
+ code?: string;
611
+ message?: string;
612
+ }, FetchOptions["throw"] extends true ? true : false>>;
613
+ };
614
+ } & {
615
+ forgetPassword: {
616
+ emailOtp: <FetchOptions extends {
617
+ mode?: undici_types.RequestMode | undefined;
618
+ method?: string | undefined;
619
+ headers?: any;
620
+ keepalive?: boolean | undefined;
621
+ redirect?: undici_types.RequestRedirect | undefined;
622
+ integrity?: string | undefined;
623
+ signal?: (AbortSignal | null) | undefined;
624
+ credentials?: undici_types.RequestCredentials | undefined;
625
+ referrer?: string | undefined;
626
+ referrerPolicy?: undici_types.ReferrerPolicy | undefined;
627
+ window?: null | undefined;
628
+ dispatcher?: undici_types.Dispatcher | undefined;
629
+ duplex?: undici_types.RequestDuplex | undefined;
630
+ onRequest?: (<T extends Record<string, any>>(context: _better_fetch_fetch.RequestContext<T>) => Promise<_better_fetch_fetch.RequestContext | void> | _better_fetch_fetch.RequestContext | void) | undefined;
631
+ onResponse?: ((context: _better_fetch_fetch.ResponseContext) => Promise<Response | void | _better_fetch_fetch.ResponseContext> | Response | _better_fetch_fetch.ResponseContext | void) | undefined;
632
+ onSuccess?: ((context: _better_fetch_fetch.SuccessContext<any>) => Promise<void> | void) | undefined;
633
+ onError?: ((context: _better_fetch_fetch.ErrorContext) => Promise<void> | void) | undefined;
634
+ onRetry?: ((response: _better_fetch_fetch.ResponseContext) => Promise<void> | void) | undefined;
635
+ hookOptions?: {
636
+ cloneResponse?: boolean;
637
+ } | undefined;
638
+ timeout?: number | undefined;
639
+ customFetchImpl?: _better_fetch_fetch.FetchEsque | undefined;
640
+ plugins?: _better_fetch_fetch.BetterFetchPlugin[] | undefined;
641
+ baseURL?: string | undefined;
642
+ throw?: boolean | undefined;
643
+ auth?: ({
644
+ type: "Bearer";
645
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
646
+ } | {
647
+ type: "Basic";
648
+ username: string | (() => string | undefined) | undefined;
649
+ password: string | (() => string | undefined) | undefined;
650
+ } | {
651
+ type: "Custom";
652
+ prefix: string | (() => string | undefined) | undefined;
653
+ value: string | (() => string | undefined) | undefined;
654
+ }) | undefined;
655
+ body?: (Partial<{
656
+ email: string;
657
+ }> & Record<string, any>) | undefined;
658
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
659
+ params?: Record<string, any> | undefined;
660
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
661
+ retry?: _better_fetch_fetch.RetryOptions | undefined;
662
+ retryAttempt?: number | undefined;
663
+ output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
664
+ errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined;
665
+ disableValidation?: boolean | undefined;
666
+ }>(data_0: better_auth.Prettify<{
667
+ email: string;
668
+ } & {
669
+ fetchOptions?: FetchOptions | undefined;
670
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
671
+ success: boolean;
672
+ }, {
673
+ code?: string;
674
+ message?: string;
675
+ }, FetchOptions["throw"] extends true ? true : false>>;
676
+ };
677
+ } & {
678
+ emailOtp: {
679
+ resetPassword: <FetchOptions extends {
680
+ mode?: undici_types.RequestMode | undefined;
681
+ method?: string | undefined;
682
+ headers?: any;
683
+ keepalive?: boolean | undefined;
684
+ redirect?: undici_types.RequestRedirect | undefined;
685
+ integrity?: string | undefined;
686
+ signal?: (AbortSignal | null) | undefined;
687
+ credentials?: undici_types.RequestCredentials | undefined;
688
+ referrer?: string | undefined;
689
+ referrerPolicy?: undici_types.ReferrerPolicy | undefined;
690
+ window?: null | undefined;
691
+ dispatcher?: undici_types.Dispatcher | undefined;
692
+ duplex?: undici_types.RequestDuplex | undefined;
693
+ onRequest?: (<T extends Record<string, any>>(context: _better_fetch_fetch.RequestContext<T>) => Promise<_better_fetch_fetch.RequestContext | void> | _better_fetch_fetch.RequestContext | void) | undefined;
694
+ onResponse?: ((context: _better_fetch_fetch.ResponseContext) => Promise<Response | void | _better_fetch_fetch.ResponseContext> | Response | _better_fetch_fetch.ResponseContext | void) | undefined;
695
+ onSuccess?: ((context: _better_fetch_fetch.SuccessContext<any>) => Promise<void> | void) | undefined;
696
+ onError?: ((context: _better_fetch_fetch.ErrorContext) => Promise<void> | void) | undefined;
697
+ onRetry?: ((response: _better_fetch_fetch.ResponseContext) => Promise<void> | void) | undefined;
698
+ hookOptions?: {
699
+ cloneResponse?: boolean;
700
+ } | undefined;
701
+ timeout?: number | undefined;
702
+ customFetchImpl?: _better_fetch_fetch.FetchEsque | undefined;
703
+ plugins?: _better_fetch_fetch.BetterFetchPlugin[] | undefined;
704
+ baseURL?: string | undefined;
705
+ throw?: boolean | undefined;
706
+ auth?: ({
707
+ type: "Bearer";
708
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
709
+ } | {
710
+ type: "Basic";
711
+ username: string | (() => string | undefined) | undefined;
712
+ password: string | (() => string | undefined) | undefined;
713
+ } | {
714
+ type: "Custom";
715
+ prefix: string | (() => string | undefined) | undefined;
716
+ value: string | (() => string | undefined) | undefined;
717
+ }) | undefined;
718
+ body?: (Partial<{
719
+ email: string;
720
+ otp: string;
721
+ password: string;
722
+ }> & Record<string, any>) | undefined;
723
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
724
+ params?: Record<string, any> | undefined;
725
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
726
+ retry?: _better_fetch_fetch.RetryOptions | undefined;
727
+ retryAttempt?: number | undefined;
728
+ output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
729
+ errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined;
730
+ disableValidation?: boolean | undefined;
731
+ }>(data_0: better_auth.Prettify<{
732
+ email: string;
733
+ otp: string;
734
+ password: string;
735
+ } & {
736
+ fetchOptions?: FetchOptions | undefined;
737
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
738
+ success: boolean;
739
+ }, {
740
+ code?: string;
741
+ message?: string;
742
+ }, FetchOptions["throw"] extends true ? true : false>>;
743
+ };
744
+ } & {
745
+ emailOtp: {
746
+ sendVerificationOtp: <FetchOptions extends {
747
+ mode?: undici_types.RequestMode | undefined;
748
+ method?: string | undefined;
749
+ headers?: any;
750
+ keepalive?: boolean | undefined;
751
+ redirect?: undici_types.RequestRedirect | undefined;
752
+ integrity?: string | undefined;
753
+ signal?: (AbortSignal | null) | undefined;
754
+ credentials?: undici_types.RequestCredentials | undefined;
755
+ referrer?: string | undefined;
756
+ referrerPolicy?: undici_types.ReferrerPolicy | undefined;
757
+ window?: null | undefined;
758
+ dispatcher?: undici_types.Dispatcher | undefined;
759
+ duplex?: undici_types.RequestDuplex | undefined;
760
+ onRequest?: (<T extends Record<string, any>>(context: _better_fetch_fetch.RequestContext<T>) => Promise<_better_fetch_fetch.RequestContext | void> | _better_fetch_fetch.RequestContext | void) | undefined;
761
+ onResponse?: ((context: _better_fetch_fetch.ResponseContext) => Promise<Response | void | _better_fetch_fetch.ResponseContext> | Response | _better_fetch_fetch.ResponseContext | void) | undefined;
762
+ onSuccess?: ((context: _better_fetch_fetch.SuccessContext<any>) => Promise<void> | void) | undefined;
763
+ onError?: ((context: _better_fetch_fetch.ErrorContext) => Promise<void> | void) | undefined;
764
+ onRetry?: ((response: _better_fetch_fetch.ResponseContext) => Promise<void> | void) | undefined;
765
+ hookOptions?: {
766
+ cloneResponse?: boolean;
767
+ } | undefined;
768
+ timeout?: number | undefined;
769
+ customFetchImpl?: _better_fetch_fetch.FetchEsque | undefined;
770
+ plugins?: _better_fetch_fetch.BetterFetchPlugin[] | undefined;
771
+ baseURL?: string | undefined;
772
+ throw?: boolean | undefined;
773
+ auth?: ({
774
+ type: "Bearer";
775
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
776
+ } | {
777
+ type: "Basic";
778
+ username: string | (() => string | undefined) | undefined;
779
+ password: string | (() => string | undefined) | undefined;
780
+ } | {
781
+ type: "Custom";
782
+ prefix: string | (() => string | undefined) | undefined;
783
+ value: string | (() => string | undefined) | undefined;
784
+ }) | undefined;
785
+ body?: (Partial<{
786
+ email: string;
787
+ type: "sign-in" | "forget-password" | "email-verification";
788
+ }> & Record<string, any>) | undefined;
789
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
790
+ params?: Record<string, any> | undefined;
791
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
792
+ retry?: _better_fetch_fetch.RetryOptions | undefined;
793
+ retryAttempt?: number | undefined;
794
+ output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
795
+ errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined;
796
+ disableValidation?: boolean | undefined;
797
+ }>(data_0: better_auth.Prettify<{
798
+ email: string;
799
+ type: "sign-in" | "forget-password" | "email-verification";
800
+ } & {
801
+ fetchOptions?: FetchOptions | undefined;
802
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
803
+ success: boolean;
804
+ }, {
805
+ code?: string;
806
+ message?: string;
807
+ }, FetchOptions["throw"] extends true ? true : false>>;
808
+ };
809
+ } & {
810
+ passkey: {
811
+ generateRegisterOptions: <FetchOptions extends {
812
+ mode?: undici_types.RequestMode | undefined;
813
+ method?: string | undefined;
814
+ headers?: any;
815
+ keepalive?: boolean | undefined;
816
+ redirect?: undici_types.RequestRedirect | undefined;
817
+ integrity?: string | undefined;
818
+ signal?: (AbortSignal | null) | undefined;
819
+ credentials?: undici_types.RequestCredentials | undefined;
820
+ referrer?: string | undefined;
821
+ referrerPolicy?: undici_types.ReferrerPolicy | undefined;
822
+ window?: null | undefined;
823
+ dispatcher?: undici_types.Dispatcher | undefined;
824
+ duplex?: undici_types.RequestDuplex | undefined;
825
+ onRequest?: (<T extends Record<string, any>>(context: _better_fetch_fetch.RequestContext<T>) => Promise<_better_fetch_fetch.RequestContext | void> | _better_fetch_fetch.RequestContext | void) | undefined;
826
+ onResponse?: ((context: _better_fetch_fetch.ResponseContext) => Promise<Response | void | _better_fetch_fetch.ResponseContext> | Response | _better_fetch_fetch.ResponseContext | void) | undefined;
827
+ onSuccess?: ((context: _better_fetch_fetch.SuccessContext<any>) => Promise<void> | void) | undefined;
828
+ onError?: ((context: _better_fetch_fetch.ErrorContext) => Promise<void> | void) | undefined;
829
+ onRetry?: ((response: _better_fetch_fetch.ResponseContext) => Promise<void> | void) | undefined;
830
+ hookOptions?: {
831
+ cloneResponse?: boolean;
832
+ } | undefined;
833
+ timeout?: number | undefined;
834
+ customFetchImpl?: _better_fetch_fetch.FetchEsque | undefined;
835
+ plugins?: _better_fetch_fetch.BetterFetchPlugin[] | undefined;
836
+ baseURL?: string | undefined;
837
+ throw?: boolean | undefined;
838
+ auth?: ({
839
+ type: "Bearer";
840
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
841
+ } | {
842
+ type: "Basic";
843
+ username: string | (() => string | undefined) | undefined;
844
+ password: string | (() => string | undefined) | undefined;
845
+ } | {
846
+ type: "Custom";
847
+ prefix: string | (() => string | undefined) | undefined;
848
+ value: string | (() => string | undefined) | undefined;
849
+ }) | undefined;
850
+ body?: undefined;
851
+ query?: (Partial<{
852
+ authenticatorAttachment?: "platform" | "cross-platform" | undefined;
853
+ name?: string | undefined;
854
+ }> & Record<string, any>) | undefined;
855
+ params?: Record<string, any> | undefined;
856
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
857
+ retry?: _better_fetch_fetch.RetryOptions | undefined;
858
+ retryAttempt?: number | undefined;
859
+ output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
860
+ errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined;
861
+ disableValidation?: boolean | undefined;
862
+ }>(data_0?: better_auth.Prettify<{
863
+ query?: {
864
+ authenticatorAttachment?: "platform" | "cross-platform" | undefined;
865
+ name?: string | undefined;
866
+ } | undefined;
867
+ fetchOptions?: FetchOptions | undefined;
868
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<_simplewebauthn_server.PublicKeyCredentialCreationOptionsJSON, {
869
+ code?: string;
870
+ message?: string;
871
+ }, FetchOptions["throw"] extends true ? true : false>>;
872
+ };
873
+ } & {
874
+ passkey: {
875
+ generateAuthenticateOptions: <FetchOptions extends {
876
+ mode?: undici_types.RequestMode | undefined;
877
+ method?: string | undefined;
878
+ headers?: any;
879
+ keepalive?: boolean | undefined;
880
+ redirect?: undici_types.RequestRedirect | undefined;
881
+ integrity?: string | undefined;
882
+ signal?: (AbortSignal | null) | undefined;
883
+ credentials?: undici_types.RequestCredentials | undefined;
884
+ referrer?: string | undefined;
885
+ referrerPolicy?: undici_types.ReferrerPolicy | undefined;
886
+ window?: null | undefined;
887
+ dispatcher?: undici_types.Dispatcher | undefined;
888
+ duplex?: undici_types.RequestDuplex | undefined;
889
+ onRequest?: (<T extends Record<string, any>>(context: _better_fetch_fetch.RequestContext<T>) => Promise<_better_fetch_fetch.RequestContext | void> | _better_fetch_fetch.RequestContext | void) | undefined;
890
+ onResponse?: ((context: _better_fetch_fetch.ResponseContext) => Promise<Response | void | _better_fetch_fetch.ResponseContext> | Response | _better_fetch_fetch.ResponseContext | void) | undefined;
891
+ onSuccess?: ((context: _better_fetch_fetch.SuccessContext<any>) => Promise<void> | void) | undefined;
892
+ onError?: ((context: _better_fetch_fetch.ErrorContext) => Promise<void> | void) | undefined;
893
+ onRetry?: ((response: _better_fetch_fetch.ResponseContext) => Promise<void> | void) | undefined;
894
+ hookOptions?: {
895
+ cloneResponse?: boolean;
896
+ } | undefined;
897
+ timeout?: number | undefined;
898
+ customFetchImpl?: _better_fetch_fetch.FetchEsque | undefined;
899
+ plugins?: _better_fetch_fetch.BetterFetchPlugin[] | undefined;
900
+ baseURL?: string | undefined;
901
+ throw?: boolean | undefined;
902
+ auth?: ({
903
+ type: "Bearer";
904
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
905
+ } | {
906
+ type: "Basic";
907
+ username: string | (() => string | undefined) | undefined;
908
+ password: string | (() => string | undefined) | undefined;
909
+ } | {
910
+ type: "Custom";
911
+ prefix: string | (() => string | undefined) | undefined;
912
+ value: string | (() => string | undefined) | undefined;
913
+ }) | undefined;
914
+ body?: (Partial<{
915
+ email?: string | undefined;
916
+ }> & Record<string, any>) | undefined;
917
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
918
+ params?: Record<string, any> | undefined;
919
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
920
+ retry?: _better_fetch_fetch.RetryOptions | undefined;
921
+ retryAttempt?: number | undefined;
922
+ output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
923
+ errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined;
924
+ disableValidation?: boolean | undefined;
925
+ }>(data_0?: better_auth.Prettify<{
926
+ query?: Record<string, any> | undefined;
927
+ fetchOptions?: FetchOptions | undefined;
928
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<_simplewebauthn_server.PublicKeyCredentialRequestOptionsJSON, {
929
+ code?: string;
930
+ message?: string;
931
+ }, FetchOptions["throw"] extends true ? true : false>>;
932
+ };
933
+ } & {
934
+ passkey: {
935
+ verifyRegistration: <FetchOptions extends {
936
+ mode?: undici_types.RequestMode | undefined;
937
+ method?: string | undefined;
938
+ headers?: any;
939
+ keepalive?: boolean | undefined;
940
+ redirect?: undici_types.RequestRedirect | undefined;
941
+ integrity?: string | undefined;
942
+ signal?: (AbortSignal | null) | undefined;
943
+ credentials?: undici_types.RequestCredentials | undefined;
944
+ referrer?: string | undefined;
945
+ referrerPolicy?: undici_types.ReferrerPolicy | undefined;
946
+ window?: null | undefined;
947
+ dispatcher?: undici_types.Dispatcher | undefined;
948
+ duplex?: undici_types.RequestDuplex | undefined;
949
+ onRequest?: (<T extends Record<string, any>>(context: _better_fetch_fetch.RequestContext<T>) => Promise<_better_fetch_fetch.RequestContext | void> | _better_fetch_fetch.RequestContext | void) | undefined;
950
+ onResponse?: ((context: _better_fetch_fetch.ResponseContext) => Promise<Response | void | _better_fetch_fetch.ResponseContext> | Response | _better_fetch_fetch.ResponseContext | void) | undefined;
951
+ onSuccess?: ((context: _better_fetch_fetch.SuccessContext<any>) => Promise<void> | void) | undefined;
952
+ onError?: ((context: _better_fetch_fetch.ErrorContext) => Promise<void> | void) | undefined;
953
+ onRetry?: ((response: _better_fetch_fetch.ResponseContext) => Promise<void> | void) | undefined;
954
+ hookOptions?: {
955
+ cloneResponse?: boolean;
956
+ } | undefined;
957
+ timeout?: number | undefined;
958
+ customFetchImpl?: _better_fetch_fetch.FetchEsque | undefined;
959
+ plugins?: _better_fetch_fetch.BetterFetchPlugin[] | undefined;
960
+ baseURL?: string | undefined;
961
+ throw?: boolean | undefined;
962
+ auth?: ({
963
+ type: "Bearer";
964
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
965
+ } | {
966
+ type: "Basic";
967
+ username: string | (() => string | undefined) | undefined;
968
+ password: string | (() => string | undefined) | undefined;
969
+ } | {
970
+ type: "Custom";
971
+ prefix: string | (() => string | undefined) | undefined;
972
+ value: string | (() => string | undefined) | undefined;
973
+ }) | undefined;
974
+ body?: (Partial<{
975
+ response: any;
976
+ name?: string | undefined;
977
+ }> & Record<string, any>) | undefined;
978
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
979
+ params?: Record<string, any> | undefined;
980
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
981
+ retry?: _better_fetch_fetch.RetryOptions | undefined;
982
+ retryAttempt?: number | undefined;
983
+ output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
984
+ errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined;
985
+ disableValidation?: boolean | undefined;
986
+ }>(data_0: better_auth.Prettify<{
987
+ response: any;
988
+ name?: string | undefined;
989
+ } & {
990
+ fetchOptions?: FetchOptions | undefined;
991
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<better_auth_plugins_passkey.Passkey, {
992
+ code?: string;
993
+ message?: string;
994
+ }, FetchOptions["throw"] extends true ? true : false>>;
995
+ };
996
+ } & {
997
+ passkey: {
998
+ verifyAuthentication: <FetchOptions extends {
999
+ mode?: undici_types.RequestMode | undefined;
1000
+ method?: string | undefined;
1001
+ headers?: any;
1002
+ keepalive?: boolean | undefined;
1003
+ redirect?: undici_types.RequestRedirect | undefined;
1004
+ integrity?: string | undefined;
1005
+ signal?: (AbortSignal | null) | undefined;
1006
+ credentials?: undici_types.RequestCredentials | undefined;
1007
+ referrer?: string | undefined;
1008
+ referrerPolicy?: undici_types.ReferrerPolicy | undefined;
1009
+ window?: null | undefined;
1010
+ dispatcher?: undici_types.Dispatcher | undefined;
1011
+ duplex?: undici_types.RequestDuplex | undefined;
1012
+ onRequest?: (<T extends Record<string, any>>(context: _better_fetch_fetch.RequestContext<T>) => Promise<_better_fetch_fetch.RequestContext | void> | _better_fetch_fetch.RequestContext | void) | undefined;
1013
+ onResponse?: ((context: _better_fetch_fetch.ResponseContext) => Promise<Response | void | _better_fetch_fetch.ResponseContext> | Response | _better_fetch_fetch.ResponseContext | void) | undefined;
1014
+ onSuccess?: ((context: _better_fetch_fetch.SuccessContext<any>) => Promise<void> | void) | undefined;
1015
+ onError?: ((context: _better_fetch_fetch.ErrorContext) => Promise<void> | void) | undefined;
1016
+ onRetry?: ((response: _better_fetch_fetch.ResponseContext) => Promise<void> | void) | undefined;
1017
+ hookOptions?: {
1018
+ cloneResponse?: boolean;
1019
+ } | undefined;
1020
+ timeout?: number | undefined;
1021
+ customFetchImpl?: _better_fetch_fetch.FetchEsque | undefined;
1022
+ plugins?: _better_fetch_fetch.BetterFetchPlugin[] | undefined;
1023
+ baseURL?: string | undefined;
1024
+ throw?: boolean | undefined;
1025
+ auth?: ({
1026
+ type: "Bearer";
1027
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1028
+ } | {
1029
+ type: "Basic";
1030
+ username: string | (() => string | undefined) | undefined;
1031
+ password: string | (() => string | undefined) | undefined;
1032
+ } | {
1033
+ type: "Custom";
1034
+ prefix: string | (() => string | undefined) | undefined;
1035
+ value: string | (() => string | undefined) | undefined;
1036
+ }) | undefined;
1037
+ body?: (Partial<{
1038
+ response: _simplewebauthn_server.AuthenticationResponseJSON;
1039
+ }> & Record<string, any>) | undefined;
1040
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
1041
+ params?: Record<string, any> | undefined;
1042
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1043
+ retry?: _better_fetch_fetch.RetryOptions | undefined;
1044
+ retryAttempt?: number | undefined;
1045
+ output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1046
+ errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined;
1047
+ disableValidation?: boolean | undefined;
1048
+ }>(data_0: better_auth.Prettify<{
1049
+ response: _simplewebauthn_server.AuthenticationResponseJSON;
1050
+ } & {
1051
+ fetchOptions?: FetchOptions | undefined;
1052
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
1053
+ session: {
1054
+ id: string;
1055
+ createdAt: Date;
1056
+ updatedAt: Date;
1057
+ userId: string;
1058
+ expiresAt: Date;
1059
+ token: string;
1060
+ ipAddress?: string | null | undefined;
1061
+ userAgent?: string | null | undefined;
1062
+ };
1063
+ }, {
1064
+ code?: string;
1065
+ message?: string;
1066
+ }, FetchOptions["throw"] extends true ? true : false>>;
1067
+ };
1068
+ } & {
1069
+ passkey: {
1070
+ listUserPasskeys: <FetchOptions extends {
1071
+ mode?: undici_types.RequestMode | undefined;
1072
+ method?: string | undefined;
1073
+ headers?: any;
1074
+ keepalive?: boolean | undefined;
1075
+ redirect?: undici_types.RequestRedirect | undefined;
1076
+ integrity?: string | undefined;
1077
+ signal?: (AbortSignal | null) | undefined;
1078
+ credentials?: undici_types.RequestCredentials | undefined;
1079
+ referrer?: string | undefined;
1080
+ referrerPolicy?: undici_types.ReferrerPolicy | undefined;
1081
+ window?: null | undefined;
1082
+ dispatcher?: undici_types.Dispatcher | undefined;
1083
+ duplex?: undici_types.RequestDuplex | undefined;
1084
+ onRequest?: (<T extends Record<string, any>>(context: _better_fetch_fetch.RequestContext<T>) => Promise<_better_fetch_fetch.RequestContext | void> | _better_fetch_fetch.RequestContext | void) | undefined;
1085
+ onResponse?: ((context: _better_fetch_fetch.ResponseContext) => Promise<Response | void | _better_fetch_fetch.ResponseContext> | Response | _better_fetch_fetch.ResponseContext | void) | undefined;
1086
+ onSuccess?: ((context: _better_fetch_fetch.SuccessContext<any>) => Promise<void> | void) | undefined;
1087
+ onError?: ((context: _better_fetch_fetch.ErrorContext) => Promise<void> | void) | undefined;
1088
+ onRetry?: ((response: _better_fetch_fetch.ResponseContext) => Promise<void> | void) | undefined;
1089
+ hookOptions?: {
1090
+ cloneResponse?: boolean;
1091
+ } | undefined;
1092
+ timeout?: number | undefined;
1093
+ customFetchImpl?: _better_fetch_fetch.FetchEsque | undefined;
1094
+ plugins?: _better_fetch_fetch.BetterFetchPlugin[] | undefined;
1095
+ baseURL?: string | undefined;
1096
+ throw?: boolean | undefined;
1097
+ auth?: ({
1098
+ type: "Bearer";
1099
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1100
+ } | {
1101
+ type: "Basic";
1102
+ username: string | (() => string | undefined) | undefined;
1103
+ password: string | (() => string | undefined) | undefined;
1104
+ } | {
1105
+ type: "Custom";
1106
+ prefix: string | (() => string | undefined) | undefined;
1107
+ value: string | (() => string | undefined) | undefined;
1108
+ }) | undefined;
1109
+ body?: undefined;
1110
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
1111
+ params?: Record<string, any> | undefined;
1112
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1113
+ retry?: _better_fetch_fetch.RetryOptions | undefined;
1114
+ retryAttempt?: number | undefined;
1115
+ output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1116
+ errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined;
1117
+ disableValidation?: boolean | undefined;
1118
+ }>(data_0?: better_auth.Prettify<{
1119
+ query?: Record<string, any> | undefined;
1120
+ fetchOptions?: FetchOptions | undefined;
1121
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<better_auth_plugins_passkey.Passkey[], {
1122
+ code?: string;
1123
+ message?: string;
1124
+ }, FetchOptions["throw"] extends true ? true : false>>;
1125
+ };
1126
+ } & {
1127
+ passkey: {
1128
+ deletePasskey: <FetchOptions extends {
1129
+ mode?: undici_types.RequestMode | undefined;
1130
+ method?: string | undefined;
1131
+ headers?: any;
1132
+ keepalive?: boolean | undefined;
1133
+ redirect?: undici_types.RequestRedirect | undefined;
1134
+ integrity?: string | undefined;
1135
+ signal?: (AbortSignal | null) | undefined;
1136
+ credentials?: undici_types.RequestCredentials | undefined;
1137
+ referrer?: string | undefined;
1138
+ referrerPolicy?: undici_types.ReferrerPolicy | undefined;
1139
+ window?: null | undefined;
1140
+ dispatcher?: undici_types.Dispatcher | undefined;
1141
+ duplex?: undici_types.RequestDuplex | undefined;
1142
+ onRequest?: (<T extends Record<string, any>>(context: _better_fetch_fetch.RequestContext<T>) => Promise<_better_fetch_fetch.RequestContext | void> | _better_fetch_fetch.RequestContext | void) | undefined;
1143
+ onResponse?: ((context: _better_fetch_fetch.ResponseContext) => Promise<Response | void | _better_fetch_fetch.ResponseContext> | Response | _better_fetch_fetch.ResponseContext | void) | undefined;
1144
+ onSuccess?: ((context: _better_fetch_fetch.SuccessContext<any>) => Promise<void> | void) | undefined;
1145
+ onError?: ((context: _better_fetch_fetch.ErrorContext) => Promise<void> | void) | undefined;
1146
+ onRetry?: ((response: _better_fetch_fetch.ResponseContext) => Promise<void> | void) | undefined;
1147
+ hookOptions?: {
1148
+ cloneResponse?: boolean;
1149
+ } | undefined;
1150
+ timeout?: number | undefined;
1151
+ customFetchImpl?: _better_fetch_fetch.FetchEsque | undefined;
1152
+ plugins?: _better_fetch_fetch.BetterFetchPlugin[] | undefined;
1153
+ baseURL?: string | undefined;
1154
+ throw?: boolean | undefined;
1155
+ auth?: ({
1156
+ type: "Bearer";
1157
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1158
+ } | {
1159
+ type: "Basic";
1160
+ username: string | (() => string | undefined) | undefined;
1161
+ password: string | (() => string | undefined) | undefined;
1162
+ } | {
1163
+ type: "Custom";
1164
+ prefix: string | (() => string | undefined) | undefined;
1165
+ value: string | (() => string | undefined) | undefined;
1166
+ }) | undefined;
1167
+ body?: (Partial<{
1168
+ id: string;
1169
+ }> & Record<string, any>) | undefined;
1170
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
1171
+ params?: Record<string, any> | undefined;
1172
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1173
+ retry?: _better_fetch_fetch.RetryOptions | undefined;
1174
+ retryAttempt?: number | undefined;
1175
+ output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1176
+ errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined;
1177
+ disableValidation?: boolean | undefined;
1178
+ }>(data_0: better_auth.Prettify<{
1179
+ id: string;
1180
+ } & {
1181
+ fetchOptions?: FetchOptions | undefined;
1182
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<never, {
1183
+ code?: string;
1184
+ message?: string;
1185
+ }, FetchOptions["throw"] extends true ? true : false>>;
1186
+ };
1187
+ } & {
1188
+ passkey: {
1189
+ updatePasskey: <FetchOptions extends {
1190
+ mode?: undici_types.RequestMode | undefined;
1191
+ method?: string | undefined;
1192
+ headers?: any;
1193
+ keepalive?: boolean | undefined;
1194
+ redirect?: undici_types.RequestRedirect | undefined;
1195
+ integrity?: string | undefined;
1196
+ signal?: (AbortSignal | null) | undefined;
1197
+ credentials?: undici_types.RequestCredentials | undefined;
1198
+ referrer?: string | undefined;
1199
+ referrerPolicy?: undici_types.ReferrerPolicy | undefined;
1200
+ window?: null | undefined;
1201
+ dispatcher?: undici_types.Dispatcher | undefined;
1202
+ duplex?: undici_types.RequestDuplex | undefined;
1203
+ onRequest?: (<T extends Record<string, any>>(context: _better_fetch_fetch.RequestContext<T>) => Promise<_better_fetch_fetch.RequestContext | void> | _better_fetch_fetch.RequestContext | void) | undefined;
1204
+ onResponse?: ((context: _better_fetch_fetch.ResponseContext) => Promise<Response | void | _better_fetch_fetch.ResponseContext> | Response | _better_fetch_fetch.ResponseContext | void) | undefined;
1205
+ onSuccess?: ((context: _better_fetch_fetch.SuccessContext<any>) => Promise<void> | void) | undefined;
1206
+ onError?: ((context: _better_fetch_fetch.ErrorContext) => Promise<void> | void) | undefined;
1207
+ onRetry?: ((response: _better_fetch_fetch.ResponseContext) => Promise<void> | void) | undefined;
1208
+ hookOptions?: {
1209
+ cloneResponse?: boolean;
1210
+ } | undefined;
1211
+ timeout?: number | undefined;
1212
+ customFetchImpl?: _better_fetch_fetch.FetchEsque | undefined;
1213
+ plugins?: _better_fetch_fetch.BetterFetchPlugin[] | undefined;
1214
+ baseURL?: string | undefined;
1215
+ throw?: boolean | undefined;
1216
+ auth?: ({
1217
+ type: "Bearer";
1218
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1219
+ } | {
1220
+ type: "Basic";
1221
+ username: string | (() => string | undefined) | undefined;
1222
+ password: string | (() => string | undefined) | undefined;
1223
+ } | {
1224
+ type: "Custom";
1225
+ prefix: string | (() => string | undefined) | undefined;
1226
+ value: string | (() => string | undefined) | undefined;
1227
+ }) | undefined;
1228
+ body?: (Partial<{
1229
+ id: string;
1230
+ name: string;
1231
+ }> & Record<string, any>) | undefined;
1232
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
1233
+ params?: Record<string, any> | undefined;
1234
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1235
+ retry?: _better_fetch_fetch.RetryOptions | undefined;
1236
+ retryAttempt?: number | undefined;
1237
+ output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1238
+ errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined;
1239
+ disableValidation?: boolean | undefined;
1240
+ }>(data_0: better_auth.Prettify<{
1241
+ id: string;
1242
+ name: string;
1243
+ } & {
1244
+ fetchOptions?: FetchOptions | undefined;
1245
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
1246
+ passkey: better_auth_plugins_passkey.Passkey;
1247
+ }, {
1248
+ code?: string;
1249
+ message?: string;
1250
+ }, FetchOptions["throw"] extends true ? true : false>>;
1251
+ };
1252
+ } & {
1253
+ signIn: {
1254
+ social: <FetchOptions extends {
1255
+ mode?: undici_types.RequestMode | undefined;
1256
+ method?: string | undefined;
1257
+ headers?: any;
1258
+ keepalive?: boolean | undefined;
1259
+ redirect?: undici_types.RequestRedirect | undefined;
1260
+ integrity?: string | undefined;
1261
+ signal?: (AbortSignal | null) | undefined;
1262
+ credentials?: undici_types.RequestCredentials | undefined;
1263
+ referrer?: string | undefined;
1264
+ referrerPolicy?: undici_types.ReferrerPolicy | undefined;
1265
+ window?: null | undefined;
1266
+ dispatcher?: undici_types.Dispatcher | undefined;
1267
+ duplex?: undici_types.RequestDuplex | undefined;
1268
+ onRequest?: (<T extends Record<string, any>>(context: _better_fetch_fetch.RequestContext<T>) => Promise<_better_fetch_fetch.RequestContext | void> | _better_fetch_fetch.RequestContext | void) | undefined;
1269
+ onResponse?: ((context: _better_fetch_fetch.ResponseContext) => Promise<Response | void | _better_fetch_fetch.ResponseContext> | Response | _better_fetch_fetch.ResponseContext | void) | undefined;
1270
+ onSuccess?: ((context: _better_fetch_fetch.SuccessContext<any>) => Promise<void> | void) | undefined;
1271
+ onError?: ((context: _better_fetch_fetch.ErrorContext) => Promise<void> | void) | undefined;
1272
+ onRetry?: ((response: _better_fetch_fetch.ResponseContext) => Promise<void> | void) | undefined;
1273
+ hookOptions?: {
1274
+ cloneResponse?: boolean;
1275
+ } | undefined;
1276
+ timeout?: number | undefined;
1277
+ customFetchImpl?: _better_fetch_fetch.FetchEsque | undefined;
1278
+ plugins?: _better_fetch_fetch.BetterFetchPlugin[] | undefined;
1279
+ baseURL?: string | undefined;
1280
+ throw?: boolean | undefined;
1281
+ auth?: ({
1282
+ type: "Bearer";
1283
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1284
+ } | {
1285
+ type: "Basic";
1286
+ username: string | (() => string | undefined) | undefined;
1287
+ password: string | (() => string | undefined) | undefined;
1288
+ } | {
1289
+ type: "Custom";
1290
+ prefix: string | (() => string | undefined) | undefined;
1291
+ value: string | (() => string | undefined) | undefined;
1292
+ }) | undefined;
1293
+ body?: (Partial<{
1294
+ provider: unknown;
1295
+ callbackURL?: string | undefined;
1296
+ newUserCallbackURL?: string | undefined;
1297
+ errorCallbackURL?: string | undefined;
1298
+ disableRedirect?: boolean | undefined;
1299
+ idToken?: {
1300
+ token: string;
1301
+ nonce?: string | undefined;
1302
+ accessToken?: string | undefined;
1303
+ refreshToken?: string | undefined;
1304
+ expiresAt?: number | undefined;
1305
+ } | undefined;
1306
+ scopes?: string[] | undefined;
1307
+ requestSignUp?: boolean | undefined;
1308
+ loginHint?: string | undefined;
1309
+ }> & Record<string, any>) | undefined;
1310
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
1311
+ params?: Record<string, any> | undefined;
1312
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1313
+ retry?: _better_fetch_fetch.RetryOptions | undefined;
1314
+ retryAttempt?: number | undefined;
1315
+ output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1316
+ errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined;
1317
+ disableValidation?: boolean | undefined;
1318
+ }>(data_0: better_auth.Prettify<{
1319
+ provider: unknown;
1320
+ callbackURL?: string | undefined;
1321
+ newUserCallbackURL?: string | undefined;
1322
+ errorCallbackURL?: string | undefined;
1323
+ disableRedirect?: boolean | undefined;
1324
+ idToken?: {
1325
+ token: string;
1326
+ nonce?: string | undefined;
1327
+ accessToken?: string | undefined;
1328
+ refreshToken?: string | undefined;
1329
+ expiresAt?: number | undefined;
1330
+ } | undefined;
1331
+ scopes?: string[] | undefined;
1332
+ requestSignUp?: boolean | undefined;
1333
+ loginHint?: string | undefined;
1334
+ } & {
1335
+ fetchOptions?: FetchOptions | undefined;
1336
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<NonNullable<{
1337
+ redirect: boolean;
1338
+ token: string;
1339
+ url: undefined;
1340
+ user: {
1341
+ id: string;
1342
+ email: string;
1343
+ name: string;
1344
+ image: string | null | undefined;
1345
+ emailVerified: boolean;
1346
+ createdAt: Date;
1347
+ updatedAt: Date;
1348
+ };
1349
+ } | {
1350
+ url: string;
1351
+ redirect: boolean;
1352
+ }>, {
1353
+ code?: string;
1354
+ message?: string;
1355
+ }, FetchOptions["throw"] extends true ? true : false>>;
1356
+ };
1357
+ } & {
1358
+ signOut: <FetchOptions extends {
1359
+ mode?: undici_types.RequestMode | undefined;
1360
+ method?: string | undefined;
1361
+ headers?: any;
1362
+ keepalive?: boolean | undefined;
1363
+ redirect?: undici_types.RequestRedirect | undefined;
1364
+ integrity?: string | undefined;
1365
+ signal?: (AbortSignal | null) | undefined;
1366
+ credentials?: undici_types.RequestCredentials | undefined;
1367
+ referrer?: string | undefined;
1368
+ referrerPolicy?: undici_types.ReferrerPolicy | undefined;
1369
+ window?: null | undefined;
1370
+ dispatcher?: undici_types.Dispatcher | undefined;
1371
+ duplex?: undici_types.RequestDuplex | undefined;
1372
+ onRequest?: (<T extends Record<string, any>>(context: _better_fetch_fetch.RequestContext<T>) => Promise<_better_fetch_fetch.RequestContext | void> | _better_fetch_fetch.RequestContext | void) | undefined;
1373
+ onResponse?: ((context: _better_fetch_fetch.ResponseContext) => Promise<Response | void | _better_fetch_fetch.ResponseContext> | Response | _better_fetch_fetch.ResponseContext | void) | undefined;
1374
+ onSuccess?: ((context: _better_fetch_fetch.SuccessContext<any>) => Promise<void> | void) | undefined;
1375
+ onError?: ((context: _better_fetch_fetch.ErrorContext) => Promise<void> | void) | undefined;
1376
+ onRetry?: ((response: _better_fetch_fetch.ResponseContext) => Promise<void> | void) | undefined;
1377
+ hookOptions?: {
1378
+ cloneResponse?: boolean;
1379
+ } | undefined;
1380
+ timeout?: number | undefined;
1381
+ customFetchImpl?: _better_fetch_fetch.FetchEsque | undefined;
1382
+ plugins?: _better_fetch_fetch.BetterFetchPlugin[] | undefined;
1383
+ baseURL?: string | undefined;
1384
+ throw?: boolean | undefined;
1385
+ auth?: ({
1386
+ type: "Bearer";
1387
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1388
+ } | {
1389
+ type: "Basic";
1390
+ username: string | (() => string | undefined) | undefined;
1391
+ password: string | (() => string | undefined) | undefined;
1392
+ } | {
1393
+ type: "Custom";
1394
+ prefix: string | (() => string | undefined) | undefined;
1395
+ value: string | (() => string | undefined) | undefined;
1396
+ }) | undefined;
1397
+ body?: undefined;
1398
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
1399
+ params?: Record<string, any> | undefined;
1400
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1401
+ retry?: _better_fetch_fetch.RetryOptions | undefined;
1402
+ retryAttempt?: number | undefined;
1403
+ output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1404
+ errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined;
1405
+ disableValidation?: boolean | undefined;
1406
+ }>(data_0?: better_auth.Prettify<{
1407
+ query?: Record<string, any> | undefined;
1408
+ fetchOptions?: FetchOptions | undefined;
1409
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
1410
+ success: boolean;
1411
+ }, {
1412
+ code?: string;
1413
+ message?: string;
1414
+ }, FetchOptions["throw"] extends true ? true : false>>;
1415
+ } & {
1416
+ signIn: {
1417
+ email: <FetchOptions extends {
1418
+ mode?: undici_types.RequestMode | undefined;
1419
+ method?: string | undefined;
1420
+ headers?: any;
1421
+ keepalive?: boolean | undefined;
1422
+ redirect?: undici_types.RequestRedirect | undefined;
1423
+ integrity?: string | undefined;
1424
+ signal?: (AbortSignal | null) | undefined;
1425
+ credentials?: undici_types.RequestCredentials | undefined;
1426
+ referrer?: string | undefined;
1427
+ referrerPolicy?: undici_types.ReferrerPolicy | undefined;
1428
+ window?: null | undefined;
1429
+ dispatcher?: undici_types.Dispatcher | undefined;
1430
+ duplex?: undici_types.RequestDuplex | undefined;
1431
+ onRequest?: (<T extends Record<string, any>>(context: _better_fetch_fetch.RequestContext<T>) => Promise<_better_fetch_fetch.RequestContext | void> | _better_fetch_fetch.RequestContext | void) | undefined;
1432
+ onResponse?: ((context: _better_fetch_fetch.ResponseContext) => Promise<Response | void | _better_fetch_fetch.ResponseContext> | Response | _better_fetch_fetch.ResponseContext | void) | undefined;
1433
+ onSuccess?: ((context: _better_fetch_fetch.SuccessContext<any>) => Promise<void> | void) | undefined;
1434
+ onError?: ((context: _better_fetch_fetch.ErrorContext) => Promise<void> | void) | undefined;
1435
+ onRetry?: ((response: _better_fetch_fetch.ResponseContext) => Promise<void> | void) | undefined;
1436
+ hookOptions?: {
1437
+ cloneResponse?: boolean;
1438
+ } | undefined;
1439
+ timeout?: number | undefined;
1440
+ customFetchImpl?: _better_fetch_fetch.FetchEsque | undefined;
1441
+ plugins?: _better_fetch_fetch.BetterFetchPlugin[] | undefined;
1442
+ baseURL?: string | undefined;
1443
+ throw?: boolean | undefined;
1444
+ auth?: ({
1445
+ type: "Bearer";
1446
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1447
+ } | {
1448
+ type: "Basic";
1449
+ username: string | (() => string | undefined) | undefined;
1450
+ password: string | (() => string | undefined) | undefined;
1451
+ } | {
1452
+ type: "Custom";
1453
+ prefix: string | (() => string | undefined) | undefined;
1454
+ value: string | (() => string | undefined) | undefined;
1455
+ }) | undefined;
1456
+ body?: (Partial<{
1457
+ email: string;
1458
+ password: string;
1459
+ callbackURL?: string | undefined;
1460
+ rememberMe?: boolean | undefined;
1461
+ }> & Record<string, any>) | undefined;
1462
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
1463
+ params?: Record<string, any> | undefined;
1464
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1465
+ retry?: _better_fetch_fetch.RetryOptions | undefined;
1466
+ retryAttempt?: number | undefined;
1467
+ output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1468
+ errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined;
1469
+ disableValidation?: boolean | undefined;
1470
+ }>(data_0: better_auth.Prettify<{
1471
+ email: string;
1472
+ password: string;
1473
+ callbackURL?: string | undefined;
1474
+ rememberMe?: boolean | undefined;
1475
+ } & {
1476
+ fetchOptions?: FetchOptions | undefined;
1477
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
1478
+ redirect: boolean;
1479
+ token: string;
1480
+ url: string | undefined;
1481
+ user: {
1482
+ id: string;
1483
+ email: string;
1484
+ name: string;
1485
+ image: string | null | undefined;
1486
+ emailVerified: boolean;
1487
+ createdAt: Date;
1488
+ updatedAt: Date;
1489
+ };
1490
+ }, {
1491
+ code?: string;
1492
+ message?: string;
1493
+ }, FetchOptions["throw"] extends true ? true : false>>;
1494
+ };
1495
+ } & {
1496
+ forgetPassword: <FetchOptions extends {
1497
+ mode?: undici_types.RequestMode | undefined;
1498
+ method?: string | undefined;
1499
+ headers?: any;
1500
+ keepalive?: boolean | undefined;
1501
+ redirect?: undici_types.RequestRedirect | undefined;
1502
+ integrity?: string | undefined;
1503
+ signal?: (AbortSignal | null) | undefined;
1504
+ credentials?: undici_types.RequestCredentials | undefined;
1505
+ referrer?: string | undefined;
1506
+ referrerPolicy?: undici_types.ReferrerPolicy | undefined;
1507
+ window?: null | undefined;
1508
+ dispatcher?: undici_types.Dispatcher | undefined;
1509
+ duplex?: undici_types.RequestDuplex | undefined;
1510
+ onRequest?: (<T extends Record<string, any>>(context: _better_fetch_fetch.RequestContext<T>) => Promise<_better_fetch_fetch.RequestContext | void> | _better_fetch_fetch.RequestContext | void) | undefined;
1511
+ onResponse?: ((context: _better_fetch_fetch.ResponseContext) => Promise<Response | void | _better_fetch_fetch.ResponseContext> | Response | _better_fetch_fetch.ResponseContext | void) | undefined;
1512
+ onSuccess?: ((context: _better_fetch_fetch.SuccessContext<any>) => Promise<void> | void) | undefined;
1513
+ onError?: ((context: _better_fetch_fetch.ErrorContext) => Promise<void> | void) | undefined;
1514
+ onRetry?: ((response: _better_fetch_fetch.ResponseContext) => Promise<void> | void) | undefined;
1515
+ hookOptions?: {
1516
+ cloneResponse?: boolean;
1517
+ } | undefined;
1518
+ timeout?: number | undefined;
1519
+ customFetchImpl?: _better_fetch_fetch.FetchEsque | undefined;
1520
+ plugins?: _better_fetch_fetch.BetterFetchPlugin[] | undefined;
1521
+ baseURL?: string | undefined;
1522
+ throw?: boolean | undefined;
1523
+ auth?: ({
1524
+ type: "Bearer";
1525
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1526
+ } | {
1527
+ type: "Basic";
1528
+ username: string | (() => string | undefined) | undefined;
1529
+ password: string | (() => string | undefined) | undefined;
1530
+ } | {
1531
+ type: "Custom";
1532
+ prefix: string | (() => string | undefined) | undefined;
1533
+ value: string | (() => string | undefined) | undefined;
1534
+ }) | undefined;
1535
+ body?: (Partial<{
1536
+ email: string;
1537
+ redirectTo?: string | undefined;
1538
+ }> & Record<string, any>) | undefined;
1539
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
1540
+ params?: Record<string, any> | undefined;
1541
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1542
+ retry?: _better_fetch_fetch.RetryOptions | undefined;
1543
+ retryAttempt?: number | undefined;
1544
+ output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1545
+ errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined;
1546
+ disableValidation?: boolean | undefined;
1547
+ }>(data_0: better_auth.Prettify<{
1548
+ email: string;
1549
+ redirectTo?: string | undefined;
1550
+ } & {
1551
+ fetchOptions?: FetchOptions | undefined;
1552
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
1553
+ status: boolean;
1554
+ }, {
1555
+ code?: string;
1556
+ message?: string;
1557
+ }, FetchOptions["throw"] extends true ? true : false>>;
1558
+ } & {
1559
+ resetPassword: <FetchOptions extends {
1560
+ mode?: undici_types.RequestMode | undefined;
1561
+ method?: string | undefined;
1562
+ headers?: any;
1563
+ keepalive?: boolean | undefined;
1564
+ redirect?: undici_types.RequestRedirect | undefined;
1565
+ integrity?: string | undefined;
1566
+ signal?: (AbortSignal | null) | undefined;
1567
+ credentials?: undici_types.RequestCredentials | undefined;
1568
+ referrer?: string | undefined;
1569
+ referrerPolicy?: undici_types.ReferrerPolicy | undefined;
1570
+ window?: null | undefined;
1571
+ dispatcher?: undici_types.Dispatcher | undefined;
1572
+ duplex?: undici_types.RequestDuplex | undefined;
1573
+ onRequest?: (<T extends Record<string, any>>(context: _better_fetch_fetch.RequestContext<T>) => Promise<_better_fetch_fetch.RequestContext | void> | _better_fetch_fetch.RequestContext | void) | undefined;
1574
+ onResponse?: ((context: _better_fetch_fetch.ResponseContext) => Promise<Response | void | _better_fetch_fetch.ResponseContext> | Response | _better_fetch_fetch.ResponseContext | void) | undefined;
1575
+ onSuccess?: ((context: _better_fetch_fetch.SuccessContext<any>) => Promise<void> | void) | undefined;
1576
+ onError?: ((context: _better_fetch_fetch.ErrorContext) => Promise<void> | void) | undefined;
1577
+ onRetry?: ((response: _better_fetch_fetch.ResponseContext) => Promise<void> | void) | undefined;
1578
+ hookOptions?: {
1579
+ cloneResponse?: boolean;
1580
+ } | undefined;
1581
+ timeout?: number | undefined;
1582
+ customFetchImpl?: _better_fetch_fetch.FetchEsque | undefined;
1583
+ plugins?: _better_fetch_fetch.BetterFetchPlugin[] | undefined;
1584
+ baseURL?: string | undefined;
1585
+ throw?: boolean | undefined;
1586
+ auth?: ({
1587
+ type: "Bearer";
1588
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1589
+ } | {
1590
+ type: "Basic";
1591
+ username: string | (() => string | undefined) | undefined;
1592
+ password: string | (() => string | undefined) | undefined;
1593
+ } | {
1594
+ type: "Custom";
1595
+ prefix: string | (() => string | undefined) | undefined;
1596
+ value: string | (() => string | undefined) | undefined;
1597
+ }) | undefined;
1598
+ body?: (Partial<{
1599
+ newPassword: string;
1600
+ token?: string | undefined;
1601
+ }> & Record<string, any>) | undefined;
1602
+ query?: (Partial<{
1603
+ token?: string | undefined;
1604
+ }> & Record<string, any>) | undefined;
1605
+ params?: Record<string, any> | undefined;
1606
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1607
+ retry?: _better_fetch_fetch.RetryOptions | undefined;
1608
+ retryAttempt?: number | undefined;
1609
+ output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1610
+ errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined;
1611
+ disableValidation?: boolean | undefined;
1612
+ }>(data_0: better_auth.Prettify<{
1613
+ newPassword: string;
1614
+ token?: string | undefined;
1615
+ } & {
1616
+ fetchOptions?: FetchOptions | undefined;
1617
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
1618
+ status: boolean;
1619
+ }, {
1620
+ code?: string;
1621
+ message?: string;
1622
+ }, FetchOptions["throw"] extends true ? true : false>>;
1623
+ } & {
1624
+ verifyEmail: <FetchOptions extends {
1625
+ mode?: undici_types.RequestMode | undefined;
1626
+ method?: string | undefined;
1627
+ headers?: any;
1628
+ keepalive?: boolean | undefined;
1629
+ redirect?: undici_types.RequestRedirect | undefined;
1630
+ integrity?: string | undefined;
1631
+ signal?: (AbortSignal | null) | undefined;
1632
+ credentials?: undici_types.RequestCredentials | undefined;
1633
+ referrer?: string | undefined;
1634
+ referrerPolicy?: undici_types.ReferrerPolicy | undefined;
1635
+ window?: null | undefined;
1636
+ dispatcher?: undici_types.Dispatcher | undefined;
1637
+ duplex?: undici_types.RequestDuplex | undefined;
1638
+ onRequest?: (<T extends Record<string, any>>(context: _better_fetch_fetch.RequestContext<T>) => Promise<_better_fetch_fetch.RequestContext | void> | _better_fetch_fetch.RequestContext | void) | undefined;
1639
+ onResponse?: ((context: _better_fetch_fetch.ResponseContext) => Promise<Response | void | _better_fetch_fetch.ResponseContext> | Response | _better_fetch_fetch.ResponseContext | void) | undefined;
1640
+ onSuccess?: ((context: _better_fetch_fetch.SuccessContext<any>) => Promise<void> | void) | undefined;
1641
+ onError?: ((context: _better_fetch_fetch.ErrorContext) => Promise<void> | void) | undefined;
1642
+ onRetry?: ((response: _better_fetch_fetch.ResponseContext) => Promise<void> | void) | undefined;
1643
+ hookOptions?: {
1644
+ cloneResponse?: boolean;
1645
+ } | undefined;
1646
+ timeout?: number | undefined;
1647
+ customFetchImpl?: _better_fetch_fetch.FetchEsque | undefined;
1648
+ plugins?: _better_fetch_fetch.BetterFetchPlugin[] | undefined;
1649
+ baseURL?: string | undefined;
1650
+ throw?: boolean | undefined;
1651
+ auth?: ({
1652
+ type: "Bearer";
1653
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1654
+ } | {
1655
+ type: "Basic";
1656
+ username: string | (() => string | undefined) | undefined;
1657
+ password: string | (() => string | undefined) | undefined;
1658
+ } | {
1659
+ type: "Custom";
1660
+ prefix: string | (() => string | undefined) | undefined;
1661
+ value: string | (() => string | undefined) | undefined;
1662
+ }) | undefined;
1663
+ body?: undefined;
1664
+ query?: (Partial<{
1665
+ token: string;
1666
+ callbackURL?: string | undefined;
1667
+ }> & Record<string, any>) | undefined;
1668
+ params?: Record<string, any> | undefined;
1669
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1670
+ retry?: _better_fetch_fetch.RetryOptions | undefined;
1671
+ retryAttempt?: number | undefined;
1672
+ output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1673
+ errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined;
1674
+ disableValidation?: boolean | undefined;
1675
+ }>(data_0: better_auth.Prettify<{
1676
+ query: {
1677
+ token: string;
1678
+ callbackURL?: string | undefined;
1679
+ };
1680
+ fetchOptions?: FetchOptions | undefined;
1681
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<NonNullable<void | {
1682
+ status: boolean;
1683
+ user: {
1684
+ id: any;
1685
+ email: any;
1686
+ name: any;
1687
+ image: any;
1688
+ emailVerified: any;
1689
+ createdAt: any;
1690
+ updatedAt: any;
1691
+ };
1692
+ } | {
1693
+ status: boolean;
1694
+ user: null;
1695
+ }>, {
1696
+ code?: string;
1697
+ message?: string;
1698
+ }, FetchOptions["throw"] extends true ? true : false>>;
1699
+ } & {
1700
+ sendVerificationEmail: <FetchOptions extends {
1701
+ mode?: undici_types.RequestMode | undefined;
1702
+ method?: string | undefined;
1703
+ headers?: any;
1704
+ keepalive?: boolean | undefined;
1705
+ redirect?: undici_types.RequestRedirect | undefined;
1706
+ integrity?: string | undefined;
1707
+ signal?: (AbortSignal | null) | undefined;
1708
+ credentials?: undici_types.RequestCredentials | undefined;
1709
+ referrer?: string | undefined;
1710
+ referrerPolicy?: undici_types.ReferrerPolicy | undefined;
1711
+ window?: null | undefined;
1712
+ dispatcher?: undici_types.Dispatcher | undefined;
1713
+ duplex?: undici_types.RequestDuplex | undefined;
1714
+ onRequest?: (<T extends Record<string, any>>(context: _better_fetch_fetch.RequestContext<T>) => Promise<_better_fetch_fetch.RequestContext | void> | _better_fetch_fetch.RequestContext | void) | undefined;
1715
+ onResponse?: ((context: _better_fetch_fetch.ResponseContext) => Promise<Response | void | _better_fetch_fetch.ResponseContext> | Response | _better_fetch_fetch.ResponseContext | void) | undefined;
1716
+ onSuccess?: ((context: _better_fetch_fetch.SuccessContext<any>) => Promise<void> | void) | undefined;
1717
+ onError?: ((context: _better_fetch_fetch.ErrorContext) => Promise<void> | void) | undefined;
1718
+ onRetry?: ((response: _better_fetch_fetch.ResponseContext) => Promise<void> | void) | undefined;
1719
+ hookOptions?: {
1720
+ cloneResponse?: boolean;
1721
+ } | undefined;
1722
+ timeout?: number | undefined;
1723
+ customFetchImpl?: _better_fetch_fetch.FetchEsque | undefined;
1724
+ plugins?: _better_fetch_fetch.BetterFetchPlugin[] | undefined;
1725
+ baseURL?: string | undefined;
1726
+ throw?: boolean | undefined;
1727
+ auth?: ({
1728
+ type: "Bearer";
1729
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1730
+ } | {
1731
+ type: "Basic";
1732
+ username: string | (() => string | undefined) | undefined;
1733
+ password: string | (() => string | undefined) | undefined;
1734
+ } | {
1735
+ type: "Custom";
1736
+ prefix: string | (() => string | undefined) | undefined;
1737
+ value: string | (() => string | undefined) | undefined;
1738
+ }) | undefined;
1739
+ body?: (Partial<{
1740
+ email: string;
1741
+ callbackURL?: string | undefined;
1742
+ }> & Record<string, any>) | undefined;
1743
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
1744
+ params?: Record<string, any> | undefined;
1745
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1746
+ retry?: _better_fetch_fetch.RetryOptions | undefined;
1747
+ retryAttempt?: number | undefined;
1748
+ output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1749
+ errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined;
1750
+ disableValidation?: boolean | undefined;
1751
+ }>(data_0: better_auth.Prettify<{
1752
+ email: string;
1753
+ callbackURL?: string | undefined;
1754
+ } & {
1755
+ fetchOptions?: FetchOptions | undefined;
1756
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
1757
+ status: boolean;
1758
+ }, {
1759
+ code?: string;
1760
+ message?: string;
1761
+ }, FetchOptions["throw"] extends true ? true : false>>;
1762
+ } & {
1763
+ changeEmail: <FetchOptions extends {
1764
+ mode?: undici_types.RequestMode | undefined;
1765
+ method?: string | undefined;
1766
+ headers?: any;
1767
+ keepalive?: boolean | undefined;
1768
+ redirect?: undici_types.RequestRedirect | undefined;
1769
+ integrity?: string | undefined;
1770
+ signal?: (AbortSignal | null) | undefined;
1771
+ credentials?: undici_types.RequestCredentials | undefined;
1772
+ referrer?: string | undefined;
1773
+ referrerPolicy?: undici_types.ReferrerPolicy | undefined;
1774
+ window?: null | undefined;
1775
+ dispatcher?: undici_types.Dispatcher | undefined;
1776
+ duplex?: undici_types.RequestDuplex | undefined;
1777
+ onRequest?: (<T extends Record<string, any>>(context: _better_fetch_fetch.RequestContext<T>) => Promise<_better_fetch_fetch.RequestContext | void> | _better_fetch_fetch.RequestContext | void) | undefined;
1778
+ onResponse?: ((context: _better_fetch_fetch.ResponseContext) => Promise<Response | void | _better_fetch_fetch.ResponseContext> | Response | _better_fetch_fetch.ResponseContext | void) | undefined;
1779
+ onSuccess?: ((context: _better_fetch_fetch.SuccessContext<any>) => Promise<void> | void) | undefined;
1780
+ onError?: ((context: _better_fetch_fetch.ErrorContext) => Promise<void> | void) | undefined;
1781
+ onRetry?: ((response: _better_fetch_fetch.ResponseContext) => Promise<void> | void) | undefined;
1782
+ hookOptions?: {
1783
+ cloneResponse?: boolean;
1784
+ } | undefined;
1785
+ timeout?: number | undefined;
1786
+ customFetchImpl?: _better_fetch_fetch.FetchEsque | undefined;
1787
+ plugins?: _better_fetch_fetch.BetterFetchPlugin[] | undefined;
1788
+ baseURL?: string | undefined;
1789
+ throw?: boolean | undefined;
1790
+ auth?: ({
1791
+ type: "Bearer";
1792
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1793
+ } | {
1794
+ type: "Basic";
1795
+ username: string | (() => string | undefined) | undefined;
1796
+ password: string | (() => string | undefined) | undefined;
1797
+ } | {
1798
+ type: "Custom";
1799
+ prefix: string | (() => string | undefined) | undefined;
1800
+ value: string | (() => string | undefined) | undefined;
1801
+ }) | undefined;
1802
+ body?: (Partial<{
1803
+ newEmail: string;
1804
+ callbackURL?: string | undefined;
1805
+ }> & Record<string, any>) | undefined;
1806
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
1807
+ params?: Record<string, any> | undefined;
1808
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1809
+ retry?: _better_fetch_fetch.RetryOptions | undefined;
1810
+ retryAttempt?: number | undefined;
1811
+ output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1812
+ errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined;
1813
+ disableValidation?: boolean | undefined;
1814
+ }>(data_0: better_auth.Prettify<{
1815
+ newEmail: string;
1816
+ callbackURL?: string | undefined;
1817
+ } & {
1818
+ fetchOptions?: FetchOptions | undefined;
1819
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
1820
+ status: boolean;
1821
+ }, {
1822
+ code?: string;
1823
+ message?: string;
1824
+ }, FetchOptions["throw"] extends true ? true : false>>;
1825
+ } & {
1826
+ changePassword: <FetchOptions extends {
1827
+ mode?: undici_types.RequestMode | undefined;
1828
+ method?: string | undefined;
1829
+ headers?: any;
1830
+ keepalive?: boolean | undefined;
1831
+ redirect?: undici_types.RequestRedirect | undefined;
1832
+ integrity?: string | undefined;
1833
+ signal?: (AbortSignal | null) | undefined;
1834
+ credentials?: undici_types.RequestCredentials | undefined;
1835
+ referrer?: string | undefined;
1836
+ referrerPolicy?: undici_types.ReferrerPolicy | undefined;
1837
+ window?: null | undefined;
1838
+ dispatcher?: undici_types.Dispatcher | undefined;
1839
+ duplex?: undici_types.RequestDuplex | undefined;
1840
+ onRequest?: (<T extends Record<string, any>>(context: _better_fetch_fetch.RequestContext<T>) => Promise<_better_fetch_fetch.RequestContext | void> | _better_fetch_fetch.RequestContext | void) | undefined;
1841
+ onResponse?: ((context: _better_fetch_fetch.ResponseContext) => Promise<Response | void | _better_fetch_fetch.ResponseContext> | Response | _better_fetch_fetch.ResponseContext | void) | undefined;
1842
+ onSuccess?: ((context: _better_fetch_fetch.SuccessContext<any>) => Promise<void> | void) | undefined;
1843
+ onError?: ((context: _better_fetch_fetch.ErrorContext) => Promise<void> | void) | undefined;
1844
+ onRetry?: ((response: _better_fetch_fetch.ResponseContext) => Promise<void> | void) | undefined;
1845
+ hookOptions?: {
1846
+ cloneResponse?: boolean;
1847
+ } | undefined;
1848
+ timeout?: number | undefined;
1849
+ customFetchImpl?: _better_fetch_fetch.FetchEsque | undefined;
1850
+ plugins?: _better_fetch_fetch.BetterFetchPlugin[] | undefined;
1851
+ baseURL?: string | undefined;
1852
+ throw?: boolean | undefined;
1853
+ auth?: ({
1854
+ type: "Bearer";
1855
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1856
+ } | {
1857
+ type: "Basic";
1858
+ username: string | (() => string | undefined) | undefined;
1859
+ password: string | (() => string | undefined) | undefined;
1860
+ } | {
1861
+ type: "Custom";
1862
+ prefix: string | (() => string | undefined) | undefined;
1863
+ value: string | (() => string | undefined) | undefined;
1864
+ }) | undefined;
1865
+ body?: (Partial<{
1866
+ newPassword: string;
1867
+ currentPassword: string;
1868
+ revokeOtherSessions?: boolean | undefined;
1869
+ }> & Record<string, any>) | undefined;
1870
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
1871
+ params?: Record<string, any> | undefined;
1872
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1873
+ retry?: _better_fetch_fetch.RetryOptions | undefined;
1874
+ retryAttempt?: number | undefined;
1875
+ output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1876
+ errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined;
1877
+ disableValidation?: boolean | undefined;
1878
+ }>(data_0: better_auth.Prettify<{
1879
+ newPassword: string;
1880
+ currentPassword: string;
1881
+ revokeOtherSessions?: boolean | undefined;
1882
+ } & {
1883
+ fetchOptions?: FetchOptions | undefined;
1884
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
1885
+ token: string | null;
1886
+ user: {
1887
+ id: string;
1888
+ email: string;
1889
+ name: string;
1890
+ image: string | null | undefined;
1891
+ emailVerified: boolean;
1892
+ createdAt: Date;
1893
+ updatedAt: Date;
1894
+ };
1895
+ }, {
1896
+ code?: string;
1897
+ message?: string;
1898
+ }, FetchOptions["throw"] extends true ? true : false>>;
1899
+ } & {
1900
+ deleteUser: <FetchOptions extends {
1901
+ mode?: undici_types.RequestMode | undefined;
1902
+ method?: string | undefined;
1903
+ headers?: any;
1904
+ keepalive?: boolean | undefined;
1905
+ redirect?: undici_types.RequestRedirect | undefined;
1906
+ integrity?: string | undefined;
1907
+ signal?: (AbortSignal | null) | undefined;
1908
+ credentials?: undici_types.RequestCredentials | undefined;
1909
+ referrer?: string | undefined;
1910
+ referrerPolicy?: undici_types.ReferrerPolicy | undefined;
1911
+ window?: null | undefined;
1912
+ dispatcher?: undici_types.Dispatcher | undefined;
1913
+ duplex?: undici_types.RequestDuplex | undefined;
1914
+ onRequest?: (<T extends Record<string, any>>(context: _better_fetch_fetch.RequestContext<T>) => Promise<_better_fetch_fetch.RequestContext | void> | _better_fetch_fetch.RequestContext | void) | undefined;
1915
+ onResponse?: ((context: _better_fetch_fetch.ResponseContext) => Promise<Response | void | _better_fetch_fetch.ResponseContext> | Response | _better_fetch_fetch.ResponseContext | void) | undefined;
1916
+ onSuccess?: ((context: _better_fetch_fetch.SuccessContext<any>) => Promise<void> | void) | undefined;
1917
+ onError?: ((context: _better_fetch_fetch.ErrorContext) => Promise<void> | void) | undefined;
1918
+ onRetry?: ((response: _better_fetch_fetch.ResponseContext) => Promise<void> | void) | undefined;
1919
+ hookOptions?: {
1920
+ cloneResponse?: boolean;
1921
+ } | undefined;
1922
+ timeout?: number | undefined;
1923
+ customFetchImpl?: _better_fetch_fetch.FetchEsque | undefined;
1924
+ plugins?: _better_fetch_fetch.BetterFetchPlugin[] | undefined;
1925
+ baseURL?: string | undefined;
1926
+ throw?: boolean | undefined;
1927
+ auth?: ({
1928
+ type: "Bearer";
1929
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1930
+ } | {
1931
+ type: "Basic";
1932
+ username: string | (() => string | undefined) | undefined;
1933
+ password: string | (() => string | undefined) | undefined;
1934
+ } | {
1935
+ type: "Custom";
1936
+ prefix: string | (() => string | undefined) | undefined;
1937
+ value: string | (() => string | undefined) | undefined;
1938
+ }) | undefined;
1939
+ body?: (Partial<{
1940
+ callbackURL?: string | undefined;
1941
+ password?: string | undefined;
1942
+ token?: string | undefined;
1943
+ }> & Record<string, any>) | undefined;
1944
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
1945
+ params?: Record<string, any> | undefined;
1946
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1947
+ retry?: _better_fetch_fetch.RetryOptions | undefined;
1948
+ retryAttempt?: number | undefined;
1949
+ output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1950
+ errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined;
1951
+ disableValidation?: boolean | undefined;
1952
+ }>(data_0?: better_auth.Prettify<{
1953
+ callbackURL?: string | undefined;
1954
+ password?: string | undefined;
1955
+ token?: string | undefined;
1956
+ } & {
1957
+ fetchOptions?: FetchOptions | undefined;
1958
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
1959
+ success: boolean;
1960
+ message: string;
1961
+ }, {
1962
+ code?: string;
1963
+ message?: string;
1964
+ }, FetchOptions["throw"] extends true ? true : false>>;
1965
+ } & {
1966
+ resetPassword: {
1967
+ ":token": <FetchOptions extends {
1968
+ mode?: undici_types.RequestMode | undefined;
1969
+ method?: string | undefined;
1970
+ headers?: any;
1971
+ keepalive?: boolean | undefined;
1972
+ redirect?: undici_types.RequestRedirect | undefined;
1973
+ integrity?: string | undefined;
1974
+ signal?: (AbortSignal | null) | undefined;
1975
+ credentials?: undici_types.RequestCredentials | undefined;
1976
+ referrer?: string | undefined;
1977
+ referrerPolicy?: undici_types.ReferrerPolicy | undefined;
1978
+ window?: null | undefined;
1979
+ dispatcher?: undici_types.Dispatcher | undefined;
1980
+ duplex?: undici_types.RequestDuplex | undefined;
1981
+ onRequest?: (<T extends Record<string, any>>(context: _better_fetch_fetch.RequestContext<T>) => Promise<_better_fetch_fetch.RequestContext | void> | _better_fetch_fetch.RequestContext | void) | undefined;
1982
+ onResponse?: ((context: _better_fetch_fetch.ResponseContext) => Promise<Response | void | _better_fetch_fetch.ResponseContext> | Response | _better_fetch_fetch.ResponseContext | void) | undefined;
1983
+ onSuccess?: ((context: _better_fetch_fetch.SuccessContext<any>) => Promise<void> | void) | undefined;
1984
+ onError?: ((context: _better_fetch_fetch.ErrorContext) => Promise<void> | void) | undefined;
1985
+ onRetry?: ((response: _better_fetch_fetch.ResponseContext) => Promise<void> | void) | undefined;
1986
+ hookOptions?: {
1987
+ cloneResponse?: boolean;
1988
+ } | undefined;
1989
+ timeout?: number | undefined;
1990
+ customFetchImpl?: _better_fetch_fetch.FetchEsque | undefined;
1991
+ plugins?: _better_fetch_fetch.BetterFetchPlugin[] | undefined;
1992
+ baseURL?: string | undefined;
1993
+ throw?: boolean | undefined;
1994
+ auth?: ({
1995
+ type: "Bearer";
1996
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1997
+ } | {
1998
+ type: "Basic";
1999
+ username: string | (() => string | undefined) | undefined;
2000
+ password: string | (() => string | undefined) | undefined;
2001
+ } | {
2002
+ type: "Custom";
2003
+ prefix: string | (() => string | undefined) | undefined;
2004
+ value: string | (() => string | undefined) | undefined;
2005
+ }) | undefined;
2006
+ body?: undefined;
2007
+ query?: (Partial<{
2008
+ callbackURL: string;
2009
+ }> & Record<string, any>) | undefined;
2010
+ params?: {
2011
+ token: string;
2012
+ } | undefined;
2013
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
2014
+ retry?: _better_fetch_fetch.RetryOptions | undefined;
2015
+ retryAttempt?: number | undefined;
2016
+ output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
2017
+ errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined;
2018
+ disableValidation?: boolean | undefined;
2019
+ }>(data_0: better_auth.Prettify<{
2020
+ query: {
2021
+ callbackURL: string;
2022
+ };
2023
+ fetchOptions?: FetchOptions | undefined;
2024
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<never, {
2025
+ code?: string;
2026
+ message?: string;
2027
+ }, FetchOptions["throw"] extends true ? true : false>>;
2028
+ };
2029
+ } & {
2030
+ requestPasswordReset: <FetchOptions extends {
2031
+ mode?: undici_types.RequestMode | undefined;
2032
+ method?: string | undefined;
2033
+ headers?: any;
2034
+ keepalive?: boolean | undefined;
2035
+ redirect?: undici_types.RequestRedirect | undefined;
2036
+ integrity?: string | undefined;
2037
+ signal?: (AbortSignal | null) | undefined;
2038
+ credentials?: undici_types.RequestCredentials | undefined;
2039
+ referrer?: string | undefined;
2040
+ referrerPolicy?: undici_types.ReferrerPolicy | undefined;
2041
+ window?: null | undefined;
2042
+ dispatcher?: undici_types.Dispatcher | undefined;
2043
+ duplex?: undici_types.RequestDuplex | undefined;
2044
+ onRequest?: (<T extends Record<string, any>>(context: _better_fetch_fetch.RequestContext<T>) => Promise<_better_fetch_fetch.RequestContext | void> | _better_fetch_fetch.RequestContext | void) | undefined;
2045
+ onResponse?: ((context: _better_fetch_fetch.ResponseContext) => Promise<Response | void | _better_fetch_fetch.ResponseContext> | Response | _better_fetch_fetch.ResponseContext | void) | undefined;
2046
+ onSuccess?: ((context: _better_fetch_fetch.SuccessContext<any>) => Promise<void> | void) | undefined;
2047
+ onError?: ((context: _better_fetch_fetch.ErrorContext) => Promise<void> | void) | undefined;
2048
+ onRetry?: ((response: _better_fetch_fetch.ResponseContext) => Promise<void> | void) | undefined;
2049
+ hookOptions?: {
2050
+ cloneResponse?: boolean;
2051
+ } | undefined;
2052
+ timeout?: number | undefined;
2053
+ customFetchImpl?: _better_fetch_fetch.FetchEsque | undefined;
2054
+ plugins?: _better_fetch_fetch.BetterFetchPlugin[] | undefined;
2055
+ baseURL?: string | undefined;
2056
+ throw?: boolean | undefined;
2057
+ auth?: ({
2058
+ type: "Bearer";
2059
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
2060
+ } | {
2061
+ type: "Basic";
2062
+ username: string | (() => string | undefined) | undefined;
2063
+ password: string | (() => string | undefined) | undefined;
2064
+ } | {
2065
+ type: "Custom";
2066
+ prefix: string | (() => string | undefined) | undefined;
2067
+ value: string | (() => string | undefined) | undefined;
2068
+ }) | undefined;
2069
+ body?: (Partial<{
2070
+ email: string;
2071
+ redirectTo?: string | undefined;
2072
+ }> & Record<string, any>) | undefined;
2073
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
2074
+ params?: Record<string, any> | undefined;
2075
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
2076
+ retry?: _better_fetch_fetch.RetryOptions | undefined;
2077
+ retryAttempt?: number | undefined;
2078
+ output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
2079
+ errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined;
2080
+ disableValidation?: boolean | undefined;
2081
+ }>(data_0: better_auth.Prettify<{
2082
+ email: string;
2083
+ redirectTo?: string | undefined;
2084
+ } & {
2085
+ fetchOptions?: FetchOptions | undefined;
2086
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
2087
+ status: boolean;
2088
+ }, {
2089
+ code?: string;
2090
+ message?: string;
2091
+ }, FetchOptions["throw"] extends true ? true : false>>;
2092
+ } & {
2093
+ resetPassword: {
2094
+ ":token": <FetchOptions extends {
2095
+ mode?: undici_types.RequestMode | undefined;
2096
+ method?: string | undefined;
2097
+ headers?: any;
2098
+ keepalive?: boolean | undefined;
2099
+ redirect?: undici_types.RequestRedirect | undefined;
2100
+ integrity?: string | undefined;
2101
+ signal?: (AbortSignal | null) | undefined;
2102
+ credentials?: undici_types.RequestCredentials | undefined;
2103
+ referrer?: string | undefined;
2104
+ referrerPolicy?: undici_types.ReferrerPolicy | undefined;
2105
+ window?: null | undefined;
2106
+ dispatcher?: undici_types.Dispatcher | undefined;
2107
+ duplex?: undici_types.RequestDuplex | undefined;
2108
+ onRequest?: (<T extends Record<string, any>>(context: _better_fetch_fetch.RequestContext<T>) => Promise<_better_fetch_fetch.RequestContext | void> | _better_fetch_fetch.RequestContext | void) | undefined;
2109
+ onResponse?: ((context: _better_fetch_fetch.ResponseContext) => Promise<Response | void | _better_fetch_fetch.ResponseContext> | Response | _better_fetch_fetch.ResponseContext | void) | undefined;
2110
+ onSuccess?: ((context: _better_fetch_fetch.SuccessContext<any>) => Promise<void> | void) | undefined;
2111
+ onError?: ((context: _better_fetch_fetch.ErrorContext) => Promise<void> | void) | undefined;
2112
+ onRetry?: ((response: _better_fetch_fetch.ResponseContext) => Promise<void> | void) | undefined;
2113
+ hookOptions?: {
2114
+ cloneResponse?: boolean;
2115
+ } | undefined;
2116
+ timeout?: number | undefined;
2117
+ customFetchImpl?: _better_fetch_fetch.FetchEsque | undefined;
2118
+ plugins?: _better_fetch_fetch.BetterFetchPlugin[] | undefined;
2119
+ baseURL?: string | undefined;
2120
+ throw?: boolean | undefined;
2121
+ auth?: ({
2122
+ type: "Bearer";
2123
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
2124
+ } | {
2125
+ type: "Basic";
2126
+ username: string | (() => string | undefined) | undefined;
2127
+ password: string | (() => string | undefined) | undefined;
2128
+ } | {
2129
+ type: "Custom";
2130
+ prefix: string | (() => string | undefined) | undefined;
2131
+ value: string | (() => string | undefined) | undefined;
2132
+ }) | undefined;
2133
+ body?: undefined;
2134
+ query?: (Partial<{
2135
+ callbackURL: string;
2136
+ }> & Record<string, any>) | undefined;
2137
+ params?: {
2138
+ token: string;
2139
+ } | undefined;
2140
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
2141
+ retry?: _better_fetch_fetch.RetryOptions | undefined;
2142
+ retryAttempt?: number | undefined;
2143
+ output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
2144
+ errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined;
2145
+ disableValidation?: boolean | undefined;
2146
+ }>(data_0: better_auth.Prettify<{
2147
+ query: {
2148
+ callbackURL: string;
2149
+ };
2150
+ fetchOptions?: FetchOptions | undefined;
2151
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<never, {
2152
+ code?: string;
2153
+ message?: string;
2154
+ }, FetchOptions["throw"] extends true ? true : false>>;
2155
+ };
2156
+ } & {
2157
+ revokeSession: <FetchOptions extends {
2158
+ mode?: undici_types.RequestMode | undefined;
2159
+ method?: string | undefined;
2160
+ headers?: any;
2161
+ keepalive?: boolean | undefined;
2162
+ redirect?: undici_types.RequestRedirect | undefined;
2163
+ integrity?: string | undefined;
2164
+ signal?: (AbortSignal | null) | undefined;
2165
+ credentials?: undici_types.RequestCredentials | undefined;
2166
+ referrer?: string | undefined;
2167
+ referrerPolicy?: undici_types.ReferrerPolicy | undefined;
2168
+ window?: null | undefined;
2169
+ dispatcher?: undici_types.Dispatcher | undefined;
2170
+ duplex?: undici_types.RequestDuplex | undefined;
2171
+ onRequest?: (<T extends Record<string, any>>(context: _better_fetch_fetch.RequestContext<T>) => Promise<_better_fetch_fetch.RequestContext | void> | _better_fetch_fetch.RequestContext | void) | undefined;
2172
+ onResponse?: ((context: _better_fetch_fetch.ResponseContext) => Promise<Response | void | _better_fetch_fetch.ResponseContext> | Response | _better_fetch_fetch.ResponseContext | void) | undefined;
2173
+ onSuccess?: ((context: _better_fetch_fetch.SuccessContext<any>) => Promise<void> | void) | undefined;
2174
+ onError?: ((context: _better_fetch_fetch.ErrorContext) => Promise<void> | void) | undefined;
2175
+ onRetry?: ((response: _better_fetch_fetch.ResponseContext) => Promise<void> | void) | undefined;
2176
+ hookOptions?: {
2177
+ cloneResponse?: boolean;
2178
+ } | undefined;
2179
+ timeout?: number | undefined;
2180
+ customFetchImpl?: _better_fetch_fetch.FetchEsque | undefined;
2181
+ plugins?: _better_fetch_fetch.BetterFetchPlugin[] | undefined;
2182
+ baseURL?: string | undefined;
2183
+ throw?: boolean | undefined;
2184
+ auth?: ({
2185
+ type: "Bearer";
2186
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
2187
+ } | {
2188
+ type: "Basic";
2189
+ username: string | (() => string | undefined) | undefined;
2190
+ password: string | (() => string | undefined) | undefined;
2191
+ } | {
2192
+ type: "Custom";
2193
+ prefix: string | (() => string | undefined) | undefined;
2194
+ value: string | (() => string | undefined) | undefined;
2195
+ }) | undefined;
2196
+ body?: (Partial<{
2197
+ token: string;
2198
+ }> & Record<string, any>) | undefined;
2199
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
2200
+ params?: Record<string, any> | undefined;
2201
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
2202
+ retry?: _better_fetch_fetch.RetryOptions | undefined;
2203
+ retryAttempt?: number | undefined;
2204
+ output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
2205
+ errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined;
2206
+ disableValidation?: boolean | undefined;
2207
+ }>(data_0: better_auth.Prettify<{
2208
+ token: string;
2209
+ } & {
2210
+ fetchOptions?: FetchOptions | undefined;
2211
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
2212
+ status: boolean;
2213
+ }, {
2214
+ code?: string;
2215
+ message?: string;
2216
+ }, FetchOptions["throw"] extends true ? true : false>>;
2217
+ } & {
2218
+ revokeSessions: <FetchOptions extends {
2219
+ mode?: undici_types.RequestMode | undefined;
2220
+ method?: string | undefined;
2221
+ headers?: any;
2222
+ keepalive?: boolean | undefined;
2223
+ redirect?: undici_types.RequestRedirect | undefined;
2224
+ integrity?: string | undefined;
2225
+ signal?: (AbortSignal | null) | undefined;
2226
+ credentials?: undici_types.RequestCredentials | undefined;
2227
+ referrer?: string | undefined;
2228
+ referrerPolicy?: undici_types.ReferrerPolicy | undefined;
2229
+ window?: null | undefined;
2230
+ dispatcher?: undici_types.Dispatcher | undefined;
2231
+ duplex?: undici_types.RequestDuplex | undefined;
2232
+ onRequest?: (<T extends Record<string, any>>(context: _better_fetch_fetch.RequestContext<T>) => Promise<_better_fetch_fetch.RequestContext | void> | _better_fetch_fetch.RequestContext | void) | undefined;
2233
+ onResponse?: ((context: _better_fetch_fetch.ResponseContext) => Promise<Response | void | _better_fetch_fetch.ResponseContext> | Response | _better_fetch_fetch.ResponseContext | void) | undefined;
2234
+ onSuccess?: ((context: _better_fetch_fetch.SuccessContext<any>) => Promise<void> | void) | undefined;
2235
+ onError?: ((context: _better_fetch_fetch.ErrorContext) => Promise<void> | void) | undefined;
2236
+ onRetry?: ((response: _better_fetch_fetch.ResponseContext) => Promise<void> | void) | undefined;
2237
+ hookOptions?: {
2238
+ cloneResponse?: boolean;
2239
+ } | undefined;
2240
+ timeout?: number | undefined;
2241
+ customFetchImpl?: _better_fetch_fetch.FetchEsque | undefined;
2242
+ plugins?: _better_fetch_fetch.BetterFetchPlugin[] | undefined;
2243
+ baseURL?: string | undefined;
2244
+ throw?: boolean | undefined;
2245
+ auth?: ({
2246
+ type: "Bearer";
2247
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
2248
+ } | {
2249
+ type: "Basic";
2250
+ username: string | (() => string | undefined) | undefined;
2251
+ password: string | (() => string | undefined) | undefined;
2252
+ } | {
2253
+ type: "Custom";
2254
+ prefix: string | (() => string | undefined) | undefined;
2255
+ value: string | (() => string | undefined) | undefined;
2256
+ }) | undefined;
2257
+ body?: undefined;
2258
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
2259
+ params?: Record<string, any> | undefined;
2260
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
2261
+ retry?: _better_fetch_fetch.RetryOptions | undefined;
2262
+ retryAttempt?: number | undefined;
2263
+ output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
2264
+ errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined;
2265
+ disableValidation?: boolean | undefined;
2266
+ }>(data_0?: better_auth.Prettify<{
2267
+ query?: Record<string, any> | undefined;
2268
+ fetchOptions?: FetchOptions | undefined;
2269
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
2270
+ status: boolean;
2271
+ }, {
2272
+ code?: string;
2273
+ message?: string;
2274
+ }, FetchOptions["throw"] extends true ? true : false>>;
2275
+ } & {
2276
+ revokeOtherSessions: <FetchOptions extends {
2277
+ mode?: undici_types.RequestMode | undefined;
2278
+ method?: string | undefined;
2279
+ headers?: any;
2280
+ keepalive?: boolean | undefined;
2281
+ redirect?: undici_types.RequestRedirect | undefined;
2282
+ integrity?: string | undefined;
2283
+ signal?: (AbortSignal | null) | undefined;
2284
+ credentials?: undici_types.RequestCredentials | undefined;
2285
+ referrer?: string | undefined;
2286
+ referrerPolicy?: undici_types.ReferrerPolicy | undefined;
2287
+ window?: null | undefined;
2288
+ dispatcher?: undici_types.Dispatcher | undefined;
2289
+ duplex?: undici_types.RequestDuplex | undefined;
2290
+ onRequest?: (<T extends Record<string, any>>(context: _better_fetch_fetch.RequestContext<T>) => Promise<_better_fetch_fetch.RequestContext | void> | _better_fetch_fetch.RequestContext | void) | undefined;
2291
+ onResponse?: ((context: _better_fetch_fetch.ResponseContext) => Promise<Response | void | _better_fetch_fetch.ResponseContext> | Response | _better_fetch_fetch.ResponseContext | void) | undefined;
2292
+ onSuccess?: ((context: _better_fetch_fetch.SuccessContext<any>) => Promise<void> | void) | undefined;
2293
+ onError?: ((context: _better_fetch_fetch.ErrorContext) => Promise<void> | void) | undefined;
2294
+ onRetry?: ((response: _better_fetch_fetch.ResponseContext) => Promise<void> | void) | undefined;
2295
+ hookOptions?: {
2296
+ cloneResponse?: boolean;
2297
+ } | undefined;
2298
+ timeout?: number | undefined;
2299
+ customFetchImpl?: _better_fetch_fetch.FetchEsque | undefined;
2300
+ plugins?: _better_fetch_fetch.BetterFetchPlugin[] | undefined;
2301
+ baseURL?: string | undefined;
2302
+ throw?: boolean | undefined;
2303
+ auth?: ({
2304
+ type: "Bearer";
2305
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
2306
+ } | {
2307
+ type: "Basic";
2308
+ username: string | (() => string | undefined) | undefined;
2309
+ password: string | (() => string | undefined) | undefined;
2310
+ } | {
2311
+ type: "Custom";
2312
+ prefix: string | (() => string | undefined) | undefined;
2313
+ value: string | (() => string | undefined) | undefined;
2314
+ }) | undefined;
2315
+ body?: undefined;
2316
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
2317
+ params?: Record<string, any> | undefined;
2318
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
2319
+ retry?: _better_fetch_fetch.RetryOptions | undefined;
2320
+ retryAttempt?: number | undefined;
2321
+ output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
2322
+ errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined;
2323
+ disableValidation?: boolean | undefined;
2324
+ }>(data_0?: better_auth.Prettify<{
2325
+ query?: Record<string, any> | undefined;
2326
+ fetchOptions?: FetchOptions | undefined;
2327
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
2328
+ status: boolean;
2329
+ }, {
2330
+ code?: string;
2331
+ message?: string;
2332
+ }, FetchOptions["throw"] extends true ? true : false>>;
2333
+ } & {
2334
+ linkSocial: <FetchOptions extends {
2335
+ mode?: undici_types.RequestMode | undefined;
2336
+ method?: string | undefined;
2337
+ headers?: any;
2338
+ keepalive?: boolean | undefined;
2339
+ redirect?: undici_types.RequestRedirect | undefined;
2340
+ integrity?: string | undefined;
2341
+ signal?: (AbortSignal | null) | undefined;
2342
+ credentials?: undici_types.RequestCredentials | undefined;
2343
+ referrer?: string | undefined;
2344
+ referrerPolicy?: undici_types.ReferrerPolicy | undefined;
2345
+ window?: null | undefined;
2346
+ dispatcher?: undici_types.Dispatcher | undefined;
2347
+ duplex?: undici_types.RequestDuplex | undefined;
2348
+ onRequest?: (<T extends Record<string, any>>(context: _better_fetch_fetch.RequestContext<T>) => Promise<_better_fetch_fetch.RequestContext | void> | _better_fetch_fetch.RequestContext | void) | undefined;
2349
+ onResponse?: ((context: _better_fetch_fetch.ResponseContext) => Promise<Response | void | _better_fetch_fetch.ResponseContext> | Response | _better_fetch_fetch.ResponseContext | void) | undefined;
2350
+ onSuccess?: ((context: _better_fetch_fetch.SuccessContext<any>) => Promise<void> | void) | undefined;
2351
+ onError?: ((context: _better_fetch_fetch.ErrorContext) => Promise<void> | void) | undefined;
2352
+ onRetry?: ((response: _better_fetch_fetch.ResponseContext) => Promise<void> | void) | undefined;
2353
+ hookOptions?: {
2354
+ cloneResponse?: boolean;
2355
+ } | undefined;
2356
+ timeout?: number | undefined;
2357
+ customFetchImpl?: _better_fetch_fetch.FetchEsque | undefined;
2358
+ plugins?: _better_fetch_fetch.BetterFetchPlugin[] | undefined;
2359
+ baseURL?: string | undefined;
2360
+ throw?: boolean | undefined;
2361
+ auth?: ({
2362
+ type: "Bearer";
2363
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
2364
+ } | {
2365
+ type: "Basic";
2366
+ username: string | (() => string | undefined) | undefined;
2367
+ password: string | (() => string | undefined) | undefined;
2368
+ } | {
2369
+ type: "Custom";
2370
+ prefix: string | (() => string | undefined) | undefined;
2371
+ value: string | (() => string | undefined) | undefined;
2372
+ }) | undefined;
2373
+ body?: (Partial<{
2374
+ provider: unknown;
2375
+ callbackURL?: string | undefined;
2376
+ idToken?: {
2377
+ token: string;
2378
+ nonce?: string | undefined;
2379
+ accessToken?: string | undefined;
2380
+ refreshToken?: string | undefined;
2381
+ scopes?: string[] | undefined;
2382
+ } | undefined;
2383
+ requestSignUp?: boolean | undefined;
2384
+ scopes?: string[] | undefined;
2385
+ errorCallbackURL?: string | undefined;
2386
+ disableRedirect?: boolean | undefined;
2387
+ }> & Record<string, any>) | undefined;
2388
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
2389
+ params?: Record<string, any> | undefined;
2390
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
2391
+ retry?: _better_fetch_fetch.RetryOptions | undefined;
2392
+ retryAttempt?: number | undefined;
2393
+ output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
2394
+ errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined;
2395
+ disableValidation?: boolean | undefined;
2396
+ }>(data_0: better_auth.Prettify<{
2397
+ provider: unknown;
2398
+ callbackURL?: string | undefined;
2399
+ idToken?: {
2400
+ token: string;
2401
+ nonce?: string | undefined;
2402
+ accessToken?: string | undefined;
2403
+ refreshToken?: string | undefined;
2404
+ scopes?: string[] | undefined;
2405
+ } | undefined;
2406
+ requestSignUp?: boolean | undefined;
2407
+ scopes?: string[] | undefined;
2408
+ errorCallbackURL?: string | undefined;
2409
+ disableRedirect?: boolean | undefined;
2410
+ } & {
2411
+ fetchOptions?: FetchOptions | undefined;
2412
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
2413
+ url: string;
2414
+ redirect: boolean;
2415
+ }, {
2416
+ code?: string;
2417
+ message?: string;
2418
+ }, FetchOptions["throw"] extends true ? true : false>>;
2419
+ } & {
2420
+ listAccounts: <FetchOptions extends {
2421
+ mode?: undici_types.RequestMode | undefined;
2422
+ method?: string | undefined;
2423
+ headers?: any;
2424
+ keepalive?: boolean | undefined;
2425
+ redirect?: undici_types.RequestRedirect | undefined;
2426
+ integrity?: string | undefined;
2427
+ signal?: (AbortSignal | null) | undefined;
2428
+ credentials?: undici_types.RequestCredentials | undefined;
2429
+ referrer?: string | undefined;
2430
+ referrerPolicy?: undici_types.ReferrerPolicy | undefined;
2431
+ window?: null | undefined;
2432
+ dispatcher?: undici_types.Dispatcher | undefined;
2433
+ duplex?: undici_types.RequestDuplex | undefined;
2434
+ onRequest?: (<T extends Record<string, any>>(context: _better_fetch_fetch.RequestContext<T>) => Promise<_better_fetch_fetch.RequestContext | void> | _better_fetch_fetch.RequestContext | void) | undefined;
2435
+ onResponse?: ((context: _better_fetch_fetch.ResponseContext) => Promise<Response | void | _better_fetch_fetch.ResponseContext> | Response | _better_fetch_fetch.ResponseContext | void) | undefined;
2436
+ onSuccess?: ((context: _better_fetch_fetch.SuccessContext<any>) => Promise<void> | void) | undefined;
2437
+ onError?: ((context: _better_fetch_fetch.ErrorContext) => Promise<void> | void) | undefined;
2438
+ onRetry?: ((response: _better_fetch_fetch.ResponseContext) => Promise<void> | void) | undefined;
2439
+ hookOptions?: {
2440
+ cloneResponse?: boolean;
2441
+ } | undefined;
2442
+ timeout?: number | undefined;
2443
+ customFetchImpl?: _better_fetch_fetch.FetchEsque | undefined;
2444
+ plugins?: _better_fetch_fetch.BetterFetchPlugin[] | undefined;
2445
+ baseURL?: string | undefined;
2446
+ throw?: boolean | undefined;
2447
+ auth?: ({
2448
+ type: "Bearer";
2449
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
2450
+ } | {
2451
+ type: "Basic";
2452
+ username: string | (() => string | undefined) | undefined;
2453
+ password: string | (() => string | undefined) | undefined;
2454
+ } | {
2455
+ type: "Custom";
2456
+ prefix: string | (() => string | undefined) | undefined;
2457
+ value: string | (() => string | undefined) | undefined;
2458
+ }) | undefined;
2459
+ body?: undefined;
2460
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
2461
+ params?: Record<string, any> | undefined;
2462
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
2463
+ retry?: _better_fetch_fetch.RetryOptions | undefined;
2464
+ retryAttempt?: number | undefined;
2465
+ output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
2466
+ errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined;
2467
+ disableValidation?: boolean | undefined;
2468
+ }>(data_0?: better_auth.Prettify<{
2469
+ query?: Record<string, any> | undefined;
2470
+ fetchOptions?: FetchOptions | undefined;
2471
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
2472
+ id: string;
2473
+ providerId: string;
2474
+ createdAt: Date;
2475
+ updatedAt: Date;
2476
+ accountId: string;
2477
+ scopes: string[];
2478
+ }[], {
2479
+ code?: string;
2480
+ message?: string;
2481
+ }, FetchOptions["throw"] extends true ? true : false>>;
2482
+ } & {
2483
+ deleteUser: {
2484
+ callback: <FetchOptions extends {
2485
+ mode?: undici_types.RequestMode | undefined;
2486
+ method?: string | undefined;
2487
+ headers?: any;
2488
+ keepalive?: boolean | undefined;
2489
+ redirect?: undici_types.RequestRedirect | undefined;
2490
+ integrity?: string | undefined;
2491
+ signal?: (AbortSignal | null) | undefined;
2492
+ credentials?: undici_types.RequestCredentials | undefined;
2493
+ referrer?: string | undefined;
2494
+ referrerPolicy?: undici_types.ReferrerPolicy | undefined;
2495
+ window?: null | undefined;
2496
+ dispatcher?: undici_types.Dispatcher | undefined;
2497
+ duplex?: undici_types.RequestDuplex | undefined;
2498
+ onRequest?: (<T extends Record<string, any>>(context: _better_fetch_fetch.RequestContext<T>) => Promise<_better_fetch_fetch.RequestContext | void> | _better_fetch_fetch.RequestContext | void) | undefined;
2499
+ onResponse?: ((context: _better_fetch_fetch.ResponseContext) => Promise<Response | void | _better_fetch_fetch.ResponseContext> | Response | _better_fetch_fetch.ResponseContext | void) | undefined;
2500
+ onSuccess?: ((context: _better_fetch_fetch.SuccessContext<any>) => Promise<void> | void) | undefined;
2501
+ onError?: ((context: _better_fetch_fetch.ErrorContext) => Promise<void> | void) | undefined;
2502
+ onRetry?: ((response: _better_fetch_fetch.ResponseContext) => Promise<void> | void) | undefined;
2503
+ hookOptions?: {
2504
+ cloneResponse?: boolean;
2505
+ } | undefined;
2506
+ timeout?: number | undefined;
2507
+ customFetchImpl?: _better_fetch_fetch.FetchEsque | undefined;
2508
+ plugins?: _better_fetch_fetch.BetterFetchPlugin[] | undefined;
2509
+ baseURL?: string | undefined;
2510
+ throw?: boolean | undefined;
2511
+ auth?: ({
2512
+ type: "Bearer";
2513
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
2514
+ } | {
2515
+ type: "Basic";
2516
+ username: string | (() => string | undefined) | undefined;
2517
+ password: string | (() => string | undefined) | undefined;
2518
+ } | {
2519
+ type: "Custom";
2520
+ prefix: string | (() => string | undefined) | undefined;
2521
+ value: string | (() => string | undefined) | undefined;
2522
+ }) | undefined;
2523
+ body?: undefined;
2524
+ query?: (Partial<{
2525
+ token: string;
2526
+ callbackURL?: string | undefined;
2527
+ }> & Record<string, any>) | undefined;
2528
+ params?: Record<string, any> | undefined;
2529
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
2530
+ retry?: _better_fetch_fetch.RetryOptions | undefined;
2531
+ retryAttempt?: number | undefined;
2532
+ output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
2533
+ errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined;
2534
+ disableValidation?: boolean | undefined;
2535
+ }>(data_0: better_auth.Prettify<{
2536
+ query: {
2537
+ token: string;
2538
+ callbackURL?: string | undefined;
2539
+ };
2540
+ fetchOptions?: FetchOptions | undefined;
2541
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
2542
+ success: boolean;
2543
+ message: string;
2544
+ }, {
2545
+ code?: string;
2546
+ message?: string;
2547
+ }, FetchOptions["throw"] extends true ? true : false>>;
2548
+ };
2549
+ } & {
2550
+ unlinkAccount: <FetchOptions extends {
2551
+ mode?: undici_types.RequestMode | undefined;
2552
+ method?: string | undefined;
2553
+ headers?: any;
2554
+ keepalive?: boolean | undefined;
2555
+ redirect?: undici_types.RequestRedirect | undefined;
2556
+ integrity?: string | undefined;
2557
+ signal?: (AbortSignal | null) | undefined;
2558
+ credentials?: undici_types.RequestCredentials | undefined;
2559
+ referrer?: string | undefined;
2560
+ referrerPolicy?: undici_types.ReferrerPolicy | undefined;
2561
+ window?: null | undefined;
2562
+ dispatcher?: undici_types.Dispatcher | undefined;
2563
+ duplex?: undici_types.RequestDuplex | undefined;
2564
+ onRequest?: (<T extends Record<string, any>>(context: _better_fetch_fetch.RequestContext<T>) => Promise<_better_fetch_fetch.RequestContext | void> | _better_fetch_fetch.RequestContext | void) | undefined;
2565
+ onResponse?: ((context: _better_fetch_fetch.ResponseContext) => Promise<Response | void | _better_fetch_fetch.ResponseContext> | Response | _better_fetch_fetch.ResponseContext | void) | undefined;
2566
+ onSuccess?: ((context: _better_fetch_fetch.SuccessContext<any>) => Promise<void> | void) | undefined;
2567
+ onError?: ((context: _better_fetch_fetch.ErrorContext) => Promise<void> | void) | undefined;
2568
+ onRetry?: ((response: _better_fetch_fetch.ResponseContext) => Promise<void> | void) | undefined;
2569
+ hookOptions?: {
2570
+ cloneResponse?: boolean;
2571
+ } | undefined;
2572
+ timeout?: number | undefined;
2573
+ customFetchImpl?: _better_fetch_fetch.FetchEsque | undefined;
2574
+ plugins?: _better_fetch_fetch.BetterFetchPlugin[] | undefined;
2575
+ baseURL?: string | undefined;
2576
+ throw?: boolean | undefined;
2577
+ auth?: ({
2578
+ type: "Bearer";
2579
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
2580
+ } | {
2581
+ type: "Basic";
2582
+ username: string | (() => string | undefined) | undefined;
2583
+ password: string | (() => string | undefined) | undefined;
2584
+ } | {
2585
+ type: "Custom";
2586
+ prefix: string | (() => string | undefined) | undefined;
2587
+ value: string | (() => string | undefined) | undefined;
2588
+ }) | undefined;
2589
+ body?: (Partial<{
2590
+ providerId: string;
2591
+ accountId?: string | undefined;
2592
+ }> & Record<string, any>) | undefined;
2593
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
2594
+ params?: Record<string, any> | undefined;
2595
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
2596
+ retry?: _better_fetch_fetch.RetryOptions | undefined;
2597
+ retryAttempt?: number | undefined;
2598
+ output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
2599
+ errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined;
2600
+ disableValidation?: boolean | undefined;
2601
+ }>(data_0: better_auth.Prettify<{
2602
+ providerId: string;
2603
+ accountId?: string | undefined;
2604
+ } & {
2605
+ fetchOptions?: FetchOptions | undefined;
2606
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
2607
+ status: boolean;
2608
+ }, {
2609
+ code?: string;
2610
+ message?: string;
2611
+ }, FetchOptions["throw"] extends true ? true : false>>;
2612
+ } & {
2613
+ refreshToken: <FetchOptions extends {
2614
+ mode?: undici_types.RequestMode | undefined;
2615
+ method?: string | undefined;
2616
+ headers?: any;
2617
+ keepalive?: boolean | undefined;
2618
+ redirect?: undici_types.RequestRedirect | undefined;
2619
+ integrity?: string | undefined;
2620
+ signal?: (AbortSignal | null) | undefined;
2621
+ credentials?: undici_types.RequestCredentials | undefined;
2622
+ referrer?: string | undefined;
2623
+ referrerPolicy?: undici_types.ReferrerPolicy | undefined;
2624
+ window?: null | undefined;
2625
+ dispatcher?: undici_types.Dispatcher | undefined;
2626
+ duplex?: undici_types.RequestDuplex | undefined;
2627
+ onRequest?: (<T extends Record<string, any>>(context: _better_fetch_fetch.RequestContext<T>) => Promise<_better_fetch_fetch.RequestContext | void> | _better_fetch_fetch.RequestContext | void) | undefined;
2628
+ onResponse?: ((context: _better_fetch_fetch.ResponseContext) => Promise<Response | void | _better_fetch_fetch.ResponseContext> | Response | _better_fetch_fetch.ResponseContext | void) | undefined;
2629
+ onSuccess?: ((context: _better_fetch_fetch.SuccessContext<any>) => Promise<void> | void) | undefined;
2630
+ onError?: ((context: _better_fetch_fetch.ErrorContext) => Promise<void> | void) | undefined;
2631
+ onRetry?: ((response: _better_fetch_fetch.ResponseContext) => Promise<void> | void) | undefined;
2632
+ hookOptions?: {
2633
+ cloneResponse?: boolean;
2634
+ } | undefined;
2635
+ timeout?: number | undefined;
2636
+ customFetchImpl?: _better_fetch_fetch.FetchEsque | undefined;
2637
+ plugins?: _better_fetch_fetch.BetterFetchPlugin[] | undefined;
2638
+ baseURL?: string | undefined;
2639
+ throw?: boolean | undefined;
2640
+ auth?: ({
2641
+ type: "Bearer";
2642
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
2643
+ } | {
2644
+ type: "Basic";
2645
+ username: string | (() => string | undefined) | undefined;
2646
+ password: string | (() => string | undefined) | undefined;
2647
+ } | {
2648
+ type: "Custom";
2649
+ prefix: string | (() => string | undefined) | undefined;
2650
+ value: string | (() => string | undefined) | undefined;
2651
+ }) | undefined;
2652
+ body?: (Partial<{
2653
+ providerId: string;
2654
+ accountId?: string | undefined;
2655
+ userId?: string | undefined;
2656
+ }> & Record<string, any>) | undefined;
2657
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
2658
+ params?: Record<string, any> | undefined;
2659
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
2660
+ retry?: _better_fetch_fetch.RetryOptions | undefined;
2661
+ retryAttempt?: number | undefined;
2662
+ output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
2663
+ errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined;
2664
+ disableValidation?: boolean | undefined;
2665
+ }>(data_0: better_auth.Prettify<{
2666
+ providerId: string;
2667
+ accountId?: string | undefined;
2668
+ userId?: string | undefined;
2669
+ } & {
2670
+ fetchOptions?: FetchOptions | undefined;
2671
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<better_auth.OAuth2Tokens, {
2672
+ code?: string;
2673
+ message?: string;
2674
+ }, FetchOptions["throw"] extends true ? true : false>>;
2675
+ } & {
2676
+ getAccessToken: <FetchOptions extends {
2677
+ mode?: undici_types.RequestMode | undefined;
2678
+ method?: string | undefined;
2679
+ headers?: any;
2680
+ keepalive?: boolean | undefined;
2681
+ redirect?: undici_types.RequestRedirect | undefined;
2682
+ integrity?: string | undefined;
2683
+ signal?: (AbortSignal | null) | undefined;
2684
+ credentials?: undici_types.RequestCredentials | undefined;
2685
+ referrer?: string | undefined;
2686
+ referrerPolicy?: undici_types.ReferrerPolicy | undefined;
2687
+ window?: null | undefined;
2688
+ dispatcher?: undici_types.Dispatcher | undefined;
2689
+ duplex?: undici_types.RequestDuplex | undefined;
2690
+ onRequest?: (<T extends Record<string, any>>(context: _better_fetch_fetch.RequestContext<T>) => Promise<_better_fetch_fetch.RequestContext | void> | _better_fetch_fetch.RequestContext | void) | undefined;
2691
+ onResponse?: ((context: _better_fetch_fetch.ResponseContext) => Promise<Response | void | _better_fetch_fetch.ResponseContext> | Response | _better_fetch_fetch.ResponseContext | void) | undefined;
2692
+ onSuccess?: ((context: _better_fetch_fetch.SuccessContext<any>) => Promise<void> | void) | undefined;
2693
+ onError?: ((context: _better_fetch_fetch.ErrorContext) => Promise<void> | void) | undefined;
2694
+ onRetry?: ((response: _better_fetch_fetch.ResponseContext) => Promise<void> | void) | undefined;
2695
+ hookOptions?: {
2696
+ cloneResponse?: boolean;
2697
+ } | undefined;
2698
+ timeout?: number | undefined;
2699
+ customFetchImpl?: _better_fetch_fetch.FetchEsque | undefined;
2700
+ plugins?: _better_fetch_fetch.BetterFetchPlugin[] | undefined;
2701
+ baseURL?: string | undefined;
2702
+ throw?: boolean | undefined;
2703
+ auth?: ({
2704
+ type: "Bearer";
2705
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
2706
+ } | {
2707
+ type: "Basic";
2708
+ username: string | (() => string | undefined) | undefined;
2709
+ password: string | (() => string | undefined) | undefined;
2710
+ } | {
2711
+ type: "Custom";
2712
+ prefix: string | (() => string | undefined) | undefined;
2713
+ value: string | (() => string | undefined) | undefined;
2714
+ }) | undefined;
2715
+ body?: (Partial<{
2716
+ providerId: string;
2717
+ accountId?: string | undefined;
2718
+ userId?: string | undefined;
2719
+ }> & Record<string, any>) | undefined;
2720
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
2721
+ params?: Record<string, any> | undefined;
2722
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
2723
+ retry?: _better_fetch_fetch.RetryOptions | undefined;
2724
+ retryAttempt?: number | undefined;
2725
+ output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
2726
+ errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined;
2727
+ disableValidation?: boolean | undefined;
2728
+ }>(data_0: better_auth.Prettify<{
2729
+ providerId: string;
2730
+ accountId?: string | undefined;
2731
+ userId?: string | undefined;
2732
+ } & {
2733
+ fetchOptions?: FetchOptions | undefined;
2734
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
2735
+ accessToken: string;
2736
+ accessTokenExpiresAt: Date | undefined;
2737
+ scopes: string[];
2738
+ idToken: string | undefined;
2739
+ }, {
2740
+ code?: string;
2741
+ message?: string;
2742
+ }, FetchOptions["throw"] extends true ? true : false>>;
2743
+ } & {
2744
+ accountInfo: <FetchOptions extends {
2745
+ mode?: undici_types.RequestMode | undefined;
2746
+ method?: string | undefined;
2747
+ headers?: any;
2748
+ keepalive?: boolean | undefined;
2749
+ redirect?: undici_types.RequestRedirect | undefined;
2750
+ integrity?: string | undefined;
2751
+ signal?: (AbortSignal | null) | undefined;
2752
+ credentials?: undici_types.RequestCredentials | undefined;
2753
+ referrer?: string | undefined;
2754
+ referrerPolicy?: undici_types.ReferrerPolicy | undefined;
2755
+ window?: null | undefined;
2756
+ dispatcher?: undici_types.Dispatcher | undefined;
2757
+ duplex?: undici_types.RequestDuplex | undefined;
2758
+ onRequest?: (<T extends Record<string, any>>(context: _better_fetch_fetch.RequestContext<T>) => Promise<_better_fetch_fetch.RequestContext | void> | _better_fetch_fetch.RequestContext | void) | undefined;
2759
+ onResponse?: ((context: _better_fetch_fetch.ResponseContext) => Promise<Response | void | _better_fetch_fetch.ResponseContext> | Response | _better_fetch_fetch.ResponseContext | void) | undefined;
2760
+ onSuccess?: ((context: _better_fetch_fetch.SuccessContext<any>) => Promise<void> | void) | undefined;
2761
+ onError?: ((context: _better_fetch_fetch.ErrorContext) => Promise<void> | void) | undefined;
2762
+ onRetry?: ((response: _better_fetch_fetch.ResponseContext) => Promise<void> | void) | undefined;
2763
+ hookOptions?: {
2764
+ cloneResponse?: boolean;
2765
+ } | undefined;
2766
+ timeout?: number | undefined;
2767
+ customFetchImpl?: _better_fetch_fetch.FetchEsque | undefined;
2768
+ plugins?: _better_fetch_fetch.BetterFetchPlugin[] | undefined;
2769
+ baseURL?: string | undefined;
2770
+ throw?: boolean | undefined;
2771
+ auth?: ({
2772
+ type: "Bearer";
2773
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
2774
+ } | {
2775
+ type: "Basic";
2776
+ username: string | (() => string | undefined) | undefined;
2777
+ password: string | (() => string | undefined) | undefined;
2778
+ } | {
2779
+ type: "Custom";
2780
+ prefix: string | (() => string | undefined) | undefined;
2781
+ value: string | (() => string | undefined) | undefined;
2782
+ }) | undefined;
2783
+ body?: (Partial<{
2784
+ accountId: string;
2785
+ }> & Record<string, any>) | undefined;
2786
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
2787
+ params?: Record<string, any> | undefined;
2788
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
2789
+ retry?: _better_fetch_fetch.RetryOptions | undefined;
2790
+ retryAttempt?: number | undefined;
2791
+ output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
2792
+ errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined;
2793
+ disableValidation?: boolean | undefined;
2794
+ }>(data_0: better_auth.Prettify<{
2795
+ accountId: string;
2796
+ } & {
2797
+ fetchOptions?: FetchOptions | undefined;
2798
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
2799
+ user: better_auth.OAuth2UserInfo;
2800
+ data: Record<string, any>;
2801
+ }, {
2802
+ code?: string;
2803
+ message?: string;
2804
+ }, FetchOptions["throw"] extends true ? true : false>>;
2805
+ } & {
2806
+ signUp: {
2807
+ email: <FetchOptions extends {
2808
+ mode?: undici_types.RequestMode | undefined;
2809
+ method?: string | undefined;
2810
+ headers?: any;
2811
+ keepalive?: boolean | undefined;
2812
+ redirect?: undici_types.RequestRedirect | undefined;
2813
+ integrity?: string | undefined;
2814
+ signal?: (AbortSignal | null) | undefined;
2815
+ credentials?: undici_types.RequestCredentials | undefined;
2816
+ referrer?: string | undefined;
2817
+ referrerPolicy?: undici_types.ReferrerPolicy | undefined;
2818
+ window?: null | undefined;
2819
+ dispatcher?: undici_types.Dispatcher | undefined;
2820
+ duplex?: undici_types.RequestDuplex | undefined;
2821
+ onRequest?: (<T extends Record<string, any>>(context: _better_fetch_fetch.RequestContext<T>) => Promise<_better_fetch_fetch.RequestContext | void> | _better_fetch_fetch.RequestContext | void) | undefined;
2822
+ onResponse?: ((context: _better_fetch_fetch.ResponseContext) => Promise<Response | void | _better_fetch_fetch.ResponseContext> | Response | _better_fetch_fetch.ResponseContext | void) | undefined;
2823
+ onSuccess?: ((context: _better_fetch_fetch.SuccessContext<any>) => Promise<void> | void) | undefined;
2824
+ onError?: ((context: _better_fetch_fetch.ErrorContext) => Promise<void> | void) | undefined;
2825
+ onRetry?: ((response: _better_fetch_fetch.ResponseContext) => Promise<void> | void) | undefined;
2826
+ hookOptions?: {
2827
+ cloneResponse?: boolean;
2828
+ } | undefined;
2829
+ timeout?: number | undefined;
2830
+ customFetchImpl?: _better_fetch_fetch.FetchEsque | undefined;
2831
+ plugins?: _better_fetch_fetch.BetterFetchPlugin[] | undefined;
2832
+ baseURL?: string | undefined;
2833
+ throw?: boolean | undefined;
2834
+ auth?: ({
2835
+ type: "Bearer";
2836
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
2837
+ } | {
2838
+ type: "Basic";
2839
+ username: string | (() => string | undefined) | undefined;
2840
+ password: string | (() => string | undefined) | undefined;
2841
+ } | {
2842
+ type: "Custom";
2843
+ prefix: string | (() => string | undefined) | undefined;
2844
+ value: string | (() => string | undefined) | undefined;
2845
+ }) | undefined;
2846
+ body?: (Partial<{
2847
+ name: string;
2848
+ email: string;
2849
+ password: string;
2850
+ image?: string;
2851
+ callbackURL?: string;
2852
+ rememberMe?: boolean;
2853
+ }> & Record<string, any>) | undefined;
2854
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
2855
+ params?: Record<string, any> | undefined;
2856
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
2857
+ retry?: _better_fetch_fetch.RetryOptions | undefined;
2858
+ retryAttempt?: number | undefined;
2859
+ output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
2860
+ errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined;
2861
+ disableValidation?: boolean | undefined;
2862
+ }>(data_0: better_auth.Prettify<{
2863
+ email: string;
2864
+ name: string;
2865
+ password: string;
2866
+ image?: string;
2867
+ callbackURL?: string;
2868
+ fetchOptions?: FetchOptions | undefined;
2869
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<NonNullable<{
2870
+ token: null;
2871
+ user: {
2872
+ id: string;
2873
+ email: string;
2874
+ name: string;
2875
+ image: string | null | undefined;
2876
+ emailVerified: boolean;
2877
+ createdAt: Date;
2878
+ updatedAt: Date;
2879
+ };
2880
+ } | {
2881
+ token: string;
2882
+ user: {
2883
+ id: string;
2884
+ email: string;
2885
+ name: string;
2886
+ image: string | null | undefined;
2887
+ emailVerified: boolean;
2888
+ createdAt: Date;
2889
+ updatedAt: Date;
2890
+ };
2891
+ }>, {
2892
+ code?: string;
2893
+ message?: string;
2894
+ }, FetchOptions["throw"] extends true ? true : false>>;
2895
+ };
2896
+ } & {
2897
+ updateUser: <FetchOptions extends {
2898
+ mode?: undici_types.RequestMode | undefined;
2899
+ method?: string | undefined;
2900
+ headers?: any;
2901
+ keepalive?: boolean | undefined;
2902
+ redirect?: undici_types.RequestRedirect | undefined;
2903
+ integrity?: string | undefined;
2904
+ signal?: (AbortSignal | null) | undefined;
2905
+ credentials?: undici_types.RequestCredentials | undefined;
2906
+ referrer?: string | undefined;
2907
+ referrerPolicy?: undici_types.ReferrerPolicy | undefined;
2908
+ window?: null | undefined;
2909
+ dispatcher?: undici_types.Dispatcher | undefined;
2910
+ duplex?: undici_types.RequestDuplex | undefined;
2911
+ onRequest?: (<T extends Record<string, any>>(context: _better_fetch_fetch.RequestContext<T>) => Promise<_better_fetch_fetch.RequestContext | void> | _better_fetch_fetch.RequestContext | void) | undefined;
2912
+ onResponse?: ((context: _better_fetch_fetch.ResponseContext) => Promise<Response | void | _better_fetch_fetch.ResponseContext> | Response | _better_fetch_fetch.ResponseContext | void) | undefined;
2913
+ onSuccess?: ((context: _better_fetch_fetch.SuccessContext<any>) => Promise<void> | void) | undefined;
2914
+ onError?: ((context: _better_fetch_fetch.ErrorContext) => Promise<void> | void) | undefined;
2915
+ onRetry?: ((response: _better_fetch_fetch.ResponseContext) => Promise<void> | void) | undefined;
2916
+ hookOptions?: {
2917
+ cloneResponse?: boolean;
2918
+ } | undefined;
2919
+ timeout?: number | undefined;
2920
+ customFetchImpl?: _better_fetch_fetch.FetchEsque | undefined;
2921
+ plugins?: _better_fetch_fetch.BetterFetchPlugin[] | undefined;
2922
+ baseURL?: string | undefined;
2923
+ throw?: boolean | undefined;
2924
+ auth?: ({
2925
+ type: "Bearer";
2926
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
2927
+ } | {
2928
+ type: "Basic";
2929
+ username: string | (() => string | undefined) | undefined;
2930
+ password: string | (() => string | undefined) | undefined;
2931
+ } | {
2932
+ type: "Custom";
2933
+ prefix: string | (() => string | undefined) | undefined;
2934
+ value: string | (() => string | undefined) | undefined;
2935
+ }) | undefined;
2936
+ body?: (Partial<Partial<{}> & {
2937
+ name?: string;
2938
+ image?: string;
2939
+ }> & Record<string, any>) | undefined;
2940
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
2941
+ params?: Record<string, any> | undefined;
2942
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
2943
+ retry?: _better_fetch_fetch.RetryOptions | undefined;
2944
+ retryAttempt?: number | undefined;
2945
+ output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
2946
+ errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined;
2947
+ disableValidation?: boolean | undefined;
2948
+ }>(data_0?: better_auth.Prettify<{
2949
+ image?: string | null;
2950
+ name?: string;
2951
+ fetchOptions?: FetchOptions | undefined;
2952
+ } & Partial<{}>> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
2953
+ status: boolean;
2954
+ }, {
2955
+ code?: string;
2956
+ message?: string;
2957
+ }, FetchOptions["throw"] extends true ? true : false>>;
2958
+ } & {
2959
+ listSessions: <FetchOptions extends {
2960
+ mode?: undici_types.RequestMode | undefined;
2961
+ method?: string | undefined;
2962
+ headers?: any;
2963
+ keepalive?: boolean | undefined;
2964
+ redirect?: undici_types.RequestRedirect | undefined;
2965
+ integrity?: string | undefined;
2966
+ signal?: (AbortSignal | null) | undefined;
2967
+ credentials?: undici_types.RequestCredentials | undefined;
2968
+ referrer?: string | undefined;
2969
+ referrerPolicy?: undici_types.ReferrerPolicy | undefined;
2970
+ window?: null | undefined;
2971
+ dispatcher?: undici_types.Dispatcher | undefined;
2972
+ duplex?: undici_types.RequestDuplex | undefined;
2973
+ onRequest?: (<T extends Record<string, any>>(context: _better_fetch_fetch.RequestContext<T>) => Promise<_better_fetch_fetch.RequestContext | void> | _better_fetch_fetch.RequestContext | void) | undefined;
2974
+ onResponse?: ((context: _better_fetch_fetch.ResponseContext) => Promise<Response | void | _better_fetch_fetch.ResponseContext> | Response | _better_fetch_fetch.ResponseContext | void) | undefined;
2975
+ onSuccess?: ((context: _better_fetch_fetch.SuccessContext<any>) => Promise<void> | void) | undefined;
2976
+ onError?: ((context: _better_fetch_fetch.ErrorContext) => Promise<void> | void) | undefined;
2977
+ onRetry?: ((response: _better_fetch_fetch.ResponseContext) => Promise<void> | void) | undefined;
2978
+ hookOptions?: {
2979
+ cloneResponse?: boolean;
2980
+ } | undefined;
2981
+ timeout?: number | undefined;
2982
+ customFetchImpl?: _better_fetch_fetch.FetchEsque | undefined;
2983
+ plugins?: _better_fetch_fetch.BetterFetchPlugin[] | undefined;
2984
+ baseURL?: string | undefined;
2985
+ throw?: boolean | undefined;
2986
+ auth?: ({
2987
+ type: "Bearer";
2988
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
2989
+ } | {
2990
+ type: "Basic";
2991
+ username: string | (() => string | undefined) | undefined;
2992
+ password: string | (() => string | undefined) | undefined;
2993
+ } | {
2994
+ type: "Custom";
2995
+ prefix: string | (() => string | undefined) | undefined;
2996
+ value: string | (() => string | undefined) | undefined;
2997
+ }) | undefined;
2998
+ body?: undefined;
2999
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
3000
+ params?: Record<string, any> | undefined;
3001
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
3002
+ retry?: _better_fetch_fetch.RetryOptions | undefined;
3003
+ retryAttempt?: number | undefined;
3004
+ output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
3005
+ errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined;
3006
+ disableValidation?: boolean | undefined;
3007
+ }>(data_0?: better_auth.Prettify<{
3008
+ query?: Record<string, any> | undefined;
3009
+ fetchOptions?: FetchOptions | undefined;
3010
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<better_auth.Prettify<{
3011
+ id: string;
3012
+ createdAt: Date;
3013
+ updatedAt: Date;
3014
+ userId: string;
3015
+ expiresAt: Date;
3016
+ token: string;
3017
+ ipAddress?: string | null | undefined | undefined;
3018
+ userAgent?: string | null | undefined | undefined;
3019
+ }>[], {
3020
+ code?: string;
3021
+ message?: string;
3022
+ }, FetchOptions["throw"] extends true ? true : false>>;
3023
+ } & {
3024
+ getSession: <FetchOptions extends {
3025
+ mode?: undici_types.RequestMode | undefined;
3026
+ method?: string | undefined;
3027
+ headers?: any;
3028
+ keepalive?: boolean | undefined;
3029
+ redirect?: undici_types.RequestRedirect | undefined;
3030
+ integrity?: string | undefined;
3031
+ signal?: (AbortSignal | null) | undefined;
3032
+ credentials?: undici_types.RequestCredentials | undefined;
3033
+ referrer?: string | undefined;
3034
+ referrerPolicy?: undici_types.ReferrerPolicy | undefined;
3035
+ window?: null | undefined;
3036
+ dispatcher?: undici_types.Dispatcher | undefined;
3037
+ duplex?: undici_types.RequestDuplex | undefined;
3038
+ onRequest?: (<T extends Record<string, any>>(context: _better_fetch_fetch.RequestContext<T>) => Promise<_better_fetch_fetch.RequestContext | void> | _better_fetch_fetch.RequestContext | void) | undefined;
3039
+ onResponse?: ((context: _better_fetch_fetch.ResponseContext) => Promise<Response | void | _better_fetch_fetch.ResponseContext> | Response | _better_fetch_fetch.ResponseContext | void) | undefined;
3040
+ onSuccess?: ((context: _better_fetch_fetch.SuccessContext<any>) => Promise<void> | void) | undefined;
3041
+ onError?: ((context: _better_fetch_fetch.ErrorContext) => Promise<void> | void) | undefined;
3042
+ onRetry?: ((response: _better_fetch_fetch.ResponseContext) => Promise<void> | void) | undefined;
3043
+ hookOptions?: {
3044
+ cloneResponse?: boolean;
3045
+ } | undefined;
3046
+ timeout?: number | undefined;
3047
+ customFetchImpl?: _better_fetch_fetch.FetchEsque | undefined;
3048
+ plugins?: _better_fetch_fetch.BetterFetchPlugin[] | undefined;
3049
+ baseURL?: string | undefined;
3050
+ throw?: boolean | undefined;
3051
+ auth?: ({
3052
+ type: "Bearer";
3053
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
3054
+ } | {
3055
+ type: "Basic";
3056
+ username: string | (() => string | undefined) | undefined;
3057
+ password: string | (() => string | undefined) | undefined;
3058
+ } | {
3059
+ type: "Custom";
3060
+ prefix: string | (() => string | undefined) | undefined;
3061
+ value: string | (() => string | undefined) | undefined;
3062
+ }) | undefined;
3063
+ body?: undefined;
3064
+ query?: (Partial<{
3065
+ disableCookieCache?: string | boolean | undefined;
3066
+ disableRefresh?: boolean | undefined;
3067
+ }> & Record<string, any>) | undefined;
3068
+ params?: Record<string, any> | undefined;
3069
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
3070
+ retry?: _better_fetch_fetch.RetryOptions | undefined;
3071
+ retryAttempt?: number | undefined;
3072
+ output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
3073
+ errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined;
3074
+ disableValidation?: boolean | undefined;
3075
+ }>(data_0?: better_auth.Prettify<{
3076
+ query?: {
3077
+ disableCookieCache?: string | boolean | undefined;
3078
+ disableRefresh?: boolean | undefined;
3079
+ } | undefined;
3080
+ fetchOptions?: FetchOptions | undefined;
3081
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
3082
+ user: {
3083
+ id: string;
3084
+ createdAt: Date;
3085
+ updatedAt: Date;
3086
+ email: string;
3087
+ emailVerified: boolean;
3088
+ name: string;
3089
+ image?: string | null | undefined;
3090
+ };
3091
+ session: {
3092
+ id: string;
3093
+ createdAt: Date;
3094
+ updatedAt: Date;
3095
+ userId: string;
3096
+ expiresAt: Date;
3097
+ token: string;
3098
+ ipAddress?: string | null | undefined;
3099
+ userAgent?: string | null | undefined;
3100
+ };
3101
+ products: {
3102
+ subscriptions: {
3103
+ id: string;
3104
+ productId: string;
3105
+ productName: string;
3106
+ priceId: string;
3107
+ priceName: string | null;
3108
+ firstBilledAt: Date | null;
3109
+ previouslyBilledAt: Date | null;
3110
+ nextBilledAt: Date | null;
3111
+ billingFrequency: number;
3112
+ billingInterval: "day" | "week" | "month" | "year";
3113
+ canceledAt: Date | null;
3114
+ status: "active" | "inactive" | "trialing";
3115
+ createdAt: Date;
3116
+ }[];
3117
+ transactions: {
3118
+ id: string;
3119
+ priceId: string;
3120
+ productId: string;
3121
+ productName: string;
3122
+ priceName: string | null;
3123
+ createdAt: Date;
3124
+ status: "canceled" | "past_due" | "draft" | "ready" | "billed" | "paid" | "completed";
3125
+ adjustmentId: string | null;
3126
+ }[];
3127
+ };
3128
+ customer: {
3129
+ id: string;
3130
+ };
3131
+ }, {
3132
+ code?: string;
3133
+ message?: string;
3134
+ }, FetchOptions["throw"] extends true ? true : false>>;
3135
+ } & {
3136
+ signIn: {
3137
+ passkey: (opts?: {
3138
+ autoFill?: boolean;
3139
+ email?: string;
3140
+ fetchOptions?: _better_fetch_fetch.BetterFetchOption;
3141
+ }, options?: _better_fetch_fetch.BetterFetchOption) => Promise<{
3142
+ data: null;
3143
+ error: {
3144
+ message?: string | undefined;
3145
+ status: number;
3146
+ statusText: string;
3147
+ };
3148
+ } | {
3149
+ data: {
3150
+ session: inspector.Session;
3151
+ user: better_auth.User;
3152
+ };
3153
+ error: null;
3154
+ } | {
3155
+ data: null;
3156
+ error: {
3157
+ code: string;
3158
+ message: string;
3159
+ status: number;
3160
+ statusText: string;
3161
+ };
3162
+ }>;
3163
+ };
3164
+ passkey: {
3165
+ addPasskey: (opts?: {
3166
+ fetchOptions?: _better_fetch_fetch.BetterFetchOption;
3167
+ name?: string;
3168
+ authenticatorAttachment?: "platform" | "cross-platform";
3169
+ useAutoRegister?: boolean;
3170
+ }, fetchOpts?: _better_fetch_fetch.BetterFetchOption) => Promise<{
3171
+ data: null;
3172
+ error: {
3173
+ message?: string | undefined;
3174
+ status: number;
3175
+ statusText: string;
3176
+ };
3177
+ } | {
3178
+ data: null;
3179
+ error: {
3180
+ code: string;
3181
+ message: string;
3182
+ status: number;
3183
+ statusText: string;
3184
+ };
3185
+ } | undefined>;
3186
+ };
3187
+ $Infer: {
3188
+ Passkey: better_auth_plugins_passkey.Passkey;
3189
+ };
3190
+ } & {
3191
+ useSession: () => {
3192
+ data: {
3193
+ user: {
3194
+ id: string;
3195
+ createdAt: Date;
3196
+ updatedAt: Date;
3197
+ email: string;
3198
+ emailVerified: boolean;
3199
+ name: string;
3200
+ image?: string | null | undefined;
3201
+ };
3202
+ session: {
3203
+ id: string;
3204
+ createdAt: Date;
3205
+ updatedAt: Date;
3206
+ userId: string;
3207
+ expiresAt: Date;
3208
+ token: string;
3209
+ ipAddress?: string | null | undefined;
3210
+ userAgent?: string | null | undefined;
3211
+ };
3212
+ products: {
3213
+ subscriptions: {
3214
+ id: string;
3215
+ productId: string;
3216
+ productName: string;
3217
+ priceId: string;
3218
+ priceName: string | null;
3219
+ firstBilledAt: Date | null;
3220
+ previouslyBilledAt: Date | null;
3221
+ nextBilledAt: Date | null;
3222
+ billingFrequency: number;
3223
+ billingInterval: "day" | "week" | "month" | "year";
3224
+ canceledAt: Date | null;
3225
+ status: "active" | "inactive" | "trialing";
3226
+ createdAt: Date;
3227
+ }[];
3228
+ transactions: {
3229
+ id: string;
3230
+ priceId: string;
3231
+ productId: string;
3232
+ productName: string;
3233
+ priceName: string | null;
3234
+ createdAt: Date;
3235
+ status: "canceled" | "past_due" | "draft" | "ready" | "billed" | "paid" | "completed";
3236
+ adjustmentId: string | null;
3237
+ }[];
3238
+ };
3239
+ customer: {
3240
+ id: string;
3241
+ };
3242
+ } | null;
3243
+ isPending: boolean;
3244
+ error: _better_fetch_fetch.BetterFetchError | null;
3245
+ refetch: (queryParams?: {
3246
+ query?: better_auth.SessionQueryParams;
3247
+ }) => void;
3248
+ };
3249
+ $Infer: {
3250
+ Session: {
3251
+ user: {
3252
+ id: string;
3253
+ createdAt: Date;
3254
+ updatedAt: Date;
3255
+ email: string;
3256
+ emailVerified: boolean;
3257
+ name: string;
3258
+ image?: string | null | undefined;
3259
+ };
3260
+ session: {
3261
+ id: string;
3262
+ createdAt: Date;
3263
+ updatedAt: Date;
3264
+ userId: string;
3265
+ expiresAt: Date;
3266
+ token: string;
3267
+ ipAddress?: string | null | undefined;
3268
+ userAgent?: string | null | undefined;
3269
+ };
3270
+ products: {
3271
+ subscriptions: {
3272
+ id: string;
3273
+ productId: string;
3274
+ productName: string;
3275
+ priceId: string;
3276
+ priceName: string | null;
3277
+ firstBilledAt: Date | null;
3278
+ previouslyBilledAt: Date | null;
3279
+ nextBilledAt: Date | null;
3280
+ billingFrequency: number;
3281
+ billingInterval: "day" | "week" | "month" | "year";
3282
+ canceledAt: Date | null;
3283
+ status: "active" | "inactive" | "trialing";
3284
+ createdAt: Date;
3285
+ }[];
3286
+ transactions: {
3287
+ id: string;
3288
+ priceId: string;
3289
+ productId: string;
3290
+ productName: string;
3291
+ priceName: string | null;
3292
+ createdAt: Date;
3293
+ status: "canceled" | "past_due" | "draft" | "ready" | "billed" | "paid" | "completed";
3294
+ adjustmentId: string | null;
3295
+ }[];
3296
+ };
3297
+ customer: {
3298
+ id: string;
3299
+ };
3300
+ };
3301
+ };
3302
+ $fetch: _better_fetch_fetch.BetterFetch<{
3303
+ plugins: (_better_fetch_fetch.BetterFetchPlugin | {
3304
+ id: string;
3305
+ name: string;
3306
+ hooks: {
3307
+ onSuccess: ((context: _better_fetch_fetch.SuccessContext<any>) => Promise<void> | void) | undefined;
3308
+ onError: ((context: _better_fetch_fetch.ErrorContext) => Promise<void> | void) | undefined;
3309
+ onRequest: (<T extends Record<string, any>>(context: _better_fetch_fetch.RequestContext<T>) => Promise<_better_fetch_fetch.RequestContext | void> | _better_fetch_fetch.RequestContext | void) | undefined;
3310
+ onResponse: ((context: _better_fetch_fetch.ResponseContext) => Promise<Response | void | _better_fetch_fetch.ResponseContext> | Response | _better_fetch_fetch.ResponseContext | void) | undefined;
3311
+ };
3312
+ } | {
3313
+ id: string;
3314
+ name: string;
3315
+ hooks: {
3316
+ onSuccess(context: _better_fetch_fetch.SuccessContext<any>): void;
3317
+ };
3318
+ })[];
3319
+ method: string;
3320
+ headers?: (HeadersInit & (HeadersInit | {
3321
+ accept: "application/json" | "text/plain" | "application/octet-stream";
3322
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
3323
+ authorization: "Bearer" | "Basic";
3324
+ })) | undefined;
3325
+ cache?: RequestCache | undefined;
3326
+ credentials?: RequestCredentials;
3327
+ integrity?: string | undefined;
3328
+ keepalive?: boolean | undefined;
3329
+ mode?: RequestMode | undefined;
3330
+ priority?: RequestPriority | undefined;
3331
+ redirect?: RequestRedirect | undefined;
3332
+ referrer?: string | undefined;
3333
+ referrerPolicy?: ReferrerPolicy | undefined;
3334
+ signal?: (AbortSignal | null) | undefined;
3335
+ window?: null | undefined;
3336
+ onRetry?: ((response: _better_fetch_fetch.ResponseContext) => Promise<void> | void) | undefined;
3337
+ hookOptions?: {
3338
+ cloneResponse?: boolean;
3339
+ } | undefined;
3340
+ timeout?: number | undefined;
3341
+ customFetchImpl: _better_fetch_fetch.FetchEsque;
3342
+ baseURL: string;
3343
+ throw?: boolean | undefined;
3344
+ auth?: ({
3345
+ type: "Bearer";
3346
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
3347
+ } | {
3348
+ type: "Basic";
3349
+ username: string | (() => string | undefined) | undefined;
3350
+ password: string | (() => string | undefined) | undefined;
3351
+ } | {
3352
+ type: "Custom";
3353
+ prefix: string | (() => string | undefined) | undefined;
3354
+ value: string | (() => string | undefined) | undefined;
3355
+ }) | undefined;
3356
+ body?: any;
3357
+ query?: any;
3358
+ params?: any;
3359
+ duplex?: "full" | "half" | undefined;
3360
+ jsonParser: (text: string) => Promise<any> | any;
3361
+ retry?: _better_fetch_fetch.RetryOptions | undefined;
3362
+ retryAttempt?: number | undefined;
3363
+ output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
3364
+ errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined;
3365
+ disableValidation?: boolean | undefined;
3366
+ }, unknown, unknown, {}>;
3367
+ $store: {
3368
+ notify: (signal?: Omit<string, "$sessionSignal"> | "$sessionSignal") => void;
3369
+ listen: (signal: Omit<string, "$sessionSignal"> | "$sessionSignal", listener: (value: boolean, oldValue?: boolean | undefined) => void) => void;
3370
+ atoms: Record<string, nanostores.WritableAtom<any>>;
3371
+ };
3372
+ $ERROR_CODES: {
3373
+ USER_NOT_FOUND: string;
3374
+ FAILED_TO_CREATE_USER: string;
3375
+ FAILED_TO_CREATE_SESSION: string;
3376
+ FAILED_TO_UPDATE_USER: string;
3377
+ FAILED_TO_GET_SESSION: string;
3378
+ INVALID_PASSWORD: string;
3379
+ INVALID_EMAIL: string;
3380
+ INVALID_EMAIL_OR_PASSWORD: string;
3381
+ SOCIAL_ACCOUNT_ALREADY_LINKED: string;
3382
+ PROVIDER_NOT_FOUND: string;
3383
+ INVALID_TOKEN: string;
3384
+ ID_TOKEN_NOT_SUPPORTED: string;
3385
+ FAILED_TO_GET_USER_INFO: string;
3386
+ USER_EMAIL_NOT_FOUND: string;
3387
+ EMAIL_NOT_VERIFIED: string;
3388
+ PASSWORD_TOO_SHORT: string;
3389
+ PASSWORD_TOO_LONG: string;
3390
+ USER_ALREADY_EXISTS: string;
3391
+ EMAIL_CAN_NOT_BE_UPDATED: string;
3392
+ CREDENTIAL_ACCOUNT_NOT_FOUND: string;
3393
+ SESSION_EXPIRED: string;
3394
+ FAILED_TO_UNLINK_LAST_ACCOUNT: string;
3395
+ ACCOUNT_NOT_FOUND: string;
3396
+ USER_ALREADY_HAS_PASSWORD: string;
3397
+ };
3398
+ };
3399
+ type CheckoutClient = ReturnType<typeof hc<CheckoutRouter>>;
3400
+ declare const makeCheckoutClient: (baseURL: string, options?: ClientRequestOptions) => CheckoutClient;
3401
+ type AppClient = ReturnType<typeof hc<AppRouter>>;
3402
+ declare const makeAppClient: (baseURL: string, options?: ClientRequestOptions) => AppClient;
3403
+ type PublicClient = ReturnType<typeof hc<PublicRouter>>;
3404
+ declare const makePublicClient: (baseURL: string, options?: ClientRequestOptions) => PublicClient;
3405
+
3406
+ export { makeAppClient, makeCheckoutClient, makePublicClient, makeUsBetterAuthClient };
3407
+ export type { AppClient, CheckoutClient, PublicClient };