@choiceform/shared-auth 0.1.13 → 0.1.15

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