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