@uninspired/auth-client 0.0.18 → 1.0.0

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