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