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