@erikey/react 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2215 @@
1
+ import * as better_auth_react from 'better-auth/react';
2
+ import { AuthClientConfig, AuthClient as AuthClient$1 } from '@erikey/js';
3
+ export { AuthClientConfig, AuthResponse, DeleteValueResponse, DeleteValuesResponse, GetValueResponse, GetValuesResponse, KvBulkSetInput, KvPair, PasswordResetResponse, Session, SetValueResponse, SetValuesResponse, SignInData, SignOutResponse, SignUpData, User, UserResponse } from '@erikey/js';
4
+ export { APIKey, Organization, Permission, SessionData } from '@erikey/core/types';
5
+
6
+ type SessionQueryParams = {
7
+ disableCookieCache?: boolean;
8
+ disableRefresh?: boolean;
9
+ };
10
+
11
+ type Prettify<T> = Omit<T, never>;
12
+
13
+ interface DashboardClientConfig {
14
+ /**
15
+ * Base URL for the auth API
16
+ * @default process.env.NEXT_PUBLIC_AUTH_URL || 'https://api.erikey.com'
17
+ */
18
+ baseURL?: string;
19
+ /**
20
+ * Whether to include credentials in requests
21
+ * @default 'include'
22
+ */
23
+ credentials?: RequestCredentials;
24
+ }
25
+ /**
26
+ * Create dashboard client with better-auth
27
+ *
28
+ * This is for the Erikey dashboard (erikey.com) - NOT for end-user auth.
29
+ * For end-user auth in customer apps, use `createAuthClient` instead.
30
+ *
31
+ * NOTE: For dashboard user signup (which creates org + project), use the
32
+ * typed API client (signupApi.dashboard) from @/lib/api/typed-api instead.
33
+ * This client only handles Better Auth operations (signIn, session, etc.)
34
+ *
35
+ * @example
36
+ * ```tsx
37
+ * import { createDashboardClient } from '@erikey/react';
38
+ *
39
+ * export const auth = createDashboardClient({
40
+ * baseURL: process.env.NEXT_PUBLIC_AUTH_URL
41
+ * });
42
+ *
43
+ * // Use Better Auth methods
44
+ * export const { useSession, signIn, signOut } = auth;
45
+ * ```
46
+ */
47
+ declare function createDashboardClient(config?: DashboardClientConfig): {
48
+ signIn: {
49
+ social: <FetchOptions extends {
50
+ credentials?: RequestCredentials | undefined;
51
+ method?: string | undefined;
52
+ headers?: (HeadersInit & (HeadersInit | {
53
+ accept: "application/json" | "text/plain" | "application/octet-stream";
54
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
55
+ authorization: "Bearer" | "Basic";
56
+ })) | undefined;
57
+ cache?: RequestCache | undefined;
58
+ integrity?: string | undefined;
59
+ keepalive?: boolean | undefined;
60
+ mode?: RequestMode | undefined;
61
+ priority?: RequestPriority | undefined;
62
+ redirect?: RequestRedirect | undefined;
63
+ referrer?: string | undefined;
64
+ referrerPolicy?: ReferrerPolicy | undefined;
65
+ signal?: (AbortSignal | null) | undefined;
66
+ window?: null | undefined;
67
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
68
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
69
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
70
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
71
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
72
+ hookOptions?: {
73
+ cloneResponse?: boolean;
74
+ } | undefined;
75
+ timeout?: number | undefined;
76
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
77
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
78
+ baseURL?: string | undefined;
79
+ throw?: boolean | undefined;
80
+ auth?: ({
81
+ type: "Bearer";
82
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
83
+ } | {
84
+ type: "Basic";
85
+ username: string | (() => string | undefined) | undefined;
86
+ password: string | (() => string | undefined) | undefined;
87
+ } | {
88
+ type: "Custom";
89
+ prefix: string | (() => string | undefined) | undefined;
90
+ value: string | (() => string | undefined) | undefined;
91
+ }) | undefined;
92
+ body?: (Partial<{
93
+ provider: unknown;
94
+ callbackURL?: string | undefined;
95
+ newUserCallbackURL?: string | undefined;
96
+ errorCallbackURL?: string | undefined;
97
+ disableRedirect?: boolean | undefined;
98
+ idToken?: {
99
+ token: string;
100
+ nonce?: string | undefined;
101
+ accessToken?: string | undefined;
102
+ refreshToken?: string | undefined;
103
+ expiresAt?: number | undefined;
104
+ } | undefined;
105
+ scopes?: string[] | undefined;
106
+ requestSignUp?: boolean | undefined;
107
+ loginHint?: string | undefined;
108
+ }> & Record<string, any>) | undefined;
109
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
110
+ params?: Record<string, any> | undefined;
111
+ duplex?: "full" | "half" | undefined;
112
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
113
+ retry?: better_auth_react.RetryOptions | undefined;
114
+ retryAttempt?: number | undefined;
115
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
116
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
117
+ disableValidation?: boolean | undefined;
118
+ }>(data_0: Prettify<{
119
+ provider: unknown;
120
+ callbackURL?: string | undefined;
121
+ newUserCallbackURL?: string | undefined;
122
+ errorCallbackURL?: string | undefined;
123
+ disableRedirect?: boolean | undefined;
124
+ idToken?: {
125
+ token: string;
126
+ nonce?: string | undefined;
127
+ accessToken?: string | undefined;
128
+ refreshToken?: string | undefined;
129
+ expiresAt?: number | undefined;
130
+ } | undefined;
131
+ scopes?: string[] | undefined;
132
+ requestSignUp?: boolean | undefined;
133
+ loginHint?: string | undefined;
134
+ } & {
135
+ fetchOptions?: FetchOptions | undefined;
136
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<NonNullable<{
137
+ redirect: boolean;
138
+ token: string;
139
+ url: undefined;
140
+ user: {
141
+ id: string;
142
+ email: string;
143
+ name: string;
144
+ image: string | null | undefined;
145
+ emailVerified: boolean;
146
+ createdAt: Date;
147
+ updatedAt: Date;
148
+ };
149
+ } | {
150
+ url: string;
151
+ redirect: boolean;
152
+ }>, {
153
+ code?: string;
154
+ message?: string;
155
+ }, FetchOptions["throw"] extends true ? true : false>>;
156
+ };
157
+ } & {
158
+ signOut: <FetchOptions extends {
159
+ credentials?: RequestCredentials | undefined;
160
+ method?: string | undefined;
161
+ headers?: (HeadersInit & (HeadersInit | {
162
+ accept: "application/json" | "text/plain" | "application/octet-stream";
163
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
164
+ authorization: "Bearer" | "Basic";
165
+ })) | undefined;
166
+ cache?: RequestCache | undefined;
167
+ integrity?: string | undefined;
168
+ keepalive?: boolean | undefined;
169
+ mode?: RequestMode | undefined;
170
+ priority?: RequestPriority | undefined;
171
+ redirect?: RequestRedirect | undefined;
172
+ referrer?: string | undefined;
173
+ referrerPolicy?: ReferrerPolicy | undefined;
174
+ signal?: (AbortSignal | null) | undefined;
175
+ window?: null | undefined;
176
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
177
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
178
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
179
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
180
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
181
+ hookOptions?: {
182
+ cloneResponse?: boolean;
183
+ } | undefined;
184
+ timeout?: number | undefined;
185
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
186
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
187
+ baseURL?: string | undefined;
188
+ throw?: boolean | undefined;
189
+ auth?: ({
190
+ type: "Bearer";
191
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
192
+ } | {
193
+ type: "Basic";
194
+ username: string | (() => string | undefined) | undefined;
195
+ password: string | (() => string | undefined) | undefined;
196
+ } | {
197
+ type: "Custom";
198
+ prefix: string | (() => string | undefined) | undefined;
199
+ value: string | (() => string | undefined) | undefined;
200
+ }) | undefined;
201
+ body?: undefined;
202
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
203
+ params?: Record<string, any> | undefined;
204
+ duplex?: "full" | "half" | undefined;
205
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
206
+ retry?: better_auth_react.RetryOptions | undefined;
207
+ retryAttempt?: number | undefined;
208
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
209
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
210
+ disableValidation?: boolean | undefined;
211
+ }>(data_0?: Prettify<{
212
+ query?: Record<string, any> | undefined;
213
+ fetchOptions?: FetchOptions | undefined;
214
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
215
+ success: boolean;
216
+ }, {
217
+ code?: string;
218
+ message?: string;
219
+ }, FetchOptions["throw"] extends true ? true : false>>;
220
+ } & {
221
+ signUp: {
222
+ email: <FetchOptions extends {
223
+ credentials?: RequestCredentials | undefined;
224
+ method?: string | undefined;
225
+ headers?: (HeadersInit & (HeadersInit | {
226
+ accept: "application/json" | "text/plain" | "application/octet-stream";
227
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
228
+ authorization: "Bearer" | "Basic";
229
+ })) | undefined;
230
+ cache?: RequestCache | undefined;
231
+ integrity?: string | undefined;
232
+ keepalive?: boolean | undefined;
233
+ mode?: RequestMode | undefined;
234
+ priority?: RequestPriority | undefined;
235
+ redirect?: RequestRedirect | undefined;
236
+ referrer?: string | undefined;
237
+ referrerPolicy?: ReferrerPolicy | undefined;
238
+ signal?: (AbortSignal | null) | undefined;
239
+ window?: null | undefined;
240
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
241
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
242
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
243
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
244
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
245
+ hookOptions?: {
246
+ cloneResponse?: boolean;
247
+ } | undefined;
248
+ timeout?: number | undefined;
249
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
250
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
251
+ baseURL?: string | undefined;
252
+ throw?: boolean | undefined;
253
+ auth?: ({
254
+ type: "Bearer";
255
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
256
+ } | {
257
+ type: "Basic";
258
+ username: string | (() => string | undefined) | undefined;
259
+ password: string | (() => string | undefined) | undefined;
260
+ } | {
261
+ type: "Custom";
262
+ prefix: string | (() => string | undefined) | undefined;
263
+ value: string | (() => string | undefined) | undefined;
264
+ }) | undefined;
265
+ body?: (Partial<{
266
+ name: string;
267
+ email: string;
268
+ password: string;
269
+ image?: string;
270
+ callbackURL?: string;
271
+ rememberMe?: boolean;
272
+ }> & Record<string, any>) | undefined;
273
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
274
+ params?: Record<string, any> | undefined;
275
+ duplex?: "full" | "half" | undefined;
276
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
277
+ retry?: better_auth_react.RetryOptions | undefined;
278
+ retryAttempt?: number | undefined;
279
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
280
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
281
+ disableValidation?: boolean | undefined;
282
+ }>(data_0: Prettify<{
283
+ email: string;
284
+ name: string;
285
+ password: string;
286
+ image?: string;
287
+ callbackURL?: string;
288
+ fetchOptions?: FetchOptions | undefined;
289
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<NonNullable<{
290
+ token: null;
291
+ user: {
292
+ id: string;
293
+ email: string;
294
+ name: string;
295
+ image: string | null | undefined;
296
+ emailVerified: boolean;
297
+ createdAt: Date;
298
+ updatedAt: Date;
299
+ };
300
+ } | {
301
+ token: string;
302
+ user: {
303
+ id: string;
304
+ email: string;
305
+ name: string;
306
+ image: string | null | undefined;
307
+ emailVerified: boolean;
308
+ createdAt: Date;
309
+ updatedAt: Date;
310
+ };
311
+ }>, {
312
+ code?: string;
313
+ message?: string;
314
+ }, FetchOptions["throw"] extends true ? true : false>>;
315
+ };
316
+ } & {
317
+ signIn: {
318
+ email: <FetchOptions extends {
319
+ credentials?: RequestCredentials | undefined;
320
+ method?: string | undefined;
321
+ headers?: (HeadersInit & (HeadersInit | {
322
+ accept: "application/json" | "text/plain" | "application/octet-stream";
323
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
324
+ authorization: "Bearer" | "Basic";
325
+ })) | undefined;
326
+ cache?: RequestCache | undefined;
327
+ integrity?: string | undefined;
328
+ keepalive?: boolean | undefined;
329
+ mode?: RequestMode | undefined;
330
+ priority?: RequestPriority | undefined;
331
+ redirect?: RequestRedirect | undefined;
332
+ referrer?: string | undefined;
333
+ referrerPolicy?: ReferrerPolicy | undefined;
334
+ signal?: (AbortSignal | null) | undefined;
335
+ window?: null | undefined;
336
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
337
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
338
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
339
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
340
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
341
+ hookOptions?: {
342
+ cloneResponse?: boolean;
343
+ } | undefined;
344
+ timeout?: number | undefined;
345
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
346
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
347
+ baseURL?: string | undefined;
348
+ throw?: boolean | undefined;
349
+ auth?: ({
350
+ type: "Bearer";
351
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
352
+ } | {
353
+ type: "Basic";
354
+ username: string | (() => string | undefined) | undefined;
355
+ password: string | (() => string | undefined) | undefined;
356
+ } | {
357
+ type: "Custom";
358
+ prefix: string | (() => string | undefined) | undefined;
359
+ value: string | (() => string | undefined) | undefined;
360
+ }) | undefined;
361
+ body?: (Partial<{
362
+ email: string;
363
+ password: string;
364
+ callbackURL?: string | undefined;
365
+ rememberMe?: boolean | undefined;
366
+ }> & Record<string, any>) | undefined;
367
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
368
+ params?: Record<string, any> | undefined;
369
+ duplex?: "full" | "half" | undefined;
370
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
371
+ retry?: better_auth_react.RetryOptions | undefined;
372
+ retryAttempt?: number | undefined;
373
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
374
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
375
+ disableValidation?: boolean | undefined;
376
+ }>(data_0: Prettify<{
377
+ email: string;
378
+ password: string;
379
+ callbackURL?: string | undefined;
380
+ rememberMe?: boolean | undefined;
381
+ } & {
382
+ fetchOptions?: FetchOptions | undefined;
383
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
384
+ redirect: boolean;
385
+ token: string;
386
+ url: string | undefined;
387
+ user: {
388
+ id: string;
389
+ email: string;
390
+ name: string;
391
+ image: string | null | undefined;
392
+ emailVerified: boolean;
393
+ createdAt: Date;
394
+ updatedAt: Date;
395
+ };
396
+ }, {
397
+ code?: string;
398
+ message?: string;
399
+ }, FetchOptions["throw"] extends true ? true : false>>;
400
+ };
401
+ } & {
402
+ forgetPassword: <FetchOptions extends {
403
+ credentials?: RequestCredentials | undefined;
404
+ method?: string | undefined;
405
+ headers?: (HeadersInit & (HeadersInit | {
406
+ accept: "application/json" | "text/plain" | "application/octet-stream";
407
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
408
+ authorization: "Bearer" | "Basic";
409
+ })) | undefined;
410
+ cache?: RequestCache | undefined;
411
+ integrity?: string | undefined;
412
+ keepalive?: boolean | undefined;
413
+ mode?: RequestMode | undefined;
414
+ priority?: RequestPriority | undefined;
415
+ redirect?: RequestRedirect | undefined;
416
+ referrer?: string | undefined;
417
+ referrerPolicy?: ReferrerPolicy | undefined;
418
+ signal?: (AbortSignal | null) | undefined;
419
+ window?: null | undefined;
420
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
421
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
422
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
423
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
424
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
425
+ hookOptions?: {
426
+ cloneResponse?: boolean;
427
+ } | undefined;
428
+ timeout?: number | undefined;
429
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
430
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
431
+ baseURL?: string | undefined;
432
+ throw?: boolean | undefined;
433
+ auth?: ({
434
+ type: "Bearer";
435
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
436
+ } | {
437
+ type: "Basic";
438
+ username: string | (() => string | undefined) | undefined;
439
+ password: string | (() => string | undefined) | undefined;
440
+ } | {
441
+ type: "Custom";
442
+ prefix: string | (() => string | undefined) | undefined;
443
+ value: string | (() => string | undefined) | undefined;
444
+ }) | undefined;
445
+ body?: (Partial<{
446
+ email: string;
447
+ redirectTo?: string | undefined;
448
+ }> & Record<string, any>) | undefined;
449
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
450
+ params?: Record<string, any> | undefined;
451
+ duplex?: "full" | "half" | undefined;
452
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
453
+ retry?: better_auth_react.RetryOptions | undefined;
454
+ retryAttempt?: number | undefined;
455
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
456
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
457
+ disableValidation?: boolean | undefined;
458
+ }>(data_0: Prettify<{
459
+ email: string;
460
+ redirectTo?: string | undefined;
461
+ } & {
462
+ fetchOptions?: FetchOptions | undefined;
463
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
464
+ status: boolean;
465
+ }, {
466
+ code?: string;
467
+ message?: string;
468
+ }, FetchOptions["throw"] extends true ? true : false>>;
469
+ } & {
470
+ resetPassword: <FetchOptions extends {
471
+ credentials?: RequestCredentials | undefined;
472
+ method?: string | undefined;
473
+ headers?: (HeadersInit & (HeadersInit | {
474
+ accept: "application/json" | "text/plain" | "application/octet-stream";
475
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
476
+ authorization: "Bearer" | "Basic";
477
+ })) | undefined;
478
+ cache?: RequestCache | undefined;
479
+ integrity?: string | undefined;
480
+ keepalive?: boolean | undefined;
481
+ mode?: RequestMode | undefined;
482
+ priority?: RequestPriority | undefined;
483
+ redirect?: RequestRedirect | undefined;
484
+ referrer?: string | undefined;
485
+ referrerPolicy?: ReferrerPolicy | undefined;
486
+ signal?: (AbortSignal | null) | undefined;
487
+ window?: null | undefined;
488
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
489
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
490
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
491
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
492
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
493
+ hookOptions?: {
494
+ cloneResponse?: boolean;
495
+ } | undefined;
496
+ timeout?: number | undefined;
497
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
498
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
499
+ baseURL?: string | undefined;
500
+ throw?: boolean | undefined;
501
+ auth?: ({
502
+ type: "Bearer";
503
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
504
+ } | {
505
+ type: "Basic";
506
+ username: string | (() => string | undefined) | undefined;
507
+ password: string | (() => string | undefined) | undefined;
508
+ } | {
509
+ type: "Custom";
510
+ prefix: string | (() => string | undefined) | undefined;
511
+ value: string | (() => string | undefined) | undefined;
512
+ }) | undefined;
513
+ body?: (Partial<{
514
+ newPassword: string;
515
+ token?: string | undefined;
516
+ }> & Record<string, any>) | undefined;
517
+ query?: (Partial<{
518
+ token?: string | undefined;
519
+ }> & Record<string, any>) | undefined;
520
+ params?: Record<string, any> | undefined;
521
+ duplex?: "full" | "half" | undefined;
522
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
523
+ retry?: better_auth_react.RetryOptions | undefined;
524
+ retryAttempt?: number | undefined;
525
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
526
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
527
+ disableValidation?: boolean | undefined;
528
+ }>(data_0: Prettify<{
529
+ newPassword: string;
530
+ token?: string | undefined;
531
+ } & {
532
+ fetchOptions?: FetchOptions | undefined;
533
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
534
+ status: boolean;
535
+ }, {
536
+ code?: string;
537
+ message?: string;
538
+ }, FetchOptions["throw"] extends true ? true : false>>;
539
+ } & {
540
+ verifyEmail: <FetchOptions extends {
541
+ credentials?: RequestCredentials | undefined;
542
+ method?: string | undefined;
543
+ headers?: (HeadersInit & (HeadersInit | {
544
+ accept: "application/json" | "text/plain" | "application/octet-stream";
545
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
546
+ authorization: "Bearer" | "Basic";
547
+ })) | undefined;
548
+ cache?: RequestCache | undefined;
549
+ integrity?: string | undefined;
550
+ keepalive?: boolean | undefined;
551
+ mode?: RequestMode | undefined;
552
+ priority?: RequestPriority | undefined;
553
+ redirect?: RequestRedirect | undefined;
554
+ referrer?: string | undefined;
555
+ referrerPolicy?: ReferrerPolicy | undefined;
556
+ signal?: (AbortSignal | null) | undefined;
557
+ window?: null | undefined;
558
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
559
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
560
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
561
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
562
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
563
+ hookOptions?: {
564
+ cloneResponse?: boolean;
565
+ } | undefined;
566
+ timeout?: number | undefined;
567
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
568
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
569
+ baseURL?: string | undefined;
570
+ throw?: boolean | undefined;
571
+ auth?: ({
572
+ type: "Bearer";
573
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
574
+ } | {
575
+ type: "Basic";
576
+ username: string | (() => string | undefined) | undefined;
577
+ password: string | (() => string | undefined) | undefined;
578
+ } | {
579
+ type: "Custom";
580
+ prefix: string | (() => string | undefined) | undefined;
581
+ value: string | (() => string | undefined) | undefined;
582
+ }) | undefined;
583
+ body?: undefined;
584
+ query?: (Partial<{
585
+ token: string;
586
+ callbackURL?: string | undefined;
587
+ }> & Record<string, any>) | undefined;
588
+ params?: Record<string, any> | undefined;
589
+ duplex?: "full" | "half" | undefined;
590
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
591
+ retry?: better_auth_react.RetryOptions | undefined;
592
+ retryAttempt?: number | undefined;
593
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
594
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
595
+ disableValidation?: boolean | undefined;
596
+ }>(data_0: Prettify<{
597
+ query: {
598
+ token: string;
599
+ callbackURL?: string | undefined;
600
+ };
601
+ fetchOptions?: FetchOptions | undefined;
602
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<NonNullable<void | {
603
+ status: boolean;
604
+ user: {
605
+ id: string;
606
+ email: string;
607
+ name: string;
608
+ image: string | null | undefined;
609
+ emailVerified: boolean;
610
+ createdAt: Date;
611
+ updatedAt: Date;
612
+ };
613
+ } | {
614
+ status: boolean;
615
+ user: null;
616
+ }>, {
617
+ code?: string;
618
+ message?: string;
619
+ }, FetchOptions["throw"] extends true ? true : false>>;
620
+ } & {
621
+ sendVerificationEmail: <FetchOptions extends {
622
+ credentials?: RequestCredentials | undefined;
623
+ method?: string | undefined;
624
+ headers?: (HeadersInit & (HeadersInit | {
625
+ accept: "application/json" | "text/plain" | "application/octet-stream";
626
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
627
+ authorization: "Bearer" | "Basic";
628
+ })) | undefined;
629
+ cache?: RequestCache | undefined;
630
+ integrity?: string | undefined;
631
+ keepalive?: boolean | undefined;
632
+ mode?: RequestMode | undefined;
633
+ priority?: RequestPriority | undefined;
634
+ redirect?: RequestRedirect | undefined;
635
+ referrer?: string | undefined;
636
+ referrerPolicy?: ReferrerPolicy | undefined;
637
+ signal?: (AbortSignal | null) | undefined;
638
+ window?: null | undefined;
639
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
640
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
641
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
642
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
643
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
644
+ hookOptions?: {
645
+ cloneResponse?: boolean;
646
+ } | undefined;
647
+ timeout?: number | undefined;
648
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
649
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
650
+ baseURL?: string | undefined;
651
+ throw?: boolean | undefined;
652
+ auth?: ({
653
+ type: "Bearer";
654
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
655
+ } | {
656
+ type: "Basic";
657
+ username: string | (() => string | undefined) | undefined;
658
+ password: string | (() => string | undefined) | undefined;
659
+ } | {
660
+ type: "Custom";
661
+ prefix: string | (() => string | undefined) | undefined;
662
+ value: string | (() => string | undefined) | undefined;
663
+ }) | undefined;
664
+ body?: (Partial<{
665
+ email: string;
666
+ callbackURL?: string | undefined;
667
+ }> & Record<string, any>) | undefined;
668
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
669
+ params?: Record<string, any> | undefined;
670
+ duplex?: "full" | "half" | undefined;
671
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
672
+ retry?: better_auth_react.RetryOptions | undefined;
673
+ retryAttempt?: number | undefined;
674
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
675
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
676
+ disableValidation?: boolean | undefined;
677
+ }>(data_0: Prettify<{
678
+ email: string;
679
+ callbackURL?: string | undefined;
680
+ } & {
681
+ fetchOptions?: FetchOptions | undefined;
682
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
683
+ status: boolean;
684
+ }, {
685
+ code?: string;
686
+ message?: string;
687
+ }, FetchOptions["throw"] extends true ? true : false>>;
688
+ } & {
689
+ changeEmail: <FetchOptions extends {
690
+ credentials?: RequestCredentials | undefined;
691
+ method?: string | undefined;
692
+ headers?: (HeadersInit & (HeadersInit | {
693
+ accept: "application/json" | "text/plain" | "application/octet-stream";
694
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
695
+ authorization: "Bearer" | "Basic";
696
+ })) | undefined;
697
+ cache?: RequestCache | undefined;
698
+ integrity?: string | undefined;
699
+ keepalive?: boolean | undefined;
700
+ mode?: RequestMode | undefined;
701
+ priority?: RequestPriority | undefined;
702
+ redirect?: RequestRedirect | undefined;
703
+ referrer?: string | undefined;
704
+ referrerPolicy?: ReferrerPolicy | undefined;
705
+ signal?: (AbortSignal | null) | undefined;
706
+ window?: null | undefined;
707
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
708
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
709
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
710
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
711
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
712
+ hookOptions?: {
713
+ cloneResponse?: boolean;
714
+ } | undefined;
715
+ timeout?: number | undefined;
716
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
717
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
718
+ baseURL?: string | undefined;
719
+ throw?: boolean | undefined;
720
+ auth?: ({
721
+ type: "Bearer";
722
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
723
+ } | {
724
+ type: "Basic";
725
+ username: string | (() => string | undefined) | undefined;
726
+ password: string | (() => string | undefined) | undefined;
727
+ } | {
728
+ type: "Custom";
729
+ prefix: string | (() => string | undefined) | undefined;
730
+ value: string | (() => string | undefined) | undefined;
731
+ }) | undefined;
732
+ body?: (Partial<{
733
+ newEmail: string;
734
+ callbackURL?: string | undefined;
735
+ }> & Record<string, any>) | undefined;
736
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
737
+ params?: Record<string, any> | undefined;
738
+ duplex?: "full" | "half" | undefined;
739
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
740
+ retry?: better_auth_react.RetryOptions | undefined;
741
+ retryAttempt?: number | undefined;
742
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
743
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
744
+ disableValidation?: boolean | undefined;
745
+ }>(data_0: Prettify<{
746
+ newEmail: string;
747
+ callbackURL?: string | undefined;
748
+ } & {
749
+ fetchOptions?: FetchOptions | undefined;
750
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
751
+ status: boolean;
752
+ }, {
753
+ code?: string;
754
+ message?: string;
755
+ }, FetchOptions["throw"] extends true ? true : false>>;
756
+ } & {
757
+ changePassword: <FetchOptions extends {
758
+ credentials?: RequestCredentials | undefined;
759
+ method?: string | undefined;
760
+ headers?: (HeadersInit & (HeadersInit | {
761
+ accept: "application/json" | "text/plain" | "application/octet-stream";
762
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
763
+ authorization: "Bearer" | "Basic";
764
+ })) | undefined;
765
+ cache?: RequestCache | undefined;
766
+ integrity?: string | undefined;
767
+ keepalive?: boolean | undefined;
768
+ mode?: RequestMode | undefined;
769
+ priority?: RequestPriority | undefined;
770
+ redirect?: RequestRedirect | undefined;
771
+ referrer?: string | undefined;
772
+ referrerPolicy?: ReferrerPolicy | undefined;
773
+ signal?: (AbortSignal | null) | undefined;
774
+ window?: null | undefined;
775
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
776
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
777
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
778
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
779
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
780
+ hookOptions?: {
781
+ cloneResponse?: boolean;
782
+ } | undefined;
783
+ timeout?: number | undefined;
784
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
785
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
786
+ baseURL?: string | undefined;
787
+ throw?: boolean | undefined;
788
+ auth?: ({
789
+ type: "Bearer";
790
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
791
+ } | {
792
+ type: "Basic";
793
+ username: string | (() => string | undefined) | undefined;
794
+ password: string | (() => string | undefined) | undefined;
795
+ } | {
796
+ type: "Custom";
797
+ prefix: string | (() => string | undefined) | undefined;
798
+ value: string | (() => string | undefined) | undefined;
799
+ }) | undefined;
800
+ body?: (Partial<{
801
+ newPassword: string;
802
+ currentPassword: string;
803
+ revokeOtherSessions?: boolean | undefined;
804
+ }> & Record<string, any>) | undefined;
805
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
806
+ params?: Record<string, any> | undefined;
807
+ duplex?: "full" | "half" | undefined;
808
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
809
+ retry?: better_auth_react.RetryOptions | undefined;
810
+ retryAttempt?: number | undefined;
811
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
812
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
813
+ disableValidation?: boolean | undefined;
814
+ }>(data_0: Prettify<{
815
+ newPassword: string;
816
+ currentPassword: string;
817
+ revokeOtherSessions?: boolean | undefined;
818
+ } & {
819
+ fetchOptions?: FetchOptions | undefined;
820
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
821
+ token: string | null;
822
+ user: {
823
+ id: string;
824
+ email: string;
825
+ name: string;
826
+ image: string | null | undefined;
827
+ emailVerified: boolean;
828
+ createdAt: Date;
829
+ updatedAt: Date;
830
+ };
831
+ }, {
832
+ code?: string;
833
+ message?: string;
834
+ }, FetchOptions["throw"] extends true ? true : false>>;
835
+ } & {
836
+ updateUser: <FetchOptions extends {
837
+ credentials?: RequestCredentials | undefined;
838
+ method?: string | undefined;
839
+ headers?: (HeadersInit & (HeadersInit | {
840
+ accept: "application/json" | "text/plain" | "application/octet-stream";
841
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
842
+ authorization: "Bearer" | "Basic";
843
+ })) | undefined;
844
+ cache?: RequestCache | undefined;
845
+ integrity?: string | undefined;
846
+ keepalive?: boolean | undefined;
847
+ mode?: RequestMode | undefined;
848
+ priority?: RequestPriority | undefined;
849
+ redirect?: RequestRedirect | undefined;
850
+ referrer?: string | undefined;
851
+ referrerPolicy?: ReferrerPolicy | undefined;
852
+ signal?: (AbortSignal | null) | undefined;
853
+ window?: null | undefined;
854
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
855
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
856
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
857
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
858
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
859
+ hookOptions?: {
860
+ cloneResponse?: boolean;
861
+ } | undefined;
862
+ timeout?: number | undefined;
863
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
864
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
865
+ baseURL?: string | undefined;
866
+ throw?: boolean | undefined;
867
+ auth?: ({
868
+ type: "Bearer";
869
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
870
+ } | {
871
+ type: "Basic";
872
+ username: string | (() => string | undefined) | undefined;
873
+ password: string | (() => string | undefined) | undefined;
874
+ } | {
875
+ type: "Custom";
876
+ prefix: string | (() => string | undefined) | undefined;
877
+ value: string | (() => string | undefined) | undefined;
878
+ }) | undefined;
879
+ body?: (Partial<Partial<{}> & {
880
+ name?: string;
881
+ image?: string;
882
+ }> & Record<string, any>) | undefined;
883
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
884
+ params?: Record<string, any> | undefined;
885
+ duplex?: "full" | "half" | undefined;
886
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
887
+ retry?: better_auth_react.RetryOptions | undefined;
888
+ retryAttempt?: number | undefined;
889
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
890
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
891
+ disableValidation?: boolean | undefined;
892
+ }>(data_0?: Prettify<{
893
+ image?: string | null;
894
+ name?: string;
895
+ fetchOptions?: FetchOptions | undefined;
896
+ } & Partial<{}>> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
897
+ status: boolean;
898
+ }, {
899
+ code?: string;
900
+ message?: string;
901
+ }, FetchOptions["throw"] extends true ? true : false>>;
902
+ } & {
903
+ deleteUser: <FetchOptions extends {
904
+ credentials?: RequestCredentials | undefined;
905
+ method?: string | undefined;
906
+ headers?: (HeadersInit & (HeadersInit | {
907
+ accept: "application/json" | "text/plain" | "application/octet-stream";
908
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
909
+ authorization: "Bearer" | "Basic";
910
+ })) | undefined;
911
+ cache?: RequestCache | undefined;
912
+ integrity?: string | undefined;
913
+ keepalive?: boolean | undefined;
914
+ mode?: RequestMode | undefined;
915
+ priority?: RequestPriority | undefined;
916
+ redirect?: RequestRedirect | undefined;
917
+ referrer?: string | undefined;
918
+ referrerPolicy?: ReferrerPolicy | undefined;
919
+ signal?: (AbortSignal | null) | undefined;
920
+ window?: null | undefined;
921
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
922
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
923
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
924
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
925
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
926
+ hookOptions?: {
927
+ cloneResponse?: boolean;
928
+ } | undefined;
929
+ timeout?: number | undefined;
930
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
931
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
932
+ baseURL?: string | undefined;
933
+ throw?: boolean | undefined;
934
+ auth?: ({
935
+ type: "Bearer";
936
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
937
+ } | {
938
+ type: "Basic";
939
+ username: string | (() => string | undefined) | undefined;
940
+ password: string | (() => string | undefined) | undefined;
941
+ } | {
942
+ type: "Custom";
943
+ prefix: string | (() => string | undefined) | undefined;
944
+ value: string | (() => string | undefined) | undefined;
945
+ }) | undefined;
946
+ body?: (Partial<{
947
+ callbackURL?: string | undefined;
948
+ password?: string | undefined;
949
+ token?: string | undefined;
950
+ }> & Record<string, any>) | undefined;
951
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
952
+ params?: Record<string, any> | undefined;
953
+ duplex?: "full" | "half" | undefined;
954
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
955
+ retry?: better_auth_react.RetryOptions | undefined;
956
+ retryAttempt?: number | undefined;
957
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
958
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
959
+ disableValidation?: boolean | undefined;
960
+ }>(data_0?: Prettify<{
961
+ callbackURL?: string | undefined;
962
+ password?: string | undefined;
963
+ token?: string | undefined;
964
+ } & {
965
+ fetchOptions?: FetchOptions | undefined;
966
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
967
+ success: boolean;
968
+ message: string;
969
+ }, {
970
+ code?: string;
971
+ message?: string;
972
+ }, FetchOptions["throw"] extends true ? true : false>>;
973
+ } & {
974
+ resetPassword: {
975
+ ":token": <FetchOptions extends {
976
+ credentials?: RequestCredentials | undefined;
977
+ method?: string | undefined;
978
+ headers?: (HeadersInit & (HeadersInit | {
979
+ accept: "application/json" | "text/plain" | "application/octet-stream";
980
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
981
+ authorization: "Bearer" | "Basic";
982
+ })) | undefined;
983
+ cache?: RequestCache | undefined;
984
+ integrity?: string | undefined;
985
+ keepalive?: boolean | undefined;
986
+ mode?: RequestMode | undefined;
987
+ priority?: RequestPriority | undefined;
988
+ redirect?: RequestRedirect | undefined;
989
+ referrer?: string | undefined;
990
+ referrerPolicy?: ReferrerPolicy | undefined;
991
+ signal?: (AbortSignal | null) | undefined;
992
+ window?: null | undefined;
993
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
994
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
995
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
996
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
997
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
998
+ hookOptions?: {
999
+ cloneResponse?: boolean;
1000
+ } | undefined;
1001
+ timeout?: number | undefined;
1002
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
1003
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
1004
+ baseURL?: string | undefined;
1005
+ throw?: boolean | undefined;
1006
+ auth?: ({
1007
+ type: "Bearer";
1008
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1009
+ } | {
1010
+ type: "Basic";
1011
+ username: string | (() => string | undefined) | undefined;
1012
+ password: string | (() => string | undefined) | undefined;
1013
+ } | {
1014
+ type: "Custom";
1015
+ prefix: string | (() => string | undefined) | undefined;
1016
+ value: string | (() => string | undefined) | undefined;
1017
+ }) | undefined;
1018
+ body?: undefined;
1019
+ query?: (Partial<{
1020
+ callbackURL: string;
1021
+ }> & Record<string, any>) | undefined;
1022
+ params?: {
1023
+ token: string;
1024
+ } | undefined;
1025
+ duplex?: "full" | "half" | undefined;
1026
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1027
+ retry?: better_auth_react.RetryOptions | undefined;
1028
+ retryAttempt?: number | undefined;
1029
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1030
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
1031
+ disableValidation?: boolean | undefined;
1032
+ }>(data_0: Prettify<{
1033
+ query: {
1034
+ callbackURL: string;
1035
+ };
1036
+ fetchOptions?: FetchOptions | undefined;
1037
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<never, {
1038
+ code?: string;
1039
+ message?: string;
1040
+ }, FetchOptions["throw"] extends true ? true : false>>;
1041
+ };
1042
+ } & {
1043
+ requestPasswordReset: <FetchOptions extends {
1044
+ credentials?: RequestCredentials | undefined;
1045
+ method?: string | undefined;
1046
+ headers?: (HeadersInit & (HeadersInit | {
1047
+ accept: "application/json" | "text/plain" | "application/octet-stream";
1048
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
1049
+ authorization: "Bearer" | "Basic";
1050
+ })) | undefined;
1051
+ cache?: RequestCache | undefined;
1052
+ integrity?: string | undefined;
1053
+ keepalive?: boolean | undefined;
1054
+ mode?: RequestMode | undefined;
1055
+ priority?: RequestPriority | undefined;
1056
+ redirect?: RequestRedirect | undefined;
1057
+ referrer?: string | undefined;
1058
+ referrerPolicy?: ReferrerPolicy | undefined;
1059
+ signal?: (AbortSignal | null) | undefined;
1060
+ window?: null | undefined;
1061
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
1062
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
1063
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
1064
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
1065
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
1066
+ hookOptions?: {
1067
+ cloneResponse?: boolean;
1068
+ } | undefined;
1069
+ timeout?: number | undefined;
1070
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
1071
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
1072
+ baseURL?: string | undefined;
1073
+ throw?: boolean | undefined;
1074
+ auth?: ({
1075
+ type: "Bearer";
1076
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1077
+ } | {
1078
+ type: "Basic";
1079
+ username: string | (() => string | undefined) | undefined;
1080
+ password: string | (() => string | undefined) | undefined;
1081
+ } | {
1082
+ type: "Custom";
1083
+ prefix: string | (() => string | undefined) | undefined;
1084
+ value: string | (() => string | undefined) | undefined;
1085
+ }) | undefined;
1086
+ body?: (Partial<{
1087
+ email: string;
1088
+ redirectTo?: string | undefined;
1089
+ }> & Record<string, any>) | undefined;
1090
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
1091
+ params?: Record<string, any> | undefined;
1092
+ duplex?: "full" | "half" | undefined;
1093
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1094
+ retry?: better_auth_react.RetryOptions | undefined;
1095
+ retryAttempt?: number | undefined;
1096
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1097
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
1098
+ disableValidation?: boolean | undefined;
1099
+ }>(data_0: Prettify<{
1100
+ email: string;
1101
+ redirectTo?: string | undefined;
1102
+ } & {
1103
+ fetchOptions?: FetchOptions | undefined;
1104
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
1105
+ status: boolean;
1106
+ message: string;
1107
+ }, {
1108
+ code?: string;
1109
+ message?: string;
1110
+ }, FetchOptions["throw"] extends true ? true : false>>;
1111
+ } & {
1112
+ resetPassword: {
1113
+ ":token": <FetchOptions extends {
1114
+ credentials?: RequestCredentials | undefined;
1115
+ method?: string | undefined;
1116
+ headers?: (HeadersInit & (HeadersInit | {
1117
+ accept: "application/json" | "text/plain" | "application/octet-stream";
1118
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
1119
+ authorization: "Bearer" | "Basic";
1120
+ })) | undefined;
1121
+ cache?: RequestCache | undefined;
1122
+ integrity?: string | undefined;
1123
+ keepalive?: boolean | undefined;
1124
+ mode?: RequestMode | undefined;
1125
+ priority?: RequestPriority | undefined;
1126
+ redirect?: RequestRedirect | undefined;
1127
+ referrer?: string | undefined;
1128
+ referrerPolicy?: ReferrerPolicy | undefined;
1129
+ signal?: (AbortSignal | null) | undefined;
1130
+ window?: null | undefined;
1131
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
1132
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
1133
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
1134
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
1135
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
1136
+ hookOptions?: {
1137
+ cloneResponse?: boolean;
1138
+ } | undefined;
1139
+ timeout?: number | undefined;
1140
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
1141
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
1142
+ baseURL?: string | undefined;
1143
+ throw?: boolean | undefined;
1144
+ auth?: ({
1145
+ type: "Bearer";
1146
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1147
+ } | {
1148
+ type: "Basic";
1149
+ username: string | (() => string | undefined) | undefined;
1150
+ password: string | (() => string | undefined) | undefined;
1151
+ } | {
1152
+ type: "Custom";
1153
+ prefix: string | (() => string | undefined) | undefined;
1154
+ value: string | (() => string | undefined) | undefined;
1155
+ }) | undefined;
1156
+ body?: undefined;
1157
+ query?: (Partial<{
1158
+ callbackURL: string;
1159
+ }> & Record<string, any>) | undefined;
1160
+ params?: {
1161
+ token: string;
1162
+ } | undefined;
1163
+ duplex?: "full" | "half" | undefined;
1164
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1165
+ retry?: better_auth_react.RetryOptions | undefined;
1166
+ retryAttempt?: number | undefined;
1167
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1168
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
1169
+ disableValidation?: boolean | undefined;
1170
+ }>(data_0: Prettify<{
1171
+ query: {
1172
+ callbackURL: string;
1173
+ };
1174
+ fetchOptions?: FetchOptions | undefined;
1175
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<never, {
1176
+ code?: string;
1177
+ message?: string;
1178
+ }, FetchOptions["throw"] extends true ? true : false>>;
1179
+ };
1180
+ } & {
1181
+ listSessions: <FetchOptions extends {
1182
+ credentials?: RequestCredentials | undefined;
1183
+ method?: string | undefined;
1184
+ headers?: (HeadersInit & (HeadersInit | {
1185
+ accept: "application/json" | "text/plain" | "application/octet-stream";
1186
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
1187
+ authorization: "Bearer" | "Basic";
1188
+ })) | undefined;
1189
+ cache?: RequestCache | undefined;
1190
+ integrity?: string | undefined;
1191
+ keepalive?: boolean | undefined;
1192
+ mode?: RequestMode | undefined;
1193
+ priority?: RequestPriority | undefined;
1194
+ redirect?: RequestRedirect | undefined;
1195
+ referrer?: string | undefined;
1196
+ referrerPolicy?: ReferrerPolicy | undefined;
1197
+ signal?: (AbortSignal | null) | undefined;
1198
+ window?: null | undefined;
1199
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
1200
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
1201
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
1202
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
1203
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
1204
+ hookOptions?: {
1205
+ cloneResponse?: boolean;
1206
+ } | undefined;
1207
+ timeout?: number | undefined;
1208
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
1209
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
1210
+ baseURL?: string | undefined;
1211
+ throw?: boolean | undefined;
1212
+ auth?: ({
1213
+ type: "Bearer";
1214
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1215
+ } | {
1216
+ type: "Basic";
1217
+ username: string | (() => string | undefined) | undefined;
1218
+ password: string | (() => string | undefined) | undefined;
1219
+ } | {
1220
+ type: "Custom";
1221
+ prefix: string | (() => string | undefined) | undefined;
1222
+ value: string | (() => string | undefined) | undefined;
1223
+ }) | undefined;
1224
+ body?: undefined;
1225
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
1226
+ params?: Record<string, any> | undefined;
1227
+ duplex?: "full" | "half" | undefined;
1228
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1229
+ retry?: better_auth_react.RetryOptions | undefined;
1230
+ retryAttempt?: number | undefined;
1231
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1232
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
1233
+ disableValidation?: boolean | undefined;
1234
+ }>(data_0?: Prettify<{
1235
+ query?: Record<string, any> | undefined;
1236
+ fetchOptions?: FetchOptions | undefined;
1237
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<Prettify<{
1238
+ id: string;
1239
+ createdAt: Date;
1240
+ updatedAt: Date;
1241
+ userId: string;
1242
+ expiresAt: Date;
1243
+ token: string;
1244
+ ipAddress?: string | null | undefined | undefined;
1245
+ userAgent?: string | null | undefined | undefined;
1246
+ }>[], {
1247
+ code?: string;
1248
+ message?: string;
1249
+ }, FetchOptions["throw"] extends true ? true : false>>;
1250
+ } & {
1251
+ revokeSession: <FetchOptions extends {
1252
+ credentials?: RequestCredentials | undefined;
1253
+ method?: string | undefined;
1254
+ headers?: (HeadersInit & (HeadersInit | {
1255
+ accept: "application/json" | "text/plain" | "application/octet-stream";
1256
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
1257
+ authorization: "Bearer" | "Basic";
1258
+ })) | undefined;
1259
+ cache?: RequestCache | undefined;
1260
+ integrity?: string | undefined;
1261
+ keepalive?: boolean | undefined;
1262
+ mode?: RequestMode | undefined;
1263
+ priority?: RequestPriority | undefined;
1264
+ redirect?: RequestRedirect | undefined;
1265
+ referrer?: string | undefined;
1266
+ referrerPolicy?: ReferrerPolicy | undefined;
1267
+ signal?: (AbortSignal | null) | undefined;
1268
+ window?: null | undefined;
1269
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
1270
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
1271
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
1272
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
1273
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
1274
+ hookOptions?: {
1275
+ cloneResponse?: boolean;
1276
+ } | undefined;
1277
+ timeout?: number | undefined;
1278
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
1279
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
1280
+ baseURL?: string | undefined;
1281
+ throw?: boolean | undefined;
1282
+ auth?: ({
1283
+ type: "Bearer";
1284
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1285
+ } | {
1286
+ type: "Basic";
1287
+ username: string | (() => string | undefined) | undefined;
1288
+ password: string | (() => string | undefined) | undefined;
1289
+ } | {
1290
+ type: "Custom";
1291
+ prefix: string | (() => string | undefined) | undefined;
1292
+ value: string | (() => string | undefined) | undefined;
1293
+ }) | undefined;
1294
+ body?: (Partial<{
1295
+ token: string;
1296
+ }> & Record<string, any>) | undefined;
1297
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
1298
+ params?: Record<string, any> | undefined;
1299
+ duplex?: "full" | "half" | undefined;
1300
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1301
+ retry?: better_auth_react.RetryOptions | undefined;
1302
+ retryAttempt?: number | undefined;
1303
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1304
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
1305
+ disableValidation?: boolean | undefined;
1306
+ }>(data_0: Prettify<{
1307
+ token: string;
1308
+ } & {
1309
+ fetchOptions?: FetchOptions | undefined;
1310
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
1311
+ status: boolean;
1312
+ }, {
1313
+ code?: string;
1314
+ message?: string;
1315
+ }, FetchOptions["throw"] extends true ? true : false>>;
1316
+ } & {
1317
+ revokeSessions: <FetchOptions extends {
1318
+ credentials?: RequestCredentials | undefined;
1319
+ method?: string | undefined;
1320
+ headers?: (HeadersInit & (HeadersInit | {
1321
+ accept: "application/json" | "text/plain" | "application/octet-stream";
1322
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
1323
+ authorization: "Bearer" | "Basic";
1324
+ })) | undefined;
1325
+ cache?: RequestCache | undefined;
1326
+ integrity?: string | undefined;
1327
+ keepalive?: boolean | undefined;
1328
+ mode?: RequestMode | undefined;
1329
+ priority?: RequestPriority | undefined;
1330
+ redirect?: RequestRedirect | undefined;
1331
+ referrer?: string | undefined;
1332
+ referrerPolicy?: ReferrerPolicy | undefined;
1333
+ signal?: (AbortSignal | null) | undefined;
1334
+ window?: null | undefined;
1335
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
1336
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
1337
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
1338
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
1339
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
1340
+ hookOptions?: {
1341
+ cloneResponse?: boolean;
1342
+ } | undefined;
1343
+ timeout?: number | undefined;
1344
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
1345
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
1346
+ baseURL?: string | undefined;
1347
+ throw?: boolean | undefined;
1348
+ auth?: ({
1349
+ type: "Bearer";
1350
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1351
+ } | {
1352
+ type: "Basic";
1353
+ username: string | (() => string | undefined) | undefined;
1354
+ password: string | (() => string | undefined) | undefined;
1355
+ } | {
1356
+ type: "Custom";
1357
+ prefix: string | (() => string | undefined) | undefined;
1358
+ value: string | (() => string | undefined) | undefined;
1359
+ }) | undefined;
1360
+ body?: undefined;
1361
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
1362
+ params?: Record<string, any> | undefined;
1363
+ duplex?: "full" | "half" | undefined;
1364
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1365
+ retry?: better_auth_react.RetryOptions | undefined;
1366
+ retryAttempt?: number | undefined;
1367
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1368
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
1369
+ disableValidation?: boolean | undefined;
1370
+ }>(data_0?: Prettify<{
1371
+ query?: Record<string, any> | undefined;
1372
+ fetchOptions?: FetchOptions | undefined;
1373
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
1374
+ status: boolean;
1375
+ }, {
1376
+ code?: string;
1377
+ message?: string;
1378
+ }, FetchOptions["throw"] extends true ? true : false>>;
1379
+ } & {
1380
+ revokeOtherSessions: <FetchOptions extends {
1381
+ credentials?: RequestCredentials | undefined;
1382
+ method?: string | undefined;
1383
+ headers?: (HeadersInit & (HeadersInit | {
1384
+ accept: "application/json" | "text/plain" | "application/octet-stream";
1385
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
1386
+ authorization: "Bearer" | "Basic";
1387
+ })) | undefined;
1388
+ cache?: RequestCache | undefined;
1389
+ integrity?: string | undefined;
1390
+ keepalive?: boolean | undefined;
1391
+ mode?: RequestMode | undefined;
1392
+ priority?: RequestPriority | undefined;
1393
+ redirect?: RequestRedirect | undefined;
1394
+ referrer?: string | undefined;
1395
+ referrerPolicy?: ReferrerPolicy | undefined;
1396
+ signal?: (AbortSignal | null) | undefined;
1397
+ window?: null | undefined;
1398
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
1399
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
1400
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
1401
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
1402
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
1403
+ hookOptions?: {
1404
+ cloneResponse?: boolean;
1405
+ } | undefined;
1406
+ timeout?: number | undefined;
1407
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
1408
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
1409
+ baseURL?: string | undefined;
1410
+ throw?: boolean | undefined;
1411
+ auth?: ({
1412
+ type: "Bearer";
1413
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1414
+ } | {
1415
+ type: "Basic";
1416
+ username: string | (() => string | undefined) | undefined;
1417
+ password: string | (() => string | undefined) | undefined;
1418
+ } | {
1419
+ type: "Custom";
1420
+ prefix: string | (() => string | undefined) | undefined;
1421
+ value: string | (() => string | undefined) | undefined;
1422
+ }) | undefined;
1423
+ body?: undefined;
1424
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
1425
+ params?: Record<string, any> | undefined;
1426
+ duplex?: "full" | "half" | undefined;
1427
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1428
+ retry?: better_auth_react.RetryOptions | undefined;
1429
+ retryAttempt?: number | undefined;
1430
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1431
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
1432
+ disableValidation?: boolean | undefined;
1433
+ }>(data_0?: Prettify<{
1434
+ query?: Record<string, any> | undefined;
1435
+ fetchOptions?: FetchOptions | undefined;
1436
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
1437
+ status: boolean;
1438
+ }, {
1439
+ code?: string;
1440
+ message?: string;
1441
+ }, FetchOptions["throw"] extends true ? true : false>>;
1442
+ } & {
1443
+ linkSocial: <FetchOptions extends {
1444
+ credentials?: RequestCredentials | undefined;
1445
+ method?: string | undefined;
1446
+ headers?: (HeadersInit & (HeadersInit | {
1447
+ accept: "application/json" | "text/plain" | "application/octet-stream";
1448
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
1449
+ authorization: "Bearer" | "Basic";
1450
+ })) | undefined;
1451
+ cache?: RequestCache | undefined;
1452
+ integrity?: string | undefined;
1453
+ keepalive?: boolean | undefined;
1454
+ mode?: RequestMode | undefined;
1455
+ priority?: RequestPriority | undefined;
1456
+ redirect?: RequestRedirect | undefined;
1457
+ referrer?: string | undefined;
1458
+ referrerPolicy?: ReferrerPolicy | undefined;
1459
+ signal?: (AbortSignal | null) | undefined;
1460
+ window?: null | undefined;
1461
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
1462
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
1463
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
1464
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
1465
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
1466
+ hookOptions?: {
1467
+ cloneResponse?: boolean;
1468
+ } | undefined;
1469
+ timeout?: number | undefined;
1470
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
1471
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
1472
+ baseURL?: string | undefined;
1473
+ throw?: boolean | undefined;
1474
+ auth?: ({
1475
+ type: "Bearer";
1476
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1477
+ } | {
1478
+ type: "Basic";
1479
+ username: string | (() => string | undefined) | undefined;
1480
+ password: string | (() => string | undefined) | undefined;
1481
+ } | {
1482
+ type: "Custom";
1483
+ prefix: string | (() => string | undefined) | undefined;
1484
+ value: string | (() => string | undefined) | undefined;
1485
+ }) | undefined;
1486
+ body?: (Partial<{
1487
+ provider: unknown;
1488
+ callbackURL?: string | undefined;
1489
+ idToken?: {
1490
+ token: string;
1491
+ nonce?: string | undefined;
1492
+ accessToken?: string | undefined;
1493
+ refreshToken?: string | undefined;
1494
+ scopes?: string[] | undefined;
1495
+ } | undefined;
1496
+ requestSignUp?: boolean | undefined;
1497
+ scopes?: string[] | undefined;
1498
+ errorCallbackURL?: string | undefined;
1499
+ disableRedirect?: boolean | undefined;
1500
+ }> & Record<string, any>) | undefined;
1501
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
1502
+ params?: Record<string, any> | undefined;
1503
+ duplex?: "full" | "half" | undefined;
1504
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1505
+ retry?: better_auth_react.RetryOptions | undefined;
1506
+ retryAttempt?: number | undefined;
1507
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1508
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
1509
+ disableValidation?: boolean | undefined;
1510
+ }>(data_0: Prettify<{
1511
+ provider: unknown;
1512
+ callbackURL?: string | undefined;
1513
+ idToken?: {
1514
+ token: string;
1515
+ nonce?: string | undefined;
1516
+ accessToken?: string | undefined;
1517
+ refreshToken?: string | undefined;
1518
+ scopes?: string[] | undefined;
1519
+ } | undefined;
1520
+ requestSignUp?: boolean | undefined;
1521
+ scopes?: string[] | undefined;
1522
+ errorCallbackURL?: string | undefined;
1523
+ disableRedirect?: boolean | undefined;
1524
+ } & {
1525
+ fetchOptions?: FetchOptions | undefined;
1526
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
1527
+ url: string;
1528
+ redirect: boolean;
1529
+ }, {
1530
+ code?: string;
1531
+ message?: string;
1532
+ }, FetchOptions["throw"] extends true ? true : false>>;
1533
+ } & {
1534
+ listAccounts: <FetchOptions extends {
1535
+ credentials?: RequestCredentials | undefined;
1536
+ method?: string | undefined;
1537
+ headers?: (HeadersInit & (HeadersInit | {
1538
+ accept: "application/json" | "text/plain" | "application/octet-stream";
1539
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
1540
+ authorization: "Bearer" | "Basic";
1541
+ })) | undefined;
1542
+ cache?: RequestCache | undefined;
1543
+ integrity?: string | undefined;
1544
+ keepalive?: boolean | undefined;
1545
+ mode?: RequestMode | undefined;
1546
+ priority?: RequestPriority | undefined;
1547
+ redirect?: RequestRedirect | undefined;
1548
+ referrer?: string | undefined;
1549
+ referrerPolicy?: ReferrerPolicy | undefined;
1550
+ signal?: (AbortSignal | null) | undefined;
1551
+ window?: null | undefined;
1552
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
1553
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
1554
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
1555
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
1556
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
1557
+ hookOptions?: {
1558
+ cloneResponse?: boolean;
1559
+ } | undefined;
1560
+ timeout?: number | undefined;
1561
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
1562
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
1563
+ baseURL?: string | undefined;
1564
+ throw?: boolean | undefined;
1565
+ auth?: ({
1566
+ type: "Bearer";
1567
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1568
+ } | {
1569
+ type: "Basic";
1570
+ username: string | (() => string | undefined) | undefined;
1571
+ password: string | (() => string | undefined) | undefined;
1572
+ } | {
1573
+ type: "Custom";
1574
+ prefix: string | (() => string | undefined) | undefined;
1575
+ value: string | (() => string | undefined) | undefined;
1576
+ }) | undefined;
1577
+ body?: undefined;
1578
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
1579
+ params?: Record<string, any> | undefined;
1580
+ duplex?: "full" | "half" | undefined;
1581
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1582
+ retry?: better_auth_react.RetryOptions | undefined;
1583
+ retryAttempt?: number | undefined;
1584
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1585
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
1586
+ disableValidation?: boolean | undefined;
1587
+ }>(data_0?: Prettify<{
1588
+ query?: Record<string, any> | undefined;
1589
+ fetchOptions?: FetchOptions | undefined;
1590
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
1591
+ id: string;
1592
+ providerId: string;
1593
+ createdAt: Date;
1594
+ updatedAt: Date;
1595
+ accountId: string;
1596
+ scopes: string[];
1597
+ }[], {
1598
+ code?: string;
1599
+ message?: string;
1600
+ }, FetchOptions["throw"] extends true ? true : false>>;
1601
+ } & {
1602
+ deleteUser: {
1603
+ callback: <FetchOptions extends {
1604
+ credentials?: RequestCredentials | undefined;
1605
+ method?: string | undefined;
1606
+ headers?: (HeadersInit & (HeadersInit | {
1607
+ accept: "application/json" | "text/plain" | "application/octet-stream";
1608
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
1609
+ authorization: "Bearer" | "Basic";
1610
+ })) | undefined;
1611
+ cache?: RequestCache | undefined;
1612
+ integrity?: string | undefined;
1613
+ keepalive?: boolean | undefined;
1614
+ mode?: RequestMode | undefined;
1615
+ priority?: RequestPriority | undefined;
1616
+ redirect?: RequestRedirect | undefined;
1617
+ referrer?: string | undefined;
1618
+ referrerPolicy?: ReferrerPolicy | undefined;
1619
+ signal?: (AbortSignal | null) | undefined;
1620
+ window?: null | undefined;
1621
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
1622
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
1623
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
1624
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
1625
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
1626
+ hookOptions?: {
1627
+ cloneResponse?: boolean;
1628
+ } | undefined;
1629
+ timeout?: number | undefined;
1630
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
1631
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
1632
+ baseURL?: string | undefined;
1633
+ throw?: boolean | undefined;
1634
+ auth?: ({
1635
+ type: "Bearer";
1636
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1637
+ } | {
1638
+ type: "Basic";
1639
+ username: string | (() => string | undefined) | undefined;
1640
+ password: string | (() => string | undefined) | undefined;
1641
+ } | {
1642
+ type: "Custom";
1643
+ prefix: string | (() => string | undefined) | undefined;
1644
+ value: string | (() => string | undefined) | undefined;
1645
+ }) | undefined;
1646
+ body?: undefined;
1647
+ query?: (Partial<{
1648
+ token: string;
1649
+ callbackURL?: string | undefined;
1650
+ }> & Record<string, any>) | undefined;
1651
+ params?: Record<string, any> | undefined;
1652
+ duplex?: "full" | "half" | undefined;
1653
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1654
+ retry?: better_auth_react.RetryOptions | undefined;
1655
+ retryAttempt?: number | undefined;
1656
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1657
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
1658
+ disableValidation?: boolean | undefined;
1659
+ }>(data_0: Prettify<{
1660
+ query: {
1661
+ token: string;
1662
+ callbackURL?: string | undefined;
1663
+ };
1664
+ fetchOptions?: FetchOptions | undefined;
1665
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
1666
+ success: boolean;
1667
+ message: string;
1668
+ }, {
1669
+ code?: string;
1670
+ message?: string;
1671
+ }, FetchOptions["throw"] extends true ? true : false>>;
1672
+ };
1673
+ } & {
1674
+ unlinkAccount: <FetchOptions extends {
1675
+ credentials?: RequestCredentials | undefined;
1676
+ method?: string | undefined;
1677
+ headers?: (HeadersInit & (HeadersInit | {
1678
+ accept: "application/json" | "text/plain" | "application/octet-stream";
1679
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
1680
+ authorization: "Bearer" | "Basic";
1681
+ })) | undefined;
1682
+ cache?: RequestCache | undefined;
1683
+ integrity?: string | undefined;
1684
+ keepalive?: boolean | undefined;
1685
+ mode?: RequestMode | undefined;
1686
+ priority?: RequestPriority | undefined;
1687
+ redirect?: RequestRedirect | undefined;
1688
+ referrer?: string | undefined;
1689
+ referrerPolicy?: ReferrerPolicy | undefined;
1690
+ signal?: (AbortSignal | null) | undefined;
1691
+ window?: null | undefined;
1692
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
1693
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
1694
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
1695
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
1696
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
1697
+ hookOptions?: {
1698
+ cloneResponse?: boolean;
1699
+ } | undefined;
1700
+ timeout?: number | undefined;
1701
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
1702
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
1703
+ baseURL?: string | undefined;
1704
+ throw?: boolean | undefined;
1705
+ auth?: ({
1706
+ type: "Bearer";
1707
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1708
+ } | {
1709
+ type: "Basic";
1710
+ username: string | (() => string | undefined) | undefined;
1711
+ password: string | (() => string | undefined) | undefined;
1712
+ } | {
1713
+ type: "Custom";
1714
+ prefix: string | (() => string | undefined) | undefined;
1715
+ value: string | (() => string | undefined) | undefined;
1716
+ }) | undefined;
1717
+ body?: (Partial<{
1718
+ providerId: string;
1719
+ accountId?: string | undefined;
1720
+ }> & Record<string, any>) | undefined;
1721
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
1722
+ params?: Record<string, any> | undefined;
1723
+ duplex?: "full" | "half" | undefined;
1724
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1725
+ retry?: better_auth_react.RetryOptions | undefined;
1726
+ retryAttempt?: number | undefined;
1727
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1728
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
1729
+ disableValidation?: boolean | undefined;
1730
+ }>(data_0: Prettify<{
1731
+ providerId: string;
1732
+ accountId?: string | undefined;
1733
+ } & {
1734
+ fetchOptions?: FetchOptions | undefined;
1735
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
1736
+ status: boolean;
1737
+ }, {
1738
+ code?: string;
1739
+ message?: string;
1740
+ }, FetchOptions["throw"] extends true ? true : false>>;
1741
+ } & {
1742
+ refreshToken: <FetchOptions extends {
1743
+ credentials?: RequestCredentials | undefined;
1744
+ method?: string | undefined;
1745
+ headers?: (HeadersInit & (HeadersInit | {
1746
+ accept: "application/json" | "text/plain" | "application/octet-stream";
1747
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
1748
+ authorization: "Bearer" | "Basic";
1749
+ })) | undefined;
1750
+ cache?: RequestCache | undefined;
1751
+ integrity?: string | undefined;
1752
+ keepalive?: boolean | undefined;
1753
+ mode?: RequestMode | undefined;
1754
+ priority?: RequestPriority | undefined;
1755
+ redirect?: RequestRedirect | undefined;
1756
+ referrer?: string | undefined;
1757
+ referrerPolicy?: ReferrerPolicy | undefined;
1758
+ signal?: (AbortSignal | null) | undefined;
1759
+ window?: null | undefined;
1760
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
1761
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
1762
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
1763
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
1764
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
1765
+ hookOptions?: {
1766
+ cloneResponse?: boolean;
1767
+ } | undefined;
1768
+ timeout?: number | undefined;
1769
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
1770
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
1771
+ baseURL?: string | undefined;
1772
+ throw?: boolean | undefined;
1773
+ auth?: ({
1774
+ type: "Bearer";
1775
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1776
+ } | {
1777
+ type: "Basic";
1778
+ username: string | (() => string | undefined) | undefined;
1779
+ password: string | (() => string | undefined) | undefined;
1780
+ } | {
1781
+ type: "Custom";
1782
+ prefix: string | (() => string | undefined) | undefined;
1783
+ value: string | (() => string | undefined) | undefined;
1784
+ }) | undefined;
1785
+ body?: (Partial<{
1786
+ providerId: string;
1787
+ accountId?: string | undefined;
1788
+ userId?: string | undefined;
1789
+ }> & Record<string, any>) | undefined;
1790
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
1791
+ params?: Record<string, any> | undefined;
1792
+ duplex?: "full" | "half" | undefined;
1793
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1794
+ retry?: better_auth_react.RetryOptions | undefined;
1795
+ retryAttempt?: number | undefined;
1796
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1797
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
1798
+ disableValidation?: boolean | undefined;
1799
+ }>(data_0: Prettify<{
1800
+ providerId: string;
1801
+ accountId?: string | undefined;
1802
+ userId?: string | undefined;
1803
+ } & {
1804
+ fetchOptions?: FetchOptions | undefined;
1805
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<any, {
1806
+ code?: string;
1807
+ message?: string;
1808
+ }, FetchOptions["throw"] extends true ? true : false>>;
1809
+ } & {
1810
+ getAccessToken: <FetchOptions extends {
1811
+ credentials?: RequestCredentials | undefined;
1812
+ method?: string | undefined;
1813
+ headers?: (HeadersInit & (HeadersInit | {
1814
+ accept: "application/json" | "text/plain" | "application/octet-stream";
1815
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
1816
+ authorization: "Bearer" | "Basic";
1817
+ })) | undefined;
1818
+ cache?: RequestCache | undefined;
1819
+ integrity?: string | undefined;
1820
+ keepalive?: boolean | undefined;
1821
+ mode?: RequestMode | undefined;
1822
+ priority?: RequestPriority | undefined;
1823
+ redirect?: RequestRedirect | undefined;
1824
+ referrer?: string | undefined;
1825
+ referrerPolicy?: ReferrerPolicy | undefined;
1826
+ signal?: (AbortSignal | null) | undefined;
1827
+ window?: null | undefined;
1828
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
1829
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
1830
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
1831
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
1832
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
1833
+ hookOptions?: {
1834
+ cloneResponse?: boolean;
1835
+ } | undefined;
1836
+ timeout?: number | undefined;
1837
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
1838
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
1839
+ baseURL?: string | undefined;
1840
+ throw?: boolean | undefined;
1841
+ auth?: ({
1842
+ type: "Bearer";
1843
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1844
+ } | {
1845
+ type: "Basic";
1846
+ username: string | (() => string | undefined) | undefined;
1847
+ password: string | (() => string | undefined) | undefined;
1848
+ } | {
1849
+ type: "Custom";
1850
+ prefix: string | (() => string | undefined) | undefined;
1851
+ value: string | (() => string | undefined) | undefined;
1852
+ }) | undefined;
1853
+ body?: (Partial<{
1854
+ providerId: string;
1855
+ accountId?: string | undefined;
1856
+ userId?: string | undefined;
1857
+ }> & Record<string, any>) | undefined;
1858
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
1859
+ params?: Record<string, any> | undefined;
1860
+ duplex?: "full" | "half" | undefined;
1861
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1862
+ retry?: better_auth_react.RetryOptions | undefined;
1863
+ retryAttempt?: number | undefined;
1864
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1865
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
1866
+ disableValidation?: boolean | undefined;
1867
+ }>(data_0: Prettify<{
1868
+ providerId: string;
1869
+ accountId?: string | undefined;
1870
+ userId?: string | undefined;
1871
+ } & {
1872
+ fetchOptions?: FetchOptions | undefined;
1873
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
1874
+ accessToken: string;
1875
+ accessTokenExpiresAt: Date | undefined;
1876
+ scopes: string[];
1877
+ idToken: string | undefined;
1878
+ }, {
1879
+ code?: string;
1880
+ message?: string;
1881
+ }, FetchOptions["throw"] extends true ? true : false>>;
1882
+ } & {
1883
+ accountInfo: <FetchOptions extends {
1884
+ credentials?: RequestCredentials | undefined;
1885
+ method?: string | undefined;
1886
+ headers?: (HeadersInit & (HeadersInit | {
1887
+ accept: "application/json" | "text/plain" | "application/octet-stream";
1888
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
1889
+ authorization: "Bearer" | "Basic";
1890
+ })) | undefined;
1891
+ cache?: RequestCache | undefined;
1892
+ integrity?: string | undefined;
1893
+ keepalive?: boolean | undefined;
1894
+ mode?: RequestMode | undefined;
1895
+ priority?: RequestPriority | undefined;
1896
+ redirect?: RequestRedirect | undefined;
1897
+ referrer?: string | undefined;
1898
+ referrerPolicy?: ReferrerPolicy | undefined;
1899
+ signal?: (AbortSignal | null) | undefined;
1900
+ window?: null | undefined;
1901
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
1902
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
1903
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
1904
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
1905
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
1906
+ hookOptions?: {
1907
+ cloneResponse?: boolean;
1908
+ } | undefined;
1909
+ timeout?: number | undefined;
1910
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
1911
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
1912
+ baseURL?: string | undefined;
1913
+ throw?: boolean | undefined;
1914
+ auth?: ({
1915
+ type: "Bearer";
1916
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1917
+ } | {
1918
+ type: "Basic";
1919
+ username: string | (() => string | undefined) | undefined;
1920
+ password: string | (() => string | undefined) | undefined;
1921
+ } | {
1922
+ type: "Custom";
1923
+ prefix: string | (() => string | undefined) | undefined;
1924
+ value: string | (() => string | undefined) | undefined;
1925
+ }) | undefined;
1926
+ body?: (Partial<{
1927
+ accountId: string;
1928
+ }> & Record<string, any>) | undefined;
1929
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
1930
+ params?: Record<string, any> | undefined;
1931
+ duplex?: "full" | "half" | undefined;
1932
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1933
+ retry?: better_auth_react.RetryOptions | undefined;
1934
+ retryAttempt?: number | undefined;
1935
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1936
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
1937
+ disableValidation?: boolean | undefined;
1938
+ }>(data_0: Prettify<{
1939
+ accountId: string;
1940
+ } & {
1941
+ fetchOptions?: FetchOptions | undefined;
1942
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
1943
+ user: packages_core_dist_oauth2.OAuth2UserInfo;
1944
+ data: Record<string, any>;
1945
+ }, {
1946
+ code?: string;
1947
+ message?: string;
1948
+ }, FetchOptions["throw"] extends true ? true : false>>;
1949
+ } & {
1950
+ getSession: <FetchOptions extends {
1951
+ credentials?: RequestCredentials | undefined;
1952
+ method?: string | undefined;
1953
+ headers?: (HeadersInit & (HeadersInit | {
1954
+ accept: "application/json" | "text/plain" | "application/octet-stream";
1955
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
1956
+ authorization: "Bearer" | "Basic";
1957
+ })) | undefined;
1958
+ cache?: RequestCache | undefined;
1959
+ integrity?: string | undefined;
1960
+ keepalive?: boolean | undefined;
1961
+ mode?: RequestMode | undefined;
1962
+ priority?: RequestPriority | undefined;
1963
+ redirect?: RequestRedirect | undefined;
1964
+ referrer?: string | undefined;
1965
+ referrerPolicy?: ReferrerPolicy | undefined;
1966
+ signal?: (AbortSignal | null) | undefined;
1967
+ window?: null | undefined;
1968
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
1969
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
1970
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
1971
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
1972
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
1973
+ hookOptions?: {
1974
+ cloneResponse?: boolean;
1975
+ } | undefined;
1976
+ timeout?: number | undefined;
1977
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
1978
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
1979
+ baseURL?: string | undefined;
1980
+ throw?: boolean | undefined;
1981
+ auth?: ({
1982
+ type: "Bearer";
1983
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1984
+ } | {
1985
+ type: "Basic";
1986
+ username: string | (() => string | undefined) | undefined;
1987
+ password: string | (() => string | undefined) | undefined;
1988
+ } | {
1989
+ type: "Custom";
1990
+ prefix: string | (() => string | undefined) | undefined;
1991
+ value: string | (() => string | undefined) | undefined;
1992
+ }) | undefined;
1993
+ body?: undefined;
1994
+ query?: (Partial<{
1995
+ disableCookieCache?: unknown;
1996
+ disableRefresh?: unknown;
1997
+ }> & Record<string, any>) | undefined;
1998
+ params?: Record<string, any> | undefined;
1999
+ duplex?: "full" | "half" | undefined;
2000
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
2001
+ retry?: better_auth_react.RetryOptions | undefined;
2002
+ retryAttempt?: number | undefined;
2003
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
2004
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
2005
+ disableValidation?: boolean | undefined;
2006
+ }>(data_0?: Prettify<{
2007
+ query?: {
2008
+ disableCookieCache?: unknown;
2009
+ disableRefresh?: unknown;
2010
+ } | undefined;
2011
+ fetchOptions?: FetchOptions | undefined;
2012
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
2013
+ user: {
2014
+ id: string;
2015
+ createdAt: Date;
2016
+ updatedAt: Date;
2017
+ email: string;
2018
+ emailVerified: boolean;
2019
+ name: string;
2020
+ image?: string | null | undefined;
2021
+ };
2022
+ session: {
2023
+ id: string;
2024
+ createdAt: Date;
2025
+ updatedAt: Date;
2026
+ userId: string;
2027
+ expiresAt: Date;
2028
+ token: string;
2029
+ ipAddress?: string | null | undefined;
2030
+ userAgent?: string | null | undefined;
2031
+ };
2032
+ } | null, {
2033
+ code?: string;
2034
+ message?: string;
2035
+ }, FetchOptions["throw"] extends true ? true : false>>;
2036
+ } & {
2037
+ useSession: () => {
2038
+ data: {
2039
+ user: {
2040
+ id: string;
2041
+ createdAt: Date;
2042
+ updatedAt: Date;
2043
+ email: string;
2044
+ emailVerified: boolean;
2045
+ name: string;
2046
+ image?: string | null | undefined;
2047
+ };
2048
+ session: {
2049
+ id: string;
2050
+ createdAt: Date;
2051
+ updatedAt: Date;
2052
+ userId: string;
2053
+ expiresAt: Date;
2054
+ token: string;
2055
+ ipAddress?: string | null | undefined;
2056
+ userAgent?: string | null | undefined;
2057
+ };
2058
+ } | null;
2059
+ isPending: boolean;
2060
+ isRefetching: boolean;
2061
+ error: better_auth_react.BetterFetchError | null;
2062
+ refetch: (queryParams?: {
2063
+ query?: SessionQueryParams;
2064
+ }) => void;
2065
+ };
2066
+ $Infer: {
2067
+ Session: {
2068
+ user: {
2069
+ id: string;
2070
+ createdAt: Date;
2071
+ updatedAt: Date;
2072
+ email: string;
2073
+ emailVerified: boolean;
2074
+ name: string;
2075
+ image?: string | null | undefined;
2076
+ };
2077
+ session: {
2078
+ id: string;
2079
+ createdAt: Date;
2080
+ updatedAt: Date;
2081
+ userId: string;
2082
+ expiresAt: Date;
2083
+ token: string;
2084
+ ipAddress?: string | null | undefined;
2085
+ userAgent?: string | null | undefined;
2086
+ };
2087
+ };
2088
+ };
2089
+ $fetch: better_auth_react.BetterFetch<{
2090
+ plugins: (better_auth_react.BetterFetchPlugin | {
2091
+ id: string;
2092
+ name: string;
2093
+ hooks: {
2094
+ onSuccess: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
2095
+ onError: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
2096
+ onRequest: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
2097
+ onResponse: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
2098
+ };
2099
+ } | {
2100
+ id: string;
2101
+ name: string;
2102
+ hooks: {
2103
+ onSuccess(context: better_auth_react.SuccessContext<any>): void;
2104
+ };
2105
+ })[];
2106
+ method: string;
2107
+ headers?: (HeadersInit & (HeadersInit | {
2108
+ accept: "application/json" | "text/plain" | "application/octet-stream";
2109
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
2110
+ authorization: "Bearer" | "Basic";
2111
+ })) | undefined;
2112
+ redirect?: RequestRedirect | undefined;
2113
+ cache?: RequestCache | undefined;
2114
+ credentials?: RequestCredentials;
2115
+ integrity?: string | undefined;
2116
+ keepalive?: boolean | undefined;
2117
+ mode?: RequestMode | undefined;
2118
+ priority?: RequestPriority | undefined;
2119
+ referrer?: string | undefined;
2120
+ referrerPolicy?: ReferrerPolicy | undefined;
2121
+ signal?: (AbortSignal | null) | undefined;
2122
+ window?: null | undefined;
2123
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
2124
+ hookOptions?: {
2125
+ cloneResponse?: boolean;
2126
+ } | undefined;
2127
+ timeout?: number | undefined;
2128
+ customFetchImpl: better_auth_react.FetchEsque;
2129
+ baseURL: string;
2130
+ throw?: boolean | undefined;
2131
+ auth?: ({
2132
+ type: "Bearer";
2133
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
2134
+ } | {
2135
+ type: "Basic";
2136
+ username: string | (() => string | undefined) | undefined;
2137
+ password: string | (() => string | undefined) | undefined;
2138
+ } | {
2139
+ type: "Custom";
2140
+ prefix: string | (() => string | undefined) | undefined;
2141
+ value: string | (() => string | undefined) | undefined;
2142
+ }) | undefined;
2143
+ body?: any;
2144
+ query?: any;
2145
+ params?: any;
2146
+ duplex?: "full" | "half" | undefined;
2147
+ jsonParser: (text: string) => Promise<any> | any;
2148
+ retry?: better_auth_react.RetryOptions | undefined;
2149
+ retryAttempt?: number | undefined;
2150
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
2151
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
2152
+ disableValidation?: boolean | undefined;
2153
+ }, unknown, unknown, {}>;
2154
+ $store: {
2155
+ notify: (signal?: Omit<string, "$sessionSignal"> | "$sessionSignal") => void;
2156
+ listen: (signal: Omit<string, "$sessionSignal"> | "$sessionSignal", listener: (value: boolean, oldValue?: boolean | undefined) => void) => void;
2157
+ atoms: Record<string, better_auth_react.WritableAtom<any>>;
2158
+ };
2159
+ $ERROR_CODES: {
2160
+ readonly USER_NOT_FOUND: "User not found";
2161
+ readonly FAILED_TO_CREATE_USER: "Failed to create user";
2162
+ readonly FAILED_TO_CREATE_SESSION: "Failed to create session";
2163
+ readonly FAILED_TO_UPDATE_USER: "Failed to update user";
2164
+ readonly FAILED_TO_GET_SESSION: "Failed to get session";
2165
+ readonly INVALID_PASSWORD: "Invalid password";
2166
+ readonly INVALID_EMAIL: "Invalid email";
2167
+ readonly INVALID_EMAIL_OR_PASSWORD: "Invalid email or password";
2168
+ readonly SOCIAL_ACCOUNT_ALREADY_LINKED: "Social account already linked";
2169
+ readonly PROVIDER_NOT_FOUND: "Provider not found";
2170
+ readonly INVALID_TOKEN: "Invalid token";
2171
+ readonly ID_TOKEN_NOT_SUPPORTED: "id_token not supported";
2172
+ readonly FAILED_TO_GET_USER_INFO: "Failed to get user info";
2173
+ readonly USER_EMAIL_NOT_FOUND: "User email not found";
2174
+ readonly EMAIL_NOT_VERIFIED: "Email not verified";
2175
+ readonly PASSWORD_TOO_SHORT: "Password too short";
2176
+ readonly PASSWORD_TOO_LONG: "Password too long";
2177
+ readonly USER_ALREADY_EXISTS: "User already exists.";
2178
+ readonly USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL: "User already exists. Use another email.";
2179
+ readonly EMAIL_CAN_NOT_BE_UPDATED: "Email can not be updated";
2180
+ readonly CREDENTIAL_ACCOUNT_NOT_FOUND: "Credential account not found";
2181
+ readonly SESSION_EXPIRED: "Session expired. Re-authenticate to perform this action.";
2182
+ readonly FAILED_TO_UNLINK_LAST_ACCOUNT: "You can't unlink your last account";
2183
+ readonly ACCOUNT_NOT_FOUND: "Account not found";
2184
+ readonly USER_ALREADY_HAS_PASSWORD: "User already has a password. Provide that to delete the account.";
2185
+ };
2186
+ };
2187
+ /**
2188
+ * Type helper for inferring the dashboard client type
2189
+ */
2190
+ type DashboardClient = ReturnType<typeof createDashboardClient>;
2191
+
2192
+ /**
2193
+ * @erikey/react - React SDK with Sandpack support
2194
+ *
2195
+ * Wraps universal @erikey/js client with browser-specific enhancements:
2196
+ * - Sandpack/iframe detection
2197
+ * - localStorage token storage for cross-origin iframes
2198
+ * - Automatic fallback when cookies are blocked
2199
+ */
2200
+
2201
+ /**
2202
+ * Create auth client with Sandpack support
2203
+ *
2204
+ * Wraps the universal client and adds:
2205
+ * - Automatic Sandpack detection
2206
+ * - localStorage token storage for iframes
2207
+ * - Bearer token fallback when cookies blocked
2208
+ */
2209
+ declare function createAuthClient(config: AuthClientConfig): AuthClient$1;
2210
+ /**
2211
+ * Type helper for inferring the auth client type
2212
+ */
2213
+ type AuthClient = ReturnType<typeof createAuthClient>;
2214
+
2215
+ export { type AuthClient, type DashboardClient, type DashboardClientConfig, createAuthClient, createDashboardClient };