@erikey/react 0.2.1 → 0.2.3

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.
package/dist/index.d.ts DELETED
@@ -1,4516 +0,0 @@
1
- import * as better_auth from 'better-auth';
2
- export { Session, User } from 'better-auth';
3
- import * as better_auth_react from 'better-auth/react';
4
- export { APIKey, Organization, Permission, SessionData } from '@erikey/core/types';
5
-
6
- interface DashboardClientConfig {
7
- /**
8
- * Base URL for the auth API
9
- * @default process.env.NEXT_PUBLIC_AUTH_URL || 'https://api.erikey.com'
10
- */
11
- baseURL?: string;
12
- /**
13
- * Whether to include credentials in requests
14
- * @default 'include'
15
- */
16
- credentials?: RequestCredentials;
17
- }
18
- /**
19
- * Create dashboard client with better-auth
20
- *
21
- * This is for the Erikey dashboard (erikey.com) - NOT for end-user auth.
22
- * For end-user auth in customer apps, use `createAuthClient` instead.
23
- *
24
- * NOTE: For dashboard user signup (which creates org + project), use the
25
- * typed API client (signupApi.dashboard) from @/lib/api/typed-api instead.
26
- * This client only handles Better Auth operations (signIn, session, etc.)
27
- *
28
- * @example
29
- * ```tsx
30
- * import { createDashboardClient } from '@erikey/react';
31
- *
32
- * export const auth = createDashboardClient({
33
- * baseURL: process.env.NEXT_PUBLIC_AUTH_URL
34
- * });
35
- *
36
- * // Use Better Auth methods
37
- * export const { useSession, signIn, signOut } = auth;
38
- * ```
39
- */
40
- declare function createDashboardClient(config?: DashboardClientConfig): {
41
- signIn: {
42
- social: <FetchOptions extends {
43
- credentials?: RequestCredentials | undefined;
44
- method?: string | undefined;
45
- headers?: (HeadersInit & (HeadersInit | {
46
- accept: "application/json" | "text/plain" | "application/octet-stream";
47
- "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
48
- authorization: "Bearer" | "Basic";
49
- })) | undefined;
50
- cache?: RequestCache | undefined;
51
- integrity?: string | undefined;
52
- keepalive?: boolean | undefined;
53
- mode?: RequestMode | undefined;
54
- priority?: RequestPriority | undefined;
55
- redirect?: RequestRedirect | undefined;
56
- referrer?: string | undefined;
57
- referrerPolicy?: ReferrerPolicy | undefined;
58
- signal?: (AbortSignal | null) | undefined;
59
- window?: null | undefined;
60
- onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
61
- onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
62
- onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
63
- onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
64
- onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
65
- hookOptions?: {
66
- cloneResponse?: boolean;
67
- } | undefined;
68
- timeout?: number | undefined;
69
- customFetchImpl?: better_auth_react.FetchEsque | undefined;
70
- plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
71
- baseURL?: string | undefined;
72
- throw?: boolean | undefined;
73
- auth?: ({
74
- type: "Bearer";
75
- token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
76
- } | {
77
- type: "Basic";
78
- username: string | (() => string | undefined) | undefined;
79
- password: string | (() => string | undefined) | undefined;
80
- } | {
81
- type: "Custom";
82
- prefix: string | (() => string | undefined) | undefined;
83
- value: string | (() => string | undefined) | undefined;
84
- }) | undefined;
85
- body?: (Partial<{
86
- provider: unknown;
87
- callbackURL?: string | undefined;
88
- newUserCallbackURL?: string | undefined;
89
- errorCallbackURL?: string | undefined;
90
- disableRedirect?: boolean | undefined;
91
- idToken?: {
92
- token: string;
93
- nonce?: string | undefined;
94
- accessToken?: string | undefined;
95
- refreshToken?: string | undefined;
96
- expiresAt?: number | undefined;
97
- } | undefined;
98
- scopes?: string[] | undefined;
99
- requestSignUp?: boolean | undefined;
100
- loginHint?: string | undefined;
101
- }> & Record<string, any>) | undefined;
102
- query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
103
- params?: Record<string, any> | undefined;
104
- duplex?: "full" | "half" | undefined;
105
- jsonParser?: ((text: string) => Promise<any> | any) | undefined;
106
- retry?: better_auth_react.RetryOptions | undefined;
107
- retryAttempt?: number | undefined;
108
- output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
109
- errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
110
- disableValidation?: boolean | undefined;
111
- }>(data_0: better_auth.Prettify<{
112
- provider: unknown;
113
- callbackURL?: string | undefined;
114
- newUserCallbackURL?: string | undefined;
115
- errorCallbackURL?: string | undefined;
116
- disableRedirect?: boolean | undefined;
117
- idToken?: {
118
- token: string;
119
- nonce?: string | undefined;
120
- accessToken?: string | undefined;
121
- refreshToken?: string | undefined;
122
- expiresAt?: number | undefined;
123
- } | undefined;
124
- scopes?: string[] | undefined;
125
- requestSignUp?: boolean | undefined;
126
- loginHint?: string | undefined;
127
- } & {
128
- fetchOptions?: FetchOptions | undefined;
129
- }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<NonNullable<{
130
- redirect: boolean;
131
- token: string;
132
- url: undefined;
133
- user: {
134
- id: string;
135
- email: string;
136
- name: string;
137
- image: string | null | undefined;
138
- emailVerified: boolean;
139
- createdAt: Date;
140
- updatedAt: Date;
141
- };
142
- } | {
143
- url: string;
144
- redirect: boolean;
145
- }>, {
146
- code?: string;
147
- message?: string;
148
- }, FetchOptions["throw"] extends true ? true : false>>;
149
- };
150
- } & {
151
- signOut: <FetchOptions extends {
152
- credentials?: RequestCredentials | undefined;
153
- method?: string | undefined;
154
- headers?: (HeadersInit & (HeadersInit | {
155
- accept: "application/json" | "text/plain" | "application/octet-stream";
156
- "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
157
- authorization: "Bearer" | "Basic";
158
- })) | undefined;
159
- cache?: RequestCache | undefined;
160
- integrity?: string | undefined;
161
- keepalive?: boolean | undefined;
162
- mode?: RequestMode | undefined;
163
- priority?: RequestPriority | undefined;
164
- redirect?: RequestRedirect | undefined;
165
- referrer?: string | undefined;
166
- referrerPolicy?: ReferrerPolicy | undefined;
167
- signal?: (AbortSignal | null) | undefined;
168
- window?: null | undefined;
169
- onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
170
- onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
171
- onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
172
- onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
173
- onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
174
- hookOptions?: {
175
- cloneResponse?: boolean;
176
- } | undefined;
177
- timeout?: number | undefined;
178
- customFetchImpl?: better_auth_react.FetchEsque | undefined;
179
- plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
180
- baseURL?: string | undefined;
181
- throw?: boolean | undefined;
182
- auth?: ({
183
- type: "Bearer";
184
- token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
185
- } | {
186
- type: "Basic";
187
- username: string | (() => string | undefined) | undefined;
188
- password: string | (() => string | undefined) | undefined;
189
- } | {
190
- type: "Custom";
191
- prefix: string | (() => string | undefined) | undefined;
192
- value: string | (() => string | undefined) | undefined;
193
- }) | undefined;
194
- body?: undefined;
195
- query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
196
- params?: Record<string, any> | undefined;
197
- duplex?: "full" | "half" | undefined;
198
- jsonParser?: ((text: string) => Promise<any> | any) | undefined;
199
- retry?: better_auth_react.RetryOptions | undefined;
200
- retryAttempt?: number | undefined;
201
- output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
202
- errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
203
- disableValidation?: boolean | undefined;
204
- }>(data_0?: better_auth.Prettify<{
205
- query?: Record<string, any> | undefined;
206
- fetchOptions?: FetchOptions | undefined;
207
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
208
- success: boolean;
209
- }, {
210
- code?: string;
211
- message?: string;
212
- }, FetchOptions["throw"] extends true ? true : false>>;
213
- } & {
214
- signUp: {
215
- email: <FetchOptions extends {
216
- credentials?: RequestCredentials | undefined;
217
- method?: string | undefined;
218
- headers?: (HeadersInit & (HeadersInit | {
219
- accept: "application/json" | "text/plain" | "application/octet-stream";
220
- "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
221
- authorization: "Bearer" | "Basic";
222
- })) | undefined;
223
- cache?: RequestCache | undefined;
224
- integrity?: string | undefined;
225
- keepalive?: boolean | undefined;
226
- mode?: RequestMode | undefined;
227
- priority?: RequestPriority | undefined;
228
- redirect?: RequestRedirect | undefined;
229
- referrer?: string | undefined;
230
- referrerPolicy?: ReferrerPolicy | undefined;
231
- signal?: (AbortSignal | null) | undefined;
232
- window?: null | undefined;
233
- onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
234
- onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
235
- onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
236
- onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
237
- onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
238
- hookOptions?: {
239
- cloneResponse?: boolean;
240
- } | undefined;
241
- timeout?: number | undefined;
242
- customFetchImpl?: better_auth_react.FetchEsque | undefined;
243
- plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
244
- baseURL?: string | undefined;
245
- throw?: boolean | undefined;
246
- auth?: ({
247
- type: "Bearer";
248
- token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
249
- } | {
250
- type: "Basic";
251
- username: string | (() => string | undefined) | undefined;
252
- password: string | (() => string | undefined) | undefined;
253
- } | {
254
- type: "Custom";
255
- prefix: string | (() => string | undefined) | undefined;
256
- value: string | (() => string | undefined) | undefined;
257
- }) | undefined;
258
- body?: (Partial<{
259
- name: string;
260
- email: string;
261
- password: string;
262
- image?: string;
263
- callbackURL?: string;
264
- rememberMe?: boolean;
265
- }> & Record<string, any>) | undefined;
266
- query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
267
- params?: Record<string, any> | undefined;
268
- duplex?: "full" | "half" | undefined;
269
- jsonParser?: ((text: string) => Promise<any> | any) | undefined;
270
- retry?: better_auth_react.RetryOptions | undefined;
271
- retryAttempt?: number | undefined;
272
- output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
273
- errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
274
- disableValidation?: boolean | undefined;
275
- }>(data_0: better_auth.Prettify<{
276
- email: string;
277
- name: string;
278
- password: string;
279
- image?: string;
280
- callbackURL?: string;
281
- fetchOptions?: FetchOptions | undefined;
282
- }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<NonNullable<{
283
- token: null;
284
- user: {
285
- id: string;
286
- email: string;
287
- name: string;
288
- image: string | null | undefined;
289
- emailVerified: boolean;
290
- createdAt: Date;
291
- updatedAt: Date;
292
- };
293
- } | {
294
- token: string;
295
- user: {
296
- id: string;
297
- email: string;
298
- name: string;
299
- image: string | null | undefined;
300
- emailVerified: boolean;
301
- createdAt: Date;
302
- updatedAt: Date;
303
- };
304
- }>, {
305
- code?: string;
306
- message?: string;
307
- }, FetchOptions["throw"] extends true ? true : false>>;
308
- };
309
- } & {
310
- signIn: {
311
- email: <FetchOptions extends {
312
- credentials?: RequestCredentials | undefined;
313
- method?: string | undefined;
314
- headers?: (HeadersInit & (HeadersInit | {
315
- accept: "application/json" | "text/plain" | "application/octet-stream";
316
- "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
317
- authorization: "Bearer" | "Basic";
318
- })) | undefined;
319
- cache?: RequestCache | undefined;
320
- integrity?: string | undefined;
321
- keepalive?: boolean | undefined;
322
- mode?: RequestMode | undefined;
323
- priority?: RequestPriority | undefined;
324
- redirect?: RequestRedirect | undefined;
325
- referrer?: string | undefined;
326
- referrerPolicy?: ReferrerPolicy | undefined;
327
- signal?: (AbortSignal | null) | undefined;
328
- window?: null | undefined;
329
- onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
330
- onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
331
- onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
332
- onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
333
- onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
334
- hookOptions?: {
335
- cloneResponse?: boolean;
336
- } | undefined;
337
- timeout?: number | undefined;
338
- customFetchImpl?: better_auth_react.FetchEsque | undefined;
339
- plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
340
- baseURL?: string | undefined;
341
- throw?: boolean | undefined;
342
- auth?: ({
343
- type: "Bearer";
344
- token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
345
- } | {
346
- type: "Basic";
347
- username: string | (() => string | undefined) | undefined;
348
- password: string | (() => string | undefined) | undefined;
349
- } | {
350
- type: "Custom";
351
- prefix: string | (() => string | undefined) | undefined;
352
- value: string | (() => string | undefined) | undefined;
353
- }) | undefined;
354
- body?: (Partial<{
355
- email: string;
356
- password: string;
357
- callbackURL?: string | undefined;
358
- rememberMe?: boolean | undefined;
359
- }> & Record<string, any>) | undefined;
360
- query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
361
- params?: Record<string, any> | undefined;
362
- duplex?: "full" | "half" | undefined;
363
- jsonParser?: ((text: string) => Promise<any> | any) | undefined;
364
- retry?: better_auth_react.RetryOptions | undefined;
365
- retryAttempt?: number | undefined;
366
- output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
367
- errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
368
- disableValidation?: boolean | undefined;
369
- }>(data_0: better_auth.Prettify<{
370
- email: string;
371
- password: string;
372
- callbackURL?: string | undefined;
373
- rememberMe?: boolean | undefined;
374
- } & {
375
- fetchOptions?: FetchOptions | undefined;
376
- }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
377
- redirect: boolean;
378
- token: string;
379
- url: string | undefined;
380
- user: {
381
- id: string;
382
- email: string;
383
- name: string;
384
- image: string | null | undefined;
385
- emailVerified: boolean;
386
- createdAt: Date;
387
- updatedAt: Date;
388
- };
389
- }, {
390
- code?: string;
391
- message?: string;
392
- }, FetchOptions["throw"] extends true ? true : false>>;
393
- };
394
- } & {
395
- forgetPassword: <FetchOptions extends {
396
- credentials?: RequestCredentials | undefined;
397
- method?: string | undefined;
398
- headers?: (HeadersInit & (HeadersInit | {
399
- accept: "application/json" | "text/plain" | "application/octet-stream";
400
- "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
401
- authorization: "Bearer" | "Basic";
402
- })) | undefined;
403
- cache?: RequestCache | undefined;
404
- integrity?: string | undefined;
405
- keepalive?: boolean | undefined;
406
- mode?: RequestMode | undefined;
407
- priority?: RequestPriority | undefined;
408
- redirect?: RequestRedirect | undefined;
409
- referrer?: string | undefined;
410
- referrerPolicy?: ReferrerPolicy | undefined;
411
- signal?: (AbortSignal | null) | undefined;
412
- window?: null | undefined;
413
- onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
414
- onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
415
- onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
416
- onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
417
- onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
418
- hookOptions?: {
419
- cloneResponse?: boolean;
420
- } | undefined;
421
- timeout?: number | undefined;
422
- customFetchImpl?: better_auth_react.FetchEsque | undefined;
423
- plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
424
- baseURL?: string | undefined;
425
- throw?: boolean | undefined;
426
- auth?: ({
427
- type: "Bearer";
428
- token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
429
- } | {
430
- type: "Basic";
431
- username: string | (() => string | undefined) | undefined;
432
- password: string | (() => string | undefined) | undefined;
433
- } | {
434
- type: "Custom";
435
- prefix: string | (() => string | undefined) | undefined;
436
- value: string | (() => string | undefined) | undefined;
437
- }) | undefined;
438
- body?: (Partial<{
439
- email: string;
440
- redirectTo?: string | undefined;
441
- }> & Record<string, any>) | undefined;
442
- query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
443
- params?: Record<string, any> | undefined;
444
- duplex?: "full" | "half" | undefined;
445
- jsonParser?: ((text: string) => Promise<any> | any) | undefined;
446
- retry?: better_auth_react.RetryOptions | undefined;
447
- retryAttempt?: number | undefined;
448
- output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
449
- errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
450
- disableValidation?: boolean | undefined;
451
- }>(data_0: better_auth.Prettify<{
452
- email: string;
453
- redirectTo?: string | undefined;
454
- } & {
455
- fetchOptions?: FetchOptions | undefined;
456
- }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
457
- status: boolean;
458
- }, {
459
- code?: string;
460
- message?: string;
461
- }, FetchOptions["throw"] extends true ? true : false>>;
462
- } & {
463
- resetPassword: <FetchOptions extends {
464
- credentials?: RequestCredentials | undefined;
465
- method?: string | undefined;
466
- headers?: (HeadersInit & (HeadersInit | {
467
- accept: "application/json" | "text/plain" | "application/octet-stream";
468
- "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
469
- authorization: "Bearer" | "Basic";
470
- })) | undefined;
471
- cache?: RequestCache | undefined;
472
- integrity?: string | undefined;
473
- keepalive?: boolean | undefined;
474
- mode?: RequestMode | undefined;
475
- priority?: RequestPriority | undefined;
476
- redirect?: RequestRedirect | undefined;
477
- referrer?: string | undefined;
478
- referrerPolicy?: ReferrerPolicy | undefined;
479
- signal?: (AbortSignal | null) | undefined;
480
- window?: null | undefined;
481
- onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
482
- onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
483
- onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
484
- onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
485
- onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
486
- hookOptions?: {
487
- cloneResponse?: boolean;
488
- } | undefined;
489
- timeout?: number | undefined;
490
- customFetchImpl?: better_auth_react.FetchEsque | undefined;
491
- plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
492
- baseURL?: string | undefined;
493
- throw?: boolean | undefined;
494
- auth?: ({
495
- type: "Bearer";
496
- token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
497
- } | {
498
- type: "Basic";
499
- username: string | (() => string | undefined) | undefined;
500
- password: string | (() => string | undefined) | undefined;
501
- } | {
502
- type: "Custom";
503
- prefix: string | (() => string | undefined) | undefined;
504
- value: string | (() => string | undefined) | undefined;
505
- }) | undefined;
506
- body?: (Partial<{
507
- newPassword: string;
508
- token?: string | undefined;
509
- }> & Record<string, any>) | undefined;
510
- query?: (Partial<{
511
- token?: string | undefined;
512
- }> & Record<string, any>) | undefined;
513
- params?: Record<string, any> | undefined;
514
- duplex?: "full" | "half" | undefined;
515
- jsonParser?: ((text: string) => Promise<any> | any) | undefined;
516
- retry?: better_auth_react.RetryOptions | undefined;
517
- retryAttempt?: number | undefined;
518
- output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
519
- errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
520
- disableValidation?: boolean | undefined;
521
- }>(data_0: better_auth.Prettify<{
522
- newPassword: string;
523
- token?: string | undefined;
524
- } & {
525
- fetchOptions?: FetchOptions | undefined;
526
- }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
527
- status: boolean;
528
- }, {
529
- code?: string;
530
- message?: string;
531
- }, FetchOptions["throw"] extends true ? true : false>>;
532
- } & {
533
- verifyEmail: <FetchOptions extends {
534
- credentials?: RequestCredentials | undefined;
535
- method?: string | undefined;
536
- headers?: (HeadersInit & (HeadersInit | {
537
- accept: "application/json" | "text/plain" | "application/octet-stream";
538
- "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
539
- authorization: "Bearer" | "Basic";
540
- })) | undefined;
541
- cache?: RequestCache | undefined;
542
- integrity?: string | undefined;
543
- keepalive?: boolean | undefined;
544
- mode?: RequestMode | undefined;
545
- priority?: RequestPriority | undefined;
546
- redirect?: RequestRedirect | undefined;
547
- referrer?: string | undefined;
548
- referrerPolicy?: ReferrerPolicy | undefined;
549
- signal?: (AbortSignal | null) | undefined;
550
- window?: null | undefined;
551
- onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
552
- onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
553
- onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
554
- onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
555
- onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
556
- hookOptions?: {
557
- cloneResponse?: boolean;
558
- } | undefined;
559
- timeout?: number | undefined;
560
- customFetchImpl?: better_auth_react.FetchEsque | undefined;
561
- plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
562
- baseURL?: string | undefined;
563
- throw?: boolean | undefined;
564
- auth?: ({
565
- type: "Bearer";
566
- token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
567
- } | {
568
- type: "Basic";
569
- username: string | (() => string | undefined) | undefined;
570
- password: string | (() => string | undefined) | undefined;
571
- } | {
572
- type: "Custom";
573
- prefix: string | (() => string | undefined) | undefined;
574
- value: string | (() => string | undefined) | undefined;
575
- }) | undefined;
576
- body?: undefined;
577
- query?: (Partial<{
578
- token: string;
579
- callbackURL?: string | undefined;
580
- }> & Record<string, any>) | undefined;
581
- params?: Record<string, any> | undefined;
582
- duplex?: "full" | "half" | undefined;
583
- jsonParser?: ((text: string) => Promise<any> | any) | undefined;
584
- retry?: better_auth_react.RetryOptions | undefined;
585
- retryAttempt?: number | undefined;
586
- output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
587
- errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
588
- disableValidation?: boolean | undefined;
589
- }>(data_0: better_auth.Prettify<{
590
- query: {
591
- token: string;
592
- callbackURL?: string | undefined;
593
- };
594
- fetchOptions?: FetchOptions | undefined;
595
- }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<NonNullable<void | {
596
- status: boolean;
597
- user: {
598
- id: string;
599
- email: string;
600
- name: string;
601
- image: string | null | undefined;
602
- emailVerified: boolean;
603
- createdAt: Date;
604
- updatedAt: Date;
605
- };
606
- } | {
607
- status: boolean;
608
- user: null;
609
- }>, {
610
- code?: string;
611
- message?: string;
612
- }, FetchOptions["throw"] extends true ? true : false>>;
613
- } & {
614
- sendVerificationEmail: <FetchOptions extends {
615
- credentials?: RequestCredentials | undefined;
616
- method?: string | undefined;
617
- headers?: (HeadersInit & (HeadersInit | {
618
- accept: "application/json" | "text/plain" | "application/octet-stream";
619
- "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
620
- authorization: "Bearer" | "Basic";
621
- })) | undefined;
622
- cache?: RequestCache | undefined;
623
- integrity?: string | undefined;
624
- keepalive?: boolean | undefined;
625
- mode?: RequestMode | undefined;
626
- priority?: RequestPriority | undefined;
627
- redirect?: RequestRedirect | undefined;
628
- referrer?: string | undefined;
629
- referrerPolicy?: ReferrerPolicy | undefined;
630
- signal?: (AbortSignal | null) | undefined;
631
- window?: null | undefined;
632
- onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
633
- onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
634
- onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
635
- onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
636
- onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
637
- hookOptions?: {
638
- cloneResponse?: boolean;
639
- } | undefined;
640
- timeout?: number | undefined;
641
- customFetchImpl?: better_auth_react.FetchEsque | undefined;
642
- plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
643
- baseURL?: string | undefined;
644
- throw?: boolean | undefined;
645
- auth?: ({
646
- type: "Bearer";
647
- token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
648
- } | {
649
- type: "Basic";
650
- username: string | (() => string | undefined) | undefined;
651
- password: string | (() => string | undefined) | undefined;
652
- } | {
653
- type: "Custom";
654
- prefix: string | (() => string | undefined) | undefined;
655
- value: string | (() => string | undefined) | undefined;
656
- }) | undefined;
657
- body?: (Partial<{
658
- email: string;
659
- callbackURL?: string | undefined;
660
- }> & Record<string, any>) | undefined;
661
- query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
662
- params?: Record<string, any> | undefined;
663
- duplex?: "full" | "half" | undefined;
664
- jsonParser?: ((text: string) => Promise<any> | any) | undefined;
665
- retry?: better_auth_react.RetryOptions | undefined;
666
- retryAttempt?: number | undefined;
667
- output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
668
- errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
669
- disableValidation?: boolean | undefined;
670
- }>(data_0: better_auth.Prettify<{
671
- email: string;
672
- callbackURL?: string | undefined;
673
- } & {
674
- fetchOptions?: FetchOptions | undefined;
675
- }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
676
- status: boolean;
677
- }, {
678
- code?: string;
679
- message?: string;
680
- }, FetchOptions["throw"] extends true ? true : false>>;
681
- } & {
682
- changeEmail: <FetchOptions extends {
683
- credentials?: RequestCredentials | undefined;
684
- method?: string | undefined;
685
- headers?: (HeadersInit & (HeadersInit | {
686
- accept: "application/json" | "text/plain" | "application/octet-stream";
687
- "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
688
- authorization: "Bearer" | "Basic";
689
- })) | undefined;
690
- cache?: RequestCache | undefined;
691
- integrity?: string | undefined;
692
- keepalive?: boolean | undefined;
693
- mode?: RequestMode | undefined;
694
- priority?: RequestPriority | undefined;
695
- redirect?: RequestRedirect | undefined;
696
- referrer?: string | undefined;
697
- referrerPolicy?: ReferrerPolicy | undefined;
698
- signal?: (AbortSignal | null) | undefined;
699
- window?: null | undefined;
700
- onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
701
- onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
702
- onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
703
- onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
704
- onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
705
- hookOptions?: {
706
- cloneResponse?: boolean;
707
- } | undefined;
708
- timeout?: number | undefined;
709
- customFetchImpl?: better_auth_react.FetchEsque | undefined;
710
- plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
711
- baseURL?: string | undefined;
712
- throw?: boolean | undefined;
713
- auth?: ({
714
- type: "Bearer";
715
- token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
716
- } | {
717
- type: "Basic";
718
- username: string | (() => string | undefined) | undefined;
719
- password: string | (() => string | undefined) | undefined;
720
- } | {
721
- type: "Custom";
722
- prefix: string | (() => string | undefined) | undefined;
723
- value: string | (() => string | undefined) | undefined;
724
- }) | undefined;
725
- body?: (Partial<{
726
- newEmail: string;
727
- callbackURL?: string | undefined;
728
- }> & Record<string, any>) | undefined;
729
- query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
730
- params?: Record<string, any> | undefined;
731
- duplex?: "full" | "half" | undefined;
732
- jsonParser?: ((text: string) => Promise<any> | any) | undefined;
733
- retry?: better_auth_react.RetryOptions | undefined;
734
- retryAttempt?: number | undefined;
735
- output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
736
- errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
737
- disableValidation?: boolean | undefined;
738
- }>(data_0: better_auth.Prettify<{
739
- newEmail: string;
740
- callbackURL?: string | undefined;
741
- } & {
742
- fetchOptions?: FetchOptions | undefined;
743
- }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
744
- status: boolean;
745
- }, {
746
- code?: string;
747
- message?: string;
748
- }, FetchOptions["throw"] extends true ? true : false>>;
749
- } & {
750
- changePassword: <FetchOptions extends {
751
- credentials?: RequestCredentials | undefined;
752
- method?: string | undefined;
753
- headers?: (HeadersInit & (HeadersInit | {
754
- accept: "application/json" | "text/plain" | "application/octet-stream";
755
- "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
756
- authorization: "Bearer" | "Basic";
757
- })) | undefined;
758
- cache?: RequestCache | undefined;
759
- integrity?: string | undefined;
760
- keepalive?: boolean | undefined;
761
- mode?: RequestMode | undefined;
762
- priority?: RequestPriority | undefined;
763
- redirect?: RequestRedirect | undefined;
764
- referrer?: string | undefined;
765
- referrerPolicy?: ReferrerPolicy | undefined;
766
- signal?: (AbortSignal | null) | undefined;
767
- window?: null | undefined;
768
- onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
769
- onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
770
- onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
771
- onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
772
- onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
773
- hookOptions?: {
774
- cloneResponse?: boolean;
775
- } | undefined;
776
- timeout?: number | undefined;
777
- customFetchImpl?: better_auth_react.FetchEsque | undefined;
778
- plugins?: better_auth_react.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
- newPassword: string;
795
- currentPassword: string;
796
- revokeOtherSessions?: boolean | undefined;
797
- }> & Record<string, any>) | undefined;
798
- query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
799
- params?: Record<string, any> | undefined;
800
- duplex?: "full" | "half" | undefined;
801
- jsonParser?: ((text: string) => Promise<any> | any) | undefined;
802
- retry?: better_auth_react.RetryOptions | undefined;
803
- retryAttempt?: number | undefined;
804
- output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
805
- errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
806
- disableValidation?: boolean | undefined;
807
- }>(data_0: better_auth.Prettify<{
808
- newPassword: string;
809
- currentPassword: string;
810
- revokeOtherSessions?: boolean | undefined;
811
- } & {
812
- fetchOptions?: FetchOptions | undefined;
813
- }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
814
- token: string | null;
815
- user: {
816
- id: string;
817
- email: string;
818
- name: string;
819
- image: string | null | undefined;
820
- emailVerified: boolean;
821
- createdAt: Date;
822
- updatedAt: Date;
823
- };
824
- }, {
825
- code?: string;
826
- message?: string;
827
- }, FetchOptions["throw"] extends true ? true : false>>;
828
- } & {
829
- updateUser: <FetchOptions extends {
830
- credentials?: RequestCredentials | undefined;
831
- method?: string | undefined;
832
- headers?: (HeadersInit & (HeadersInit | {
833
- accept: "application/json" | "text/plain" | "application/octet-stream";
834
- "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
835
- authorization: "Bearer" | "Basic";
836
- })) | undefined;
837
- cache?: RequestCache | undefined;
838
- integrity?: string | undefined;
839
- keepalive?: boolean | undefined;
840
- mode?: RequestMode | undefined;
841
- priority?: RequestPriority | undefined;
842
- redirect?: RequestRedirect | undefined;
843
- referrer?: string | undefined;
844
- referrerPolicy?: ReferrerPolicy | undefined;
845
- signal?: (AbortSignal | null) | undefined;
846
- window?: null | undefined;
847
- onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
848
- onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
849
- onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
850
- onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
851
- onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
852
- hookOptions?: {
853
- cloneResponse?: boolean;
854
- } | undefined;
855
- timeout?: number | undefined;
856
- customFetchImpl?: better_auth_react.FetchEsque | undefined;
857
- plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
858
- baseURL?: string | undefined;
859
- throw?: boolean | undefined;
860
- auth?: ({
861
- type: "Bearer";
862
- token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
863
- } | {
864
- type: "Basic";
865
- username: string | (() => string | undefined) | undefined;
866
- password: string | (() => string | undefined) | undefined;
867
- } | {
868
- type: "Custom";
869
- prefix: string | (() => string | undefined) | undefined;
870
- value: string | (() => string | undefined) | undefined;
871
- }) | undefined;
872
- body?: (Partial<Partial<{}> & {
873
- name?: string;
874
- image?: string;
875
- }> & Record<string, any>) | undefined;
876
- query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
877
- params?: Record<string, any> | undefined;
878
- duplex?: "full" | "half" | undefined;
879
- jsonParser?: ((text: string) => Promise<any> | any) | undefined;
880
- retry?: better_auth_react.RetryOptions | undefined;
881
- retryAttempt?: number | undefined;
882
- output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
883
- errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
884
- disableValidation?: boolean | undefined;
885
- }>(data_0?: better_auth.Prettify<{
886
- image?: string | null;
887
- name?: string;
888
- fetchOptions?: FetchOptions | undefined;
889
- } & Partial<{}>> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
890
- status: boolean;
891
- }, {
892
- code?: string;
893
- message?: string;
894
- }, FetchOptions["throw"] extends true ? true : false>>;
895
- } & {
896
- deleteUser: <FetchOptions extends {
897
- credentials?: RequestCredentials | undefined;
898
- method?: string | undefined;
899
- headers?: (HeadersInit & (HeadersInit | {
900
- accept: "application/json" | "text/plain" | "application/octet-stream";
901
- "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
902
- authorization: "Bearer" | "Basic";
903
- })) | undefined;
904
- cache?: RequestCache | undefined;
905
- integrity?: string | undefined;
906
- keepalive?: boolean | undefined;
907
- mode?: RequestMode | undefined;
908
- priority?: RequestPriority | undefined;
909
- redirect?: RequestRedirect | undefined;
910
- referrer?: string | undefined;
911
- referrerPolicy?: ReferrerPolicy | undefined;
912
- signal?: (AbortSignal | null) | undefined;
913
- window?: null | undefined;
914
- onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
915
- onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
916
- onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
917
- onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
918
- onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
919
- hookOptions?: {
920
- cloneResponse?: boolean;
921
- } | undefined;
922
- timeout?: number | undefined;
923
- customFetchImpl?: better_auth_react.FetchEsque | undefined;
924
- plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
925
- baseURL?: string | undefined;
926
- throw?: boolean | undefined;
927
- auth?: ({
928
- type: "Bearer";
929
- token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
930
- } | {
931
- type: "Basic";
932
- username: string | (() => string | undefined) | undefined;
933
- password: string | (() => string | undefined) | undefined;
934
- } | {
935
- type: "Custom";
936
- prefix: string | (() => string | undefined) | undefined;
937
- value: string | (() => string | undefined) | undefined;
938
- }) | undefined;
939
- body?: (Partial<{
940
- callbackURL?: string | undefined;
941
- password?: string | undefined;
942
- token?: string | undefined;
943
- }> & Record<string, any>) | undefined;
944
- query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
945
- params?: Record<string, any> | undefined;
946
- duplex?: "full" | "half" | undefined;
947
- jsonParser?: ((text: string) => Promise<any> | any) | undefined;
948
- retry?: better_auth_react.RetryOptions | undefined;
949
- retryAttempt?: number | undefined;
950
- output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
951
- errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
952
- disableValidation?: boolean | undefined;
953
- }>(data_0?: better_auth.Prettify<{
954
- callbackURL?: string | undefined;
955
- password?: string | undefined;
956
- token?: string | undefined;
957
- } & {
958
- fetchOptions?: FetchOptions | undefined;
959
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
960
- success: boolean;
961
- message: string;
962
- }, {
963
- code?: string;
964
- message?: string;
965
- }, FetchOptions["throw"] extends true ? true : false>>;
966
- } & {
967
- resetPassword: {
968
- ":token": <FetchOptions extends {
969
- credentials?: RequestCredentials | undefined;
970
- method?: string | undefined;
971
- headers?: (HeadersInit & (HeadersInit | {
972
- accept: "application/json" | "text/plain" | "application/octet-stream";
973
- "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
974
- authorization: "Bearer" | "Basic";
975
- })) | undefined;
976
- cache?: RequestCache | undefined;
977
- integrity?: string | undefined;
978
- keepalive?: boolean | undefined;
979
- mode?: RequestMode | undefined;
980
- priority?: RequestPriority | undefined;
981
- redirect?: RequestRedirect | undefined;
982
- referrer?: string | undefined;
983
- referrerPolicy?: ReferrerPolicy | undefined;
984
- signal?: (AbortSignal | null) | undefined;
985
- window?: null | undefined;
986
- onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
987
- onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
988
- onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
989
- onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
990
- onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
991
- hookOptions?: {
992
- cloneResponse?: boolean;
993
- } | undefined;
994
- timeout?: number | undefined;
995
- customFetchImpl?: better_auth_react.FetchEsque | undefined;
996
- plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
997
- baseURL?: string | undefined;
998
- throw?: boolean | undefined;
999
- auth?: ({
1000
- type: "Bearer";
1001
- token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1002
- } | {
1003
- type: "Basic";
1004
- username: string | (() => string | undefined) | undefined;
1005
- password: string | (() => string | undefined) | undefined;
1006
- } | {
1007
- type: "Custom";
1008
- prefix: string | (() => string | undefined) | undefined;
1009
- value: string | (() => string | undefined) | undefined;
1010
- }) | undefined;
1011
- body?: undefined;
1012
- query?: (Partial<{
1013
- callbackURL: string;
1014
- }> & Record<string, any>) | undefined;
1015
- params?: {
1016
- token: string;
1017
- } | undefined;
1018
- duplex?: "full" | "half" | undefined;
1019
- jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1020
- retry?: better_auth_react.RetryOptions | undefined;
1021
- retryAttempt?: number | undefined;
1022
- output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1023
- errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
1024
- disableValidation?: boolean | undefined;
1025
- }>(data_0: better_auth.Prettify<{
1026
- query: {
1027
- callbackURL: string;
1028
- };
1029
- fetchOptions?: FetchOptions | undefined;
1030
- }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<never, {
1031
- code?: string;
1032
- message?: string;
1033
- }, FetchOptions["throw"] extends true ? true : false>>;
1034
- };
1035
- } & {
1036
- requestPasswordReset: <FetchOptions extends {
1037
- credentials?: RequestCredentials | undefined;
1038
- method?: string | undefined;
1039
- headers?: (HeadersInit & (HeadersInit | {
1040
- accept: "application/json" | "text/plain" | "application/octet-stream";
1041
- "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
1042
- authorization: "Bearer" | "Basic";
1043
- })) | undefined;
1044
- cache?: RequestCache | undefined;
1045
- integrity?: string | undefined;
1046
- keepalive?: boolean | undefined;
1047
- mode?: RequestMode | undefined;
1048
- priority?: RequestPriority | undefined;
1049
- redirect?: RequestRedirect | undefined;
1050
- referrer?: string | undefined;
1051
- referrerPolicy?: ReferrerPolicy | undefined;
1052
- signal?: (AbortSignal | null) | undefined;
1053
- window?: null | undefined;
1054
- onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
1055
- onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
1056
- onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
1057
- onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
1058
- onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
1059
- hookOptions?: {
1060
- cloneResponse?: boolean;
1061
- } | undefined;
1062
- timeout?: number | undefined;
1063
- customFetchImpl?: better_auth_react.FetchEsque | undefined;
1064
- plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
1065
- baseURL?: string | undefined;
1066
- throw?: boolean | undefined;
1067
- auth?: ({
1068
- type: "Bearer";
1069
- token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1070
- } | {
1071
- type: "Basic";
1072
- username: string | (() => string | undefined) | undefined;
1073
- password: string | (() => string | undefined) | undefined;
1074
- } | {
1075
- type: "Custom";
1076
- prefix: string | (() => string | undefined) | undefined;
1077
- value: string | (() => string | undefined) | undefined;
1078
- }) | undefined;
1079
- body?: (Partial<{
1080
- email: string;
1081
- redirectTo?: string | undefined;
1082
- }> & Record<string, any>) | undefined;
1083
- query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
1084
- params?: Record<string, any> | undefined;
1085
- duplex?: "full" | "half" | undefined;
1086
- jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1087
- retry?: better_auth_react.RetryOptions | undefined;
1088
- retryAttempt?: number | undefined;
1089
- output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1090
- errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
1091
- disableValidation?: boolean | undefined;
1092
- }>(data_0: better_auth.Prettify<{
1093
- email: string;
1094
- redirectTo?: string | undefined;
1095
- } & {
1096
- fetchOptions?: FetchOptions | undefined;
1097
- }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
1098
- status: boolean;
1099
- message: string;
1100
- }, {
1101
- code?: string;
1102
- message?: string;
1103
- }, FetchOptions["throw"] extends true ? true : false>>;
1104
- } & {
1105
- resetPassword: {
1106
- ":token": <FetchOptions extends {
1107
- credentials?: RequestCredentials | undefined;
1108
- method?: string | undefined;
1109
- headers?: (HeadersInit & (HeadersInit | {
1110
- accept: "application/json" | "text/plain" | "application/octet-stream";
1111
- "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
1112
- authorization: "Bearer" | "Basic";
1113
- })) | undefined;
1114
- cache?: RequestCache | undefined;
1115
- integrity?: string | undefined;
1116
- keepalive?: boolean | undefined;
1117
- mode?: RequestMode | undefined;
1118
- priority?: RequestPriority | undefined;
1119
- redirect?: RequestRedirect | undefined;
1120
- referrer?: string | undefined;
1121
- referrerPolicy?: ReferrerPolicy | undefined;
1122
- signal?: (AbortSignal | null) | undefined;
1123
- window?: null | undefined;
1124
- onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
1125
- onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
1126
- onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
1127
- onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
1128
- onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
1129
- hookOptions?: {
1130
- cloneResponse?: boolean;
1131
- } | undefined;
1132
- timeout?: number | undefined;
1133
- customFetchImpl?: better_auth_react.FetchEsque | undefined;
1134
- plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
1135
- baseURL?: string | undefined;
1136
- throw?: boolean | undefined;
1137
- auth?: ({
1138
- type: "Bearer";
1139
- token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1140
- } | {
1141
- type: "Basic";
1142
- username: string | (() => string | undefined) | undefined;
1143
- password: string | (() => string | undefined) | undefined;
1144
- } | {
1145
- type: "Custom";
1146
- prefix: string | (() => string | undefined) | undefined;
1147
- value: string | (() => string | undefined) | undefined;
1148
- }) | undefined;
1149
- body?: undefined;
1150
- query?: (Partial<{
1151
- callbackURL: string;
1152
- }> & Record<string, any>) | undefined;
1153
- params?: {
1154
- token: string;
1155
- } | undefined;
1156
- duplex?: "full" | "half" | undefined;
1157
- jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1158
- retry?: better_auth_react.RetryOptions | undefined;
1159
- retryAttempt?: number | undefined;
1160
- output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1161
- errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
1162
- disableValidation?: boolean | undefined;
1163
- }>(data_0: better_auth.Prettify<{
1164
- query: {
1165
- callbackURL: string;
1166
- };
1167
- fetchOptions?: FetchOptions | undefined;
1168
- }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<never, {
1169
- code?: string;
1170
- message?: string;
1171
- }, FetchOptions["throw"] extends true ? true : false>>;
1172
- };
1173
- } & {
1174
- listSessions: <FetchOptions extends {
1175
- credentials?: RequestCredentials | undefined;
1176
- method?: string | undefined;
1177
- headers?: (HeadersInit & (HeadersInit | {
1178
- accept: "application/json" | "text/plain" | "application/octet-stream";
1179
- "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
1180
- authorization: "Bearer" | "Basic";
1181
- })) | undefined;
1182
- cache?: RequestCache | undefined;
1183
- integrity?: string | undefined;
1184
- keepalive?: boolean | undefined;
1185
- mode?: RequestMode | undefined;
1186
- priority?: RequestPriority | undefined;
1187
- redirect?: RequestRedirect | undefined;
1188
- referrer?: string | undefined;
1189
- referrerPolicy?: ReferrerPolicy | undefined;
1190
- signal?: (AbortSignal | null) | undefined;
1191
- window?: null | undefined;
1192
- onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
1193
- onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
1194
- onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
1195
- onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
1196
- onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
1197
- hookOptions?: {
1198
- cloneResponse?: boolean;
1199
- } | undefined;
1200
- timeout?: number | undefined;
1201
- customFetchImpl?: better_auth_react.FetchEsque | undefined;
1202
- plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
1203
- baseURL?: string | undefined;
1204
- throw?: boolean | undefined;
1205
- auth?: ({
1206
- type: "Bearer";
1207
- token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1208
- } | {
1209
- type: "Basic";
1210
- username: string | (() => string | undefined) | undefined;
1211
- password: string | (() => string | undefined) | undefined;
1212
- } | {
1213
- type: "Custom";
1214
- prefix: string | (() => string | undefined) | undefined;
1215
- value: string | (() => string | undefined) | undefined;
1216
- }) | undefined;
1217
- body?: undefined;
1218
- query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
1219
- params?: Record<string, any> | undefined;
1220
- duplex?: "full" | "half" | undefined;
1221
- jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1222
- retry?: better_auth_react.RetryOptions | undefined;
1223
- retryAttempt?: number | undefined;
1224
- output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1225
- errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
1226
- disableValidation?: boolean | undefined;
1227
- }>(data_0?: better_auth.Prettify<{
1228
- query?: Record<string, any> | undefined;
1229
- fetchOptions?: FetchOptions | undefined;
1230
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<better_auth.Prettify<{
1231
- id: string;
1232
- createdAt: Date;
1233
- updatedAt: Date;
1234
- userId: string;
1235
- expiresAt: Date;
1236
- token: string;
1237
- ipAddress?: string | null | undefined | undefined;
1238
- userAgent?: string | null | undefined | undefined;
1239
- }>[], {
1240
- code?: string;
1241
- message?: string;
1242
- }, FetchOptions["throw"] extends true ? true : false>>;
1243
- } & {
1244
- revokeSession: <FetchOptions extends {
1245
- credentials?: RequestCredentials | undefined;
1246
- method?: string | undefined;
1247
- headers?: (HeadersInit & (HeadersInit | {
1248
- accept: "application/json" | "text/plain" | "application/octet-stream";
1249
- "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
1250
- authorization: "Bearer" | "Basic";
1251
- })) | undefined;
1252
- cache?: RequestCache | undefined;
1253
- integrity?: string | undefined;
1254
- keepalive?: boolean | undefined;
1255
- mode?: RequestMode | undefined;
1256
- priority?: RequestPriority | undefined;
1257
- redirect?: RequestRedirect | undefined;
1258
- referrer?: string | undefined;
1259
- referrerPolicy?: ReferrerPolicy | undefined;
1260
- signal?: (AbortSignal | null) | undefined;
1261
- window?: null | undefined;
1262
- onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
1263
- onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
1264
- onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
1265
- onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
1266
- onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
1267
- hookOptions?: {
1268
- cloneResponse?: boolean;
1269
- } | undefined;
1270
- timeout?: number | undefined;
1271
- customFetchImpl?: better_auth_react.FetchEsque | undefined;
1272
- plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
1273
- baseURL?: string | undefined;
1274
- throw?: boolean | undefined;
1275
- auth?: ({
1276
- type: "Bearer";
1277
- token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1278
- } | {
1279
- type: "Basic";
1280
- username: string | (() => string | undefined) | undefined;
1281
- password: string | (() => string | undefined) | undefined;
1282
- } | {
1283
- type: "Custom";
1284
- prefix: string | (() => string | undefined) | undefined;
1285
- value: string | (() => string | undefined) | undefined;
1286
- }) | undefined;
1287
- body?: (Partial<{
1288
- token: string;
1289
- }> & Record<string, any>) | undefined;
1290
- query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
1291
- params?: Record<string, any> | undefined;
1292
- duplex?: "full" | "half" | undefined;
1293
- jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1294
- retry?: better_auth_react.RetryOptions | undefined;
1295
- retryAttempt?: number | undefined;
1296
- output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1297
- errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
1298
- disableValidation?: boolean | undefined;
1299
- }>(data_0: better_auth.Prettify<{
1300
- token: string;
1301
- } & {
1302
- fetchOptions?: FetchOptions | undefined;
1303
- }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
1304
- status: boolean;
1305
- }, {
1306
- code?: string;
1307
- message?: string;
1308
- }, FetchOptions["throw"] extends true ? true : false>>;
1309
- } & {
1310
- revokeSessions: <FetchOptions extends {
1311
- credentials?: RequestCredentials | undefined;
1312
- method?: string | undefined;
1313
- headers?: (HeadersInit & (HeadersInit | {
1314
- accept: "application/json" | "text/plain" | "application/octet-stream";
1315
- "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
1316
- authorization: "Bearer" | "Basic";
1317
- })) | undefined;
1318
- cache?: RequestCache | undefined;
1319
- integrity?: string | undefined;
1320
- keepalive?: boolean | undefined;
1321
- mode?: RequestMode | undefined;
1322
- priority?: RequestPriority | undefined;
1323
- redirect?: RequestRedirect | undefined;
1324
- referrer?: string | undefined;
1325
- referrerPolicy?: ReferrerPolicy | undefined;
1326
- signal?: (AbortSignal | null) | undefined;
1327
- window?: null | undefined;
1328
- onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
1329
- onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
1330
- onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
1331
- onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
1332
- onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
1333
- hookOptions?: {
1334
- cloneResponse?: boolean;
1335
- } | undefined;
1336
- timeout?: number | undefined;
1337
- customFetchImpl?: better_auth_react.FetchEsque | undefined;
1338
- plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
1339
- baseURL?: string | undefined;
1340
- throw?: boolean | undefined;
1341
- auth?: ({
1342
- type: "Bearer";
1343
- token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1344
- } | {
1345
- type: "Basic";
1346
- username: string | (() => string | undefined) | undefined;
1347
- password: string | (() => string | undefined) | undefined;
1348
- } | {
1349
- type: "Custom";
1350
- prefix: string | (() => string | undefined) | undefined;
1351
- value: string | (() => string | undefined) | undefined;
1352
- }) | undefined;
1353
- body?: undefined;
1354
- query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
1355
- params?: Record<string, any> | undefined;
1356
- duplex?: "full" | "half" | undefined;
1357
- jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1358
- retry?: better_auth_react.RetryOptions | undefined;
1359
- retryAttempt?: number | undefined;
1360
- output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1361
- errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
1362
- disableValidation?: boolean | undefined;
1363
- }>(data_0?: better_auth.Prettify<{
1364
- query?: Record<string, any> | undefined;
1365
- fetchOptions?: FetchOptions | undefined;
1366
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
1367
- status: boolean;
1368
- }, {
1369
- code?: string;
1370
- message?: string;
1371
- }, FetchOptions["throw"] extends true ? true : false>>;
1372
- } & {
1373
- revokeOtherSessions: <FetchOptions extends {
1374
- credentials?: RequestCredentials | undefined;
1375
- method?: string | undefined;
1376
- headers?: (HeadersInit & (HeadersInit | {
1377
- accept: "application/json" | "text/plain" | "application/octet-stream";
1378
- "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
1379
- authorization: "Bearer" | "Basic";
1380
- })) | undefined;
1381
- cache?: RequestCache | undefined;
1382
- integrity?: string | undefined;
1383
- keepalive?: boolean | undefined;
1384
- mode?: RequestMode | undefined;
1385
- priority?: RequestPriority | undefined;
1386
- redirect?: RequestRedirect | undefined;
1387
- referrer?: string | undefined;
1388
- referrerPolicy?: ReferrerPolicy | undefined;
1389
- signal?: (AbortSignal | null) | undefined;
1390
- window?: null | undefined;
1391
- onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
1392
- onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
1393
- onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
1394
- onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
1395
- onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
1396
- hookOptions?: {
1397
- cloneResponse?: boolean;
1398
- } | undefined;
1399
- timeout?: number | undefined;
1400
- customFetchImpl?: better_auth_react.FetchEsque | undefined;
1401
- plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
1402
- baseURL?: string | undefined;
1403
- throw?: boolean | undefined;
1404
- auth?: ({
1405
- type: "Bearer";
1406
- token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1407
- } | {
1408
- type: "Basic";
1409
- username: string | (() => string | undefined) | undefined;
1410
- password: string | (() => string | undefined) | undefined;
1411
- } | {
1412
- type: "Custom";
1413
- prefix: string | (() => string | undefined) | undefined;
1414
- value: string | (() => string | undefined) | undefined;
1415
- }) | undefined;
1416
- body?: undefined;
1417
- query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
1418
- params?: Record<string, any> | undefined;
1419
- duplex?: "full" | "half" | undefined;
1420
- jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1421
- retry?: better_auth_react.RetryOptions | undefined;
1422
- retryAttempt?: number | undefined;
1423
- output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1424
- errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
1425
- disableValidation?: boolean | undefined;
1426
- }>(data_0?: better_auth.Prettify<{
1427
- query?: Record<string, any> | undefined;
1428
- fetchOptions?: FetchOptions | undefined;
1429
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
1430
- status: boolean;
1431
- }, {
1432
- code?: string;
1433
- message?: string;
1434
- }, FetchOptions["throw"] extends true ? true : false>>;
1435
- } & {
1436
- linkSocial: <FetchOptions extends {
1437
- credentials?: RequestCredentials | undefined;
1438
- method?: string | undefined;
1439
- headers?: (HeadersInit & (HeadersInit | {
1440
- accept: "application/json" | "text/plain" | "application/octet-stream";
1441
- "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
1442
- authorization: "Bearer" | "Basic";
1443
- })) | undefined;
1444
- cache?: RequestCache | undefined;
1445
- integrity?: string | undefined;
1446
- keepalive?: boolean | undefined;
1447
- mode?: RequestMode | undefined;
1448
- priority?: RequestPriority | undefined;
1449
- redirect?: RequestRedirect | undefined;
1450
- referrer?: string | undefined;
1451
- referrerPolicy?: ReferrerPolicy | undefined;
1452
- signal?: (AbortSignal | null) | undefined;
1453
- window?: null | undefined;
1454
- onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
1455
- onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
1456
- onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
1457
- onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
1458
- onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
1459
- hookOptions?: {
1460
- cloneResponse?: boolean;
1461
- } | undefined;
1462
- timeout?: number | undefined;
1463
- customFetchImpl?: better_auth_react.FetchEsque | undefined;
1464
- plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
1465
- baseURL?: string | undefined;
1466
- throw?: boolean | undefined;
1467
- auth?: ({
1468
- type: "Bearer";
1469
- token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1470
- } | {
1471
- type: "Basic";
1472
- username: string | (() => string | undefined) | undefined;
1473
- password: string | (() => string | undefined) | undefined;
1474
- } | {
1475
- type: "Custom";
1476
- prefix: string | (() => string | undefined) | undefined;
1477
- value: string | (() => string | undefined) | undefined;
1478
- }) | undefined;
1479
- body?: (Partial<{
1480
- provider: unknown;
1481
- callbackURL?: string | undefined;
1482
- idToken?: {
1483
- token: string;
1484
- nonce?: string | undefined;
1485
- accessToken?: string | undefined;
1486
- refreshToken?: string | undefined;
1487
- scopes?: string[] | undefined;
1488
- } | undefined;
1489
- requestSignUp?: boolean | undefined;
1490
- scopes?: string[] | undefined;
1491
- errorCallbackURL?: string | undefined;
1492
- disableRedirect?: boolean | undefined;
1493
- }> & Record<string, any>) | undefined;
1494
- query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
1495
- params?: Record<string, any> | undefined;
1496
- duplex?: "full" | "half" | undefined;
1497
- jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1498
- retry?: better_auth_react.RetryOptions | undefined;
1499
- retryAttempt?: number | undefined;
1500
- output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1501
- errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
1502
- disableValidation?: boolean | undefined;
1503
- }>(data_0: better_auth.Prettify<{
1504
- provider: unknown;
1505
- callbackURL?: string | undefined;
1506
- idToken?: {
1507
- token: string;
1508
- nonce?: string | undefined;
1509
- accessToken?: string | undefined;
1510
- refreshToken?: string | undefined;
1511
- scopes?: string[] | undefined;
1512
- } | undefined;
1513
- requestSignUp?: boolean | undefined;
1514
- scopes?: string[] | undefined;
1515
- errorCallbackURL?: string | undefined;
1516
- disableRedirect?: boolean | undefined;
1517
- } & {
1518
- fetchOptions?: FetchOptions | undefined;
1519
- }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
1520
- url: string;
1521
- redirect: boolean;
1522
- }, {
1523
- code?: string;
1524
- message?: string;
1525
- }, FetchOptions["throw"] extends true ? true : false>>;
1526
- } & {
1527
- listAccounts: <FetchOptions extends {
1528
- credentials?: RequestCredentials | undefined;
1529
- method?: string | undefined;
1530
- headers?: (HeadersInit & (HeadersInit | {
1531
- accept: "application/json" | "text/plain" | "application/octet-stream";
1532
- "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
1533
- authorization: "Bearer" | "Basic";
1534
- })) | undefined;
1535
- cache?: RequestCache | undefined;
1536
- integrity?: string | undefined;
1537
- keepalive?: boolean | undefined;
1538
- mode?: RequestMode | undefined;
1539
- priority?: RequestPriority | undefined;
1540
- redirect?: RequestRedirect | undefined;
1541
- referrer?: string | undefined;
1542
- referrerPolicy?: ReferrerPolicy | undefined;
1543
- signal?: (AbortSignal | null) | undefined;
1544
- window?: null | undefined;
1545
- onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
1546
- onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
1547
- onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
1548
- onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
1549
- onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
1550
- hookOptions?: {
1551
- cloneResponse?: boolean;
1552
- } | undefined;
1553
- timeout?: number | undefined;
1554
- customFetchImpl?: better_auth_react.FetchEsque | undefined;
1555
- plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
1556
- baseURL?: string | undefined;
1557
- throw?: boolean | undefined;
1558
- auth?: ({
1559
- type: "Bearer";
1560
- token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1561
- } | {
1562
- type: "Basic";
1563
- username: string | (() => string | undefined) | undefined;
1564
- password: string | (() => string | undefined) | undefined;
1565
- } | {
1566
- type: "Custom";
1567
- prefix: string | (() => string | undefined) | undefined;
1568
- value: string | (() => string | undefined) | undefined;
1569
- }) | undefined;
1570
- body?: undefined;
1571
- query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
1572
- params?: Record<string, any> | undefined;
1573
- duplex?: "full" | "half" | undefined;
1574
- jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1575
- retry?: better_auth_react.RetryOptions | undefined;
1576
- retryAttempt?: number | undefined;
1577
- output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1578
- errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
1579
- disableValidation?: boolean | undefined;
1580
- }>(data_0?: better_auth.Prettify<{
1581
- query?: Record<string, any> | undefined;
1582
- fetchOptions?: FetchOptions | undefined;
1583
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
1584
- id: string;
1585
- providerId: string;
1586
- createdAt: Date;
1587
- updatedAt: Date;
1588
- accountId: string;
1589
- scopes: string[];
1590
- }[], {
1591
- code?: string;
1592
- message?: string;
1593
- }, FetchOptions["throw"] extends true ? true : false>>;
1594
- } & {
1595
- deleteUser: {
1596
- callback: <FetchOptions extends {
1597
- credentials?: RequestCredentials | undefined;
1598
- method?: string | undefined;
1599
- headers?: (HeadersInit & (HeadersInit | {
1600
- accept: "application/json" | "text/plain" | "application/octet-stream";
1601
- "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
1602
- authorization: "Bearer" | "Basic";
1603
- })) | undefined;
1604
- cache?: RequestCache | undefined;
1605
- integrity?: string | undefined;
1606
- keepalive?: boolean | undefined;
1607
- mode?: RequestMode | undefined;
1608
- priority?: RequestPriority | undefined;
1609
- redirect?: RequestRedirect | undefined;
1610
- referrer?: string | undefined;
1611
- referrerPolicy?: ReferrerPolicy | undefined;
1612
- signal?: (AbortSignal | null) | undefined;
1613
- window?: null | undefined;
1614
- onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
1615
- onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
1616
- onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
1617
- onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
1618
- onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
1619
- hookOptions?: {
1620
- cloneResponse?: boolean;
1621
- } | undefined;
1622
- timeout?: number | undefined;
1623
- customFetchImpl?: better_auth_react.FetchEsque | undefined;
1624
- plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
1625
- baseURL?: string | undefined;
1626
- throw?: boolean | undefined;
1627
- auth?: ({
1628
- type: "Bearer";
1629
- token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1630
- } | {
1631
- type: "Basic";
1632
- username: string | (() => string | undefined) | undefined;
1633
- password: string | (() => string | undefined) | undefined;
1634
- } | {
1635
- type: "Custom";
1636
- prefix: string | (() => string | undefined) | undefined;
1637
- value: string | (() => string | undefined) | undefined;
1638
- }) | undefined;
1639
- body?: undefined;
1640
- query?: (Partial<{
1641
- token: string;
1642
- callbackURL?: string | undefined;
1643
- }> & Record<string, any>) | undefined;
1644
- params?: Record<string, any> | undefined;
1645
- duplex?: "full" | "half" | undefined;
1646
- jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1647
- retry?: better_auth_react.RetryOptions | undefined;
1648
- retryAttempt?: number | undefined;
1649
- output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1650
- errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
1651
- disableValidation?: boolean | undefined;
1652
- }>(data_0: better_auth.Prettify<{
1653
- query: {
1654
- token: string;
1655
- callbackURL?: string | undefined;
1656
- };
1657
- fetchOptions?: FetchOptions | undefined;
1658
- }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
1659
- success: boolean;
1660
- message: string;
1661
- }, {
1662
- code?: string;
1663
- message?: string;
1664
- }, FetchOptions["throw"] extends true ? true : false>>;
1665
- };
1666
- } & {
1667
- unlinkAccount: <FetchOptions extends {
1668
- credentials?: RequestCredentials | undefined;
1669
- method?: string | undefined;
1670
- headers?: (HeadersInit & (HeadersInit | {
1671
- accept: "application/json" | "text/plain" | "application/octet-stream";
1672
- "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
1673
- authorization: "Bearer" | "Basic";
1674
- })) | undefined;
1675
- cache?: RequestCache | undefined;
1676
- integrity?: string | undefined;
1677
- keepalive?: boolean | undefined;
1678
- mode?: RequestMode | undefined;
1679
- priority?: RequestPriority | undefined;
1680
- redirect?: RequestRedirect | undefined;
1681
- referrer?: string | undefined;
1682
- referrerPolicy?: ReferrerPolicy | undefined;
1683
- signal?: (AbortSignal | null) | undefined;
1684
- window?: null | undefined;
1685
- onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
1686
- onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
1687
- onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
1688
- onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
1689
- onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
1690
- hookOptions?: {
1691
- cloneResponse?: boolean;
1692
- } | undefined;
1693
- timeout?: number | undefined;
1694
- customFetchImpl?: better_auth_react.FetchEsque | undefined;
1695
- plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
1696
- baseURL?: string | undefined;
1697
- throw?: boolean | undefined;
1698
- auth?: ({
1699
- type: "Bearer";
1700
- token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1701
- } | {
1702
- type: "Basic";
1703
- username: string | (() => string | undefined) | undefined;
1704
- password: string | (() => string | undefined) | undefined;
1705
- } | {
1706
- type: "Custom";
1707
- prefix: string | (() => string | undefined) | undefined;
1708
- value: string | (() => string | undefined) | undefined;
1709
- }) | undefined;
1710
- body?: (Partial<{
1711
- providerId: string;
1712
- accountId?: string | undefined;
1713
- }> & Record<string, any>) | undefined;
1714
- query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
1715
- params?: Record<string, any> | undefined;
1716
- duplex?: "full" | "half" | undefined;
1717
- jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1718
- retry?: better_auth_react.RetryOptions | undefined;
1719
- retryAttempt?: number | undefined;
1720
- output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1721
- errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
1722
- disableValidation?: boolean | undefined;
1723
- }>(data_0: better_auth.Prettify<{
1724
- providerId: string;
1725
- accountId?: string | undefined;
1726
- } & {
1727
- fetchOptions?: FetchOptions | undefined;
1728
- }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
1729
- status: boolean;
1730
- }, {
1731
- code?: string;
1732
- message?: string;
1733
- }, FetchOptions["throw"] extends true ? true : false>>;
1734
- } & {
1735
- refreshToken: <FetchOptions extends {
1736
- credentials?: RequestCredentials | undefined;
1737
- method?: string | undefined;
1738
- headers?: (HeadersInit & (HeadersInit | {
1739
- accept: "application/json" | "text/plain" | "application/octet-stream";
1740
- "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
1741
- authorization: "Bearer" | "Basic";
1742
- })) | undefined;
1743
- cache?: RequestCache | undefined;
1744
- integrity?: string | undefined;
1745
- keepalive?: boolean | undefined;
1746
- mode?: RequestMode | undefined;
1747
- priority?: RequestPriority | undefined;
1748
- redirect?: RequestRedirect | undefined;
1749
- referrer?: string | undefined;
1750
- referrerPolicy?: ReferrerPolicy | undefined;
1751
- signal?: (AbortSignal | null) | undefined;
1752
- window?: null | undefined;
1753
- onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
1754
- onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
1755
- onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
1756
- onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
1757
- onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
1758
- hookOptions?: {
1759
- cloneResponse?: boolean;
1760
- } | undefined;
1761
- timeout?: number | undefined;
1762
- customFetchImpl?: better_auth_react.FetchEsque | undefined;
1763
- plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
1764
- baseURL?: string | undefined;
1765
- throw?: boolean | undefined;
1766
- auth?: ({
1767
- type: "Bearer";
1768
- token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1769
- } | {
1770
- type: "Basic";
1771
- username: string | (() => string | undefined) | undefined;
1772
- password: string | (() => string | undefined) | undefined;
1773
- } | {
1774
- type: "Custom";
1775
- prefix: string | (() => string | undefined) | undefined;
1776
- value: string | (() => string | undefined) | undefined;
1777
- }) | undefined;
1778
- body?: (Partial<{
1779
- providerId: string;
1780
- accountId?: string | undefined;
1781
- userId?: string | undefined;
1782
- }> & Record<string, any>) | undefined;
1783
- query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
1784
- params?: Record<string, any> | undefined;
1785
- duplex?: "full" | "half" | undefined;
1786
- jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1787
- retry?: better_auth_react.RetryOptions | undefined;
1788
- retryAttempt?: number | undefined;
1789
- output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1790
- errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
1791
- disableValidation?: boolean | undefined;
1792
- }>(data_0: better_auth.Prettify<{
1793
- providerId: string;
1794
- accountId?: string | undefined;
1795
- userId?: string | undefined;
1796
- } & {
1797
- fetchOptions?: FetchOptions | undefined;
1798
- }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<any, {
1799
- code?: string;
1800
- message?: string;
1801
- }, FetchOptions["throw"] extends true ? true : false>>;
1802
- } & {
1803
- getAccessToken: <FetchOptions extends {
1804
- credentials?: RequestCredentials | undefined;
1805
- method?: string | undefined;
1806
- headers?: (HeadersInit & (HeadersInit | {
1807
- accept: "application/json" | "text/plain" | "application/octet-stream";
1808
- "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
1809
- authorization: "Bearer" | "Basic";
1810
- })) | undefined;
1811
- cache?: RequestCache | undefined;
1812
- integrity?: string | undefined;
1813
- keepalive?: boolean | undefined;
1814
- mode?: RequestMode | undefined;
1815
- priority?: RequestPriority | undefined;
1816
- redirect?: RequestRedirect | undefined;
1817
- referrer?: string | undefined;
1818
- referrerPolicy?: ReferrerPolicy | undefined;
1819
- signal?: (AbortSignal | null) | undefined;
1820
- window?: null | undefined;
1821
- onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
1822
- onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
1823
- onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
1824
- onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
1825
- onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
1826
- hookOptions?: {
1827
- cloneResponse?: boolean;
1828
- } | undefined;
1829
- timeout?: number | undefined;
1830
- customFetchImpl?: better_auth_react.FetchEsque | undefined;
1831
- plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
1832
- baseURL?: string | undefined;
1833
- throw?: boolean | undefined;
1834
- auth?: ({
1835
- type: "Bearer";
1836
- token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1837
- } | {
1838
- type: "Basic";
1839
- username: string | (() => string | undefined) | undefined;
1840
- password: string | (() => string | undefined) | undefined;
1841
- } | {
1842
- type: "Custom";
1843
- prefix: string | (() => string | undefined) | undefined;
1844
- value: string | (() => string | undefined) | undefined;
1845
- }) | undefined;
1846
- body?: (Partial<{
1847
- providerId: string;
1848
- accountId?: string | undefined;
1849
- userId?: string | undefined;
1850
- }> & Record<string, any>) | undefined;
1851
- query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
1852
- params?: Record<string, any> | undefined;
1853
- duplex?: "full" | "half" | undefined;
1854
- jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1855
- retry?: better_auth_react.RetryOptions | undefined;
1856
- retryAttempt?: number | undefined;
1857
- output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1858
- errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
1859
- disableValidation?: boolean | undefined;
1860
- }>(data_0: better_auth.Prettify<{
1861
- providerId: string;
1862
- accountId?: string | undefined;
1863
- userId?: string | undefined;
1864
- } & {
1865
- fetchOptions?: FetchOptions | undefined;
1866
- }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
1867
- accessToken: string;
1868
- accessTokenExpiresAt: Date | undefined;
1869
- scopes: string[];
1870
- idToken: string | undefined;
1871
- }, {
1872
- code?: string;
1873
- message?: string;
1874
- }, FetchOptions["throw"] extends true ? true : false>>;
1875
- } & {
1876
- accountInfo: <FetchOptions extends {
1877
- credentials?: RequestCredentials | undefined;
1878
- method?: string | undefined;
1879
- headers?: (HeadersInit & (HeadersInit | {
1880
- accept: "application/json" | "text/plain" | "application/octet-stream";
1881
- "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
1882
- authorization: "Bearer" | "Basic";
1883
- })) | undefined;
1884
- cache?: RequestCache | undefined;
1885
- integrity?: string | undefined;
1886
- keepalive?: boolean | undefined;
1887
- mode?: RequestMode | undefined;
1888
- priority?: RequestPriority | undefined;
1889
- redirect?: RequestRedirect | undefined;
1890
- referrer?: string | undefined;
1891
- referrerPolicy?: ReferrerPolicy | undefined;
1892
- signal?: (AbortSignal | null) | undefined;
1893
- window?: null | undefined;
1894
- onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
1895
- onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
1896
- onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
1897
- onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
1898
- onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
1899
- hookOptions?: {
1900
- cloneResponse?: boolean;
1901
- } | undefined;
1902
- timeout?: number | undefined;
1903
- customFetchImpl?: better_auth_react.FetchEsque | undefined;
1904
- plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
1905
- baseURL?: string | undefined;
1906
- throw?: boolean | undefined;
1907
- auth?: ({
1908
- type: "Bearer";
1909
- token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1910
- } | {
1911
- type: "Basic";
1912
- username: string | (() => string | undefined) | undefined;
1913
- password: string | (() => string | undefined) | undefined;
1914
- } | {
1915
- type: "Custom";
1916
- prefix: string | (() => string | undefined) | undefined;
1917
- value: string | (() => string | undefined) | undefined;
1918
- }) | undefined;
1919
- body?: (Partial<{
1920
- accountId: string;
1921
- }> & Record<string, any>) | undefined;
1922
- query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
1923
- params?: Record<string, any> | undefined;
1924
- duplex?: "full" | "half" | undefined;
1925
- jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1926
- retry?: better_auth_react.RetryOptions | undefined;
1927
- retryAttempt?: number | undefined;
1928
- output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1929
- errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
1930
- disableValidation?: boolean | undefined;
1931
- }>(data_0: better_auth.Prettify<{
1932
- accountId: string;
1933
- } & {
1934
- fetchOptions?: FetchOptions | undefined;
1935
- }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
1936
- user: packages_core_dist_oauth2.OAuth2UserInfo;
1937
- data: Record<string, any>;
1938
- }, {
1939
- code?: string;
1940
- message?: string;
1941
- }, FetchOptions["throw"] extends true ? true : false>>;
1942
- } & {
1943
- getSession: <FetchOptions extends {
1944
- credentials?: RequestCredentials | undefined;
1945
- method?: string | undefined;
1946
- headers?: (HeadersInit & (HeadersInit | {
1947
- accept: "application/json" | "text/plain" | "application/octet-stream";
1948
- "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
1949
- authorization: "Bearer" | "Basic";
1950
- })) | undefined;
1951
- cache?: RequestCache | undefined;
1952
- integrity?: string | undefined;
1953
- keepalive?: boolean | undefined;
1954
- mode?: RequestMode | undefined;
1955
- priority?: RequestPriority | undefined;
1956
- redirect?: RequestRedirect | undefined;
1957
- referrer?: string | undefined;
1958
- referrerPolicy?: ReferrerPolicy | undefined;
1959
- signal?: (AbortSignal | null) | undefined;
1960
- window?: null | undefined;
1961
- onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
1962
- onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
1963
- onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
1964
- onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
1965
- onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
1966
- hookOptions?: {
1967
- cloneResponse?: boolean;
1968
- } | undefined;
1969
- timeout?: number | undefined;
1970
- customFetchImpl?: better_auth_react.FetchEsque | undefined;
1971
- plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
1972
- baseURL?: string | undefined;
1973
- throw?: boolean | undefined;
1974
- auth?: ({
1975
- type: "Bearer";
1976
- token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1977
- } | {
1978
- type: "Basic";
1979
- username: string | (() => string | undefined) | undefined;
1980
- password: string | (() => string | undefined) | undefined;
1981
- } | {
1982
- type: "Custom";
1983
- prefix: string | (() => string | undefined) | undefined;
1984
- value: string | (() => string | undefined) | undefined;
1985
- }) | undefined;
1986
- body?: undefined;
1987
- query?: (Partial<{
1988
- disableCookieCache?: unknown;
1989
- disableRefresh?: unknown;
1990
- }> & Record<string, any>) | undefined;
1991
- params?: Record<string, any> | undefined;
1992
- duplex?: "full" | "half" | undefined;
1993
- jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1994
- retry?: better_auth_react.RetryOptions | undefined;
1995
- retryAttempt?: number | undefined;
1996
- output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1997
- errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
1998
- disableValidation?: boolean | undefined;
1999
- }>(data_0?: better_auth.Prettify<{
2000
- query?: {
2001
- disableCookieCache?: unknown;
2002
- disableRefresh?: unknown;
2003
- } | undefined;
2004
- fetchOptions?: FetchOptions | undefined;
2005
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
2006
- user: {
2007
- id: string;
2008
- createdAt: Date;
2009
- updatedAt: Date;
2010
- email: string;
2011
- emailVerified: boolean;
2012
- name: string;
2013
- image?: string | null | undefined;
2014
- };
2015
- session: {
2016
- id: string;
2017
- createdAt: Date;
2018
- updatedAt: Date;
2019
- userId: string;
2020
- expiresAt: Date;
2021
- token: string;
2022
- ipAddress?: string | null | undefined;
2023
- userAgent?: string | null | undefined;
2024
- };
2025
- } | null, {
2026
- code?: string;
2027
- message?: string;
2028
- }, FetchOptions["throw"] extends true ? true : false>>;
2029
- } & {
2030
- useSession: () => {
2031
- data: {
2032
- user: {
2033
- id: string;
2034
- createdAt: Date;
2035
- updatedAt: Date;
2036
- email: string;
2037
- emailVerified: boolean;
2038
- name: string;
2039
- image?: string | null | undefined;
2040
- };
2041
- session: {
2042
- id: string;
2043
- createdAt: Date;
2044
- updatedAt: Date;
2045
- userId: string;
2046
- expiresAt: Date;
2047
- token: string;
2048
- ipAddress?: string | null | undefined;
2049
- userAgent?: string | null | undefined;
2050
- };
2051
- } | null;
2052
- isPending: boolean;
2053
- isRefetching: boolean;
2054
- error: better_auth_react.BetterFetchError | null;
2055
- refetch: (queryParams?: {
2056
- query?: better_auth.SessionQueryParams;
2057
- }) => void;
2058
- };
2059
- $Infer: {
2060
- Session: {
2061
- user: {
2062
- id: string;
2063
- createdAt: Date;
2064
- updatedAt: Date;
2065
- email: string;
2066
- emailVerified: boolean;
2067
- name: string;
2068
- image?: string | null | undefined;
2069
- };
2070
- session: {
2071
- id: string;
2072
- createdAt: Date;
2073
- updatedAt: Date;
2074
- userId: string;
2075
- expiresAt: Date;
2076
- token: string;
2077
- ipAddress?: string | null | undefined;
2078
- userAgent?: string | null | undefined;
2079
- };
2080
- };
2081
- };
2082
- $fetch: better_auth_react.BetterFetch<{
2083
- plugins: (better_auth_react.BetterFetchPlugin | {
2084
- id: string;
2085
- name: string;
2086
- hooks: {
2087
- onSuccess: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
2088
- onError: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
2089
- onRequest: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
2090
- onResponse: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
2091
- };
2092
- } | {
2093
- id: string;
2094
- name: string;
2095
- hooks: {
2096
- onSuccess(context: better_auth_react.SuccessContext<any>): void;
2097
- };
2098
- })[];
2099
- method: string;
2100
- headers?: (HeadersInit & (HeadersInit | {
2101
- accept: "application/json" | "text/plain" | "application/octet-stream";
2102
- "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
2103
- authorization: "Bearer" | "Basic";
2104
- })) | undefined;
2105
- redirect?: RequestRedirect | undefined;
2106
- cache?: RequestCache | undefined;
2107
- credentials?: RequestCredentials;
2108
- integrity?: string | undefined;
2109
- keepalive?: boolean | undefined;
2110
- mode?: RequestMode | undefined;
2111
- priority?: RequestPriority | undefined;
2112
- referrer?: string | undefined;
2113
- referrerPolicy?: ReferrerPolicy | undefined;
2114
- signal?: (AbortSignal | null) | undefined;
2115
- window?: null | undefined;
2116
- onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
2117
- hookOptions?: {
2118
- cloneResponse?: boolean;
2119
- } | undefined;
2120
- timeout?: number | undefined;
2121
- customFetchImpl: better_auth_react.FetchEsque;
2122
- baseURL: string;
2123
- throw?: boolean | undefined;
2124
- auth?: ({
2125
- type: "Bearer";
2126
- token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
2127
- } | {
2128
- type: "Basic";
2129
- username: string | (() => string | undefined) | undefined;
2130
- password: string | (() => string | undefined) | undefined;
2131
- } | {
2132
- type: "Custom";
2133
- prefix: string | (() => string | undefined) | undefined;
2134
- value: string | (() => string | undefined) | undefined;
2135
- }) | undefined;
2136
- body?: any;
2137
- query?: any;
2138
- params?: any;
2139
- duplex?: "full" | "half" | undefined;
2140
- jsonParser: (text: string) => Promise<any> | any;
2141
- retry?: better_auth_react.RetryOptions | undefined;
2142
- retryAttempt?: number | undefined;
2143
- output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
2144
- errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
2145
- disableValidation?: boolean | undefined;
2146
- }, unknown, unknown, {}>;
2147
- $store: {
2148
- notify: (signal?: Omit<string, "$sessionSignal"> | "$sessionSignal") => void;
2149
- listen: (signal: Omit<string, "$sessionSignal"> | "$sessionSignal", listener: (value: boolean, oldValue?: boolean | undefined) => void) => void;
2150
- atoms: Record<string, better_auth_react.WritableAtom<any>>;
2151
- };
2152
- $ERROR_CODES: {
2153
- readonly USER_NOT_FOUND: "User not found";
2154
- readonly FAILED_TO_CREATE_USER: "Failed to create user";
2155
- readonly FAILED_TO_CREATE_SESSION: "Failed to create session";
2156
- readonly FAILED_TO_UPDATE_USER: "Failed to update user";
2157
- readonly FAILED_TO_GET_SESSION: "Failed to get session";
2158
- readonly INVALID_PASSWORD: "Invalid password";
2159
- readonly INVALID_EMAIL: "Invalid email";
2160
- readonly INVALID_EMAIL_OR_PASSWORD: "Invalid email or password";
2161
- readonly SOCIAL_ACCOUNT_ALREADY_LINKED: "Social account already linked";
2162
- readonly PROVIDER_NOT_FOUND: "Provider not found";
2163
- readonly INVALID_TOKEN: "Invalid token";
2164
- readonly ID_TOKEN_NOT_SUPPORTED: "id_token not supported";
2165
- readonly FAILED_TO_GET_USER_INFO: "Failed to get user info";
2166
- readonly USER_EMAIL_NOT_FOUND: "User email not found";
2167
- readonly EMAIL_NOT_VERIFIED: "Email not verified";
2168
- readonly PASSWORD_TOO_SHORT: "Password too short";
2169
- readonly PASSWORD_TOO_LONG: "Password too long";
2170
- readonly USER_ALREADY_EXISTS: "User already exists.";
2171
- readonly USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL: "User already exists. Use another email.";
2172
- readonly EMAIL_CAN_NOT_BE_UPDATED: "Email can not be updated";
2173
- readonly CREDENTIAL_ACCOUNT_NOT_FOUND: "Credential account not found";
2174
- readonly SESSION_EXPIRED: "Session expired. Re-authenticate to perform this action.";
2175
- readonly FAILED_TO_UNLINK_LAST_ACCOUNT: "You can't unlink your last account";
2176
- readonly ACCOUNT_NOT_FOUND: "Account not found";
2177
- readonly USER_ALREADY_HAS_PASSWORD: "User already has a password. Provide that to delete the account.";
2178
- };
2179
- };
2180
- /**
2181
- * Type helper for inferring the dashboard client type
2182
- */
2183
- type DashboardClient = ReturnType<typeof createDashboardClient>;
2184
-
2185
- /**
2186
- * @erikey/react - Auth Client
2187
- *
2188
- * Wraps better-auth/react with Erikey-specific enhancements:
2189
- * - X-Project-Id header injection for multi-tenant routing
2190
- * - Bearer token auth for cross-origin iframes (Sandpack)
2191
- * - localStorage token storage when cookies are blocked
2192
- *
2193
- * This replaces 300+ lines of custom fetch code with better-auth client,
2194
- * enabling signIn.social(), useSession(), and all better-auth features.
2195
- */
2196
- interface AuthClientConfig {
2197
- /**
2198
- * Your Erikey project ID (pk_live_xxx or pk_test_xxx)
2199
- */
2200
- projectId: string;
2201
- /**
2202
- * Base URL for the auth API
2203
- * @default 'https://auth.erikey.com'
2204
- */
2205
- baseUrl?: string;
2206
- }
2207
-
2208
- /**
2209
- * Create an auth client for end-user authentication
2210
- *
2211
- * Wraps better-auth/react with Erikey-specific enhancements.
2212
- * Automatically detects cross-origin iframes (Sandpack) and uses
2213
- * Bearer tokens instead of cookies.
2214
- *
2215
- * @example Basic usage
2216
- * ```tsx
2217
- * import { createAuthClient } from '@erikey/react';
2218
- *
2219
- * const auth = createAuthClient({
2220
- * projectId: 'pk_live_xxx',
2221
- * });
2222
- *
2223
- * // Email auth
2224
- * await auth.signIn.email({ email, password });
2225
- * await auth.signUp.email({ email, password, name });
2226
- *
2227
- * // Social OAuth
2228
- * await auth.signIn.social({ provider: 'google' });
2229
- *
2230
- * // Reactive session hook (React)
2231
- * const { data: session, isPending } = auth.useSession();
2232
- *
2233
- * // Sign out
2234
- * await auth.signOut();
2235
- * ```
2236
- */
2237
- declare function createAuthClient(config: AuthClientConfig): {
2238
- signIn: {
2239
- social: <FetchOptions extends {
2240
- credentials?: RequestCredentials | undefined;
2241
- method?: string | undefined;
2242
- headers?: (HeadersInit & (HeadersInit | {
2243
- accept: "application/json" | "text/plain" | "application/octet-stream";
2244
- "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
2245
- authorization: "Bearer" | "Basic";
2246
- })) | undefined;
2247
- cache?: RequestCache | undefined;
2248
- integrity?: string | undefined;
2249
- keepalive?: boolean | undefined;
2250
- mode?: RequestMode | undefined;
2251
- priority?: RequestPriority | undefined;
2252
- redirect?: RequestRedirect | undefined;
2253
- referrer?: string | undefined;
2254
- referrerPolicy?: ReferrerPolicy | undefined;
2255
- signal?: (AbortSignal | null) | undefined;
2256
- window?: null | undefined;
2257
- onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
2258
- onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
2259
- onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
2260
- onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
2261
- onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
2262
- hookOptions?: {
2263
- cloneResponse?: boolean;
2264
- } | undefined;
2265
- timeout?: number | undefined;
2266
- customFetchImpl?: better_auth_react.FetchEsque | undefined;
2267
- plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
2268
- baseURL?: string | undefined;
2269
- throw?: boolean | undefined;
2270
- auth?: ({
2271
- type: "Bearer";
2272
- token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
2273
- } | {
2274
- type: "Basic";
2275
- username: string | (() => string | undefined) | undefined;
2276
- password: string | (() => string | undefined) | undefined;
2277
- } | {
2278
- type: "Custom";
2279
- prefix: string | (() => string | undefined) | undefined;
2280
- value: string | (() => string | undefined) | undefined;
2281
- }) | undefined;
2282
- body?: (Partial<{
2283
- provider: unknown;
2284
- callbackURL?: string | undefined;
2285
- newUserCallbackURL?: string | undefined;
2286
- errorCallbackURL?: string | undefined;
2287
- disableRedirect?: boolean | undefined;
2288
- idToken?: {
2289
- token: string;
2290
- nonce?: string | undefined;
2291
- accessToken?: string | undefined;
2292
- refreshToken?: string | undefined;
2293
- expiresAt?: number | undefined;
2294
- } | undefined;
2295
- scopes?: string[] | undefined;
2296
- requestSignUp?: boolean | undefined;
2297
- loginHint?: string | undefined;
2298
- }> & Record<string, any>) | undefined;
2299
- query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
2300
- params?: Record<string, any> | undefined;
2301
- duplex?: "full" | "half" | undefined;
2302
- jsonParser?: ((text: string) => Promise<any> | any) | undefined;
2303
- retry?: better_auth_react.RetryOptions | undefined;
2304
- retryAttempt?: number | undefined;
2305
- output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
2306
- errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
2307
- disableValidation?: boolean | undefined;
2308
- }>(data_0: better_auth.Prettify<{
2309
- provider: unknown;
2310
- callbackURL?: string | undefined;
2311
- newUserCallbackURL?: string | undefined;
2312
- errorCallbackURL?: string | undefined;
2313
- disableRedirect?: boolean | undefined;
2314
- idToken?: {
2315
- token: string;
2316
- nonce?: string | undefined;
2317
- accessToken?: string | undefined;
2318
- refreshToken?: string | undefined;
2319
- expiresAt?: number | undefined;
2320
- } | undefined;
2321
- scopes?: string[] | undefined;
2322
- requestSignUp?: boolean | undefined;
2323
- loginHint?: string | undefined;
2324
- } & {
2325
- fetchOptions?: FetchOptions | undefined;
2326
- }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<NonNullable<{
2327
- redirect: boolean;
2328
- token: string;
2329
- url: undefined;
2330
- user: {
2331
- id: string;
2332
- email: string;
2333
- name: string;
2334
- image: string | null | undefined;
2335
- emailVerified: boolean;
2336
- createdAt: Date;
2337
- updatedAt: Date;
2338
- };
2339
- } | {
2340
- url: string;
2341
- redirect: boolean;
2342
- }>, {
2343
- code?: string;
2344
- message?: string;
2345
- }, FetchOptions["throw"] extends true ? true : false>>;
2346
- };
2347
- } & {
2348
- signOut: <FetchOptions extends {
2349
- credentials?: RequestCredentials | undefined;
2350
- method?: string | undefined;
2351
- headers?: (HeadersInit & (HeadersInit | {
2352
- accept: "application/json" | "text/plain" | "application/octet-stream";
2353
- "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
2354
- authorization: "Bearer" | "Basic";
2355
- })) | undefined;
2356
- cache?: RequestCache | undefined;
2357
- integrity?: string | undefined;
2358
- keepalive?: boolean | undefined;
2359
- mode?: RequestMode | undefined;
2360
- priority?: RequestPriority | undefined;
2361
- redirect?: RequestRedirect | undefined;
2362
- referrer?: string | undefined;
2363
- referrerPolicy?: ReferrerPolicy | undefined;
2364
- signal?: (AbortSignal | null) | undefined;
2365
- window?: null | undefined;
2366
- onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
2367
- onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
2368
- onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
2369
- onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
2370
- onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
2371
- hookOptions?: {
2372
- cloneResponse?: boolean;
2373
- } | undefined;
2374
- timeout?: number | undefined;
2375
- customFetchImpl?: better_auth_react.FetchEsque | undefined;
2376
- plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
2377
- baseURL?: string | undefined;
2378
- throw?: boolean | undefined;
2379
- auth?: ({
2380
- type: "Bearer";
2381
- token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
2382
- } | {
2383
- type: "Basic";
2384
- username: string | (() => string | undefined) | undefined;
2385
- password: string | (() => string | undefined) | undefined;
2386
- } | {
2387
- type: "Custom";
2388
- prefix: string | (() => string | undefined) | undefined;
2389
- value: string | (() => string | undefined) | undefined;
2390
- }) | undefined;
2391
- body?: undefined;
2392
- query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
2393
- params?: Record<string, any> | undefined;
2394
- duplex?: "full" | "half" | undefined;
2395
- jsonParser?: ((text: string) => Promise<any> | any) | undefined;
2396
- retry?: better_auth_react.RetryOptions | undefined;
2397
- retryAttempt?: number | undefined;
2398
- output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
2399
- errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
2400
- disableValidation?: boolean | undefined;
2401
- }>(data_0?: better_auth.Prettify<{
2402
- query?: Record<string, any> | undefined;
2403
- fetchOptions?: FetchOptions | undefined;
2404
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
2405
- success: boolean;
2406
- }, {
2407
- code?: string;
2408
- message?: string;
2409
- }, FetchOptions["throw"] extends true ? true : false>>;
2410
- } & {
2411
- signUp: {
2412
- email: <FetchOptions extends {
2413
- credentials?: RequestCredentials | undefined;
2414
- method?: string | undefined;
2415
- headers?: (HeadersInit & (HeadersInit | {
2416
- accept: "application/json" | "text/plain" | "application/octet-stream";
2417
- "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
2418
- authorization: "Bearer" | "Basic";
2419
- })) | undefined;
2420
- cache?: RequestCache | undefined;
2421
- integrity?: string | undefined;
2422
- keepalive?: boolean | undefined;
2423
- mode?: RequestMode | undefined;
2424
- priority?: RequestPriority | undefined;
2425
- redirect?: RequestRedirect | undefined;
2426
- referrer?: string | undefined;
2427
- referrerPolicy?: ReferrerPolicy | undefined;
2428
- signal?: (AbortSignal | null) | undefined;
2429
- window?: null | undefined;
2430
- onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
2431
- onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
2432
- onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
2433
- onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
2434
- onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
2435
- hookOptions?: {
2436
- cloneResponse?: boolean;
2437
- } | undefined;
2438
- timeout?: number | undefined;
2439
- customFetchImpl?: better_auth_react.FetchEsque | undefined;
2440
- plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
2441
- baseURL?: string | undefined;
2442
- throw?: boolean | undefined;
2443
- auth?: ({
2444
- type: "Bearer";
2445
- token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
2446
- } | {
2447
- type: "Basic";
2448
- username: string | (() => string | undefined) | undefined;
2449
- password: string | (() => string | undefined) | undefined;
2450
- } | {
2451
- type: "Custom";
2452
- prefix: string | (() => string | undefined) | undefined;
2453
- value: string | (() => string | undefined) | undefined;
2454
- }) | undefined;
2455
- body?: (Partial<{
2456
- name: string;
2457
- email: string;
2458
- password: string;
2459
- image?: string;
2460
- callbackURL?: string;
2461
- rememberMe?: boolean;
2462
- }> & Record<string, any>) | undefined;
2463
- query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
2464
- params?: Record<string, any> | undefined;
2465
- duplex?: "full" | "half" | undefined;
2466
- jsonParser?: ((text: string) => Promise<any> | any) | undefined;
2467
- retry?: better_auth_react.RetryOptions | undefined;
2468
- retryAttempt?: number | undefined;
2469
- output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
2470
- errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
2471
- disableValidation?: boolean | undefined;
2472
- }>(data_0: better_auth.Prettify<{
2473
- email: string;
2474
- name: string;
2475
- password: string;
2476
- image?: string;
2477
- callbackURL?: string;
2478
- fetchOptions?: FetchOptions | undefined;
2479
- }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<NonNullable<{
2480
- token: null;
2481
- user: {
2482
- id: string;
2483
- email: string;
2484
- name: string;
2485
- image: string | null | undefined;
2486
- emailVerified: boolean;
2487
- createdAt: Date;
2488
- updatedAt: Date;
2489
- };
2490
- } | {
2491
- token: string;
2492
- user: {
2493
- id: string;
2494
- email: string;
2495
- name: string;
2496
- image: string | null | undefined;
2497
- emailVerified: boolean;
2498
- createdAt: Date;
2499
- updatedAt: Date;
2500
- };
2501
- }>, {
2502
- code?: string;
2503
- message?: string;
2504
- }, FetchOptions["throw"] extends true ? true : false>>;
2505
- };
2506
- } & {
2507
- signIn: {
2508
- email: <FetchOptions extends {
2509
- credentials?: RequestCredentials | undefined;
2510
- method?: string | undefined;
2511
- headers?: (HeadersInit & (HeadersInit | {
2512
- accept: "application/json" | "text/plain" | "application/octet-stream";
2513
- "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
2514
- authorization: "Bearer" | "Basic";
2515
- })) | undefined;
2516
- cache?: RequestCache | undefined;
2517
- integrity?: string | undefined;
2518
- keepalive?: boolean | undefined;
2519
- mode?: RequestMode | undefined;
2520
- priority?: RequestPriority | undefined;
2521
- redirect?: RequestRedirect | undefined;
2522
- referrer?: string | undefined;
2523
- referrerPolicy?: ReferrerPolicy | undefined;
2524
- signal?: (AbortSignal | null) | undefined;
2525
- window?: null | undefined;
2526
- onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
2527
- onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
2528
- onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
2529
- onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
2530
- onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
2531
- hookOptions?: {
2532
- cloneResponse?: boolean;
2533
- } | undefined;
2534
- timeout?: number | undefined;
2535
- customFetchImpl?: better_auth_react.FetchEsque | undefined;
2536
- plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
2537
- baseURL?: string | undefined;
2538
- throw?: boolean | undefined;
2539
- auth?: ({
2540
- type: "Bearer";
2541
- token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
2542
- } | {
2543
- type: "Basic";
2544
- username: string | (() => string | undefined) | undefined;
2545
- password: string | (() => string | undefined) | undefined;
2546
- } | {
2547
- type: "Custom";
2548
- prefix: string | (() => string | undefined) | undefined;
2549
- value: string | (() => string | undefined) | undefined;
2550
- }) | undefined;
2551
- body?: (Partial<{
2552
- email: string;
2553
- password: string;
2554
- callbackURL?: string | undefined;
2555
- rememberMe?: boolean | undefined;
2556
- }> & Record<string, any>) | undefined;
2557
- query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
2558
- params?: Record<string, any> | undefined;
2559
- duplex?: "full" | "half" | undefined;
2560
- jsonParser?: ((text: string) => Promise<any> | any) | undefined;
2561
- retry?: better_auth_react.RetryOptions | undefined;
2562
- retryAttempt?: number | undefined;
2563
- output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
2564
- errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
2565
- disableValidation?: boolean | undefined;
2566
- }>(data_0: better_auth.Prettify<{
2567
- email: string;
2568
- password: string;
2569
- callbackURL?: string | undefined;
2570
- rememberMe?: boolean | undefined;
2571
- } & {
2572
- fetchOptions?: FetchOptions | undefined;
2573
- }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
2574
- redirect: boolean;
2575
- token: string;
2576
- url: string | undefined;
2577
- user: {
2578
- id: string;
2579
- email: string;
2580
- name: string;
2581
- image: string | null | undefined;
2582
- emailVerified: boolean;
2583
- createdAt: Date;
2584
- updatedAt: Date;
2585
- };
2586
- }, {
2587
- code?: string;
2588
- message?: string;
2589
- }, FetchOptions["throw"] extends true ? true : false>>;
2590
- };
2591
- } & {
2592
- forgetPassword: <FetchOptions extends {
2593
- credentials?: RequestCredentials | undefined;
2594
- method?: string | undefined;
2595
- headers?: (HeadersInit & (HeadersInit | {
2596
- accept: "application/json" | "text/plain" | "application/octet-stream";
2597
- "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
2598
- authorization: "Bearer" | "Basic";
2599
- })) | undefined;
2600
- cache?: RequestCache | undefined;
2601
- integrity?: string | undefined;
2602
- keepalive?: boolean | undefined;
2603
- mode?: RequestMode | undefined;
2604
- priority?: RequestPriority | undefined;
2605
- redirect?: RequestRedirect | undefined;
2606
- referrer?: string | undefined;
2607
- referrerPolicy?: ReferrerPolicy | undefined;
2608
- signal?: (AbortSignal | null) | undefined;
2609
- window?: null | undefined;
2610
- onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
2611
- onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
2612
- onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
2613
- onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
2614
- onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
2615
- hookOptions?: {
2616
- cloneResponse?: boolean;
2617
- } | undefined;
2618
- timeout?: number | undefined;
2619
- customFetchImpl?: better_auth_react.FetchEsque | undefined;
2620
- plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
2621
- baseURL?: string | undefined;
2622
- throw?: boolean | undefined;
2623
- auth?: ({
2624
- type: "Bearer";
2625
- token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
2626
- } | {
2627
- type: "Basic";
2628
- username: string | (() => string | undefined) | undefined;
2629
- password: string | (() => string | undefined) | undefined;
2630
- } | {
2631
- type: "Custom";
2632
- prefix: string | (() => string | undefined) | undefined;
2633
- value: string | (() => string | undefined) | undefined;
2634
- }) | undefined;
2635
- body?: (Partial<{
2636
- email: string;
2637
- redirectTo?: string | undefined;
2638
- }> & Record<string, any>) | undefined;
2639
- query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
2640
- params?: Record<string, any> | undefined;
2641
- duplex?: "full" | "half" | undefined;
2642
- jsonParser?: ((text: string) => Promise<any> | any) | undefined;
2643
- retry?: better_auth_react.RetryOptions | undefined;
2644
- retryAttempt?: number | undefined;
2645
- output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
2646
- errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
2647
- disableValidation?: boolean | undefined;
2648
- }>(data_0: better_auth.Prettify<{
2649
- email: string;
2650
- redirectTo?: string | undefined;
2651
- } & {
2652
- fetchOptions?: FetchOptions | undefined;
2653
- }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
2654
- status: boolean;
2655
- }, {
2656
- code?: string;
2657
- message?: string;
2658
- }, FetchOptions["throw"] extends true ? true : false>>;
2659
- } & {
2660
- resetPassword: <FetchOptions extends {
2661
- credentials?: RequestCredentials | undefined;
2662
- method?: string | undefined;
2663
- headers?: (HeadersInit & (HeadersInit | {
2664
- accept: "application/json" | "text/plain" | "application/octet-stream";
2665
- "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
2666
- authorization: "Bearer" | "Basic";
2667
- })) | undefined;
2668
- cache?: RequestCache | undefined;
2669
- integrity?: string | undefined;
2670
- keepalive?: boolean | undefined;
2671
- mode?: RequestMode | undefined;
2672
- priority?: RequestPriority | undefined;
2673
- redirect?: RequestRedirect | undefined;
2674
- referrer?: string | undefined;
2675
- referrerPolicy?: ReferrerPolicy | undefined;
2676
- signal?: (AbortSignal | null) | undefined;
2677
- window?: null | undefined;
2678
- onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
2679
- onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
2680
- onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
2681
- onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
2682
- onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
2683
- hookOptions?: {
2684
- cloneResponse?: boolean;
2685
- } | undefined;
2686
- timeout?: number | undefined;
2687
- customFetchImpl?: better_auth_react.FetchEsque | undefined;
2688
- plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
2689
- baseURL?: string | undefined;
2690
- throw?: boolean | undefined;
2691
- auth?: ({
2692
- type: "Bearer";
2693
- token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
2694
- } | {
2695
- type: "Basic";
2696
- username: string | (() => string | undefined) | undefined;
2697
- password: string | (() => string | undefined) | undefined;
2698
- } | {
2699
- type: "Custom";
2700
- prefix: string | (() => string | undefined) | undefined;
2701
- value: string | (() => string | undefined) | undefined;
2702
- }) | undefined;
2703
- body?: (Partial<{
2704
- newPassword: string;
2705
- token?: string | undefined;
2706
- }> & Record<string, any>) | undefined;
2707
- query?: (Partial<{
2708
- token?: string | undefined;
2709
- }> & Record<string, any>) | undefined;
2710
- params?: Record<string, any> | undefined;
2711
- duplex?: "full" | "half" | undefined;
2712
- jsonParser?: ((text: string) => Promise<any> | any) | undefined;
2713
- retry?: better_auth_react.RetryOptions | undefined;
2714
- retryAttempt?: number | undefined;
2715
- output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
2716
- errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
2717
- disableValidation?: boolean | undefined;
2718
- }>(data_0: better_auth.Prettify<{
2719
- newPassword: string;
2720
- token?: string | undefined;
2721
- } & {
2722
- fetchOptions?: FetchOptions | undefined;
2723
- }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
2724
- status: boolean;
2725
- }, {
2726
- code?: string;
2727
- message?: string;
2728
- }, FetchOptions["throw"] extends true ? true : false>>;
2729
- } & {
2730
- verifyEmail: <FetchOptions extends {
2731
- credentials?: RequestCredentials | undefined;
2732
- method?: string | undefined;
2733
- headers?: (HeadersInit & (HeadersInit | {
2734
- accept: "application/json" | "text/plain" | "application/octet-stream";
2735
- "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
2736
- authorization: "Bearer" | "Basic";
2737
- })) | undefined;
2738
- cache?: RequestCache | undefined;
2739
- integrity?: string | undefined;
2740
- keepalive?: boolean | undefined;
2741
- mode?: RequestMode | undefined;
2742
- priority?: RequestPriority | undefined;
2743
- redirect?: RequestRedirect | undefined;
2744
- referrer?: string | undefined;
2745
- referrerPolicy?: ReferrerPolicy | undefined;
2746
- signal?: (AbortSignal | null) | undefined;
2747
- window?: null | undefined;
2748
- onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
2749
- onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
2750
- onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
2751
- onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
2752
- onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
2753
- hookOptions?: {
2754
- cloneResponse?: boolean;
2755
- } | undefined;
2756
- timeout?: number | undefined;
2757
- customFetchImpl?: better_auth_react.FetchEsque | undefined;
2758
- plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
2759
- baseURL?: string | undefined;
2760
- throw?: boolean | undefined;
2761
- auth?: ({
2762
- type: "Bearer";
2763
- token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
2764
- } | {
2765
- type: "Basic";
2766
- username: string | (() => string | undefined) | undefined;
2767
- password: string | (() => string | undefined) | undefined;
2768
- } | {
2769
- type: "Custom";
2770
- prefix: string | (() => string | undefined) | undefined;
2771
- value: string | (() => string | undefined) | undefined;
2772
- }) | undefined;
2773
- body?: undefined;
2774
- query?: (Partial<{
2775
- token: string;
2776
- callbackURL?: string | undefined;
2777
- }> & Record<string, any>) | undefined;
2778
- params?: Record<string, any> | undefined;
2779
- duplex?: "full" | "half" | undefined;
2780
- jsonParser?: ((text: string) => Promise<any> | any) | undefined;
2781
- retry?: better_auth_react.RetryOptions | undefined;
2782
- retryAttempt?: number | undefined;
2783
- output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
2784
- errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
2785
- disableValidation?: boolean | undefined;
2786
- }>(data_0: better_auth.Prettify<{
2787
- query: {
2788
- token: string;
2789
- callbackURL?: string | undefined;
2790
- };
2791
- fetchOptions?: FetchOptions | undefined;
2792
- }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<NonNullable<void | {
2793
- status: boolean;
2794
- user: {
2795
- id: string;
2796
- email: string;
2797
- name: string;
2798
- image: string | null | undefined;
2799
- emailVerified: boolean;
2800
- createdAt: Date;
2801
- updatedAt: Date;
2802
- };
2803
- } | {
2804
- status: boolean;
2805
- user: null;
2806
- }>, {
2807
- code?: string;
2808
- message?: string;
2809
- }, FetchOptions["throw"] extends true ? true : false>>;
2810
- } & {
2811
- sendVerificationEmail: <FetchOptions extends {
2812
- credentials?: RequestCredentials | undefined;
2813
- method?: string | undefined;
2814
- headers?: (HeadersInit & (HeadersInit | {
2815
- accept: "application/json" | "text/plain" | "application/octet-stream";
2816
- "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
2817
- authorization: "Bearer" | "Basic";
2818
- })) | undefined;
2819
- cache?: RequestCache | undefined;
2820
- integrity?: string | undefined;
2821
- keepalive?: boolean | undefined;
2822
- mode?: RequestMode | undefined;
2823
- priority?: RequestPriority | undefined;
2824
- redirect?: RequestRedirect | undefined;
2825
- referrer?: string | undefined;
2826
- referrerPolicy?: ReferrerPolicy | undefined;
2827
- signal?: (AbortSignal | null) | undefined;
2828
- window?: null | undefined;
2829
- onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
2830
- onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
2831
- onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
2832
- onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
2833
- onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
2834
- hookOptions?: {
2835
- cloneResponse?: boolean;
2836
- } | undefined;
2837
- timeout?: number | undefined;
2838
- customFetchImpl?: better_auth_react.FetchEsque | undefined;
2839
- plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
2840
- baseURL?: string | undefined;
2841
- throw?: boolean | undefined;
2842
- auth?: ({
2843
- type: "Bearer";
2844
- token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
2845
- } | {
2846
- type: "Basic";
2847
- username: string | (() => string | undefined) | undefined;
2848
- password: string | (() => string | undefined) | undefined;
2849
- } | {
2850
- type: "Custom";
2851
- prefix: string | (() => string | undefined) | undefined;
2852
- value: string | (() => string | undefined) | undefined;
2853
- }) | undefined;
2854
- body?: (Partial<{
2855
- email: string;
2856
- callbackURL?: string | undefined;
2857
- }> & Record<string, any>) | undefined;
2858
- query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
2859
- params?: Record<string, any> | undefined;
2860
- duplex?: "full" | "half" | undefined;
2861
- jsonParser?: ((text: string) => Promise<any> | any) | undefined;
2862
- retry?: better_auth_react.RetryOptions | undefined;
2863
- retryAttempt?: number | undefined;
2864
- output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
2865
- errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
2866
- disableValidation?: boolean | undefined;
2867
- }>(data_0: better_auth.Prettify<{
2868
- email: string;
2869
- callbackURL?: string | undefined;
2870
- } & {
2871
- fetchOptions?: FetchOptions | undefined;
2872
- }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
2873
- status: boolean;
2874
- }, {
2875
- code?: string;
2876
- message?: string;
2877
- }, FetchOptions["throw"] extends true ? true : false>>;
2878
- } & {
2879
- changeEmail: <FetchOptions extends {
2880
- credentials?: RequestCredentials | undefined;
2881
- method?: string | undefined;
2882
- headers?: (HeadersInit & (HeadersInit | {
2883
- accept: "application/json" | "text/plain" | "application/octet-stream";
2884
- "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
2885
- authorization: "Bearer" | "Basic";
2886
- })) | undefined;
2887
- cache?: RequestCache | undefined;
2888
- integrity?: string | undefined;
2889
- keepalive?: boolean | undefined;
2890
- mode?: RequestMode | undefined;
2891
- priority?: RequestPriority | undefined;
2892
- redirect?: RequestRedirect | undefined;
2893
- referrer?: string | undefined;
2894
- referrerPolicy?: ReferrerPolicy | undefined;
2895
- signal?: (AbortSignal | null) | undefined;
2896
- window?: null | undefined;
2897
- onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
2898
- onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
2899
- onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
2900
- onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
2901
- onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
2902
- hookOptions?: {
2903
- cloneResponse?: boolean;
2904
- } | undefined;
2905
- timeout?: number | undefined;
2906
- customFetchImpl?: better_auth_react.FetchEsque | undefined;
2907
- plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
2908
- baseURL?: string | undefined;
2909
- throw?: boolean | undefined;
2910
- auth?: ({
2911
- type: "Bearer";
2912
- token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
2913
- } | {
2914
- type: "Basic";
2915
- username: string | (() => string | undefined) | undefined;
2916
- password: string | (() => string | undefined) | undefined;
2917
- } | {
2918
- type: "Custom";
2919
- prefix: string | (() => string | undefined) | undefined;
2920
- value: string | (() => string | undefined) | undefined;
2921
- }) | undefined;
2922
- body?: (Partial<{
2923
- newEmail: string;
2924
- callbackURL?: string | undefined;
2925
- }> & Record<string, any>) | undefined;
2926
- query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
2927
- params?: Record<string, any> | undefined;
2928
- duplex?: "full" | "half" | undefined;
2929
- jsonParser?: ((text: string) => Promise<any> | any) | undefined;
2930
- retry?: better_auth_react.RetryOptions | undefined;
2931
- retryAttempt?: number | undefined;
2932
- output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
2933
- errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
2934
- disableValidation?: boolean | undefined;
2935
- }>(data_0: better_auth.Prettify<{
2936
- newEmail: string;
2937
- callbackURL?: string | undefined;
2938
- } & {
2939
- fetchOptions?: FetchOptions | undefined;
2940
- }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
2941
- status: boolean;
2942
- }, {
2943
- code?: string;
2944
- message?: string;
2945
- }, FetchOptions["throw"] extends true ? true : false>>;
2946
- } & {
2947
- changePassword: <FetchOptions extends {
2948
- credentials?: RequestCredentials | undefined;
2949
- method?: string | undefined;
2950
- headers?: (HeadersInit & (HeadersInit | {
2951
- accept: "application/json" | "text/plain" | "application/octet-stream";
2952
- "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
2953
- authorization: "Bearer" | "Basic";
2954
- })) | undefined;
2955
- cache?: RequestCache | undefined;
2956
- integrity?: string | undefined;
2957
- keepalive?: boolean | undefined;
2958
- mode?: RequestMode | undefined;
2959
- priority?: RequestPriority | undefined;
2960
- redirect?: RequestRedirect | undefined;
2961
- referrer?: string | undefined;
2962
- referrerPolicy?: ReferrerPolicy | undefined;
2963
- signal?: (AbortSignal | null) | undefined;
2964
- window?: null | undefined;
2965
- onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
2966
- onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
2967
- onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
2968
- onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
2969
- onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
2970
- hookOptions?: {
2971
- cloneResponse?: boolean;
2972
- } | undefined;
2973
- timeout?: number | undefined;
2974
- customFetchImpl?: better_auth_react.FetchEsque | undefined;
2975
- plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
2976
- baseURL?: string | undefined;
2977
- throw?: boolean | undefined;
2978
- auth?: ({
2979
- type: "Bearer";
2980
- token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
2981
- } | {
2982
- type: "Basic";
2983
- username: string | (() => string | undefined) | undefined;
2984
- password: string | (() => string | undefined) | undefined;
2985
- } | {
2986
- type: "Custom";
2987
- prefix: string | (() => string | undefined) | undefined;
2988
- value: string | (() => string | undefined) | undefined;
2989
- }) | undefined;
2990
- body?: (Partial<{
2991
- newPassword: string;
2992
- currentPassword: string;
2993
- revokeOtherSessions?: boolean | undefined;
2994
- }> & Record<string, any>) | undefined;
2995
- query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
2996
- params?: Record<string, any> | undefined;
2997
- duplex?: "full" | "half" | undefined;
2998
- jsonParser?: ((text: string) => Promise<any> | any) | undefined;
2999
- retry?: better_auth_react.RetryOptions | undefined;
3000
- retryAttempt?: number | undefined;
3001
- output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
3002
- errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
3003
- disableValidation?: boolean | undefined;
3004
- }>(data_0: better_auth.Prettify<{
3005
- newPassword: string;
3006
- currentPassword: string;
3007
- revokeOtherSessions?: boolean | undefined;
3008
- } & {
3009
- fetchOptions?: FetchOptions | undefined;
3010
- }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
3011
- token: string | null;
3012
- user: {
3013
- id: string;
3014
- email: string;
3015
- name: string;
3016
- image: string | null | undefined;
3017
- emailVerified: boolean;
3018
- createdAt: Date;
3019
- updatedAt: Date;
3020
- };
3021
- }, {
3022
- code?: string;
3023
- message?: string;
3024
- }, FetchOptions["throw"] extends true ? true : false>>;
3025
- } & {
3026
- updateUser: <FetchOptions extends {
3027
- credentials?: RequestCredentials | undefined;
3028
- method?: string | undefined;
3029
- headers?: (HeadersInit & (HeadersInit | {
3030
- accept: "application/json" | "text/plain" | "application/octet-stream";
3031
- "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
3032
- authorization: "Bearer" | "Basic";
3033
- })) | undefined;
3034
- cache?: RequestCache | undefined;
3035
- integrity?: string | undefined;
3036
- keepalive?: boolean | undefined;
3037
- mode?: RequestMode | undefined;
3038
- priority?: RequestPriority | undefined;
3039
- redirect?: RequestRedirect | undefined;
3040
- referrer?: string | undefined;
3041
- referrerPolicy?: ReferrerPolicy | undefined;
3042
- signal?: (AbortSignal | null) | undefined;
3043
- window?: null | undefined;
3044
- onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
3045
- onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
3046
- onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
3047
- onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
3048
- onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
3049
- hookOptions?: {
3050
- cloneResponse?: boolean;
3051
- } | undefined;
3052
- timeout?: number | undefined;
3053
- customFetchImpl?: better_auth_react.FetchEsque | undefined;
3054
- plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
3055
- baseURL?: string | undefined;
3056
- throw?: boolean | undefined;
3057
- auth?: ({
3058
- type: "Bearer";
3059
- token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
3060
- } | {
3061
- type: "Basic";
3062
- username: string | (() => string | undefined) | undefined;
3063
- password: string | (() => string | undefined) | undefined;
3064
- } | {
3065
- type: "Custom";
3066
- prefix: string | (() => string | undefined) | undefined;
3067
- value: string | (() => string | undefined) | undefined;
3068
- }) | undefined;
3069
- body?: (Partial<Partial<{}> & {
3070
- name?: string;
3071
- image?: string;
3072
- }> & Record<string, any>) | undefined;
3073
- query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
3074
- params?: Record<string, any> | undefined;
3075
- duplex?: "full" | "half" | undefined;
3076
- jsonParser?: ((text: string) => Promise<any> | any) | undefined;
3077
- retry?: better_auth_react.RetryOptions | undefined;
3078
- retryAttempt?: number | undefined;
3079
- output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
3080
- errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
3081
- disableValidation?: boolean | undefined;
3082
- }>(data_0?: better_auth.Prettify<{
3083
- image?: string | null;
3084
- name?: string;
3085
- fetchOptions?: FetchOptions | undefined;
3086
- } & Partial<{}>> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
3087
- status: boolean;
3088
- }, {
3089
- code?: string;
3090
- message?: string;
3091
- }, FetchOptions["throw"] extends true ? true : false>>;
3092
- } & {
3093
- deleteUser: <FetchOptions extends {
3094
- credentials?: RequestCredentials | undefined;
3095
- method?: string | undefined;
3096
- headers?: (HeadersInit & (HeadersInit | {
3097
- accept: "application/json" | "text/plain" | "application/octet-stream";
3098
- "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
3099
- authorization: "Bearer" | "Basic";
3100
- })) | undefined;
3101
- cache?: RequestCache | undefined;
3102
- integrity?: string | undefined;
3103
- keepalive?: boolean | undefined;
3104
- mode?: RequestMode | undefined;
3105
- priority?: RequestPriority | undefined;
3106
- redirect?: RequestRedirect | undefined;
3107
- referrer?: string | undefined;
3108
- referrerPolicy?: ReferrerPolicy | undefined;
3109
- signal?: (AbortSignal | null) | undefined;
3110
- window?: null | undefined;
3111
- onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
3112
- onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
3113
- onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
3114
- onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
3115
- onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
3116
- hookOptions?: {
3117
- cloneResponse?: boolean;
3118
- } | undefined;
3119
- timeout?: number | undefined;
3120
- customFetchImpl?: better_auth_react.FetchEsque | undefined;
3121
- plugins?: better_auth_react.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?: (Partial<{
3137
- callbackURL?: string | undefined;
3138
- password?: string | undefined;
3139
- token?: string | undefined;
3140
- }> & Record<string, any>) | undefined;
3141
- query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
3142
- params?: Record<string, any> | undefined;
3143
- duplex?: "full" | "half" | undefined;
3144
- jsonParser?: ((text: string) => Promise<any> | any) | undefined;
3145
- retry?: better_auth_react.RetryOptions | undefined;
3146
- retryAttempt?: number | undefined;
3147
- output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
3148
- errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
3149
- disableValidation?: boolean | undefined;
3150
- }>(data_0?: better_auth.Prettify<{
3151
- callbackURL?: string | undefined;
3152
- password?: string | undefined;
3153
- token?: string | undefined;
3154
- } & {
3155
- fetchOptions?: FetchOptions | undefined;
3156
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
3157
- success: boolean;
3158
- message: string;
3159
- }, {
3160
- code?: string;
3161
- message?: string;
3162
- }, FetchOptions["throw"] extends true ? true : false>>;
3163
- } & {
3164
- resetPassword: {
3165
- ":token": <FetchOptions extends {
3166
- credentials?: RequestCredentials | undefined;
3167
- method?: string | undefined;
3168
- headers?: (HeadersInit & (HeadersInit | {
3169
- accept: "application/json" | "text/plain" | "application/octet-stream";
3170
- "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
3171
- authorization: "Bearer" | "Basic";
3172
- })) | undefined;
3173
- cache?: RequestCache | undefined;
3174
- integrity?: string | undefined;
3175
- keepalive?: boolean | undefined;
3176
- mode?: RequestMode | undefined;
3177
- priority?: RequestPriority | undefined;
3178
- redirect?: RequestRedirect | undefined;
3179
- referrer?: string | undefined;
3180
- referrerPolicy?: ReferrerPolicy | undefined;
3181
- signal?: (AbortSignal | null) | undefined;
3182
- window?: null | undefined;
3183
- onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
3184
- onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
3185
- onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
3186
- onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
3187
- onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
3188
- hookOptions?: {
3189
- cloneResponse?: boolean;
3190
- } | undefined;
3191
- timeout?: number | undefined;
3192
- customFetchImpl?: better_auth_react.FetchEsque | undefined;
3193
- plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
3194
- baseURL?: string | undefined;
3195
- throw?: boolean | undefined;
3196
- auth?: ({
3197
- type: "Bearer";
3198
- token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
3199
- } | {
3200
- type: "Basic";
3201
- username: string | (() => string | undefined) | undefined;
3202
- password: string | (() => string | undefined) | undefined;
3203
- } | {
3204
- type: "Custom";
3205
- prefix: string | (() => string | undefined) | undefined;
3206
- value: string | (() => string | undefined) | undefined;
3207
- }) | undefined;
3208
- body?: undefined;
3209
- query?: (Partial<{
3210
- callbackURL: string;
3211
- }> & Record<string, any>) | undefined;
3212
- params?: {
3213
- token: string;
3214
- } | undefined;
3215
- duplex?: "full" | "half" | undefined;
3216
- jsonParser?: ((text: string) => Promise<any> | any) | undefined;
3217
- retry?: better_auth_react.RetryOptions | undefined;
3218
- retryAttempt?: number | undefined;
3219
- output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
3220
- errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
3221
- disableValidation?: boolean | undefined;
3222
- }>(data_0: better_auth.Prettify<{
3223
- query: {
3224
- callbackURL: string;
3225
- };
3226
- fetchOptions?: FetchOptions | undefined;
3227
- }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<never, {
3228
- code?: string;
3229
- message?: string;
3230
- }, FetchOptions["throw"] extends true ? true : false>>;
3231
- };
3232
- } & {
3233
- requestPasswordReset: <FetchOptions extends {
3234
- credentials?: RequestCredentials | undefined;
3235
- method?: string | undefined;
3236
- headers?: (HeadersInit & (HeadersInit | {
3237
- accept: "application/json" | "text/plain" | "application/octet-stream";
3238
- "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
3239
- authorization: "Bearer" | "Basic";
3240
- })) | undefined;
3241
- cache?: RequestCache | undefined;
3242
- integrity?: string | undefined;
3243
- keepalive?: boolean | undefined;
3244
- mode?: RequestMode | undefined;
3245
- priority?: RequestPriority | undefined;
3246
- redirect?: RequestRedirect | undefined;
3247
- referrer?: string | undefined;
3248
- referrerPolicy?: ReferrerPolicy | undefined;
3249
- signal?: (AbortSignal | null) | undefined;
3250
- window?: null | undefined;
3251
- onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
3252
- onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
3253
- onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
3254
- onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
3255
- onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
3256
- hookOptions?: {
3257
- cloneResponse?: boolean;
3258
- } | undefined;
3259
- timeout?: number | undefined;
3260
- customFetchImpl?: better_auth_react.FetchEsque | undefined;
3261
- plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
3262
- baseURL?: string | undefined;
3263
- throw?: boolean | undefined;
3264
- auth?: ({
3265
- type: "Bearer";
3266
- token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
3267
- } | {
3268
- type: "Basic";
3269
- username: string | (() => string | undefined) | undefined;
3270
- password: string | (() => string | undefined) | undefined;
3271
- } | {
3272
- type: "Custom";
3273
- prefix: string | (() => string | undefined) | undefined;
3274
- value: string | (() => string | undefined) | undefined;
3275
- }) | undefined;
3276
- body?: (Partial<{
3277
- email: string;
3278
- redirectTo?: string | undefined;
3279
- }> & Record<string, any>) | undefined;
3280
- query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
3281
- params?: Record<string, any> | undefined;
3282
- duplex?: "full" | "half" | undefined;
3283
- jsonParser?: ((text: string) => Promise<any> | any) | undefined;
3284
- retry?: better_auth_react.RetryOptions | undefined;
3285
- retryAttempt?: number | undefined;
3286
- output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
3287
- errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
3288
- disableValidation?: boolean | undefined;
3289
- }>(data_0: better_auth.Prettify<{
3290
- email: string;
3291
- redirectTo?: string | undefined;
3292
- } & {
3293
- fetchOptions?: FetchOptions | undefined;
3294
- }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
3295
- status: boolean;
3296
- message: string;
3297
- }, {
3298
- code?: string;
3299
- message?: string;
3300
- }, FetchOptions["throw"] extends true ? true : false>>;
3301
- } & {
3302
- resetPassword: {
3303
- ":token": <FetchOptions extends {
3304
- credentials?: RequestCredentials | undefined;
3305
- method?: string | undefined;
3306
- headers?: (HeadersInit & (HeadersInit | {
3307
- accept: "application/json" | "text/plain" | "application/octet-stream";
3308
- "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
3309
- authorization: "Bearer" | "Basic";
3310
- })) | undefined;
3311
- cache?: RequestCache | undefined;
3312
- integrity?: string | undefined;
3313
- keepalive?: boolean | undefined;
3314
- mode?: RequestMode | undefined;
3315
- priority?: RequestPriority | undefined;
3316
- redirect?: RequestRedirect | undefined;
3317
- referrer?: string | undefined;
3318
- referrerPolicy?: ReferrerPolicy | undefined;
3319
- signal?: (AbortSignal | null) | undefined;
3320
- window?: null | undefined;
3321
- onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
3322
- onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
3323
- onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
3324
- onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
3325
- onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
3326
- hookOptions?: {
3327
- cloneResponse?: boolean;
3328
- } | undefined;
3329
- timeout?: number | undefined;
3330
- customFetchImpl?: better_auth_react.FetchEsque | undefined;
3331
- plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
3332
- baseURL?: string | undefined;
3333
- throw?: boolean | undefined;
3334
- auth?: ({
3335
- type: "Bearer";
3336
- token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
3337
- } | {
3338
- type: "Basic";
3339
- username: string | (() => string | undefined) | undefined;
3340
- password: string | (() => string | undefined) | undefined;
3341
- } | {
3342
- type: "Custom";
3343
- prefix: string | (() => string | undefined) | undefined;
3344
- value: string | (() => string | undefined) | undefined;
3345
- }) | undefined;
3346
- body?: undefined;
3347
- query?: (Partial<{
3348
- callbackURL: string;
3349
- }> & Record<string, any>) | undefined;
3350
- params?: {
3351
- token: string;
3352
- } | undefined;
3353
- duplex?: "full" | "half" | undefined;
3354
- jsonParser?: ((text: string) => Promise<any> | any) | undefined;
3355
- retry?: better_auth_react.RetryOptions | undefined;
3356
- retryAttempt?: number | undefined;
3357
- output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
3358
- errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
3359
- disableValidation?: boolean | undefined;
3360
- }>(data_0: better_auth.Prettify<{
3361
- query: {
3362
- callbackURL: string;
3363
- };
3364
- fetchOptions?: FetchOptions | undefined;
3365
- }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<never, {
3366
- code?: string;
3367
- message?: string;
3368
- }, FetchOptions["throw"] extends true ? true : false>>;
3369
- };
3370
- } & {
3371
- listSessions: <FetchOptions extends {
3372
- credentials?: RequestCredentials | undefined;
3373
- method?: string | undefined;
3374
- headers?: (HeadersInit & (HeadersInit | {
3375
- accept: "application/json" | "text/plain" | "application/octet-stream";
3376
- "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
3377
- authorization: "Bearer" | "Basic";
3378
- })) | undefined;
3379
- cache?: RequestCache | undefined;
3380
- integrity?: string | undefined;
3381
- keepalive?: boolean | undefined;
3382
- mode?: RequestMode | undefined;
3383
- priority?: RequestPriority | undefined;
3384
- redirect?: RequestRedirect | undefined;
3385
- referrer?: string | undefined;
3386
- referrerPolicy?: ReferrerPolicy | undefined;
3387
- signal?: (AbortSignal | null) | undefined;
3388
- window?: null | undefined;
3389
- onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
3390
- onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
3391
- onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
3392
- onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
3393
- onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
3394
- hookOptions?: {
3395
- cloneResponse?: boolean;
3396
- } | undefined;
3397
- timeout?: number | undefined;
3398
- customFetchImpl?: better_auth_react.FetchEsque | undefined;
3399
- plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
3400
- baseURL?: string | undefined;
3401
- throw?: boolean | undefined;
3402
- auth?: ({
3403
- type: "Bearer";
3404
- token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
3405
- } | {
3406
- type: "Basic";
3407
- username: string | (() => string | undefined) | undefined;
3408
- password: string | (() => string | undefined) | undefined;
3409
- } | {
3410
- type: "Custom";
3411
- prefix: string | (() => string | undefined) | undefined;
3412
- value: string | (() => string | undefined) | undefined;
3413
- }) | undefined;
3414
- body?: undefined;
3415
- query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
3416
- params?: Record<string, any> | undefined;
3417
- duplex?: "full" | "half" | undefined;
3418
- jsonParser?: ((text: string) => Promise<any> | any) | undefined;
3419
- retry?: better_auth_react.RetryOptions | undefined;
3420
- retryAttempt?: number | undefined;
3421
- output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
3422
- errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
3423
- disableValidation?: boolean | undefined;
3424
- }>(data_0?: better_auth.Prettify<{
3425
- query?: Record<string, any> | undefined;
3426
- fetchOptions?: FetchOptions | undefined;
3427
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<better_auth.Prettify<{
3428
- id: string;
3429
- createdAt: Date;
3430
- updatedAt: Date;
3431
- userId: string;
3432
- expiresAt: Date;
3433
- token: string;
3434
- ipAddress?: string | null | undefined | undefined;
3435
- userAgent?: string | null | undefined | undefined;
3436
- }>[], {
3437
- code?: string;
3438
- message?: string;
3439
- }, FetchOptions["throw"] extends true ? true : false>>;
3440
- } & {
3441
- revokeSession: <FetchOptions extends {
3442
- credentials?: RequestCredentials | undefined;
3443
- method?: string | undefined;
3444
- headers?: (HeadersInit & (HeadersInit | {
3445
- accept: "application/json" | "text/plain" | "application/octet-stream";
3446
- "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
3447
- authorization: "Bearer" | "Basic";
3448
- })) | undefined;
3449
- cache?: RequestCache | undefined;
3450
- integrity?: string | undefined;
3451
- keepalive?: boolean | undefined;
3452
- mode?: RequestMode | undefined;
3453
- priority?: RequestPriority | undefined;
3454
- redirect?: RequestRedirect | undefined;
3455
- referrer?: string | undefined;
3456
- referrerPolicy?: ReferrerPolicy | undefined;
3457
- signal?: (AbortSignal | null) | undefined;
3458
- window?: null | undefined;
3459
- onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
3460
- onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
3461
- onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
3462
- onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
3463
- onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
3464
- hookOptions?: {
3465
- cloneResponse?: boolean;
3466
- } | undefined;
3467
- timeout?: number | undefined;
3468
- customFetchImpl?: better_auth_react.FetchEsque | undefined;
3469
- plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
3470
- baseURL?: string | undefined;
3471
- throw?: boolean | undefined;
3472
- auth?: ({
3473
- type: "Bearer";
3474
- token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
3475
- } | {
3476
- type: "Basic";
3477
- username: string | (() => string | undefined) | undefined;
3478
- password: string | (() => string | undefined) | undefined;
3479
- } | {
3480
- type: "Custom";
3481
- prefix: string | (() => string | undefined) | undefined;
3482
- value: string | (() => string | undefined) | undefined;
3483
- }) | undefined;
3484
- body?: (Partial<{
3485
- token: string;
3486
- }> & Record<string, any>) | undefined;
3487
- query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
3488
- params?: Record<string, any> | undefined;
3489
- duplex?: "full" | "half" | undefined;
3490
- jsonParser?: ((text: string) => Promise<any> | any) | undefined;
3491
- retry?: better_auth_react.RetryOptions | undefined;
3492
- retryAttempt?: number | undefined;
3493
- output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
3494
- errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
3495
- disableValidation?: boolean | undefined;
3496
- }>(data_0: better_auth.Prettify<{
3497
- token: string;
3498
- } & {
3499
- fetchOptions?: FetchOptions | undefined;
3500
- }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
3501
- status: boolean;
3502
- }, {
3503
- code?: string;
3504
- message?: string;
3505
- }, FetchOptions["throw"] extends true ? true : false>>;
3506
- } & {
3507
- revokeSessions: <FetchOptions extends {
3508
- credentials?: RequestCredentials | undefined;
3509
- method?: string | undefined;
3510
- headers?: (HeadersInit & (HeadersInit | {
3511
- accept: "application/json" | "text/plain" | "application/octet-stream";
3512
- "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
3513
- authorization: "Bearer" | "Basic";
3514
- })) | undefined;
3515
- cache?: RequestCache | undefined;
3516
- integrity?: string | undefined;
3517
- keepalive?: boolean | undefined;
3518
- mode?: RequestMode | undefined;
3519
- priority?: RequestPriority | undefined;
3520
- redirect?: RequestRedirect | undefined;
3521
- referrer?: string | undefined;
3522
- referrerPolicy?: ReferrerPolicy | undefined;
3523
- signal?: (AbortSignal | null) | undefined;
3524
- window?: null | undefined;
3525
- onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
3526
- onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
3527
- onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
3528
- onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
3529
- onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
3530
- hookOptions?: {
3531
- cloneResponse?: boolean;
3532
- } | undefined;
3533
- timeout?: number | undefined;
3534
- customFetchImpl?: better_auth_react.FetchEsque | undefined;
3535
- plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
3536
- baseURL?: string | undefined;
3537
- throw?: boolean | undefined;
3538
- auth?: ({
3539
- type: "Bearer";
3540
- token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
3541
- } | {
3542
- type: "Basic";
3543
- username: string | (() => string | undefined) | undefined;
3544
- password: string | (() => string | undefined) | undefined;
3545
- } | {
3546
- type: "Custom";
3547
- prefix: string | (() => string | undefined) | undefined;
3548
- value: string | (() => string | undefined) | undefined;
3549
- }) | undefined;
3550
- body?: undefined;
3551
- query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
3552
- params?: Record<string, any> | undefined;
3553
- duplex?: "full" | "half" | undefined;
3554
- jsonParser?: ((text: string) => Promise<any> | any) | undefined;
3555
- retry?: better_auth_react.RetryOptions | undefined;
3556
- retryAttempt?: number | undefined;
3557
- output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
3558
- errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
3559
- disableValidation?: boolean | undefined;
3560
- }>(data_0?: better_auth.Prettify<{
3561
- query?: Record<string, any> | undefined;
3562
- fetchOptions?: FetchOptions | undefined;
3563
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
3564
- status: boolean;
3565
- }, {
3566
- code?: string;
3567
- message?: string;
3568
- }, FetchOptions["throw"] extends true ? true : false>>;
3569
- } & {
3570
- revokeOtherSessions: <FetchOptions extends {
3571
- credentials?: RequestCredentials | undefined;
3572
- method?: string | undefined;
3573
- headers?: (HeadersInit & (HeadersInit | {
3574
- accept: "application/json" | "text/plain" | "application/octet-stream";
3575
- "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
3576
- authorization: "Bearer" | "Basic";
3577
- })) | undefined;
3578
- cache?: RequestCache | undefined;
3579
- integrity?: string | undefined;
3580
- keepalive?: boolean | undefined;
3581
- mode?: RequestMode | undefined;
3582
- priority?: RequestPriority | undefined;
3583
- redirect?: RequestRedirect | undefined;
3584
- referrer?: string | undefined;
3585
- referrerPolicy?: ReferrerPolicy | undefined;
3586
- signal?: (AbortSignal | null) | undefined;
3587
- window?: null | undefined;
3588
- onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
3589
- onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
3590
- onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
3591
- onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
3592
- onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
3593
- hookOptions?: {
3594
- cloneResponse?: boolean;
3595
- } | undefined;
3596
- timeout?: number | undefined;
3597
- customFetchImpl?: better_auth_react.FetchEsque | undefined;
3598
- plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
3599
- baseURL?: string | undefined;
3600
- throw?: boolean | undefined;
3601
- auth?: ({
3602
- type: "Bearer";
3603
- token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
3604
- } | {
3605
- type: "Basic";
3606
- username: string | (() => string | undefined) | undefined;
3607
- password: string | (() => string | undefined) | undefined;
3608
- } | {
3609
- type: "Custom";
3610
- prefix: string | (() => string | undefined) | undefined;
3611
- value: string | (() => string | undefined) | undefined;
3612
- }) | undefined;
3613
- body?: undefined;
3614
- query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
3615
- params?: Record<string, any> | undefined;
3616
- duplex?: "full" | "half" | undefined;
3617
- jsonParser?: ((text: string) => Promise<any> | any) | undefined;
3618
- retry?: better_auth_react.RetryOptions | undefined;
3619
- retryAttempt?: number | undefined;
3620
- output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
3621
- errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
3622
- disableValidation?: boolean | undefined;
3623
- }>(data_0?: better_auth.Prettify<{
3624
- query?: Record<string, any> | undefined;
3625
- fetchOptions?: FetchOptions | undefined;
3626
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
3627
- status: boolean;
3628
- }, {
3629
- code?: string;
3630
- message?: string;
3631
- }, FetchOptions["throw"] extends true ? true : false>>;
3632
- } & {
3633
- linkSocial: <FetchOptions extends {
3634
- credentials?: RequestCredentials | undefined;
3635
- method?: string | undefined;
3636
- headers?: (HeadersInit & (HeadersInit | {
3637
- accept: "application/json" | "text/plain" | "application/octet-stream";
3638
- "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
3639
- authorization: "Bearer" | "Basic";
3640
- })) | undefined;
3641
- cache?: RequestCache | undefined;
3642
- integrity?: string | undefined;
3643
- keepalive?: boolean | undefined;
3644
- mode?: RequestMode | undefined;
3645
- priority?: RequestPriority | undefined;
3646
- redirect?: RequestRedirect | undefined;
3647
- referrer?: string | undefined;
3648
- referrerPolicy?: ReferrerPolicy | undefined;
3649
- signal?: (AbortSignal | null) | undefined;
3650
- window?: null | undefined;
3651
- onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
3652
- onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
3653
- onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
3654
- onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
3655
- onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
3656
- hookOptions?: {
3657
- cloneResponse?: boolean;
3658
- } | undefined;
3659
- timeout?: number | undefined;
3660
- customFetchImpl?: better_auth_react.FetchEsque | undefined;
3661
- plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
3662
- baseURL?: string | undefined;
3663
- throw?: boolean | undefined;
3664
- auth?: ({
3665
- type: "Bearer";
3666
- token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
3667
- } | {
3668
- type: "Basic";
3669
- username: string | (() => string | undefined) | undefined;
3670
- password: string | (() => string | undefined) | undefined;
3671
- } | {
3672
- type: "Custom";
3673
- prefix: string | (() => string | undefined) | undefined;
3674
- value: string | (() => string | undefined) | undefined;
3675
- }) | undefined;
3676
- body?: (Partial<{
3677
- provider: unknown;
3678
- callbackURL?: string | undefined;
3679
- idToken?: {
3680
- token: string;
3681
- nonce?: string | undefined;
3682
- accessToken?: string | undefined;
3683
- refreshToken?: string | undefined;
3684
- scopes?: string[] | undefined;
3685
- } | undefined;
3686
- requestSignUp?: boolean | undefined;
3687
- scopes?: string[] | undefined;
3688
- errorCallbackURL?: string | undefined;
3689
- disableRedirect?: boolean | undefined;
3690
- }> & Record<string, any>) | undefined;
3691
- query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
3692
- params?: Record<string, any> | undefined;
3693
- duplex?: "full" | "half" | undefined;
3694
- jsonParser?: ((text: string) => Promise<any> | any) | undefined;
3695
- retry?: better_auth_react.RetryOptions | undefined;
3696
- retryAttempt?: number | undefined;
3697
- output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
3698
- errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
3699
- disableValidation?: boolean | undefined;
3700
- }>(data_0: better_auth.Prettify<{
3701
- provider: unknown;
3702
- callbackURL?: string | undefined;
3703
- idToken?: {
3704
- token: string;
3705
- nonce?: string | undefined;
3706
- accessToken?: string | undefined;
3707
- refreshToken?: string | undefined;
3708
- scopes?: string[] | undefined;
3709
- } | undefined;
3710
- requestSignUp?: boolean | undefined;
3711
- scopes?: string[] | undefined;
3712
- errorCallbackURL?: string | undefined;
3713
- disableRedirect?: boolean | undefined;
3714
- } & {
3715
- fetchOptions?: FetchOptions | undefined;
3716
- }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
3717
- url: string;
3718
- redirect: boolean;
3719
- }, {
3720
- code?: string;
3721
- message?: string;
3722
- }, FetchOptions["throw"] extends true ? true : false>>;
3723
- } & {
3724
- listAccounts: <FetchOptions extends {
3725
- credentials?: RequestCredentials | undefined;
3726
- method?: string | undefined;
3727
- headers?: (HeadersInit & (HeadersInit | {
3728
- accept: "application/json" | "text/plain" | "application/octet-stream";
3729
- "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
3730
- authorization: "Bearer" | "Basic";
3731
- })) | undefined;
3732
- cache?: RequestCache | undefined;
3733
- integrity?: string | undefined;
3734
- keepalive?: boolean | undefined;
3735
- mode?: RequestMode | undefined;
3736
- priority?: RequestPriority | undefined;
3737
- redirect?: RequestRedirect | undefined;
3738
- referrer?: string | undefined;
3739
- referrerPolicy?: ReferrerPolicy | undefined;
3740
- signal?: (AbortSignal | null) | undefined;
3741
- window?: null | undefined;
3742
- onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
3743
- onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
3744
- onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
3745
- onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
3746
- onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
3747
- hookOptions?: {
3748
- cloneResponse?: boolean;
3749
- } | undefined;
3750
- timeout?: number | undefined;
3751
- customFetchImpl?: better_auth_react.FetchEsque | undefined;
3752
- plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
3753
- baseURL?: string | undefined;
3754
- throw?: boolean | undefined;
3755
- auth?: ({
3756
- type: "Bearer";
3757
- token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
3758
- } | {
3759
- type: "Basic";
3760
- username: string | (() => string | undefined) | undefined;
3761
- password: string | (() => string | undefined) | undefined;
3762
- } | {
3763
- type: "Custom";
3764
- prefix: string | (() => string | undefined) | undefined;
3765
- value: string | (() => string | undefined) | undefined;
3766
- }) | undefined;
3767
- body?: undefined;
3768
- query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
3769
- params?: Record<string, any> | undefined;
3770
- duplex?: "full" | "half" | undefined;
3771
- jsonParser?: ((text: string) => Promise<any> | any) | undefined;
3772
- retry?: better_auth_react.RetryOptions | undefined;
3773
- retryAttempt?: number | undefined;
3774
- output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
3775
- errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
3776
- disableValidation?: boolean | undefined;
3777
- }>(data_0?: better_auth.Prettify<{
3778
- query?: Record<string, any> | undefined;
3779
- fetchOptions?: FetchOptions | undefined;
3780
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
3781
- id: string;
3782
- providerId: string;
3783
- createdAt: Date;
3784
- updatedAt: Date;
3785
- accountId: string;
3786
- scopes: string[];
3787
- }[], {
3788
- code?: string;
3789
- message?: string;
3790
- }, FetchOptions["throw"] extends true ? true : false>>;
3791
- } & {
3792
- deleteUser: {
3793
- callback: <FetchOptions extends {
3794
- credentials?: RequestCredentials | undefined;
3795
- method?: string | undefined;
3796
- headers?: (HeadersInit & (HeadersInit | {
3797
- accept: "application/json" | "text/plain" | "application/octet-stream";
3798
- "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
3799
- authorization: "Bearer" | "Basic";
3800
- })) | undefined;
3801
- cache?: RequestCache | undefined;
3802
- integrity?: string | undefined;
3803
- keepalive?: boolean | undefined;
3804
- mode?: RequestMode | undefined;
3805
- priority?: RequestPriority | undefined;
3806
- redirect?: RequestRedirect | undefined;
3807
- referrer?: string | undefined;
3808
- referrerPolicy?: ReferrerPolicy | undefined;
3809
- signal?: (AbortSignal | null) | undefined;
3810
- window?: null | undefined;
3811
- onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
3812
- onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
3813
- onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
3814
- onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
3815
- onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
3816
- hookOptions?: {
3817
- cloneResponse?: boolean;
3818
- } | undefined;
3819
- timeout?: number | undefined;
3820
- customFetchImpl?: better_auth_react.FetchEsque | undefined;
3821
- plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
3822
- baseURL?: string | undefined;
3823
- throw?: boolean | undefined;
3824
- auth?: ({
3825
- type: "Bearer";
3826
- token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
3827
- } | {
3828
- type: "Basic";
3829
- username: string | (() => string | undefined) | undefined;
3830
- password: string | (() => string | undefined) | undefined;
3831
- } | {
3832
- type: "Custom";
3833
- prefix: string | (() => string | undefined) | undefined;
3834
- value: string | (() => string | undefined) | undefined;
3835
- }) | undefined;
3836
- body?: undefined;
3837
- query?: (Partial<{
3838
- token: string;
3839
- callbackURL?: string | undefined;
3840
- }> & Record<string, any>) | undefined;
3841
- params?: Record<string, any> | undefined;
3842
- duplex?: "full" | "half" | undefined;
3843
- jsonParser?: ((text: string) => Promise<any> | any) | undefined;
3844
- retry?: better_auth_react.RetryOptions | undefined;
3845
- retryAttempt?: number | undefined;
3846
- output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
3847
- errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
3848
- disableValidation?: boolean | undefined;
3849
- }>(data_0: better_auth.Prettify<{
3850
- query: {
3851
- token: string;
3852
- callbackURL?: string | undefined;
3853
- };
3854
- fetchOptions?: FetchOptions | undefined;
3855
- }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
3856
- success: boolean;
3857
- message: string;
3858
- }, {
3859
- code?: string;
3860
- message?: string;
3861
- }, FetchOptions["throw"] extends true ? true : false>>;
3862
- };
3863
- } & {
3864
- unlinkAccount: <FetchOptions extends {
3865
- credentials?: RequestCredentials | undefined;
3866
- method?: string | undefined;
3867
- headers?: (HeadersInit & (HeadersInit | {
3868
- accept: "application/json" | "text/plain" | "application/octet-stream";
3869
- "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
3870
- authorization: "Bearer" | "Basic";
3871
- })) | undefined;
3872
- cache?: RequestCache | undefined;
3873
- integrity?: string | undefined;
3874
- keepalive?: boolean | undefined;
3875
- mode?: RequestMode | undefined;
3876
- priority?: RequestPriority | undefined;
3877
- redirect?: RequestRedirect | undefined;
3878
- referrer?: string | undefined;
3879
- referrerPolicy?: ReferrerPolicy | undefined;
3880
- signal?: (AbortSignal | null) | undefined;
3881
- window?: null | undefined;
3882
- onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
3883
- onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
3884
- onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
3885
- onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
3886
- onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
3887
- hookOptions?: {
3888
- cloneResponse?: boolean;
3889
- } | undefined;
3890
- timeout?: number | undefined;
3891
- customFetchImpl?: better_auth_react.FetchEsque | undefined;
3892
- plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
3893
- baseURL?: string | undefined;
3894
- throw?: boolean | undefined;
3895
- auth?: ({
3896
- type: "Bearer";
3897
- token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
3898
- } | {
3899
- type: "Basic";
3900
- username: string | (() => string | undefined) | undefined;
3901
- password: string | (() => string | undefined) | undefined;
3902
- } | {
3903
- type: "Custom";
3904
- prefix: string | (() => string | undefined) | undefined;
3905
- value: string | (() => string | undefined) | undefined;
3906
- }) | undefined;
3907
- body?: (Partial<{
3908
- providerId: string;
3909
- accountId?: string | undefined;
3910
- }> & Record<string, any>) | undefined;
3911
- query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
3912
- params?: Record<string, any> | undefined;
3913
- duplex?: "full" | "half" | undefined;
3914
- jsonParser?: ((text: string) => Promise<any> | any) | undefined;
3915
- retry?: better_auth_react.RetryOptions | undefined;
3916
- retryAttempt?: number | undefined;
3917
- output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
3918
- errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
3919
- disableValidation?: boolean | undefined;
3920
- }>(data_0: better_auth.Prettify<{
3921
- providerId: string;
3922
- accountId?: string | undefined;
3923
- } & {
3924
- fetchOptions?: FetchOptions | undefined;
3925
- }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
3926
- status: boolean;
3927
- }, {
3928
- code?: string;
3929
- message?: string;
3930
- }, FetchOptions["throw"] extends true ? true : false>>;
3931
- } & {
3932
- refreshToken: <FetchOptions extends {
3933
- credentials?: RequestCredentials | undefined;
3934
- method?: string | undefined;
3935
- headers?: (HeadersInit & (HeadersInit | {
3936
- accept: "application/json" | "text/plain" | "application/octet-stream";
3937
- "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
3938
- authorization: "Bearer" | "Basic";
3939
- })) | undefined;
3940
- cache?: RequestCache | undefined;
3941
- integrity?: string | undefined;
3942
- keepalive?: boolean | undefined;
3943
- mode?: RequestMode | undefined;
3944
- priority?: RequestPriority | undefined;
3945
- redirect?: RequestRedirect | undefined;
3946
- referrer?: string | undefined;
3947
- referrerPolicy?: ReferrerPolicy | undefined;
3948
- signal?: (AbortSignal | null) | undefined;
3949
- window?: null | undefined;
3950
- onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
3951
- onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
3952
- onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
3953
- onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
3954
- onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
3955
- hookOptions?: {
3956
- cloneResponse?: boolean;
3957
- } | undefined;
3958
- timeout?: number | undefined;
3959
- customFetchImpl?: better_auth_react.FetchEsque | undefined;
3960
- plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
3961
- baseURL?: string | undefined;
3962
- throw?: boolean | undefined;
3963
- auth?: ({
3964
- type: "Bearer";
3965
- token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
3966
- } | {
3967
- type: "Basic";
3968
- username: string | (() => string | undefined) | undefined;
3969
- password: string | (() => string | undefined) | undefined;
3970
- } | {
3971
- type: "Custom";
3972
- prefix: string | (() => string | undefined) | undefined;
3973
- value: string | (() => string | undefined) | undefined;
3974
- }) | undefined;
3975
- body?: (Partial<{
3976
- providerId: string;
3977
- accountId?: string | undefined;
3978
- userId?: string | undefined;
3979
- }> & Record<string, any>) | undefined;
3980
- query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
3981
- params?: Record<string, any> | undefined;
3982
- duplex?: "full" | "half" | undefined;
3983
- jsonParser?: ((text: string) => Promise<any> | any) | undefined;
3984
- retry?: better_auth_react.RetryOptions | undefined;
3985
- retryAttempt?: number | undefined;
3986
- output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
3987
- errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
3988
- disableValidation?: boolean | undefined;
3989
- }>(data_0: better_auth.Prettify<{
3990
- providerId: string;
3991
- accountId?: string | undefined;
3992
- userId?: string | undefined;
3993
- } & {
3994
- fetchOptions?: FetchOptions | undefined;
3995
- }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<any, {
3996
- code?: string;
3997
- message?: string;
3998
- }, FetchOptions["throw"] extends true ? true : false>>;
3999
- } & {
4000
- getAccessToken: <FetchOptions extends {
4001
- credentials?: RequestCredentials | undefined;
4002
- method?: string | undefined;
4003
- headers?: (HeadersInit & (HeadersInit | {
4004
- accept: "application/json" | "text/plain" | "application/octet-stream";
4005
- "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
4006
- authorization: "Bearer" | "Basic";
4007
- })) | undefined;
4008
- cache?: RequestCache | undefined;
4009
- integrity?: string | undefined;
4010
- keepalive?: boolean | undefined;
4011
- mode?: RequestMode | undefined;
4012
- priority?: RequestPriority | undefined;
4013
- redirect?: RequestRedirect | undefined;
4014
- referrer?: string | undefined;
4015
- referrerPolicy?: ReferrerPolicy | undefined;
4016
- signal?: (AbortSignal | null) | undefined;
4017
- window?: null | undefined;
4018
- onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
4019
- onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
4020
- onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
4021
- onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
4022
- onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
4023
- hookOptions?: {
4024
- cloneResponse?: boolean;
4025
- } | undefined;
4026
- timeout?: number | undefined;
4027
- customFetchImpl?: better_auth_react.FetchEsque | undefined;
4028
- plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
4029
- baseURL?: string | undefined;
4030
- throw?: boolean | undefined;
4031
- auth?: ({
4032
- type: "Bearer";
4033
- token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
4034
- } | {
4035
- type: "Basic";
4036
- username: string | (() => string | undefined) | undefined;
4037
- password: string | (() => string | undefined) | undefined;
4038
- } | {
4039
- type: "Custom";
4040
- prefix: string | (() => string | undefined) | undefined;
4041
- value: string | (() => string | undefined) | undefined;
4042
- }) | undefined;
4043
- body?: (Partial<{
4044
- providerId: string;
4045
- accountId?: string | undefined;
4046
- userId?: string | undefined;
4047
- }> & Record<string, any>) | undefined;
4048
- query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
4049
- params?: Record<string, any> | undefined;
4050
- duplex?: "full" | "half" | undefined;
4051
- jsonParser?: ((text: string) => Promise<any> | any) | undefined;
4052
- retry?: better_auth_react.RetryOptions | undefined;
4053
- retryAttempt?: number | undefined;
4054
- output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
4055
- errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
4056
- disableValidation?: boolean | undefined;
4057
- }>(data_0: better_auth.Prettify<{
4058
- providerId: string;
4059
- accountId?: string | undefined;
4060
- userId?: string | undefined;
4061
- } & {
4062
- fetchOptions?: FetchOptions | undefined;
4063
- }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
4064
- accessToken: string;
4065
- accessTokenExpiresAt: Date | undefined;
4066
- scopes: string[];
4067
- idToken: string | undefined;
4068
- }, {
4069
- code?: string;
4070
- message?: string;
4071
- }, FetchOptions["throw"] extends true ? true : false>>;
4072
- } & {
4073
- accountInfo: <FetchOptions extends {
4074
- credentials?: RequestCredentials | undefined;
4075
- method?: string | undefined;
4076
- headers?: (HeadersInit & (HeadersInit | {
4077
- accept: "application/json" | "text/plain" | "application/octet-stream";
4078
- "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
4079
- authorization: "Bearer" | "Basic";
4080
- })) | undefined;
4081
- cache?: RequestCache | undefined;
4082
- integrity?: string | undefined;
4083
- keepalive?: boolean | undefined;
4084
- mode?: RequestMode | undefined;
4085
- priority?: RequestPriority | undefined;
4086
- redirect?: RequestRedirect | undefined;
4087
- referrer?: string | undefined;
4088
- referrerPolicy?: ReferrerPolicy | undefined;
4089
- signal?: (AbortSignal | null) | undefined;
4090
- window?: null | undefined;
4091
- onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
4092
- onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
4093
- onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
4094
- onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
4095
- onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
4096
- hookOptions?: {
4097
- cloneResponse?: boolean;
4098
- } | undefined;
4099
- timeout?: number | undefined;
4100
- customFetchImpl?: better_auth_react.FetchEsque | undefined;
4101
- plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
4102
- baseURL?: string | undefined;
4103
- throw?: boolean | undefined;
4104
- auth?: ({
4105
- type: "Bearer";
4106
- token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
4107
- } | {
4108
- type: "Basic";
4109
- username: string | (() => string | undefined) | undefined;
4110
- password: string | (() => string | undefined) | undefined;
4111
- } | {
4112
- type: "Custom";
4113
- prefix: string | (() => string | undefined) | undefined;
4114
- value: string | (() => string | undefined) | undefined;
4115
- }) | undefined;
4116
- body?: (Partial<{
4117
- accountId: string;
4118
- }> & Record<string, any>) | undefined;
4119
- query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
4120
- params?: Record<string, any> | undefined;
4121
- duplex?: "full" | "half" | undefined;
4122
- jsonParser?: ((text: string) => Promise<any> | any) | undefined;
4123
- retry?: better_auth_react.RetryOptions | undefined;
4124
- retryAttempt?: number | undefined;
4125
- output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
4126
- errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
4127
- disableValidation?: boolean | undefined;
4128
- }>(data_0: better_auth.Prettify<{
4129
- accountId: string;
4130
- } & {
4131
- fetchOptions?: FetchOptions | undefined;
4132
- }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
4133
- user: packages_core_dist_oauth2.OAuth2UserInfo;
4134
- data: Record<string, any>;
4135
- }, {
4136
- code?: string;
4137
- message?: string;
4138
- }, FetchOptions["throw"] extends true ? true : false>>;
4139
- } & {
4140
- getSession: <FetchOptions extends {
4141
- credentials?: RequestCredentials | undefined;
4142
- method?: string | undefined;
4143
- headers?: (HeadersInit & (HeadersInit | {
4144
- accept: "application/json" | "text/plain" | "application/octet-stream";
4145
- "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
4146
- authorization: "Bearer" | "Basic";
4147
- })) | undefined;
4148
- cache?: RequestCache | undefined;
4149
- integrity?: string | undefined;
4150
- keepalive?: boolean | undefined;
4151
- mode?: RequestMode | undefined;
4152
- priority?: RequestPriority | undefined;
4153
- redirect?: RequestRedirect | undefined;
4154
- referrer?: string | undefined;
4155
- referrerPolicy?: ReferrerPolicy | undefined;
4156
- signal?: (AbortSignal | null) | undefined;
4157
- window?: null | undefined;
4158
- onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
4159
- onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
4160
- onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
4161
- onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
4162
- onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
4163
- hookOptions?: {
4164
- cloneResponse?: boolean;
4165
- } | undefined;
4166
- timeout?: number | undefined;
4167
- customFetchImpl?: better_auth_react.FetchEsque | undefined;
4168
- plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
4169
- baseURL?: string | undefined;
4170
- throw?: boolean | undefined;
4171
- auth?: ({
4172
- type: "Bearer";
4173
- token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
4174
- } | {
4175
- type: "Basic";
4176
- username: string | (() => string | undefined) | undefined;
4177
- password: string | (() => string | undefined) | undefined;
4178
- } | {
4179
- type: "Custom";
4180
- prefix: string | (() => string | undefined) | undefined;
4181
- value: string | (() => string | undefined) | undefined;
4182
- }) | undefined;
4183
- body?: undefined;
4184
- query?: (Partial<{
4185
- disableCookieCache?: unknown;
4186
- disableRefresh?: unknown;
4187
- }> & Record<string, any>) | undefined;
4188
- params?: Record<string, any> | undefined;
4189
- duplex?: "full" | "half" | undefined;
4190
- jsonParser?: ((text: string) => Promise<any> | any) | undefined;
4191
- retry?: better_auth_react.RetryOptions | undefined;
4192
- retryAttempt?: number | undefined;
4193
- output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
4194
- errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
4195
- disableValidation?: boolean | undefined;
4196
- }>(data_0?: better_auth.Prettify<{
4197
- query?: {
4198
- disableCookieCache?: unknown;
4199
- disableRefresh?: unknown;
4200
- } | undefined;
4201
- fetchOptions?: FetchOptions | undefined;
4202
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
4203
- user: {
4204
- id: string;
4205
- createdAt: Date;
4206
- updatedAt: Date;
4207
- email: string;
4208
- emailVerified: boolean;
4209
- name: string;
4210
- image?: string | null | undefined;
4211
- };
4212
- session: {
4213
- id: string;
4214
- createdAt: Date;
4215
- updatedAt: Date;
4216
- userId: string;
4217
- expiresAt: Date;
4218
- token: string;
4219
- ipAddress?: string | null | undefined;
4220
- userAgent?: string | null | undefined;
4221
- };
4222
- } | null, {
4223
- code?: string;
4224
- message?: string;
4225
- }, FetchOptions["throw"] extends true ? true : false>>;
4226
- } & {
4227
- useSession: () => {
4228
- data: {
4229
- user: {
4230
- id: string;
4231
- createdAt: Date;
4232
- updatedAt: Date;
4233
- email: string;
4234
- emailVerified: boolean;
4235
- name: string;
4236
- image?: string | null | undefined;
4237
- };
4238
- session: {
4239
- id: string;
4240
- createdAt: Date;
4241
- updatedAt: Date;
4242
- userId: string;
4243
- expiresAt: Date;
4244
- token: string;
4245
- ipAddress?: string | null | undefined;
4246
- userAgent?: string | null | undefined;
4247
- };
4248
- } | null;
4249
- isPending: boolean;
4250
- isRefetching: boolean;
4251
- error: better_auth_react.BetterFetchError | null;
4252
- refetch: (queryParams?: {
4253
- query?: better_auth.SessionQueryParams;
4254
- }) => void;
4255
- };
4256
- $Infer: {
4257
- Session: {
4258
- user: {
4259
- id: string;
4260
- createdAt: Date;
4261
- updatedAt: Date;
4262
- email: string;
4263
- emailVerified: boolean;
4264
- name: string;
4265
- image?: string | null | undefined;
4266
- };
4267
- session: {
4268
- id: string;
4269
- createdAt: Date;
4270
- updatedAt: Date;
4271
- userId: string;
4272
- expiresAt: Date;
4273
- token: string;
4274
- ipAddress?: string | null | undefined;
4275
- userAgent?: string | null | undefined;
4276
- };
4277
- };
4278
- };
4279
- $fetch: better_auth_react.BetterFetch<{
4280
- plugins: (better_auth_react.BetterFetchPlugin | {
4281
- id: string;
4282
- name: string;
4283
- hooks: {
4284
- onSuccess: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
4285
- onError: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
4286
- onRequest: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
4287
- onResponse: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
4288
- };
4289
- } | {
4290
- id: string;
4291
- name: string;
4292
- hooks: {
4293
- onSuccess(context: better_auth_react.SuccessContext<any>): void;
4294
- };
4295
- })[];
4296
- method: string;
4297
- headers?: (HeadersInit & (HeadersInit | {
4298
- accept: "application/json" | "text/plain" | "application/octet-stream";
4299
- "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
4300
- authorization: "Bearer" | "Basic";
4301
- })) | undefined;
4302
- redirect?: RequestRedirect | undefined;
4303
- cache?: RequestCache | undefined;
4304
- credentials?: RequestCredentials;
4305
- integrity?: string | undefined;
4306
- keepalive?: boolean | undefined;
4307
- mode?: RequestMode | undefined;
4308
- priority?: RequestPriority | undefined;
4309
- referrer?: string | undefined;
4310
- referrerPolicy?: ReferrerPolicy | undefined;
4311
- signal?: (AbortSignal | null) | undefined;
4312
- window?: null | undefined;
4313
- onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
4314
- hookOptions?: {
4315
- cloneResponse?: boolean;
4316
- } | undefined;
4317
- timeout?: number | undefined;
4318
- customFetchImpl: better_auth_react.FetchEsque;
4319
- baseURL: string;
4320
- throw?: boolean | undefined;
4321
- auth?: ({
4322
- type: "Bearer";
4323
- token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
4324
- } | {
4325
- type: "Basic";
4326
- username: string | (() => string | undefined) | undefined;
4327
- password: string | (() => string | undefined) | undefined;
4328
- } | {
4329
- type: "Custom";
4330
- prefix: string | (() => string | undefined) | undefined;
4331
- value: string | (() => string | undefined) | undefined;
4332
- }) | undefined;
4333
- body?: any;
4334
- query?: any;
4335
- params?: any;
4336
- duplex?: "full" | "half" | undefined;
4337
- jsonParser: (text: string) => Promise<any> | any;
4338
- retry?: better_auth_react.RetryOptions | undefined;
4339
- retryAttempt?: number | undefined;
4340
- output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
4341
- errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
4342
- disableValidation?: boolean | undefined;
4343
- }, unknown, unknown, {}>;
4344
- $store: {
4345
- notify: (signal?: Omit<string, "$sessionSignal"> | "$sessionSignal") => void;
4346
- listen: (signal: Omit<string, "$sessionSignal"> | "$sessionSignal", listener: (value: boolean, oldValue?: boolean | undefined) => void) => void;
4347
- atoms: Record<string, better_auth_react.WritableAtom<any>>;
4348
- };
4349
- $ERROR_CODES: {
4350
- readonly USER_NOT_FOUND: "User not found";
4351
- readonly FAILED_TO_CREATE_USER: "Failed to create user";
4352
- readonly FAILED_TO_CREATE_SESSION: "Failed to create session";
4353
- readonly FAILED_TO_UPDATE_USER: "Failed to update user";
4354
- readonly FAILED_TO_GET_SESSION: "Failed to get session";
4355
- readonly INVALID_PASSWORD: "Invalid password";
4356
- readonly INVALID_EMAIL: "Invalid email";
4357
- readonly INVALID_EMAIL_OR_PASSWORD: "Invalid email or password";
4358
- readonly SOCIAL_ACCOUNT_ALREADY_LINKED: "Social account already linked";
4359
- readonly PROVIDER_NOT_FOUND: "Provider not found";
4360
- readonly INVALID_TOKEN: "Invalid token";
4361
- readonly ID_TOKEN_NOT_SUPPORTED: "id_token not supported";
4362
- readonly FAILED_TO_GET_USER_INFO: "Failed to get user info";
4363
- readonly USER_EMAIL_NOT_FOUND: "User email not found";
4364
- readonly EMAIL_NOT_VERIFIED: "Email not verified";
4365
- readonly PASSWORD_TOO_SHORT: "Password too short";
4366
- readonly PASSWORD_TOO_LONG: "Password too long";
4367
- readonly USER_ALREADY_EXISTS: "User already exists.";
4368
- readonly USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL: "User already exists. Use another email.";
4369
- readonly EMAIL_CAN_NOT_BE_UPDATED: "Email can not be updated";
4370
- readonly CREDENTIAL_ACCOUNT_NOT_FOUND: "Credential account not found";
4371
- readonly SESSION_EXPIRED: "Session expired. Re-authenticate to perform this action.";
4372
- readonly FAILED_TO_UNLINK_LAST_ACCOUNT: "You can't unlink your last account";
4373
- readonly ACCOUNT_NOT_FOUND: "Account not found";
4374
- readonly USER_ALREADY_HAS_PASSWORD: "User already has a password. Provide that to delete the account.";
4375
- };
4376
- };
4377
- /**
4378
- * Type helper for inferring the auth client type
4379
- */
4380
- type AuthClient = ReturnType<typeof createAuthClient>;
4381
-
4382
- /**
4383
- * @erikey/react - KV Store Client
4384
- *
4385
- * Erikey-specific key-value storage for end-users.
4386
- * Stores data per-user, scoped to the project.
4387
- *
4388
- * This is NOT part of better-auth - it's an Erikey-specific feature.
4389
- */
4390
- interface KvClientConfig {
4391
- /**
4392
- * Your Erikey project ID (pk_live_xxx or pk_test_xxx)
4393
- */
4394
- projectId: string;
4395
- /**
4396
- * Base URL for the auth API
4397
- * @default 'https://auth.erikey.com'
4398
- */
4399
- baseUrl?: string;
4400
- }
4401
- interface KvPair {
4402
- key: string;
4403
- value: any;
4404
- createdAt: string;
4405
- updatedAt: string;
4406
- }
4407
- interface KvBulkSetInput {
4408
- key: string;
4409
- value: any;
4410
- }
4411
- interface SetValueResponse {
4412
- success: boolean;
4413
- data?: {
4414
- key: string;
4415
- value: any;
4416
- };
4417
- error?: string;
4418
- }
4419
- interface GetValueResponse {
4420
- success: boolean;
4421
- data?: KvPair;
4422
- error?: string;
4423
- }
4424
- interface GetValuesResponse {
4425
- success: boolean;
4426
- data?: {
4427
- kvPairs: KvPair[];
4428
- total: number;
4429
- };
4430
- error?: string;
4431
- }
4432
- interface DeleteValueResponse {
4433
- success: boolean;
4434
- data?: {
4435
- message: string;
4436
- };
4437
- error?: string;
4438
- }
4439
- interface DeleteValuesResponse {
4440
- success: boolean;
4441
- data?: {
4442
- deleted: string[];
4443
- failed: Array<{
4444
- key: string;
4445
- error: string;
4446
- }>;
4447
- };
4448
- error?: string;
4449
- }
4450
- interface SetValuesResponse {
4451
- success: boolean;
4452
- data?: {
4453
- results: Array<{
4454
- key: string;
4455
- success: boolean;
4456
- }>;
4457
- total: number;
4458
- };
4459
- error?: string;
4460
- }
4461
- /**
4462
- * Create a KV store client for per-user data storage
4463
- *
4464
- * @example
4465
- * ```tsx
4466
- * import { createKvClient } from '@erikey/react';
4467
- *
4468
- * const kv = createKvClient({
4469
- * projectId: 'pk_live_xxx',
4470
- * });
4471
- *
4472
- * // Store a value
4473
- * await kv.setValue('preferences', { theme: 'dark' });
4474
- *
4475
- * // Get a value
4476
- * const { data } = await kv.getValue('preferences');
4477
- *
4478
- * // Get all values
4479
- * const { data: all } = await kv.getValues();
4480
- *
4481
- * // Delete a value
4482
- * await kv.deleteValue('preferences');
4483
- * ```
4484
- */
4485
- declare function createKvClient(config: KvClientConfig): {
4486
- /**
4487
- * Set a single key-value pair
4488
- */
4489
- setValue: (key: string, value: any) => Promise<SetValueResponse>;
4490
- /**
4491
- * Get a single key-value pair
4492
- */
4493
- getValue: (key: string) => Promise<GetValueResponse>;
4494
- /**
4495
- * Get all key-value pairs for the authenticated user
4496
- */
4497
- getValues: () => Promise<GetValuesResponse>;
4498
- /**
4499
- * Delete a single key-value pair
4500
- */
4501
- deleteValue: (key: string) => Promise<DeleteValueResponse>;
4502
- /**
4503
- * Delete multiple key-value pairs
4504
- */
4505
- deleteValues: (keys: string[]) => Promise<DeleteValuesResponse>;
4506
- /**
4507
- * Set multiple key-value pairs in bulk (max 100 pairs)
4508
- */
4509
- setValues: (kvPairs: KvBulkSetInput[]) => Promise<SetValuesResponse>;
4510
- };
4511
- /**
4512
- * Type helper for inferring the KV client type
4513
- */
4514
- type KvClient = ReturnType<typeof createKvClient>;
4515
-
4516
- export { type AuthClient, type AuthClientConfig, type DashboardClient, type DashboardClientConfig, type DeleteValueResponse, type DeleteValuesResponse, type GetValueResponse, type GetValuesResponse, type KvBulkSetInput, type KvClient, type KvClientConfig, type KvPair, type SetValueResponse, type SetValuesResponse, createAuthClient, createDashboardClient, createKvClient };