@uninspired/auth-client 0.0.9 → 0.0.11

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