deesse 0.2.13 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +17 -34
  3. package/dist/index.d.ts +23 -32
  4. package/dist/index.d.ts.map +1 -1
  5. package/dist/index.js +9 -126
  6. package/dist/index.types.d.ts +15 -0
  7. package/dist/index.types.d.ts.map +1 -0
  8. package/dist/index.types.js +1 -0
  9. package/dist/next.d.ts +3 -0
  10. package/dist/next.d.ts.map +1 -0
  11. package/dist/next.js +7 -0
  12. package/dist/paths.d.ts +3 -0
  13. package/dist/paths.d.ts.map +1 -0
  14. package/dist/paths.js +2 -0
  15. package/dist/plugin-api.d.ts +3 -0
  16. package/dist/plugin-api.d.ts.map +1 -0
  17. package/dist/plugin-api.js +5 -0
  18. package/dist/react-types.d.ts +30 -0
  19. package/dist/react-types.d.ts.map +1 -0
  20. package/dist/react-types.js +1 -0
  21. package/dist/react.d.ts +9 -0
  22. package/dist/react.d.ts.map +1 -0
  23. package/dist/react.js +15 -0
  24. package/dist/runtime-types.d.ts +20 -0
  25. package/dist/runtime-types.d.ts.map +1 -0
  26. package/dist/runtime-types.js +1 -0
  27. package/dist/runtime.d.ts +11 -0
  28. package/dist/runtime.d.ts.map +1 -0
  29. package/dist/runtime.js +169 -0
  30. package/dist/types.d.ts +298 -0
  31. package/dist/types.d.ts.map +1 -0
  32. package/dist/types.js +1 -0
  33. package/package.json +52 -39
  34. package/.turbo/turbo-build.log +0 -4
  35. package/.turbo/turbo-lint.log +0 -19
  36. package/.turbo/turbo-type-check.log +0 -4
  37. package/dist/cache.d.ts +0 -16
  38. package/dist/cache.d.ts.map +0 -1
  39. package/dist/cache.js +0 -59
  40. package/dist/cache.js.map +0 -1
  41. package/dist/client.d.ts +0 -816
  42. package/dist/client.d.ts.map +0 -1
  43. package/dist/client.js +0 -23
  44. package/dist/client.js.map +0 -1
  45. package/dist/config/define.d.ts +0 -61
  46. package/dist/config/define.d.ts.map +0 -1
  47. package/dist/config/define.js +0 -66
  48. package/dist/config/define.js.map +0 -1
  49. package/dist/config/index.d.ts +0 -7
  50. package/dist/config/index.d.ts.map +0 -1
  51. package/dist/config/index.js +0 -4
  52. package/dist/config/index.js.map +0 -1
  53. package/dist/config/page.d.ts +0 -30
  54. package/dist/config/page.d.ts.map +0 -1
  55. package/dist/config/page.js +0 -22
  56. package/dist/config/page.js.map +0 -1
  57. package/dist/config/plugin.d.ts +0 -10
  58. package/dist/config/plugin.d.ts.map +0 -1
  59. package/dist/config/plugin.js +0 -10
  60. package/dist/config/plugin.js.map +0 -1
  61. package/dist/index.js.map +0 -1
  62. package/dist/lib/admin.d.ts +0 -33
  63. package/dist/lib/admin.d.ts.map +0 -1
  64. package/dist/lib/admin.js +0 -69
  65. package/dist/lib/admin.js.map +0 -1
  66. package/dist/lib/validation.d.ts +0 -32
  67. package/dist/lib/validation.d.ts.map +0 -1
  68. package/dist/lib/validation.js +0 -80
  69. package/dist/lib/validation.js.map +0 -1
  70. package/dist/server.d.ts +0 -9
  71. package/dist/server.d.ts.map +0 -1
  72. package/dist/server.js +0 -19
  73. package/dist/server.js.map +0 -1
  74. package/src/cache.ts +0 -81
  75. package/src/client.ts +0 -30
  76. package/src/config/define.ts +0 -135
  77. package/src/config/index.ts +0 -6
  78. package/src/config/page.ts +0 -54
  79. package/src/config/plugin.ts +0 -21
  80. package/src/index.ts +0 -166
  81. package/src/server.ts +0 -28
  82. package/tsconfig.json +0 -12
package/dist/client.d.ts DELETED
@@ -1,816 +0,0 @@
1
- import type { BetterAuthClientOptions } from "better-auth/client";
2
- export interface DeesseClientOptions {
3
- auth: BetterAuthClientOptions;
4
- }
5
- /**
6
- * Creates a type-safe authentication client.
7
- * Wraps better-auth's createAuthClient with a simpler API.
8
- *
9
- * @example
10
- * ```typescript
11
- * import { createClient } from "deesse";
12
- *
13
- * export const client = createClient({
14
- * auth: {
15
- * baseURL: "/api/auth",
16
- * },
17
- * });
18
- *
19
- * // In a component:
20
- * const { data, isPending } = client.auth.useSession();
21
- * ```
22
- */
23
- export declare function createClient(options: DeesseClientOptions): {
24
- auth: {
25
- signIn: {
26
- social: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
27
- provider: (string & {}) | "linear" | "huggingface" | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat";
28
- callbackURL?: string | undefined;
29
- newUserCallbackURL?: string | undefined;
30
- errorCallbackURL?: string | undefined;
31
- disableRedirect?: boolean | undefined;
32
- idToken?: {
33
- token: string;
34
- nonce?: string | undefined;
35
- accessToken?: string | undefined;
36
- refreshToken?: string | undefined;
37
- expiresAt?: number | undefined;
38
- user?: {
39
- name?: {
40
- firstName?: string | undefined;
41
- lastName?: string | undefined;
42
- } | undefined;
43
- email?: string | undefined;
44
- } | undefined;
45
- } | undefined;
46
- scopes?: string[] | undefined;
47
- requestSignUp?: boolean | undefined;
48
- loginHint?: string | undefined;
49
- additionalData?: Record<string, any> | undefined;
50
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
51
- provider: (string & {}) | "linear" | "huggingface" | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat";
52
- callbackURL?: string | undefined;
53
- newUserCallbackURL?: string | undefined;
54
- errorCallbackURL?: string | undefined;
55
- disableRedirect?: boolean | undefined;
56
- idToken?: {
57
- token: string;
58
- nonce?: string | undefined;
59
- accessToken?: string | undefined;
60
- refreshToken?: string | undefined;
61
- expiresAt?: number | undefined;
62
- user?: {
63
- name?: {
64
- firstName?: string | undefined;
65
- lastName?: string | undefined;
66
- } | undefined;
67
- email?: string | undefined;
68
- } | undefined;
69
- } | undefined;
70
- scopes?: string[] | undefined;
71
- requestSignUp?: boolean | undefined;
72
- loginHint?: string | undefined;
73
- additionalData?: Record<string, any> | undefined;
74
- } & {
75
- fetchOptions?: FetchOptions | undefined;
76
- }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
77
- redirect: boolean;
78
- url: string;
79
- } | (Omit<{
80
- redirect: boolean;
81
- token: string;
82
- url: undefined;
83
- user: {
84
- id: string;
85
- createdAt: Date;
86
- updatedAt: Date;
87
- email: string;
88
- emailVerified: boolean;
89
- name: string;
90
- image?: string | null | undefined | undefined;
91
- };
92
- }, "user"> & {
93
- user: import("better-auth").StripEmptyObjects<{
94
- id: string;
95
- createdAt: Date;
96
- updatedAt: Date;
97
- email: string;
98
- emailVerified: boolean;
99
- name: string;
100
- image?: string | null | undefined;
101
- }>;
102
- }), {
103
- code?: string | undefined;
104
- message?: string | undefined;
105
- }, FetchOptions["throw"] extends true ? true : false>>;
106
- };
107
- } & {
108
- signOut: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
109
- query?: Record<string, any> | undefined;
110
- fetchOptions?: FetchOptions | undefined;
111
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
112
- success: boolean;
113
- }, {
114
- code?: string | undefined;
115
- message?: string | undefined;
116
- }, FetchOptions["throw"] extends true ? true : false>>;
117
- } & {
118
- signUp: {
119
- email: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
120
- name: string;
121
- email: string;
122
- password: string;
123
- image?: string | undefined;
124
- callbackURL?: string | undefined;
125
- rememberMe?: boolean | undefined;
126
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
127
- email: string;
128
- name: string;
129
- password: string;
130
- image?: string | undefined;
131
- callbackURL?: string | undefined;
132
- fetchOptions?: FetchOptions | undefined;
133
- }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<(Omit<{
134
- token: null;
135
- user: {
136
- id: string;
137
- createdAt: Date;
138
- updatedAt: Date;
139
- email: string;
140
- emailVerified: boolean;
141
- name: string;
142
- image?: string | null | undefined | undefined;
143
- };
144
- }, "user"> & {
145
- user: import("better-auth").StripEmptyObjects<{
146
- id: string;
147
- createdAt: Date;
148
- updatedAt: Date;
149
- email: string;
150
- emailVerified: boolean;
151
- name: string;
152
- image?: string | null | undefined;
153
- }>;
154
- }) | (Omit<{
155
- token: string;
156
- user: {
157
- id: string;
158
- createdAt: Date;
159
- updatedAt: Date;
160
- email: string;
161
- emailVerified: boolean;
162
- name: string;
163
- image?: string | null | undefined | undefined;
164
- };
165
- }, "user"> & {
166
- user: import("better-auth").StripEmptyObjects<{
167
- id: string;
168
- createdAt: Date;
169
- updatedAt: Date;
170
- email: string;
171
- emailVerified: boolean;
172
- name: string;
173
- image?: string | null | undefined;
174
- }>;
175
- }), {
176
- code?: string | undefined;
177
- message?: string | undefined;
178
- }, FetchOptions["throw"] extends true ? true : false>>;
179
- };
180
- } & {
181
- signIn: {
182
- email: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
183
- email: string;
184
- password: string;
185
- callbackURL?: string | undefined;
186
- rememberMe?: boolean | undefined;
187
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
188
- email: string;
189
- password: string;
190
- callbackURL?: string | undefined;
191
- rememberMe?: boolean | undefined;
192
- } & {
193
- fetchOptions?: FetchOptions | undefined;
194
- }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<Omit<{
195
- redirect: boolean;
196
- token: string;
197
- url?: string | undefined;
198
- user: {
199
- id: string;
200
- createdAt: Date;
201
- updatedAt: Date;
202
- email: string;
203
- emailVerified: boolean;
204
- name: string;
205
- image?: string | null | undefined | undefined;
206
- };
207
- }, "user"> & {
208
- user: import("better-auth").StripEmptyObjects<{
209
- id: string;
210
- createdAt: Date;
211
- updatedAt: Date;
212
- email: string;
213
- emailVerified: boolean;
214
- name: string;
215
- image?: string | null | undefined;
216
- }>;
217
- }, {
218
- code?: string | undefined;
219
- message?: string | undefined;
220
- }, FetchOptions["throw"] extends true ? true : false>>;
221
- };
222
- } & {
223
- resetPassword: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
224
- newPassword: string;
225
- token?: string | undefined;
226
- }> & Record<string, any>, Partial<{
227
- token?: string | undefined;
228
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
229
- newPassword: string;
230
- token?: string | undefined;
231
- } & {
232
- fetchOptions?: FetchOptions | undefined;
233
- }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
234
- status: boolean;
235
- }, {
236
- code?: string | undefined;
237
- message?: string | undefined;
238
- }, FetchOptions["throw"] extends true ? true : false>>;
239
- } & {
240
- verifyEmail: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<{
241
- token: string;
242
- callbackURL?: string | undefined;
243
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
244
- query: {
245
- token: string;
246
- callbackURL?: string | undefined;
247
- };
248
- fetchOptions?: FetchOptions | undefined;
249
- }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<NonNullable<void | {
250
- status: boolean;
251
- }>, {
252
- code?: string | undefined;
253
- message?: string | undefined;
254
- }, FetchOptions["throw"] extends true ? true : false>>;
255
- } & {
256
- sendVerificationEmail: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
257
- email: string;
258
- callbackURL?: string | undefined;
259
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
260
- email: string;
261
- callbackURL?: string | undefined;
262
- } & {
263
- fetchOptions?: FetchOptions | undefined;
264
- }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
265
- status: boolean;
266
- }, {
267
- code?: string | undefined;
268
- message?: string | undefined;
269
- }, FetchOptions["throw"] extends true ? true : false>>;
270
- } & {
271
- changeEmail: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
272
- newEmail: string;
273
- callbackURL?: string | undefined;
274
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
275
- newEmail: string;
276
- callbackURL?: string | undefined;
277
- } & {
278
- fetchOptions?: FetchOptions | undefined;
279
- }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
280
- status: boolean;
281
- }, {
282
- code?: string | undefined;
283
- message?: string | undefined;
284
- }, FetchOptions["throw"] extends true ? true : false>>;
285
- } & {
286
- changePassword: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
287
- newPassword: string;
288
- currentPassword: string;
289
- revokeOtherSessions?: boolean | undefined;
290
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
291
- newPassword: string;
292
- currentPassword: string;
293
- revokeOtherSessions?: boolean | undefined;
294
- } & {
295
- fetchOptions?: FetchOptions | undefined;
296
- }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<Omit<{
297
- token: string | null;
298
- user: {
299
- id: string;
300
- createdAt: Date;
301
- updatedAt: Date;
302
- email: string;
303
- emailVerified: boolean;
304
- name: string;
305
- image?: string | null | undefined;
306
- } & Record<string, any> & {
307
- id: string;
308
- createdAt: Date;
309
- updatedAt: Date;
310
- email: string;
311
- emailVerified: boolean;
312
- name: string;
313
- image?: string | null | undefined;
314
- };
315
- }, "user"> & {
316
- user: import("better-auth").StripEmptyObjects<{
317
- id: string;
318
- createdAt: Date;
319
- updatedAt: Date;
320
- email: string;
321
- emailVerified: boolean;
322
- name: string;
323
- image?: string | null | undefined;
324
- }>;
325
- }, {
326
- code?: string | undefined;
327
- message?: string | undefined;
328
- }, FetchOptions["throw"] extends true ? true : false>>;
329
- } & {
330
- updateSession: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<Partial<{}>> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<Partial<{}> & {
331
- fetchOptions?: FetchOptions | undefined;
332
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
333
- session: {
334
- id: string;
335
- createdAt: Date;
336
- updatedAt: Date;
337
- userId: string;
338
- expiresAt: Date;
339
- token: string;
340
- ipAddress?: string | null | undefined;
341
- userAgent?: string | null | undefined;
342
- };
343
- }, {
344
- code?: string | undefined;
345
- message?: string | undefined;
346
- }, FetchOptions["throw"] extends true ? true : false>>;
347
- } & {
348
- updateUser: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<Partial<{}> & {
349
- name?: string | undefined;
350
- image?: string | undefined | null;
351
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<import("better-auth/client").InferUserUpdateCtx<BetterAuthClientOptions, FetchOptions>> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
352
- status: boolean;
353
- }, {
354
- code?: string | undefined;
355
- message?: string | undefined;
356
- }, FetchOptions["throw"] extends true ? true : false>>;
357
- } & {
358
- deleteUser: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
359
- callbackURL?: string | undefined;
360
- password?: string | undefined;
361
- token?: string | undefined;
362
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
363
- callbackURL?: string | undefined;
364
- password?: string | undefined;
365
- token?: string | undefined;
366
- } & {
367
- fetchOptions?: FetchOptions | undefined;
368
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
369
- success: boolean;
370
- message: string;
371
- }, {
372
- code?: string | undefined;
373
- message?: string | undefined;
374
- }, FetchOptions["throw"] extends true ? true : false>>;
375
- } & {
376
- requestPasswordReset: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
377
- email: string;
378
- redirectTo?: string | undefined;
379
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
380
- email: string;
381
- redirectTo?: string | undefined;
382
- } & {
383
- fetchOptions?: FetchOptions | undefined;
384
- }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
385
- status: boolean;
386
- message: string;
387
- }, {
388
- code?: string | undefined;
389
- message?: string | undefined;
390
- }, FetchOptions["throw"] extends true ? true : false>>;
391
- } & {
392
- resetPassword: {
393
- ":token": <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<{
394
- callbackURL: string;
395
- }> & Record<string, any>, {
396
- token: string;
397
- }>>(data_0: import("better-auth").Prettify<{
398
- query: {
399
- callbackURL: string;
400
- };
401
- fetchOptions?: FetchOptions | undefined;
402
- }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<never, {
403
- code?: string | undefined;
404
- message?: string | undefined;
405
- }, FetchOptions["throw"] extends true ? true : false>>;
406
- };
407
- } & {
408
- listSessions: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
409
- query?: Record<string, any> | undefined;
410
- fetchOptions?: FetchOptions | undefined;
411
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<import("better-auth").Prettify<{
412
- id: string;
413
- createdAt: Date;
414
- updatedAt: Date;
415
- userId: string;
416
- expiresAt: Date;
417
- token: string;
418
- ipAddress?: string | null | undefined | undefined;
419
- userAgent?: string | null | undefined | undefined;
420
- }>[], {
421
- code?: string | undefined;
422
- message?: string | undefined;
423
- }, FetchOptions["throw"] extends true ? true : false>>;
424
- } & {
425
- revokeSession: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
426
- token: string;
427
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
428
- token: string;
429
- } & {
430
- fetchOptions?: FetchOptions | undefined;
431
- }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
432
- status: boolean;
433
- }, {
434
- code?: string | undefined;
435
- message?: string | undefined;
436
- }, FetchOptions["throw"] extends true ? true : false>>;
437
- } & {
438
- revokeSessions: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
439
- query?: Record<string, any> | undefined;
440
- fetchOptions?: FetchOptions | undefined;
441
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
442
- status: boolean;
443
- }, {
444
- code?: string | undefined;
445
- message?: string | undefined;
446
- }, FetchOptions["throw"] extends true ? true : false>>;
447
- } & {
448
- revokeOtherSessions: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
449
- query?: Record<string, any> | undefined;
450
- fetchOptions?: FetchOptions | undefined;
451
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
452
- status: boolean;
453
- }, {
454
- code?: string | undefined;
455
- message?: string | undefined;
456
- }, FetchOptions["throw"] extends true ? true : false>>;
457
- } & {
458
- linkSocial: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
459
- provider: unknown;
460
- callbackURL?: string | undefined;
461
- idToken?: {
462
- token: string;
463
- nonce?: string | undefined;
464
- accessToken?: string | undefined;
465
- refreshToken?: string | undefined;
466
- scopes?: string[] | undefined;
467
- } | undefined;
468
- requestSignUp?: boolean | undefined;
469
- scopes?: string[] | undefined;
470
- errorCallbackURL?: string | undefined;
471
- disableRedirect?: boolean | undefined;
472
- additionalData?: Record<string, any> | undefined;
473
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
474
- provider: unknown;
475
- callbackURL?: string | undefined;
476
- idToken?: {
477
- token: string;
478
- nonce?: string | undefined;
479
- accessToken?: string | undefined;
480
- refreshToken?: string | undefined;
481
- scopes?: string[] | undefined;
482
- } | undefined;
483
- requestSignUp?: boolean | undefined;
484
- scopes?: string[] | undefined;
485
- errorCallbackURL?: string | undefined;
486
- disableRedirect?: boolean | undefined;
487
- additionalData?: Record<string, any> | undefined;
488
- } & {
489
- fetchOptions?: FetchOptions | undefined;
490
- }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
491
- url: string;
492
- redirect: boolean;
493
- }, {
494
- code?: string | undefined;
495
- message?: string | undefined;
496
- }, FetchOptions["throw"] extends true ? true : false>>;
497
- } & {
498
- listAccounts: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
499
- query?: Record<string, any> | undefined;
500
- fetchOptions?: FetchOptions | undefined;
501
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
502
- scopes: string[];
503
- id: string;
504
- createdAt: Date;
505
- updatedAt: Date;
506
- userId: string;
507
- providerId: string;
508
- accountId: string;
509
- }[], {
510
- code?: string | undefined;
511
- message?: string | undefined;
512
- }, FetchOptions["throw"] extends true ? true : false>>;
513
- } & {
514
- deleteUser: {
515
- callback: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<{
516
- token: string;
517
- callbackURL?: string | undefined;
518
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
519
- query: {
520
- token: string;
521
- callbackURL?: string | undefined;
522
- };
523
- fetchOptions?: FetchOptions | undefined;
524
- }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
525
- success: boolean;
526
- message: string;
527
- }, {
528
- code?: string | undefined;
529
- message?: string | undefined;
530
- }, FetchOptions["throw"] extends true ? true : false>>;
531
- };
532
- } & {
533
- unlinkAccount: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
534
- providerId: string;
535
- accountId?: string | undefined;
536
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
537
- providerId: string;
538
- accountId?: string | undefined;
539
- } & {
540
- fetchOptions?: FetchOptions | undefined;
541
- }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
542
- status: boolean;
543
- }, {
544
- code?: string | undefined;
545
- message?: string | undefined;
546
- }, FetchOptions["throw"] extends true ? true : false>>;
547
- } & {
548
- refreshToken: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
549
- providerId: string;
550
- accountId?: string | undefined;
551
- userId?: string | undefined;
552
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
553
- providerId: string;
554
- accountId?: string | undefined;
555
- userId?: string | undefined;
556
- } & {
557
- fetchOptions?: FetchOptions | undefined;
558
- }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
559
- accessToken: string | undefined;
560
- refreshToken: string;
561
- accessTokenExpiresAt: Date | undefined;
562
- refreshTokenExpiresAt: Date | null | undefined;
563
- scope: string | null | undefined;
564
- idToken: string | null | undefined;
565
- providerId: string;
566
- accountId: string;
567
- }, {
568
- code?: string | undefined;
569
- message?: string | undefined;
570
- }, FetchOptions["throw"] extends true ? true : false>>;
571
- } & {
572
- getAccessToken: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
573
- providerId: string;
574
- accountId?: string | undefined;
575
- userId?: string | undefined;
576
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
577
- providerId: string;
578
- accountId?: string | undefined;
579
- userId?: string | undefined;
580
- } & {
581
- fetchOptions?: FetchOptions | undefined;
582
- }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
583
- accessToken: string;
584
- accessTokenExpiresAt: Date | undefined;
585
- scopes: string[];
586
- idToken: string | undefined;
587
- }, {
588
- code?: string | undefined;
589
- message?: string | undefined;
590
- }, FetchOptions["throw"] extends true ? true : false>>;
591
- } & {
592
- accountInfo: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<{
593
- accountId?: string | undefined;
594
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
595
- query?: {
596
- accountId?: string | undefined;
597
- } | undefined;
598
- fetchOptions?: FetchOptions | undefined;
599
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
600
- user: import("better-auth").OAuth2UserInfo;
601
- data: Record<string, any>;
602
- }, {
603
- code?: string | undefined;
604
- message?: string | undefined;
605
- }, FetchOptions["throw"] extends true ? true : false>>;
606
- } & {
607
- getSession: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<{
608
- disableCookieCache?: unknown;
609
- disableRefresh?: unknown;
610
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
611
- query?: {
612
- disableCookieCache?: unknown;
613
- disableRefresh?: unknown;
614
- } | undefined;
615
- fetchOptions?: FetchOptions | undefined;
616
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
617
- user: import("better-auth").StripEmptyObjects<{
618
- id: string;
619
- createdAt: Date;
620
- updatedAt: Date;
621
- email: string;
622
- emailVerified: boolean;
623
- name: string;
624
- image?: string | null | undefined;
625
- }>;
626
- session: import("better-auth").StripEmptyObjects<{
627
- id: string;
628
- createdAt: Date;
629
- updatedAt: Date;
630
- userId: string;
631
- expiresAt: Date;
632
- token: string;
633
- ipAddress?: string | null | undefined;
634
- userAgent?: string | null | undefined;
635
- }>;
636
- } | null, {
637
- code?: string | undefined;
638
- message?: string | undefined;
639
- }, FetchOptions["throw"] extends true ? true : false>>;
640
- } & {
641
- useSession: () => {
642
- data: {
643
- user: import("better-auth").StripEmptyObjects<{
644
- id: string;
645
- createdAt: Date;
646
- updatedAt: Date;
647
- email: string;
648
- emailVerified: boolean;
649
- name: string;
650
- image?: string | null | undefined;
651
- }>;
652
- session: import("better-auth").StripEmptyObjects<{
653
- id: string;
654
- createdAt: Date;
655
- updatedAt: Date;
656
- userId: string;
657
- expiresAt: Date;
658
- token: string;
659
- ipAddress?: string | null | undefined;
660
- userAgent?: string | null | undefined;
661
- }>;
662
- } | null;
663
- isPending: boolean;
664
- isRefetching: boolean;
665
- error: import("better-auth/react").BetterFetchError | null;
666
- refetch: (queryParams?: {
667
- query?: import("better-auth").SessionQueryParams;
668
- } | undefined) => Promise<void>;
669
- };
670
- $Infer: {
671
- Session: {
672
- user: import("better-auth").StripEmptyObjects<{
673
- id: string;
674
- createdAt: Date;
675
- updatedAt: Date;
676
- email: string;
677
- emailVerified: boolean;
678
- name: string;
679
- image?: string | null | undefined;
680
- }>;
681
- session: import("better-auth").StripEmptyObjects<{
682
- id: string;
683
- createdAt: Date;
684
- updatedAt: Date;
685
- userId: string;
686
- expiresAt: Date;
687
- token: string;
688
- ipAddress?: string | null | undefined;
689
- userAgent?: string | null | undefined;
690
- }>;
691
- };
692
- };
693
- $fetch: import("better-auth/react").BetterFetch<{
694
- plugins: (import("better-auth/react").BetterFetchPlugin<Record<string, any>> | {
695
- id: string;
696
- name: string;
697
- hooks: {
698
- onSuccess(context: import("better-auth/react").SuccessContext<any>): void;
699
- };
700
- } | {
701
- id: string;
702
- name: string;
703
- hooks: {
704
- onSuccess: ((context: import("better-auth/react").SuccessContext<any>) => Promise<void> | void) | undefined;
705
- onError: ((context: import("better-auth/react").ErrorContext) => Promise<void> | void) | undefined;
706
- onRequest: (<T extends Record<string, any>>(context: import("better-auth/react").RequestContext<T>) => Promise<import("better-auth/react").RequestContext | void> | import("better-auth/react").RequestContext | void) | undefined;
707
- onResponse: ((context: import("better-auth/react").ResponseContext) => Promise<Response | void | import("better-auth/react").ResponseContext> | Response | import("better-auth/react").ResponseContext | void) | undefined;
708
- };
709
- })[];
710
- priority?: RequestPriority | undefined;
711
- cache?: RequestCache | undefined;
712
- credentials?: RequestCredentials;
713
- headers?: (HeadersInit & (HeadersInit | {
714
- accept: "application/json" | "text/plain" | "application/octet-stream";
715
- "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
716
- authorization: "Bearer" | "Basic";
717
- })) | undefined;
718
- integrity?: string | undefined;
719
- keepalive?: boolean | undefined;
720
- method: string;
721
- mode?: RequestMode | undefined;
722
- redirect?: RequestRedirect | undefined;
723
- referrer?: string | undefined;
724
- referrerPolicy?: ReferrerPolicy | undefined;
725
- signal?: (AbortSignal | null) | undefined;
726
- window?: null | undefined;
727
- onRetry?: ((response: import("better-auth/react").ResponseContext) => Promise<void> | void) | undefined;
728
- hookOptions?: {
729
- cloneResponse?: boolean;
730
- } | undefined;
731
- timeout?: number | undefined;
732
- customFetchImpl: import("better-auth/react").FetchEsque;
733
- baseURL: string;
734
- throw?: boolean | undefined;
735
- auth?: ({
736
- type: "Bearer";
737
- token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
738
- } | {
739
- type: "Basic";
740
- username: string | (() => string | undefined) | undefined;
741
- password: string | (() => string | undefined) | undefined;
742
- } | {
743
- type: "Custom";
744
- prefix: string | (() => string | undefined) | undefined;
745
- value: string | (() => string | undefined) | undefined;
746
- }) | undefined;
747
- body?: any;
748
- query?: any;
749
- params?: any;
750
- duplex?: "full" | "half" | undefined;
751
- jsonParser: (text: string) => Promise<any> | any;
752
- retry?: import("better-auth/react").RetryOptions | undefined;
753
- retryAttempt?: number | undefined;
754
- output?: (import("better-auth/react").StandardSchemaV1 | typeof Blob | typeof File) | undefined;
755
- errorSchema?: import("better-auth/react").StandardSchemaV1 | undefined;
756
- disableValidation?: boolean | undefined;
757
- disableSignal?: boolean | undefined;
758
- }, unknown, unknown, {}>;
759
- $store: {
760
- notify: (signal?: (Omit<string, "$sessionSignal"> | "$sessionSignal") | undefined) => void;
761
- listen: (signal: Omit<string, "$sessionSignal"> | "$sessionSignal", listener: (value: boolean, oldValue?: boolean | undefined) => void) => void;
762
- atoms: Record<string, import("better-auth/react").WritableAtom<any>>;
763
- };
764
- $ERROR_CODES: {
765
- USER_NOT_FOUND: import("better-auth").RawError<"USER_NOT_FOUND">;
766
- FAILED_TO_CREATE_USER: import("better-auth").RawError<"FAILED_TO_CREATE_USER">;
767
- FAILED_TO_CREATE_SESSION: import("better-auth").RawError<"FAILED_TO_CREATE_SESSION">;
768
- FAILED_TO_UPDATE_USER: import("better-auth").RawError<"FAILED_TO_UPDATE_USER">;
769
- FAILED_TO_GET_SESSION: import("better-auth").RawError<"FAILED_TO_GET_SESSION">;
770
- INVALID_PASSWORD: import("better-auth").RawError<"INVALID_PASSWORD">;
771
- INVALID_EMAIL: import("better-auth").RawError<"INVALID_EMAIL">;
772
- INVALID_EMAIL_OR_PASSWORD: import("better-auth").RawError<"INVALID_EMAIL_OR_PASSWORD">;
773
- INVALID_USER: import("better-auth").RawError<"INVALID_USER">;
774
- SOCIAL_ACCOUNT_ALREADY_LINKED: import("better-auth").RawError<"SOCIAL_ACCOUNT_ALREADY_LINKED">;
775
- PROVIDER_NOT_FOUND: import("better-auth").RawError<"PROVIDER_NOT_FOUND">;
776
- INVALID_TOKEN: import("better-auth").RawError<"INVALID_TOKEN">;
777
- TOKEN_EXPIRED: import("better-auth").RawError<"TOKEN_EXPIRED">;
778
- ID_TOKEN_NOT_SUPPORTED: import("better-auth").RawError<"ID_TOKEN_NOT_SUPPORTED">;
779
- FAILED_TO_GET_USER_INFO: import("better-auth").RawError<"FAILED_TO_GET_USER_INFO">;
780
- USER_EMAIL_NOT_FOUND: import("better-auth").RawError<"USER_EMAIL_NOT_FOUND">;
781
- EMAIL_NOT_VERIFIED: import("better-auth").RawError<"EMAIL_NOT_VERIFIED">;
782
- PASSWORD_TOO_SHORT: import("better-auth").RawError<"PASSWORD_TOO_SHORT">;
783
- PASSWORD_TOO_LONG: import("better-auth").RawError<"PASSWORD_TOO_LONG">;
784
- USER_ALREADY_EXISTS: import("better-auth").RawError<"USER_ALREADY_EXISTS">;
785
- USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL: import("better-auth").RawError<"USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL">;
786
- EMAIL_CAN_NOT_BE_UPDATED: import("better-auth").RawError<"EMAIL_CAN_NOT_BE_UPDATED">;
787
- CREDENTIAL_ACCOUNT_NOT_FOUND: import("better-auth").RawError<"CREDENTIAL_ACCOUNT_NOT_FOUND">;
788
- ACCOUNT_NOT_FOUND: import("better-auth").RawError<"ACCOUNT_NOT_FOUND">;
789
- SESSION_EXPIRED: import("better-auth").RawError<"SESSION_EXPIRED">;
790
- FAILED_TO_UNLINK_LAST_ACCOUNT: import("better-auth").RawError<"FAILED_TO_UNLINK_LAST_ACCOUNT">;
791
- USER_ALREADY_HAS_PASSWORD: import("better-auth").RawError<"USER_ALREADY_HAS_PASSWORD">;
792
- CROSS_SITE_NAVIGATION_LOGIN_BLOCKED: import("better-auth").RawError<"CROSS_SITE_NAVIGATION_LOGIN_BLOCKED">;
793
- VERIFICATION_EMAIL_NOT_ENABLED: import("better-auth").RawError<"VERIFICATION_EMAIL_NOT_ENABLED">;
794
- EMAIL_ALREADY_VERIFIED: import("better-auth").RawError<"EMAIL_ALREADY_VERIFIED">;
795
- EMAIL_MISMATCH: import("better-auth").RawError<"EMAIL_MISMATCH">;
796
- SESSION_NOT_FRESH: import("better-auth").RawError<"SESSION_NOT_FRESH">;
797
- LINKED_ACCOUNT_ALREADY_EXISTS: import("better-auth").RawError<"LINKED_ACCOUNT_ALREADY_EXISTS">;
798
- INVALID_ORIGIN: import("better-auth").RawError<"INVALID_ORIGIN">;
799
- INVALID_CALLBACK_URL: import("better-auth").RawError<"INVALID_CALLBACK_URL">;
800
- INVALID_REDIRECT_URL: import("better-auth").RawError<"INVALID_REDIRECT_URL">;
801
- INVALID_ERROR_CALLBACK_URL: import("better-auth").RawError<"INVALID_ERROR_CALLBACK_URL">;
802
- INVALID_NEW_USER_CALLBACK_URL: import("better-auth").RawError<"INVALID_NEW_USER_CALLBACK_URL">;
803
- MISSING_OR_NULL_ORIGIN: import("better-auth").RawError<"MISSING_OR_NULL_ORIGIN">;
804
- CALLBACK_URL_REQUIRED: import("better-auth").RawError<"CALLBACK_URL_REQUIRED">;
805
- FAILED_TO_CREATE_VERIFICATION: import("better-auth").RawError<"FAILED_TO_CREATE_VERIFICATION">;
806
- FIELD_NOT_ALLOWED: import("better-auth").RawError<"FIELD_NOT_ALLOWED">;
807
- ASYNC_VALIDATION_NOT_SUPPORTED: import("better-auth").RawError<"ASYNC_VALIDATION_NOT_SUPPORTED">;
808
- VALIDATION_ERROR: import("better-auth").RawError<"VALIDATION_ERROR">;
809
- MISSING_FIELD: import("better-auth").RawError<"MISSING_FIELD">;
810
- METHOD_NOT_ALLOWED_DEFER_SESSION_REQUIRED: import("better-auth").RawError<"METHOD_NOT_ALLOWED_DEFER_SESSION_REQUIRED">;
811
- BODY_MUST_BE_AN_OBJECT: import("better-auth").RawError<"BODY_MUST_BE_AN_OBJECT">;
812
- PASSWORD_ALREADY_SET: import("better-auth").RawError<"PASSWORD_ALREADY_SET">;
813
- };
814
- };
815
- };
816
- //# sourceMappingURL=client.d.ts.map