better-auth-ui 3.2.24 → 3.2.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2678 @@
1
+ import { BetterFetchError } from '@better-fetch/fetch';
2
+ import * as better_auth from 'better-auth';
3
+ import { Account, User as User$1 } from 'better-auth';
4
+ import { Member } from 'better-auth/plugins/organization';
5
+ import * as better_auth_react from 'better-auth/react';
6
+ import { createAuthClient } from 'better-auth/react';
7
+ import * as better_auth_client_plugins from 'better-auth/client/plugins';
8
+ import * as better_auth_plugins from 'better-auth/plugins';
9
+
10
+ type Refetch = () => Promise<unknown> | unknown;
11
+
12
+ type AnyAuthClient = Omit<ReturnType<typeof createAuthClient>, "signUp" | "getSession"> & {
13
+ [key: string]: any;
14
+ };
15
+
16
+ declare const authClient: {} & {
17
+ useActiveOrganization: () => {
18
+ data: better_auth.Prettify<{
19
+ id: string;
20
+ name: string;
21
+ slug: string;
22
+ createdAt: Date;
23
+ logo?: string | null | undefined | undefined;
24
+ metadata?: any;
25
+ } & {
26
+ members: {
27
+ id: string;
28
+ organizationId: string;
29
+ role: "member" | "admin" | "owner";
30
+ createdAt: Date;
31
+ userId: string;
32
+ user: {
33
+ id: string;
34
+ email: string;
35
+ name: string;
36
+ image?: string | undefined;
37
+ };
38
+ }[];
39
+ invitations: {
40
+ id: string;
41
+ organizationId: string;
42
+ email: string;
43
+ role: "member" | "admin" | "owner";
44
+ status: better_auth_plugins.InvitationStatus;
45
+ inviterId: string;
46
+ expiresAt: Date;
47
+ createdAt: Date;
48
+ }[];
49
+ }> | null;
50
+ error: null | better_auth_react.BetterFetchError;
51
+ isPending: boolean;
52
+ isRefetching: boolean;
53
+ refetch: (queryParams?: {
54
+ query?: better_auth.SessionQueryParams;
55
+ } | undefined) => Promise<void>;
56
+ };
57
+ useListOrganizations: () => {
58
+ data: {
59
+ id: string;
60
+ name: string;
61
+ slug: string;
62
+ createdAt: Date;
63
+ logo?: string | null | undefined | undefined;
64
+ metadata?: any;
65
+ }[] | null;
66
+ error: null | better_auth_react.BetterFetchError;
67
+ isPending: boolean;
68
+ isRefetching: boolean;
69
+ refetch: (queryParams?: {
70
+ query?: better_auth.SessionQueryParams;
71
+ } | undefined) => Promise<void>;
72
+ };
73
+ useActiveMember: () => {
74
+ data: {
75
+ id: string;
76
+ organizationId: string;
77
+ userId: string;
78
+ role: string;
79
+ createdAt: Date;
80
+ } | null;
81
+ error: null | better_auth_react.BetterFetchError;
82
+ isPending: boolean;
83
+ isRefetching: boolean;
84
+ refetch: (queryParams?: {
85
+ query?: better_auth.SessionQueryParams;
86
+ } | undefined) => Promise<void>;
87
+ };
88
+ useActiveMemberRole: () => {
89
+ data: {
90
+ role: string;
91
+ } | null;
92
+ error: null | better_auth_react.BetterFetchError;
93
+ isPending: boolean;
94
+ isRefetching: boolean;
95
+ refetch: (queryParams?: {
96
+ query?: better_auth.SessionQueryParams;
97
+ } | undefined) => Promise<void>;
98
+ };
99
+ } & {
100
+ signIn: {
101
+ social: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
102
+ provider: "line" | (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" | "paybin" | "paypal" | "polar" | "railway" | "vercel";
103
+ callbackURL?: string | undefined;
104
+ newUserCallbackURL?: string | undefined;
105
+ errorCallbackURL?: string | undefined;
106
+ disableRedirect?: boolean | undefined;
107
+ idToken?: {
108
+ token: string;
109
+ nonce?: string | undefined;
110
+ accessToken?: string | undefined;
111
+ refreshToken?: string | undefined;
112
+ expiresAt?: number | undefined;
113
+ } | undefined;
114
+ scopes?: string[] | undefined;
115
+ requestSignUp?: boolean | undefined;
116
+ loginHint?: string | undefined;
117
+ additionalData?: Record<string, any> | undefined;
118
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
119
+ provider: "line" | (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" | "paybin" | "paypal" | "polar" | "railway" | "vercel";
120
+ callbackURL?: string | undefined;
121
+ newUserCallbackURL?: string | undefined;
122
+ errorCallbackURL?: string | undefined;
123
+ disableRedirect?: boolean | undefined;
124
+ idToken?: {
125
+ token: string;
126
+ nonce?: string | undefined;
127
+ accessToken?: string | undefined;
128
+ refreshToken?: string | undefined;
129
+ expiresAt?: number | undefined;
130
+ } | undefined;
131
+ scopes?: string[] | undefined;
132
+ requestSignUp?: boolean | undefined;
133
+ loginHint?: string | undefined;
134
+ additionalData?: Record<string, any> | undefined;
135
+ } & {
136
+ fetchOptions?: FetchOptions | undefined;
137
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
138
+ redirect: boolean;
139
+ url: string;
140
+ } | (Omit<{
141
+ redirect: boolean;
142
+ token: string;
143
+ url: undefined;
144
+ user: {
145
+ id: string;
146
+ createdAt: Date;
147
+ updatedAt: Date;
148
+ email: string;
149
+ emailVerified: boolean;
150
+ name: string;
151
+ image?: string | null | undefined | undefined;
152
+ };
153
+ }, "user"> & {
154
+ user: better_auth.StripEmptyObjects<{
155
+ id: string;
156
+ createdAt: Date;
157
+ updatedAt: Date;
158
+ email: string;
159
+ emailVerified: boolean;
160
+ name: string;
161
+ image?: string | null | undefined;
162
+ } & {
163
+ isAnonymous: boolean | null | undefined;
164
+ } & {} & {} & {
165
+ username?: string | null | undefined;
166
+ displayUsername?: string | null | undefined;
167
+ } & {
168
+ twoFactorEnabled: boolean | null | undefined;
169
+ } & {}>;
170
+ }), {
171
+ code?: string | undefined;
172
+ message?: string | undefined;
173
+ }, FetchOptions["throw"] extends true ? true : false>>;
174
+ };
175
+ } & {
176
+ signOut: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
177
+ query?: Record<string, any> | undefined;
178
+ fetchOptions?: FetchOptions | undefined;
179
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
180
+ success: boolean;
181
+ }, {
182
+ code?: string | undefined;
183
+ message?: string | undefined;
184
+ }, FetchOptions["throw"] extends true ? true : false>>;
185
+ } & {
186
+ signUp: {
187
+ email: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
188
+ name: string;
189
+ email: string;
190
+ password: string;
191
+ image?: string | undefined;
192
+ callbackURL?: string | undefined;
193
+ rememberMe?: boolean | undefined;
194
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
195
+ email: string;
196
+ name: string;
197
+ password: string;
198
+ image?: string | undefined;
199
+ callbackURL?: string | undefined;
200
+ fetchOptions?: FetchOptions | undefined;
201
+ } & {} & {} & {} & {
202
+ username?: string | null | undefined;
203
+ displayUsername?: string | null | undefined;
204
+ } & {} & {}>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<(Omit<{
205
+ token: null;
206
+ user: {
207
+ id: string;
208
+ createdAt: Date;
209
+ updatedAt: Date;
210
+ email: string;
211
+ emailVerified: boolean;
212
+ name: string;
213
+ image?: string | null | undefined | undefined;
214
+ };
215
+ }, "user"> & {
216
+ user: better_auth.StripEmptyObjects<{
217
+ id: string;
218
+ createdAt: Date;
219
+ updatedAt: Date;
220
+ email: string;
221
+ emailVerified: boolean;
222
+ name: string;
223
+ image?: string | null | undefined;
224
+ } & {
225
+ isAnonymous: boolean | null | undefined;
226
+ } & {} & {} & {
227
+ username?: string | null | undefined;
228
+ displayUsername?: string | null | undefined;
229
+ } & {
230
+ twoFactorEnabled: boolean | null | undefined;
231
+ } & {}>;
232
+ }) | (Omit<{
233
+ token: string;
234
+ user: {
235
+ id: string;
236
+ createdAt: Date;
237
+ updatedAt: Date;
238
+ email: string;
239
+ emailVerified: boolean;
240
+ name: string;
241
+ image?: string | null | undefined | undefined;
242
+ };
243
+ }, "user"> & {
244
+ user: better_auth.StripEmptyObjects<{
245
+ id: string;
246
+ createdAt: Date;
247
+ updatedAt: Date;
248
+ email: string;
249
+ emailVerified: boolean;
250
+ name: string;
251
+ image?: string | null | undefined;
252
+ } & {
253
+ isAnonymous: boolean | null | undefined;
254
+ } & {} & {} & {
255
+ username?: string | null | undefined;
256
+ displayUsername?: string | null | undefined;
257
+ } & {
258
+ twoFactorEnabled: boolean | null | undefined;
259
+ } & {}>;
260
+ }), {
261
+ code?: string | undefined;
262
+ message?: string | undefined;
263
+ }, FetchOptions["throw"] extends true ? true : false>>;
264
+ };
265
+ } & {
266
+ signIn: {
267
+ email: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
268
+ email: string;
269
+ password: string;
270
+ callbackURL?: string | undefined;
271
+ rememberMe?: boolean | undefined;
272
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
273
+ email: string;
274
+ password: string;
275
+ callbackURL?: string | undefined;
276
+ rememberMe?: boolean | undefined;
277
+ } & {
278
+ fetchOptions?: FetchOptions | undefined;
279
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<Omit<{
280
+ redirect: boolean;
281
+ token: string;
282
+ url?: string | undefined;
283
+ user: {
284
+ id: string;
285
+ createdAt: Date;
286
+ updatedAt: Date;
287
+ email: string;
288
+ emailVerified: boolean;
289
+ name: string;
290
+ image?: string | null | undefined | undefined;
291
+ };
292
+ }, "user"> & {
293
+ user: better_auth.StripEmptyObjects<{
294
+ id: string;
295
+ createdAt: Date;
296
+ updatedAt: Date;
297
+ email: string;
298
+ emailVerified: boolean;
299
+ name: string;
300
+ image?: string | null | undefined;
301
+ } & {
302
+ isAnonymous: boolean | null | undefined;
303
+ } & {} & {} & {
304
+ username?: string | null | undefined;
305
+ displayUsername?: string | null | undefined;
306
+ } & {
307
+ twoFactorEnabled: boolean | null | undefined;
308
+ } & {}>;
309
+ }, {
310
+ code?: string | undefined;
311
+ message?: string | undefined;
312
+ }, FetchOptions["throw"] extends true ? true : false>>;
313
+ };
314
+ } & {
315
+ resetPassword: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
316
+ newPassword: string;
317
+ token?: string | undefined;
318
+ }> & Record<string, any>, Partial<{
319
+ token?: string | undefined;
320
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
321
+ newPassword: string;
322
+ token?: string | undefined;
323
+ } & {
324
+ fetchOptions?: FetchOptions | undefined;
325
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
326
+ status: boolean;
327
+ }, {
328
+ code?: string | undefined;
329
+ message?: string | undefined;
330
+ }, FetchOptions["throw"] extends true ? true : false>>;
331
+ } & {
332
+ verifyEmail: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
333
+ token: string;
334
+ callbackURL?: string | undefined;
335
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
336
+ query: {
337
+ token: string;
338
+ callbackURL?: string | undefined;
339
+ };
340
+ fetchOptions?: FetchOptions | undefined;
341
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<NonNullable<void | {
342
+ status: boolean;
343
+ }>, {
344
+ code?: string | undefined;
345
+ message?: string | undefined;
346
+ }, FetchOptions["throw"] extends true ? true : false>>;
347
+ } & {
348
+ sendVerificationEmail: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
349
+ email: string;
350
+ callbackURL?: string | undefined;
351
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
352
+ email: string;
353
+ callbackURL?: string | undefined;
354
+ } & {
355
+ fetchOptions?: FetchOptions | undefined;
356
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
357
+ status: boolean;
358
+ }, {
359
+ code?: string | undefined;
360
+ message?: string | undefined;
361
+ }, FetchOptions["throw"] extends true ? true : false>>;
362
+ } & {
363
+ changeEmail: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
364
+ newEmail: string;
365
+ callbackURL?: string | undefined;
366
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
367
+ newEmail: string;
368
+ callbackURL?: string | undefined;
369
+ } & {
370
+ fetchOptions?: FetchOptions | undefined;
371
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
372
+ status: boolean;
373
+ }, {
374
+ code?: string | undefined;
375
+ message?: string | undefined;
376
+ }, FetchOptions["throw"] extends true ? true : false>>;
377
+ } & {
378
+ changePassword: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
379
+ newPassword: string;
380
+ currentPassword: string;
381
+ revokeOtherSessions?: boolean | undefined;
382
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
383
+ newPassword: string;
384
+ currentPassword: string;
385
+ revokeOtherSessions?: boolean | undefined;
386
+ } & {
387
+ fetchOptions?: FetchOptions | undefined;
388
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<Omit<{
389
+ token: string | null;
390
+ user: {
391
+ id: string;
392
+ createdAt: Date;
393
+ updatedAt: Date;
394
+ email: string;
395
+ emailVerified: boolean;
396
+ name: string;
397
+ image?: string | null | undefined;
398
+ } & Record<string, any> & {
399
+ id: string;
400
+ createdAt: Date;
401
+ updatedAt: Date;
402
+ email: string;
403
+ emailVerified: boolean;
404
+ name: string;
405
+ image?: string | null | undefined;
406
+ };
407
+ }, "user"> & {
408
+ user: better_auth.StripEmptyObjects<{
409
+ id: string;
410
+ createdAt: Date;
411
+ updatedAt: Date;
412
+ email: string;
413
+ emailVerified: boolean;
414
+ name: string;
415
+ image?: string | null | undefined;
416
+ } & {
417
+ isAnonymous: boolean | null | undefined;
418
+ } & {} & {} & {
419
+ username?: string | null | undefined;
420
+ displayUsername?: string | null | undefined;
421
+ } & {
422
+ twoFactorEnabled: boolean | null | undefined;
423
+ } & {}>;
424
+ }, {
425
+ code?: string | undefined;
426
+ message?: string | undefined;
427
+ }, FetchOptions["throw"] extends true ? true : false>>;
428
+ } & {
429
+ updateSession: <FetchOptions extends better_auth.ClientFetchOption<Partial<Partial<{}>> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<Partial<{}> & {
430
+ fetchOptions?: FetchOptions | undefined;
431
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
432
+ session: {
433
+ id: string;
434
+ createdAt: Date;
435
+ updatedAt: Date;
436
+ userId: string;
437
+ expiresAt: Date;
438
+ token: string;
439
+ ipAddress?: string | null | undefined;
440
+ userAgent?: string | null | undefined;
441
+ };
442
+ }, {
443
+ code?: string | undefined;
444
+ message?: string | undefined;
445
+ }, FetchOptions["throw"] extends true ? true : false>>;
446
+ } & {
447
+ updateUser: <FetchOptions extends better_auth.ClientFetchOption<Partial<Partial<{}> & {
448
+ name?: string | undefined;
449
+ image?: string | undefined | null;
450
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
451
+ image?: (string | null) | undefined;
452
+ name?: string | undefined;
453
+ fetchOptions?: FetchOptions | undefined;
454
+ } & Partial<{} & {} & {} & {
455
+ username?: string | null | undefined;
456
+ displayUsername?: string | null | undefined;
457
+ } & {} & {}>> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
458
+ status: boolean;
459
+ }, {
460
+ code?: string | undefined;
461
+ message?: string | undefined;
462
+ }, FetchOptions["throw"] extends true ? true : false>>;
463
+ } & {
464
+ deleteUser: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
465
+ callbackURL?: string | undefined;
466
+ password?: string | undefined;
467
+ token?: string | undefined;
468
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
469
+ callbackURL?: string | undefined;
470
+ password?: string | undefined;
471
+ token?: string | undefined;
472
+ } & {
473
+ fetchOptions?: FetchOptions | undefined;
474
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
475
+ success: boolean;
476
+ message: string;
477
+ }, {
478
+ code?: string | undefined;
479
+ message?: string | undefined;
480
+ }, FetchOptions["throw"] extends true ? true : false>>;
481
+ } & {
482
+ requestPasswordReset: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
483
+ email: string;
484
+ redirectTo?: string | undefined;
485
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
486
+ email: string;
487
+ redirectTo?: string | undefined;
488
+ } & {
489
+ fetchOptions?: FetchOptions | undefined;
490
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
491
+ status: boolean;
492
+ message: string;
493
+ }, {
494
+ code?: string | undefined;
495
+ message?: string | undefined;
496
+ }, FetchOptions["throw"] extends true ? true : false>>;
497
+ } & {
498
+ resetPassword: {
499
+ ":token": <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
500
+ callbackURL: string;
501
+ }> & Record<string, any>, {
502
+ token: string;
503
+ }>>(data_0: better_auth.Prettify<{
504
+ query: {
505
+ callbackURL: string;
506
+ };
507
+ fetchOptions?: FetchOptions | undefined;
508
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<never, {
509
+ code?: string | undefined;
510
+ message?: string | undefined;
511
+ }, FetchOptions["throw"] extends true ? true : false>>;
512
+ };
513
+ } & {
514
+ listSessions: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
515
+ query?: Record<string, any> | undefined;
516
+ fetchOptions?: FetchOptions | undefined;
517
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<better_auth.Prettify<{
518
+ id: string;
519
+ createdAt: Date;
520
+ updatedAt: Date;
521
+ userId: string;
522
+ expiresAt: Date;
523
+ token: string;
524
+ ipAddress?: string | null | undefined | undefined;
525
+ userAgent?: string | null | undefined | undefined;
526
+ }>[], {
527
+ code?: string | undefined;
528
+ message?: string | undefined;
529
+ }, FetchOptions["throw"] extends true ? true : false>>;
530
+ } & {
531
+ revokeSession: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
532
+ token: string;
533
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
534
+ token: string;
535
+ } & {
536
+ fetchOptions?: FetchOptions | undefined;
537
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
538
+ status: boolean;
539
+ }, {
540
+ code?: string | undefined;
541
+ message?: string | undefined;
542
+ }, FetchOptions["throw"] extends true ? true : false>>;
543
+ } & {
544
+ revokeSessions: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
545
+ query?: Record<string, any> | undefined;
546
+ fetchOptions?: FetchOptions | undefined;
547
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
548
+ status: boolean;
549
+ }, {
550
+ code?: string | undefined;
551
+ message?: string | undefined;
552
+ }, FetchOptions["throw"] extends true ? true : false>>;
553
+ } & {
554
+ revokeOtherSessions: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
555
+ query?: Record<string, any> | undefined;
556
+ fetchOptions?: FetchOptions | undefined;
557
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
558
+ status: boolean;
559
+ }, {
560
+ code?: string | undefined;
561
+ message?: string | undefined;
562
+ }, FetchOptions["throw"] extends true ? true : false>>;
563
+ } & {
564
+ linkSocial: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
565
+ provider: unknown;
566
+ callbackURL?: string | undefined;
567
+ idToken?: {
568
+ token: string;
569
+ nonce?: string | undefined;
570
+ accessToken?: string | undefined;
571
+ refreshToken?: string | undefined;
572
+ scopes?: string[] | undefined;
573
+ } | undefined;
574
+ requestSignUp?: boolean | undefined;
575
+ scopes?: string[] | undefined;
576
+ errorCallbackURL?: string | undefined;
577
+ disableRedirect?: boolean | undefined;
578
+ additionalData?: Record<string, any> | undefined;
579
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
580
+ provider: unknown;
581
+ callbackURL?: string | undefined;
582
+ idToken?: {
583
+ token: string;
584
+ nonce?: string | undefined;
585
+ accessToken?: string | undefined;
586
+ refreshToken?: string | undefined;
587
+ scopes?: string[] | undefined;
588
+ } | undefined;
589
+ requestSignUp?: boolean | undefined;
590
+ scopes?: string[] | undefined;
591
+ errorCallbackURL?: string | undefined;
592
+ disableRedirect?: boolean | undefined;
593
+ additionalData?: Record<string, any> | undefined;
594
+ } & {
595
+ fetchOptions?: FetchOptions | undefined;
596
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
597
+ url: string;
598
+ redirect: boolean;
599
+ }, {
600
+ code?: string | undefined;
601
+ message?: string | undefined;
602
+ }, FetchOptions["throw"] extends true ? true : false>>;
603
+ } & {
604
+ listAccounts: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
605
+ query?: Record<string, any> | undefined;
606
+ fetchOptions?: FetchOptions | undefined;
607
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
608
+ scopes: string[];
609
+ id: string;
610
+ createdAt: Date;
611
+ updatedAt: Date;
612
+ userId: string;
613
+ providerId: string;
614
+ accountId: string;
615
+ }[], {
616
+ code?: string | undefined;
617
+ message?: string | undefined;
618
+ }, FetchOptions["throw"] extends true ? true : false>>;
619
+ } & {
620
+ deleteUser: {
621
+ callback: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
622
+ token: string;
623
+ callbackURL?: string | undefined;
624
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
625
+ query: {
626
+ token: string;
627
+ callbackURL?: string | undefined;
628
+ };
629
+ fetchOptions?: FetchOptions | undefined;
630
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
631
+ success: boolean;
632
+ message: string;
633
+ }, {
634
+ code?: string | undefined;
635
+ message?: string | undefined;
636
+ }, FetchOptions["throw"] extends true ? true : false>>;
637
+ };
638
+ } & {
639
+ unlinkAccount: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
640
+ providerId: string;
641
+ accountId?: string | undefined;
642
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
643
+ providerId: string;
644
+ accountId?: string | undefined;
645
+ } & {
646
+ fetchOptions?: FetchOptions | undefined;
647
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
648
+ status: boolean;
649
+ }, {
650
+ code?: string | undefined;
651
+ message?: string | undefined;
652
+ }, FetchOptions["throw"] extends true ? true : false>>;
653
+ } & {
654
+ refreshToken: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
655
+ providerId: string;
656
+ accountId?: string | undefined;
657
+ userId?: string | undefined;
658
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
659
+ providerId: string;
660
+ accountId?: string | undefined;
661
+ userId?: string | undefined;
662
+ } & {
663
+ fetchOptions?: FetchOptions | undefined;
664
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
665
+ accessToken: string | undefined;
666
+ refreshToken: string;
667
+ accessTokenExpiresAt: Date | undefined;
668
+ refreshTokenExpiresAt: Date | null | undefined;
669
+ scope: string | null | undefined;
670
+ idToken: string | null | undefined;
671
+ providerId: string;
672
+ accountId: string;
673
+ }, {
674
+ code?: string | undefined;
675
+ message?: string | undefined;
676
+ }, FetchOptions["throw"] extends true ? true : false>>;
677
+ } & {
678
+ getAccessToken: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
679
+ providerId: string;
680
+ accountId?: string | undefined;
681
+ userId?: string | undefined;
682
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
683
+ providerId: string;
684
+ accountId?: string | undefined;
685
+ userId?: string | undefined;
686
+ } & {
687
+ fetchOptions?: FetchOptions | undefined;
688
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
689
+ accessToken: string;
690
+ accessTokenExpiresAt: Date | undefined;
691
+ scopes: string[];
692
+ idToken: string | undefined;
693
+ }, {
694
+ code?: string | undefined;
695
+ message?: string | undefined;
696
+ }, FetchOptions["throw"] extends true ? true : false>>;
697
+ } & {
698
+ accountInfo: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
699
+ accountId?: string | undefined;
700
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
701
+ query?: {
702
+ accountId?: string | undefined;
703
+ } | undefined;
704
+ fetchOptions?: FetchOptions | undefined;
705
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
706
+ user: better_auth.OAuth2UserInfo;
707
+ data: Record<string, any>;
708
+ }, {
709
+ code?: string | undefined;
710
+ message?: string | undefined;
711
+ }, FetchOptions["throw"] extends true ? true : false>>;
712
+ } & {
713
+ getSession: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
714
+ disableCookieCache?: unknown;
715
+ disableRefresh?: unknown;
716
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
717
+ query?: {
718
+ disableCookieCache?: unknown;
719
+ disableRefresh?: unknown;
720
+ } | undefined;
721
+ fetchOptions?: FetchOptions | undefined;
722
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
723
+ user: better_auth.StripEmptyObjects<{
724
+ id: string;
725
+ createdAt: Date;
726
+ updatedAt: Date;
727
+ email: string;
728
+ emailVerified: boolean;
729
+ name: string;
730
+ image?: string | null | undefined;
731
+ } & {
732
+ isAnonymous: boolean | null | undefined;
733
+ } & {} & {} & {
734
+ username?: string | null | undefined;
735
+ displayUsername?: string | null | undefined;
736
+ } & {
737
+ twoFactorEnabled: boolean | null | undefined;
738
+ } & {}>;
739
+ session: better_auth.StripEmptyObjects<{
740
+ id: string;
741
+ createdAt: Date;
742
+ updatedAt: Date;
743
+ userId: string;
744
+ expiresAt: Date;
745
+ token: string;
746
+ ipAddress?: string | null | undefined;
747
+ userAgent?: string | null | undefined;
748
+ } & {} & {
749
+ activeOrganizationId?: string | null | undefined;
750
+ }>;
751
+ } | null, {
752
+ code?: string | undefined;
753
+ message?: string | undefined;
754
+ }, FetchOptions["throw"] extends true ? true : false>>;
755
+ } & {
756
+ multiSession: {
757
+ listDeviceSessions: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
758
+ query?: Record<string, any> | undefined;
759
+ fetchOptions?: FetchOptions | undefined;
760
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
761
+ session: {
762
+ id: string;
763
+ createdAt: Date;
764
+ updatedAt: Date;
765
+ userId: string;
766
+ expiresAt: Date;
767
+ token: string;
768
+ ipAddress?: string | null | undefined;
769
+ userAgent?: string | null | undefined;
770
+ };
771
+ user: {
772
+ id: string;
773
+ createdAt: Date;
774
+ updatedAt: Date;
775
+ email: string;
776
+ emailVerified: boolean;
777
+ name: string;
778
+ image?: string | null | undefined;
779
+ };
780
+ }[], {
781
+ code?: string | undefined;
782
+ message?: string | undefined;
783
+ }, FetchOptions["throw"] extends true ? true : false>>;
784
+ };
785
+ } & {
786
+ multiSession: {
787
+ setActive: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
788
+ sessionToken: string;
789
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
790
+ sessionToken: string;
791
+ } & {
792
+ fetchOptions?: FetchOptions | undefined;
793
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
794
+ session: {
795
+ id: string;
796
+ createdAt: Date;
797
+ updatedAt: Date;
798
+ userId: string;
799
+ expiresAt: Date;
800
+ token: string;
801
+ ipAddress?: string | null | undefined;
802
+ userAgent?: string | null | undefined;
803
+ } & Record<string, any>;
804
+ user: {
805
+ id: string;
806
+ createdAt: Date;
807
+ updatedAt: Date;
808
+ email: string;
809
+ emailVerified: boolean;
810
+ name: string;
811
+ image?: string | null | undefined;
812
+ } & Record<string, any>;
813
+ }, {
814
+ code?: string | undefined;
815
+ message?: string | undefined;
816
+ }, FetchOptions["throw"] extends true ? true : false>>;
817
+ };
818
+ } & {
819
+ multiSession: {
820
+ revoke: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
821
+ sessionToken: string;
822
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
823
+ sessionToken: string;
824
+ } & {
825
+ fetchOptions?: FetchOptions | undefined;
826
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
827
+ status: boolean;
828
+ }, {
829
+ code?: string | undefined;
830
+ message?: string | undefined;
831
+ }, FetchOptions["throw"] extends true ? true : false>>;
832
+ };
833
+ } & {
834
+ signIn: {
835
+ oauth2: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
836
+ providerId: string;
837
+ callbackURL?: string | undefined;
838
+ errorCallbackURL?: string | undefined;
839
+ newUserCallbackURL?: string | undefined;
840
+ disableRedirect?: boolean | undefined;
841
+ scopes?: string[] | undefined;
842
+ requestSignUp?: boolean | undefined;
843
+ additionalData?: Record<string, any> | undefined;
844
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
845
+ providerId: string;
846
+ callbackURL?: string | undefined;
847
+ errorCallbackURL?: string | undefined;
848
+ newUserCallbackURL?: string | undefined;
849
+ disableRedirect?: boolean | undefined;
850
+ scopes?: string[] | undefined;
851
+ requestSignUp?: boolean | undefined;
852
+ additionalData?: Record<string, any> | undefined;
853
+ } & {
854
+ fetchOptions?: FetchOptions | undefined;
855
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
856
+ url: string;
857
+ redirect: boolean;
858
+ }, {
859
+ code?: string | undefined;
860
+ message?: string | undefined;
861
+ }, FetchOptions["throw"] extends true ? true : false>>;
862
+ };
863
+ } & {
864
+ oauth2: {
865
+ link: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
866
+ providerId: string;
867
+ callbackURL: string;
868
+ scopes?: string[] | undefined;
869
+ errorCallbackURL?: string | undefined;
870
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
871
+ providerId: string;
872
+ callbackURL: string;
873
+ scopes?: string[] | undefined;
874
+ errorCallbackURL?: string | undefined;
875
+ } & {
876
+ fetchOptions?: FetchOptions | undefined;
877
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
878
+ url: string;
879
+ redirect: boolean;
880
+ }, {
881
+ code?: string | undefined;
882
+ message?: string | undefined;
883
+ }, FetchOptions["throw"] extends true ? true : false>>;
884
+ };
885
+ } & {
886
+ signIn: {
887
+ anonymous: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
888
+ query?: Record<string, any> | undefined;
889
+ fetchOptions?: FetchOptions | undefined;
890
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<Omit<{
891
+ token: string;
892
+ user: Record<string, any> & {
893
+ id: string;
894
+ createdAt: Date;
895
+ updatedAt: Date;
896
+ email: string;
897
+ emailVerified: boolean;
898
+ name: string;
899
+ image?: string | null | undefined;
900
+ };
901
+ }, "user"> & {
902
+ user: better_auth.StripEmptyObjects<{
903
+ id: string;
904
+ createdAt: Date;
905
+ updatedAt: Date;
906
+ email: string;
907
+ emailVerified: boolean;
908
+ name: string;
909
+ image?: string | null | undefined;
910
+ } & {
911
+ isAnonymous: boolean | null | undefined;
912
+ } & {} & {} & {
913
+ username?: string | null | undefined;
914
+ displayUsername?: string | null | undefined;
915
+ } & {
916
+ twoFactorEnabled: boolean | null | undefined;
917
+ } & {}>;
918
+ }, {
919
+ code?: string | undefined;
920
+ message?: string | undefined;
921
+ }, FetchOptions["throw"] extends true ? true : false>>;
922
+ };
923
+ } & {
924
+ deleteAnonymousUser: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
925
+ query?: Record<string, any> | undefined;
926
+ fetchOptions?: FetchOptions | undefined;
927
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
928
+ success: boolean;
929
+ }, {
930
+ code?: string | undefined;
931
+ message?: string | undefined;
932
+ }, FetchOptions["throw"] extends true ? true : false>>;
933
+ } & {
934
+ signIn: {
935
+ username: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
936
+ username: string;
937
+ password: string;
938
+ rememberMe?: boolean | undefined;
939
+ callbackURL?: string | undefined;
940
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
941
+ username: string;
942
+ password: string;
943
+ rememberMe?: boolean | undefined;
944
+ callbackURL?: string | undefined;
945
+ } & {
946
+ fetchOptions?: FetchOptions | undefined;
947
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<Omit<{
948
+ token: string;
949
+ user: {
950
+ id: string;
951
+ createdAt: Date;
952
+ updatedAt: Date;
953
+ email: string;
954
+ emailVerified: boolean;
955
+ name: string;
956
+ image?: string | null | undefined;
957
+ } & {
958
+ username: string;
959
+ displayUsername: string;
960
+ };
961
+ }, "user"> & {
962
+ user: better_auth.StripEmptyObjects<{
963
+ id: string;
964
+ createdAt: Date;
965
+ updatedAt: Date;
966
+ email: string;
967
+ emailVerified: boolean;
968
+ name: string;
969
+ image?: string | null | undefined;
970
+ } & {
971
+ isAnonymous: boolean | null | undefined;
972
+ } & {} & {} & {
973
+ username?: string | null | undefined;
974
+ displayUsername?: string | null | undefined;
975
+ } & {
976
+ twoFactorEnabled: boolean | null | undefined;
977
+ } & {}>;
978
+ }, {
979
+ code?: string | undefined;
980
+ message?: string | undefined;
981
+ }, FetchOptions["throw"] extends true ? true : false>>;
982
+ };
983
+ } & {
984
+ isUsernameAvailable: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
985
+ username: string;
986
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
987
+ username: string;
988
+ } & {
989
+ fetchOptions?: FetchOptions | undefined;
990
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
991
+ available: boolean;
992
+ }, {
993
+ code?: string | undefined;
994
+ message?: string | undefined;
995
+ }, FetchOptions["throw"] extends true ? true : false>>;
996
+ } & {
997
+ signIn: {
998
+ magicLink: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
999
+ email: string;
1000
+ name?: string | undefined;
1001
+ callbackURL?: string | undefined;
1002
+ newUserCallbackURL?: string | undefined;
1003
+ errorCallbackURL?: string | undefined;
1004
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1005
+ email: string;
1006
+ name?: string | undefined;
1007
+ callbackURL?: string | undefined;
1008
+ newUserCallbackURL?: string | undefined;
1009
+ errorCallbackURL?: string | undefined;
1010
+ } & {
1011
+ fetchOptions?: FetchOptions | undefined;
1012
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
1013
+ status: boolean;
1014
+ }, {
1015
+ code?: string | undefined;
1016
+ message?: string | undefined;
1017
+ }, FetchOptions["throw"] extends true ? true : false>>;
1018
+ };
1019
+ } & {
1020
+ magicLink: {
1021
+ verify: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
1022
+ token: string;
1023
+ callbackURL?: string | undefined;
1024
+ errorCallbackURL?: string | undefined;
1025
+ newUserCallbackURL?: string | undefined;
1026
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1027
+ query: {
1028
+ token: string;
1029
+ callbackURL?: string | undefined;
1030
+ errorCallbackURL?: string | undefined;
1031
+ newUserCallbackURL?: string | undefined;
1032
+ };
1033
+ fetchOptions?: FetchOptions | undefined;
1034
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<Omit<{
1035
+ token: string;
1036
+ user: {
1037
+ id: string;
1038
+ createdAt: Date;
1039
+ updatedAt: Date;
1040
+ email: string;
1041
+ emailVerified: boolean;
1042
+ name: string;
1043
+ image?: string | null | undefined;
1044
+ };
1045
+ }, "user"> & {
1046
+ user: better_auth.StripEmptyObjects<{
1047
+ id: string;
1048
+ createdAt: Date;
1049
+ updatedAt: Date;
1050
+ email: string;
1051
+ emailVerified: boolean;
1052
+ name: string;
1053
+ image?: string | null | undefined;
1054
+ } & {
1055
+ isAnonymous: boolean | null | undefined;
1056
+ } & {} & {} & {
1057
+ username?: string | null | undefined;
1058
+ displayUsername?: string | null | undefined;
1059
+ } & {
1060
+ twoFactorEnabled: boolean | null | undefined;
1061
+ } & {}>;
1062
+ }, {
1063
+ code?: string | undefined;
1064
+ message?: string | undefined;
1065
+ }, FetchOptions["throw"] extends true ? true : false>>;
1066
+ };
1067
+ } & {
1068
+ emailOtp: {
1069
+ sendVerificationOtp: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1070
+ email: string;
1071
+ type: "sign-in" | "change-email" | "email-verification" | "forget-password";
1072
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1073
+ email: string;
1074
+ type: "sign-in" | "change-email" | "email-verification" | "forget-password";
1075
+ } & {
1076
+ fetchOptions?: FetchOptions | undefined;
1077
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
1078
+ success: boolean;
1079
+ }, {
1080
+ code?: string | undefined;
1081
+ message?: string | undefined;
1082
+ }, FetchOptions["throw"] extends true ? true : false>>;
1083
+ };
1084
+ } & {
1085
+ emailOtp: {
1086
+ checkVerificationOtp: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1087
+ email: string;
1088
+ type: "sign-in" | "change-email" | "email-verification" | "forget-password";
1089
+ otp: string;
1090
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1091
+ email: string;
1092
+ type: "sign-in" | "change-email" | "email-verification" | "forget-password";
1093
+ otp: string;
1094
+ } & {
1095
+ fetchOptions?: FetchOptions | undefined;
1096
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
1097
+ success: boolean;
1098
+ }, {
1099
+ code?: string | undefined;
1100
+ message?: string | undefined;
1101
+ }, FetchOptions["throw"] extends true ? true : false>>;
1102
+ };
1103
+ } & {
1104
+ emailOtp: {
1105
+ verifyEmail: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1106
+ email: string;
1107
+ otp: string;
1108
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1109
+ email: string;
1110
+ otp: string;
1111
+ } & {
1112
+ fetchOptions?: FetchOptions | undefined;
1113
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<(Omit<{
1114
+ status: boolean;
1115
+ token: string;
1116
+ user: {
1117
+ id: string;
1118
+ createdAt: Date;
1119
+ updatedAt: Date;
1120
+ email: string;
1121
+ emailVerified: boolean;
1122
+ name: string;
1123
+ image?: string | null | undefined;
1124
+ } & Record<string, any>;
1125
+ }, "user"> & {
1126
+ user: better_auth.StripEmptyObjects<{
1127
+ id: string;
1128
+ createdAt: Date;
1129
+ updatedAt: Date;
1130
+ email: string;
1131
+ emailVerified: boolean;
1132
+ name: string;
1133
+ image?: string | null | undefined;
1134
+ } & {
1135
+ isAnonymous: boolean | null | undefined;
1136
+ } & {} & {} & {
1137
+ username?: string | null | undefined;
1138
+ displayUsername?: string | null | undefined;
1139
+ } & {
1140
+ twoFactorEnabled: boolean | null | undefined;
1141
+ } & {}>;
1142
+ }) | (Omit<{
1143
+ status: boolean;
1144
+ token: null;
1145
+ user: {
1146
+ id: string;
1147
+ createdAt: Date;
1148
+ updatedAt: Date;
1149
+ email: string;
1150
+ emailVerified: boolean;
1151
+ name: string;
1152
+ image?: string | null | undefined;
1153
+ } & Record<string, any>;
1154
+ }, "user"> & {
1155
+ user: better_auth.StripEmptyObjects<{
1156
+ id: string;
1157
+ createdAt: Date;
1158
+ updatedAt: Date;
1159
+ email: string;
1160
+ emailVerified: boolean;
1161
+ name: string;
1162
+ image?: string | null | undefined;
1163
+ } & {
1164
+ isAnonymous: boolean | null | undefined;
1165
+ } & {} & {} & {
1166
+ username?: string | null | undefined;
1167
+ displayUsername?: string | null | undefined;
1168
+ } & {
1169
+ twoFactorEnabled: boolean | null | undefined;
1170
+ } & {}>;
1171
+ }), {
1172
+ code?: string | undefined;
1173
+ message?: string | undefined;
1174
+ }, FetchOptions["throw"] extends true ? true : false>>;
1175
+ };
1176
+ } & {
1177
+ signIn: {
1178
+ emailOtp: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1179
+ email: string;
1180
+ otp: string;
1181
+ name?: string | undefined;
1182
+ image?: string | undefined;
1183
+ } & Record<string, any>> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1184
+ email: string;
1185
+ otp: string;
1186
+ name?: string | undefined;
1187
+ image?: string | undefined;
1188
+ } & Record<string, any> & {
1189
+ fetchOptions?: FetchOptions | undefined;
1190
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<Omit<{
1191
+ token: string;
1192
+ user: {
1193
+ id: string;
1194
+ createdAt: Date;
1195
+ updatedAt: Date;
1196
+ email: string;
1197
+ emailVerified: boolean;
1198
+ name: string;
1199
+ image?: string | null | undefined;
1200
+ };
1201
+ }, "user"> & {
1202
+ user: better_auth.StripEmptyObjects<{
1203
+ id: string;
1204
+ createdAt: Date;
1205
+ updatedAt: Date;
1206
+ email: string;
1207
+ emailVerified: boolean;
1208
+ name: string;
1209
+ image?: string | null | undefined;
1210
+ } & {
1211
+ isAnonymous: boolean | null | undefined;
1212
+ } & {} & {} & {
1213
+ username?: string | null | undefined;
1214
+ displayUsername?: string | null | undefined;
1215
+ } & {
1216
+ twoFactorEnabled: boolean | null | undefined;
1217
+ } & {}>;
1218
+ }, {
1219
+ code?: string | undefined;
1220
+ message?: string | undefined;
1221
+ }, FetchOptions["throw"] extends true ? true : false>>;
1222
+ };
1223
+ } & {
1224
+ emailOtp: {
1225
+ requestPasswordReset: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1226
+ email: string;
1227
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1228
+ email: string;
1229
+ } & {
1230
+ fetchOptions?: FetchOptions | undefined;
1231
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
1232
+ success: boolean;
1233
+ }, {
1234
+ code?: string | undefined;
1235
+ message?: string | undefined;
1236
+ }, FetchOptions["throw"] extends true ? true : false>>;
1237
+ };
1238
+ } & {
1239
+ forgetPassword: {
1240
+ emailOtp: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1241
+ email: string;
1242
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1243
+ email: string;
1244
+ } & {
1245
+ fetchOptions?: FetchOptions | undefined;
1246
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
1247
+ success: boolean;
1248
+ }, {
1249
+ code?: string | undefined;
1250
+ message?: string | undefined;
1251
+ }, FetchOptions["throw"] extends true ? true : false>>;
1252
+ };
1253
+ } & {
1254
+ emailOtp: {
1255
+ resetPassword: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1256
+ email: string;
1257
+ otp: string;
1258
+ password: string;
1259
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1260
+ email: string;
1261
+ otp: string;
1262
+ password: string;
1263
+ } & {
1264
+ fetchOptions?: FetchOptions | undefined;
1265
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
1266
+ success: boolean;
1267
+ }, {
1268
+ code?: string | undefined;
1269
+ message?: string | undefined;
1270
+ }, FetchOptions["throw"] extends true ? true : false>>;
1271
+ };
1272
+ } & {
1273
+ emailOtp: {
1274
+ requestEmailChange: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1275
+ newEmail: string;
1276
+ otp?: string | undefined;
1277
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1278
+ newEmail: string;
1279
+ otp?: string | undefined;
1280
+ } & {
1281
+ fetchOptions?: FetchOptions | undefined;
1282
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
1283
+ success: boolean;
1284
+ }, {
1285
+ code?: string | undefined;
1286
+ message?: string | undefined;
1287
+ }, FetchOptions["throw"] extends true ? true : false>>;
1288
+ };
1289
+ } & {
1290
+ emailOtp: {
1291
+ changeEmail: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1292
+ newEmail: string;
1293
+ otp: string;
1294
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1295
+ newEmail: string;
1296
+ otp: string;
1297
+ } & {
1298
+ fetchOptions?: FetchOptions | undefined;
1299
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
1300
+ success: boolean;
1301
+ }, {
1302
+ code?: string | undefined;
1303
+ message?: string | undefined;
1304
+ }, FetchOptions["throw"] extends true ? true : false>>;
1305
+ };
1306
+ } & {
1307
+ twoFactor: {
1308
+ enable: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1309
+ password: string;
1310
+ issuer?: string | undefined;
1311
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1312
+ password: string;
1313
+ issuer?: string | undefined;
1314
+ } & {
1315
+ fetchOptions?: FetchOptions | undefined;
1316
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
1317
+ totpURI: string;
1318
+ backupCodes: string[];
1319
+ }, {
1320
+ code?: string | undefined;
1321
+ message?: string | undefined;
1322
+ }, FetchOptions["throw"] extends true ? true : false>>;
1323
+ };
1324
+ } & {
1325
+ twoFactor: {
1326
+ disable: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1327
+ password: string;
1328
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1329
+ password: string;
1330
+ } & {
1331
+ fetchOptions?: FetchOptions | undefined;
1332
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
1333
+ status: boolean;
1334
+ }, {
1335
+ code?: string | undefined;
1336
+ message?: string | undefined;
1337
+ }, FetchOptions["throw"] extends true ? true : false>>;
1338
+ };
1339
+ } & {
1340
+ twoFactor: {
1341
+ verifyBackupCode: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1342
+ code: string;
1343
+ disableSession?: boolean | undefined;
1344
+ trustDevice?: boolean | undefined;
1345
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1346
+ code: string;
1347
+ disableSession?: boolean | undefined;
1348
+ trustDevice?: boolean | undefined;
1349
+ } & {
1350
+ fetchOptions?: FetchOptions | undefined;
1351
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<Omit<{
1352
+ token: string | undefined;
1353
+ user: (Record<string, any> & {
1354
+ id: string;
1355
+ createdAt: Date;
1356
+ updatedAt: Date;
1357
+ email: string;
1358
+ emailVerified: boolean;
1359
+ name: string;
1360
+ image?: string | null | undefined;
1361
+ }) | better_auth_plugins.UserWithTwoFactor;
1362
+ }, "user"> & {
1363
+ user: better_auth.StripEmptyObjects<{
1364
+ id: string;
1365
+ createdAt: Date;
1366
+ updatedAt: Date;
1367
+ email: string;
1368
+ emailVerified: boolean;
1369
+ name: string;
1370
+ image?: string | null | undefined;
1371
+ } & {
1372
+ isAnonymous: boolean | null | undefined;
1373
+ } & {} & {} & {
1374
+ username?: string | null | undefined;
1375
+ displayUsername?: string | null | undefined;
1376
+ } & {
1377
+ twoFactorEnabled: boolean | null | undefined;
1378
+ } & {}>;
1379
+ }, {
1380
+ code?: string | undefined;
1381
+ message?: string | undefined;
1382
+ }, FetchOptions["throw"] extends true ? true : false>>;
1383
+ };
1384
+ } & {
1385
+ twoFactor: {
1386
+ generateBackupCodes: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1387
+ password: string;
1388
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1389
+ password: string;
1390
+ } & {
1391
+ fetchOptions?: FetchOptions | undefined;
1392
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
1393
+ status: boolean;
1394
+ backupCodes: string[];
1395
+ }, {
1396
+ code?: string | undefined;
1397
+ message?: string | undefined;
1398
+ }, FetchOptions["throw"] extends true ? true : false>>;
1399
+ };
1400
+ } & {
1401
+ twoFactor: {
1402
+ sendOtp: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1403
+ trustDevice?: boolean | undefined;
1404
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
1405
+ query?: Record<string, any> | undefined;
1406
+ fetchOptions?: FetchOptions | undefined;
1407
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
1408
+ status: boolean;
1409
+ }, {
1410
+ code?: string | undefined;
1411
+ message?: string | undefined;
1412
+ }, FetchOptions["throw"] extends true ? true : false>>;
1413
+ };
1414
+ } & {
1415
+ twoFactor: {
1416
+ verifyOtp: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1417
+ code: string;
1418
+ trustDevice?: boolean | undefined;
1419
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1420
+ code: string;
1421
+ trustDevice?: boolean | undefined;
1422
+ } & {
1423
+ fetchOptions?: FetchOptions | undefined;
1424
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<(Omit<{
1425
+ token: string;
1426
+ user: better_auth_plugins.UserWithTwoFactor;
1427
+ }, "user"> & {
1428
+ user: better_auth.StripEmptyObjects<{
1429
+ id: string;
1430
+ createdAt: Date;
1431
+ updatedAt: Date;
1432
+ email: string;
1433
+ emailVerified: boolean;
1434
+ name: string;
1435
+ image?: string | null | undefined;
1436
+ } & {
1437
+ isAnonymous: boolean | null | undefined;
1438
+ } & {} & {} & {
1439
+ username?: string | null | undefined;
1440
+ displayUsername?: string | null | undefined;
1441
+ } & {
1442
+ twoFactorEnabled: boolean | null | undefined;
1443
+ } & {}>;
1444
+ }) | (Omit<{
1445
+ token: string;
1446
+ user: Record<string, any> & {
1447
+ id: string;
1448
+ createdAt: Date;
1449
+ updatedAt: Date;
1450
+ email: string;
1451
+ emailVerified: boolean;
1452
+ name: string;
1453
+ image?: string | null | undefined;
1454
+ };
1455
+ }, "user"> & {
1456
+ user: better_auth.StripEmptyObjects<{
1457
+ id: string;
1458
+ createdAt: Date;
1459
+ updatedAt: Date;
1460
+ email: string;
1461
+ emailVerified: boolean;
1462
+ name: string;
1463
+ image?: string | null | undefined;
1464
+ } & {
1465
+ isAnonymous: boolean | null | undefined;
1466
+ } & {} & {} & {
1467
+ username?: string | null | undefined;
1468
+ displayUsername?: string | null | undefined;
1469
+ } & {
1470
+ twoFactorEnabled: boolean | null | undefined;
1471
+ } & {}>;
1472
+ }), {
1473
+ code?: string | undefined;
1474
+ message?: string | undefined;
1475
+ }, FetchOptions["throw"] extends true ? true : false>>;
1476
+ };
1477
+ } & {
1478
+ twoFactor: {
1479
+ getTotpUri: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1480
+ password: string;
1481
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1482
+ password: string;
1483
+ } & {
1484
+ fetchOptions?: FetchOptions | undefined;
1485
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
1486
+ totpURI: string;
1487
+ }, {
1488
+ code?: string | undefined;
1489
+ message?: string | undefined;
1490
+ }, FetchOptions["throw"] extends true ? true : false>>;
1491
+ };
1492
+ } & {
1493
+ twoFactor: {
1494
+ verifyTotp: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1495
+ code: string;
1496
+ trustDevice?: boolean | undefined;
1497
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1498
+ code: string;
1499
+ trustDevice?: boolean | undefined;
1500
+ } & {
1501
+ fetchOptions?: FetchOptions | undefined;
1502
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<(Omit<{
1503
+ token: string;
1504
+ user: better_auth_plugins.UserWithTwoFactor;
1505
+ }, "user"> & {
1506
+ user: better_auth.StripEmptyObjects<{
1507
+ id: string;
1508
+ createdAt: Date;
1509
+ updatedAt: Date;
1510
+ email: string;
1511
+ emailVerified: boolean;
1512
+ name: string;
1513
+ image?: string | null | undefined;
1514
+ } & {
1515
+ isAnonymous: boolean | null | undefined;
1516
+ } & {} & {} & {
1517
+ username?: string | null | undefined;
1518
+ displayUsername?: string | null | undefined;
1519
+ } & {
1520
+ twoFactorEnabled: boolean | null | undefined;
1521
+ } & {}>;
1522
+ }) | (Omit<{
1523
+ token: string;
1524
+ user: Record<string, any> & {
1525
+ id: string;
1526
+ createdAt: Date;
1527
+ updatedAt: Date;
1528
+ email: string;
1529
+ emailVerified: boolean;
1530
+ name: string;
1531
+ image?: string | null | undefined;
1532
+ };
1533
+ }, "user"> & {
1534
+ user: better_auth.StripEmptyObjects<{
1535
+ id: string;
1536
+ createdAt: Date;
1537
+ updatedAt: Date;
1538
+ email: string;
1539
+ emailVerified: boolean;
1540
+ name: string;
1541
+ image?: string | null | undefined;
1542
+ } & {
1543
+ isAnonymous: boolean | null | undefined;
1544
+ } & {} & {} & {
1545
+ username?: string | null | undefined;
1546
+ displayUsername?: string | null | undefined;
1547
+ } & {
1548
+ twoFactorEnabled: boolean | null | undefined;
1549
+ } & {}>;
1550
+ }), {
1551
+ code?: string | undefined;
1552
+ message?: string | undefined;
1553
+ }, FetchOptions["throw"] extends true ? true : false>>;
1554
+ };
1555
+ } & {
1556
+ organization: {
1557
+ create: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1558
+ name: string;
1559
+ slug: string;
1560
+ userId?: string | undefined;
1561
+ logo?: string | undefined;
1562
+ metadata?: Record<string, any> | undefined;
1563
+ keepCurrentActiveOrganization?: boolean | undefined;
1564
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1565
+ name: string;
1566
+ slug: string;
1567
+ userId?: string | undefined;
1568
+ logo?: string | undefined;
1569
+ metadata?: Record<string, any> | undefined;
1570
+ keepCurrentActiveOrganization?: boolean | undefined;
1571
+ } & {
1572
+ fetchOptions?: FetchOptions | undefined;
1573
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<NonNullable<{
1574
+ id: string;
1575
+ name: string;
1576
+ slug: string;
1577
+ createdAt: Date;
1578
+ logo?: string | null | undefined | undefined;
1579
+ metadata?: any;
1580
+ } & {
1581
+ metadata: any;
1582
+ members: ({
1583
+ id: string;
1584
+ organizationId: string;
1585
+ userId: string;
1586
+ role: string;
1587
+ createdAt: Date;
1588
+ } | undefined)[];
1589
+ }>, {
1590
+ code?: string | undefined;
1591
+ message?: string | undefined;
1592
+ }, FetchOptions["throw"] extends true ? true : false>>;
1593
+ };
1594
+ } & {
1595
+ organization: {
1596
+ update: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1597
+ data: {
1598
+ name?: string | undefined;
1599
+ slug?: string | undefined;
1600
+ logo?: string | undefined;
1601
+ metadata?: Record<string, any> | undefined;
1602
+ } & Partial<{}>;
1603
+ organizationId?: string | undefined;
1604
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1605
+ data: {
1606
+ name?: string | undefined;
1607
+ slug?: string | undefined;
1608
+ logo?: string | undefined;
1609
+ metadata?: Record<string, any> | undefined;
1610
+ } & Partial<{}>;
1611
+ organizationId?: string | undefined;
1612
+ } & {
1613
+ fetchOptions?: FetchOptions | undefined;
1614
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
1615
+ id: string;
1616
+ name: string;
1617
+ slug: string;
1618
+ createdAt: Date;
1619
+ logo?: string | null | undefined | undefined;
1620
+ metadata?: any;
1621
+ }, {
1622
+ code?: string | undefined;
1623
+ message?: string | undefined;
1624
+ }, FetchOptions["throw"] extends true ? true : false>>;
1625
+ };
1626
+ } & {
1627
+ organization: {
1628
+ delete: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1629
+ organizationId: string;
1630
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1631
+ organizationId: string;
1632
+ } & {
1633
+ fetchOptions?: FetchOptions | undefined;
1634
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
1635
+ id: string;
1636
+ name: string;
1637
+ slug: string;
1638
+ createdAt: Date;
1639
+ logo?: string | null | undefined | undefined;
1640
+ metadata?: any;
1641
+ }, {
1642
+ code?: string | undefined;
1643
+ message?: string | undefined;
1644
+ }, FetchOptions["throw"] extends true ? true : false>>;
1645
+ };
1646
+ } & {
1647
+ organization: {
1648
+ setActive: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1649
+ organizationId?: string | null | undefined;
1650
+ organizationSlug?: string | undefined;
1651
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
1652
+ organizationId?: string | null | undefined;
1653
+ organizationSlug?: string | undefined;
1654
+ } & {
1655
+ fetchOptions?: FetchOptions | undefined;
1656
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
1657
+ members: {
1658
+ id: string;
1659
+ organizationId: string;
1660
+ role: "member" | "admin" | "owner";
1661
+ createdAt: Date;
1662
+ userId: string;
1663
+ user: {
1664
+ id: string;
1665
+ email: string;
1666
+ name: string;
1667
+ image?: string | undefined;
1668
+ };
1669
+ }[];
1670
+ invitations: {
1671
+ id: string;
1672
+ organizationId: string;
1673
+ email: string;
1674
+ role: "member" | "admin" | "owner";
1675
+ status: better_auth_plugins.InvitationStatus;
1676
+ inviterId: string;
1677
+ expiresAt: Date;
1678
+ createdAt: Date;
1679
+ }[];
1680
+ } & {
1681
+ id: string;
1682
+ name: string;
1683
+ slug: string;
1684
+ createdAt: Date;
1685
+ logo?: string | null | undefined | undefined;
1686
+ metadata?: any;
1687
+ }, {
1688
+ code?: string | undefined;
1689
+ message?: string | undefined;
1690
+ }, FetchOptions["throw"] extends true ? true : false>>;
1691
+ };
1692
+ } & {
1693
+ organization: {
1694
+ getFullOrganization: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
1695
+ organizationId?: string | undefined;
1696
+ organizationSlug?: string | undefined;
1697
+ membersLimit?: string | number | undefined;
1698
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
1699
+ query?: {
1700
+ organizationId?: string | undefined;
1701
+ organizationSlug?: string | undefined;
1702
+ membersLimit?: string | number | undefined;
1703
+ } | undefined;
1704
+ fetchOptions?: FetchOptions | undefined;
1705
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
1706
+ members: {
1707
+ id: string;
1708
+ organizationId: string;
1709
+ role: "member" | "admin" | "owner";
1710
+ createdAt: Date;
1711
+ userId: string;
1712
+ user: {
1713
+ id: string;
1714
+ email: string;
1715
+ name: string;
1716
+ image?: string | undefined;
1717
+ };
1718
+ }[];
1719
+ invitations: {
1720
+ id: string;
1721
+ organizationId: string;
1722
+ email: string;
1723
+ role: "member" | "admin" | "owner";
1724
+ status: better_auth_plugins.InvitationStatus;
1725
+ inviterId: string;
1726
+ expiresAt: Date;
1727
+ createdAt: Date;
1728
+ }[];
1729
+ } & {
1730
+ id: string;
1731
+ name: string;
1732
+ slug: string;
1733
+ createdAt: Date;
1734
+ logo?: string | null | undefined | undefined;
1735
+ metadata?: any;
1736
+ }, {
1737
+ code?: string | undefined;
1738
+ message?: string | undefined;
1739
+ }, FetchOptions["throw"] extends true ? true : false>>;
1740
+ };
1741
+ } & {
1742
+ organization: {
1743
+ list: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
1744
+ query?: Record<string, any> | undefined;
1745
+ fetchOptions?: FetchOptions | undefined;
1746
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
1747
+ id: string;
1748
+ name: string;
1749
+ slug: string;
1750
+ createdAt: Date;
1751
+ logo?: string | null | undefined | undefined;
1752
+ metadata?: any;
1753
+ }[], {
1754
+ code?: string | undefined;
1755
+ message?: string | undefined;
1756
+ }, FetchOptions["throw"] extends true ? true : false>>;
1757
+ };
1758
+ } & {
1759
+ organization: {
1760
+ inviteMember: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1761
+ email: string;
1762
+ role: "member" | "admin" | "owner" | ("member" | "admin" | "owner")[];
1763
+ organizationId?: string | undefined;
1764
+ resend?: boolean | undefined;
1765
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1766
+ email: string;
1767
+ role: "member" | "admin" | "owner" | ("member" | "admin" | "owner")[];
1768
+ organizationId?: string | undefined;
1769
+ resend?: boolean | undefined;
1770
+ } & {
1771
+ fetchOptions?: FetchOptions | undefined;
1772
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<NonNullable<{
1773
+ id: string;
1774
+ organizationId: string;
1775
+ email: string;
1776
+ role: "member" | "admin" | "owner";
1777
+ status: better_auth_plugins.InvitationStatus;
1778
+ inviterId: string;
1779
+ expiresAt: Date;
1780
+ createdAt: Date;
1781
+ } | {
1782
+ id: string;
1783
+ organizationId: string;
1784
+ email: string;
1785
+ role: "member" | "admin" | "owner";
1786
+ status: better_auth_plugins.InvitationStatus;
1787
+ inviterId: string;
1788
+ expiresAt: Date;
1789
+ createdAt: Date;
1790
+ }>, {
1791
+ code?: string | undefined;
1792
+ message?: string | undefined;
1793
+ }, FetchOptions["throw"] extends true ? true : false>>;
1794
+ };
1795
+ } & {
1796
+ organization: {
1797
+ cancelInvitation: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1798
+ invitationId: string;
1799
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1800
+ invitationId: string;
1801
+ } & {
1802
+ fetchOptions?: FetchOptions | undefined;
1803
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
1804
+ id: string;
1805
+ organizationId: string;
1806
+ email: string;
1807
+ role: "member" | "admin" | "owner";
1808
+ status: better_auth_plugins.InvitationStatus;
1809
+ inviterId: string;
1810
+ expiresAt: Date;
1811
+ createdAt: Date;
1812
+ }, {
1813
+ code?: string | undefined;
1814
+ message?: string | undefined;
1815
+ }, FetchOptions["throw"] extends true ? true : false>>;
1816
+ };
1817
+ } & {
1818
+ organization: {
1819
+ acceptInvitation: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1820
+ invitationId: string;
1821
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1822
+ invitationId: string;
1823
+ } & {
1824
+ fetchOptions?: FetchOptions | undefined;
1825
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
1826
+ invitation: {
1827
+ id: string;
1828
+ organizationId: string;
1829
+ email: string;
1830
+ role: "member" | "admin" | "owner";
1831
+ status: better_auth_plugins.InvitationStatus;
1832
+ inviterId: string;
1833
+ expiresAt: Date;
1834
+ createdAt: Date;
1835
+ };
1836
+ member: {
1837
+ id: string;
1838
+ organizationId: string;
1839
+ userId: string;
1840
+ role: string;
1841
+ createdAt: Date;
1842
+ };
1843
+ }, {
1844
+ code?: string | undefined;
1845
+ message?: string | undefined;
1846
+ }, FetchOptions["throw"] extends true ? true : false>>;
1847
+ };
1848
+ } & {
1849
+ organization: {
1850
+ getInvitation: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
1851
+ id: string;
1852
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1853
+ query: {
1854
+ id: string;
1855
+ };
1856
+ fetchOptions?: FetchOptions | undefined;
1857
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<NonNullable<{
1858
+ id: string;
1859
+ organizationId: string;
1860
+ email: string;
1861
+ role: "member" | "admin" | "owner";
1862
+ status: better_auth_plugins.InvitationStatus;
1863
+ inviterId: string;
1864
+ expiresAt: Date;
1865
+ createdAt: Date;
1866
+ } & {
1867
+ organizationName: string;
1868
+ organizationSlug: string;
1869
+ inviterEmail: string;
1870
+ }>, {
1871
+ code?: string | undefined;
1872
+ message?: string | undefined;
1873
+ }, FetchOptions["throw"] extends true ? true : false>>;
1874
+ };
1875
+ } & {
1876
+ organization: {
1877
+ rejectInvitation: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1878
+ invitationId: string;
1879
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1880
+ invitationId: string;
1881
+ } & {
1882
+ fetchOptions?: FetchOptions | undefined;
1883
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
1884
+ invitation: {
1885
+ id: string;
1886
+ organizationId: string;
1887
+ email: string;
1888
+ role: "admin" | "member" | "owner";
1889
+ status: better_auth_plugins.InvitationStatus;
1890
+ inviterId: string;
1891
+ expiresAt: Date;
1892
+ createdAt: Date;
1893
+ } | null;
1894
+ member: null;
1895
+ }, {
1896
+ code?: string | undefined;
1897
+ message?: string | undefined;
1898
+ }, FetchOptions["throw"] extends true ? true : false>>;
1899
+ };
1900
+ } & {
1901
+ organization: {
1902
+ listInvitations: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
1903
+ organizationId?: string | undefined;
1904
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
1905
+ query?: {
1906
+ organizationId?: string | undefined;
1907
+ } | undefined;
1908
+ fetchOptions?: FetchOptions | undefined;
1909
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
1910
+ id: string;
1911
+ organizationId: string;
1912
+ email: string;
1913
+ role: "member" | "admin" | "owner";
1914
+ status: better_auth_plugins.InvitationStatus;
1915
+ inviterId: string;
1916
+ expiresAt: Date;
1917
+ createdAt: Date;
1918
+ }[], {
1919
+ code?: string | undefined;
1920
+ message?: string | undefined;
1921
+ }, FetchOptions["throw"] extends true ? true : false>>;
1922
+ };
1923
+ } & {
1924
+ organization: {
1925
+ getActiveMember: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
1926
+ query?: Record<string, any> | undefined;
1927
+ fetchOptions?: FetchOptions | undefined;
1928
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<NonNullable<Omit<{
1929
+ id: string;
1930
+ organizationId: string;
1931
+ role: "member" | "admin" | "owner";
1932
+ createdAt: Date;
1933
+ userId: string;
1934
+ user: {
1935
+ id: string;
1936
+ email: string;
1937
+ name: string;
1938
+ image?: string | undefined;
1939
+ };
1940
+ } & {
1941
+ user: {
1942
+ id: string;
1943
+ createdAt: Date;
1944
+ updatedAt: Date;
1945
+ email: string;
1946
+ emailVerified: boolean;
1947
+ name: string;
1948
+ image?: string | null | undefined;
1949
+ };
1950
+ }, "user"> & {
1951
+ user: {
1952
+ id: string;
1953
+ name: string;
1954
+ email: string;
1955
+ image: string | undefined;
1956
+ };
1957
+ }>, {
1958
+ code?: string | undefined;
1959
+ message?: string | undefined;
1960
+ }, FetchOptions["throw"] extends true ? true : false>>;
1961
+ };
1962
+ } & {
1963
+ organization: {
1964
+ checkSlug: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1965
+ slug: string;
1966
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1967
+ slug: string;
1968
+ } & {
1969
+ fetchOptions?: FetchOptions | undefined;
1970
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
1971
+ status: boolean;
1972
+ }, {
1973
+ code?: string | undefined;
1974
+ message?: string | undefined;
1975
+ }, FetchOptions["throw"] extends true ? true : false>>;
1976
+ };
1977
+ } & {
1978
+ organization: {
1979
+ removeMember: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1980
+ memberIdOrEmail: string;
1981
+ organizationId?: string | undefined;
1982
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1983
+ memberIdOrEmail: string;
1984
+ organizationId?: string | undefined;
1985
+ } & {
1986
+ fetchOptions?: FetchOptions | undefined;
1987
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
1988
+ member: {
1989
+ id: string;
1990
+ organizationId: string;
1991
+ role: "member" | "admin" | "owner";
1992
+ createdAt: Date;
1993
+ userId: string;
1994
+ user: {
1995
+ id: string;
1996
+ email: string;
1997
+ name: string;
1998
+ image?: string | undefined;
1999
+ };
2000
+ };
2001
+ }, {
2002
+ code?: string | undefined;
2003
+ message?: string | undefined;
2004
+ }, FetchOptions["throw"] extends true ? true : false>>;
2005
+ };
2006
+ } & {
2007
+ organization: {
2008
+ updateMemberRole: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
2009
+ role: better_auth.LiteralString | better_auth.LiteralString[] | "member" | "admin" | "owner" | ("member" | "admin" | "owner")[];
2010
+ memberId: string;
2011
+ organizationId?: string | undefined;
2012
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
2013
+ role: better_auth.LiteralString | better_auth.LiteralString[] | "member" | "admin" | "owner" | ("member" | "admin" | "owner")[];
2014
+ memberId: string;
2015
+ organizationId?: string | undefined;
2016
+ } & {
2017
+ fetchOptions?: FetchOptions | undefined;
2018
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
2019
+ id: string;
2020
+ organizationId: string;
2021
+ role: "admin" | "member" | "owner";
2022
+ createdAt: Date;
2023
+ userId: string;
2024
+ user: {
2025
+ id: string;
2026
+ email: string;
2027
+ name: string;
2028
+ image?: string | undefined;
2029
+ };
2030
+ }, {
2031
+ code?: string | undefined;
2032
+ message?: string | undefined;
2033
+ }, FetchOptions["throw"] extends true ? true : false>>;
2034
+ };
2035
+ } & {
2036
+ organization: {
2037
+ leave: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
2038
+ organizationId: string;
2039
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
2040
+ organizationId: string;
2041
+ } & {
2042
+ fetchOptions?: FetchOptions | undefined;
2043
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<NonNullable<Omit<{
2044
+ id: string;
2045
+ organizationId: string;
2046
+ role: "member" | "admin" | "owner";
2047
+ createdAt: Date;
2048
+ userId: string;
2049
+ user: {
2050
+ id: string;
2051
+ email: string;
2052
+ name: string;
2053
+ image?: string | undefined;
2054
+ };
2055
+ } & {
2056
+ user: {
2057
+ id: string;
2058
+ createdAt: Date;
2059
+ updatedAt: Date;
2060
+ email: string;
2061
+ emailVerified: boolean;
2062
+ name: string;
2063
+ image?: string | null | undefined;
2064
+ };
2065
+ }, "user"> & {
2066
+ user: {
2067
+ id: string;
2068
+ name: string;
2069
+ email: string;
2070
+ image: string | undefined;
2071
+ };
2072
+ }>, {
2073
+ code?: string | undefined;
2074
+ message?: string | undefined;
2075
+ }, FetchOptions["throw"] extends true ? true : false>>;
2076
+ };
2077
+ } & {
2078
+ organization: {
2079
+ listUserInvitations: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
2080
+ email?: string | undefined;
2081
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
2082
+ query?: {
2083
+ email?: string | undefined;
2084
+ } | undefined;
2085
+ fetchOptions?: FetchOptions | undefined;
2086
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<(Omit<{
2087
+ id: string;
2088
+ organizationId: string;
2089
+ email: string;
2090
+ role: "member" | "admin" | "owner";
2091
+ status: better_auth_plugins.InvitationStatus;
2092
+ inviterId: string;
2093
+ expiresAt: Date;
2094
+ createdAt: Date;
2095
+ } & {
2096
+ organization: {
2097
+ id: string;
2098
+ name: string;
2099
+ slug: string;
2100
+ createdAt: Date;
2101
+ logo?: string | null | undefined | undefined;
2102
+ metadata?: any;
2103
+ };
2104
+ }, "organization"> & {
2105
+ organizationName: string;
2106
+ })[], {
2107
+ code?: string | undefined;
2108
+ message?: string | undefined;
2109
+ }, FetchOptions["throw"] extends true ? true : false>>;
2110
+ };
2111
+ } & {
2112
+ organization: {
2113
+ listMembers: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
2114
+ limit?: string | number | undefined;
2115
+ offset?: string | number | undefined;
2116
+ sortBy?: string | undefined;
2117
+ sortDirection?: "desc" | "asc" | undefined;
2118
+ filterField?: string | undefined;
2119
+ filterValue?: string | number | boolean | string[] | number[] | undefined;
2120
+ filterOperator?: "in" | "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
2121
+ organizationId?: string | undefined;
2122
+ organizationSlug?: string | undefined;
2123
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
2124
+ query?: {
2125
+ limit?: string | number | undefined;
2126
+ offset?: string | number | undefined;
2127
+ sortBy?: string | undefined;
2128
+ sortDirection?: "desc" | "asc" | undefined;
2129
+ filterField?: string | undefined;
2130
+ filterValue?: string | number | boolean | string[] | number[] | undefined;
2131
+ filterOperator?: "in" | "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
2132
+ organizationId?: string | undefined;
2133
+ organizationSlug?: string | undefined;
2134
+ } | undefined;
2135
+ fetchOptions?: FetchOptions | undefined;
2136
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
2137
+ members: ({
2138
+ id: string;
2139
+ organizationId: string;
2140
+ role: "member" | "admin" | "owner";
2141
+ createdAt: Date;
2142
+ userId: string;
2143
+ user: {
2144
+ id: string;
2145
+ email: string;
2146
+ name: string;
2147
+ image?: string | undefined;
2148
+ };
2149
+ } & {
2150
+ user: {
2151
+ id: string;
2152
+ name: string;
2153
+ email: string;
2154
+ image: string | null | undefined;
2155
+ };
2156
+ })[];
2157
+ total: number;
2158
+ }, {
2159
+ code?: string | undefined;
2160
+ message?: string | undefined;
2161
+ }, FetchOptions["throw"] extends true ? true : false>>;
2162
+ };
2163
+ } & {
2164
+ organization: {
2165
+ getActiveMemberRole: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
2166
+ userId?: string | undefined;
2167
+ organizationId?: string | undefined;
2168
+ organizationSlug?: string | undefined;
2169
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
2170
+ query?: {
2171
+ userId?: string | undefined;
2172
+ organizationId?: string | undefined;
2173
+ organizationSlug?: string | undefined;
2174
+ } | undefined;
2175
+ fetchOptions?: FetchOptions | undefined;
2176
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
2177
+ role: "member" | "admin" | "owner";
2178
+ }, {
2179
+ code?: string | undefined;
2180
+ message?: string | undefined;
2181
+ }, FetchOptions["throw"] extends true ? true : false>>;
2182
+ };
2183
+ } & {
2184
+ organization: {
2185
+ hasPermission: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
2186
+ permissions: {
2187
+ readonly organization?: ("update" | "delete")[] | undefined;
2188
+ readonly member?: ("update" | "delete" | "create")[] | undefined;
2189
+ readonly invitation?: ("create" | "cancel")[] | undefined;
2190
+ readonly team?: ("update" | "delete" | "create")[] | undefined;
2191
+ readonly ac?: ("update" | "delete" | "create" | "read")[] | undefined;
2192
+ };
2193
+ } & {
2194
+ organizationId?: string | undefined;
2195
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
2196
+ permissions: {
2197
+ readonly organization?: ("update" | "delete")[] | undefined;
2198
+ readonly member?: ("update" | "delete" | "create")[] | undefined;
2199
+ readonly invitation?: ("create" | "cancel")[] | undefined;
2200
+ readonly team?: ("update" | "delete" | "create")[] | undefined;
2201
+ readonly ac?: ("update" | "delete" | "create" | "read")[] | undefined;
2202
+ };
2203
+ } & {
2204
+ organizationId?: string | undefined;
2205
+ } & {
2206
+ fetchOptions?: FetchOptions | undefined;
2207
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
2208
+ error: null;
2209
+ success: boolean;
2210
+ }, {
2211
+ code?: string | undefined;
2212
+ message?: string | undefined;
2213
+ }, FetchOptions["throw"] extends true ? true : false>>;
2214
+ };
2215
+ } & {
2216
+ oneTap: (opts?: better_auth_client_plugins.GoogleOneTapActionOptions | undefined, fetchOptions?: better_auth.ClientFetchOption | undefined) => Promise<void>;
2217
+ } & {
2218
+ $Infer: {
2219
+ ActiveOrganization: {
2220
+ members: {
2221
+ id: string;
2222
+ organizationId: string;
2223
+ role: "member" | "admin" | "owner";
2224
+ createdAt: Date;
2225
+ userId: string;
2226
+ user: {
2227
+ id: string;
2228
+ email: string;
2229
+ name: string;
2230
+ image?: string | undefined;
2231
+ };
2232
+ }[];
2233
+ invitations: {
2234
+ id: string;
2235
+ organizationId: string;
2236
+ email: string;
2237
+ role: "member" | "admin" | "owner";
2238
+ status: better_auth_plugins.InvitationStatus;
2239
+ inviterId: string;
2240
+ expiresAt: Date;
2241
+ createdAt: Date;
2242
+ }[];
2243
+ } & {
2244
+ id: string;
2245
+ name: string;
2246
+ slug: string;
2247
+ createdAt: Date;
2248
+ logo?: string | null | undefined | undefined;
2249
+ metadata?: any;
2250
+ };
2251
+ Organization: {
2252
+ id: string;
2253
+ name: string;
2254
+ slug: string;
2255
+ createdAt: Date;
2256
+ logo?: string | null | undefined;
2257
+ metadata?: any;
2258
+ };
2259
+ Invitation: {
2260
+ id: string;
2261
+ organizationId: string;
2262
+ email: string;
2263
+ role: "member" | "admin" | "owner";
2264
+ status: better_auth_plugins.InvitationStatus;
2265
+ inviterId: string;
2266
+ expiresAt: Date;
2267
+ createdAt: Date;
2268
+ };
2269
+ Member: {
2270
+ id: string;
2271
+ organizationId: string;
2272
+ role: "member" | "admin" | "owner";
2273
+ createdAt: Date;
2274
+ userId: string;
2275
+ user: {
2276
+ id: string;
2277
+ email: string;
2278
+ name: string;
2279
+ image?: string | undefined;
2280
+ };
2281
+ };
2282
+ Team: {
2283
+ id: string;
2284
+ name: string;
2285
+ organizationId: string;
2286
+ createdAt: Date;
2287
+ updatedAt?: Date | undefined;
2288
+ };
2289
+ };
2290
+ organization: {
2291
+ checkRolePermission: <R extends "member" | "admin" | "owner">(data: {
2292
+ permissions: {
2293
+ readonly organization?: ("update" | "delete")[] | undefined;
2294
+ readonly member?: ("update" | "delete" | "create")[] | undefined;
2295
+ readonly invitation?: ("create" | "cancel")[] | undefined;
2296
+ readonly team?: ("update" | "delete" | "create")[] | undefined;
2297
+ readonly ac?: ("update" | "delete" | "create" | "read")[] | undefined;
2298
+ };
2299
+ } & {
2300
+ role: R;
2301
+ }) => boolean;
2302
+ };
2303
+ } & {
2304
+ useSession: () => {
2305
+ data: {
2306
+ user: better_auth.StripEmptyObjects<{
2307
+ id: string;
2308
+ createdAt: Date;
2309
+ updatedAt: Date;
2310
+ email: string;
2311
+ emailVerified: boolean;
2312
+ name: string;
2313
+ image?: string | null | undefined;
2314
+ } & {
2315
+ isAnonymous: boolean | null | undefined;
2316
+ } & {} & {} & {
2317
+ username?: string | null | undefined;
2318
+ displayUsername?: string | null | undefined;
2319
+ } & {
2320
+ twoFactorEnabled: boolean | null | undefined;
2321
+ } & {}>;
2322
+ session: better_auth.StripEmptyObjects<{
2323
+ id: string;
2324
+ createdAt: Date;
2325
+ updatedAt: Date;
2326
+ userId: string;
2327
+ expiresAt: Date;
2328
+ token: string;
2329
+ ipAddress?: string | null | undefined;
2330
+ userAgent?: string | null | undefined;
2331
+ } & {} & {
2332
+ activeOrganizationId?: string | null | undefined;
2333
+ }>;
2334
+ } | null;
2335
+ isPending: boolean;
2336
+ isRefetching: boolean;
2337
+ error: better_auth_react.BetterFetchError | null;
2338
+ refetch: (queryParams?: {
2339
+ query?: better_auth.SessionQueryParams;
2340
+ } | undefined) => Promise<void>;
2341
+ };
2342
+ $Infer: {
2343
+ Session: {
2344
+ user: better_auth.StripEmptyObjects<{
2345
+ id: string;
2346
+ createdAt: Date;
2347
+ updatedAt: Date;
2348
+ email: string;
2349
+ emailVerified: boolean;
2350
+ name: string;
2351
+ image?: string | null | undefined;
2352
+ } & {
2353
+ isAnonymous: boolean | null | undefined;
2354
+ } & {} & {} & {
2355
+ username?: string | null | undefined;
2356
+ displayUsername?: string | null | undefined;
2357
+ } & {
2358
+ twoFactorEnabled: boolean | null | undefined;
2359
+ } & {}>;
2360
+ session: better_auth.StripEmptyObjects<{
2361
+ id: string;
2362
+ createdAt: Date;
2363
+ updatedAt: Date;
2364
+ userId: string;
2365
+ expiresAt: Date;
2366
+ token: string;
2367
+ ipAddress?: string | null | undefined;
2368
+ userAgent?: string | null | undefined;
2369
+ } & {} & {
2370
+ activeOrganizationId?: string | null | undefined;
2371
+ }>;
2372
+ };
2373
+ };
2374
+ $fetch: better_auth_react.BetterFetch<{
2375
+ plugins: (better_auth_react.BetterFetchPlugin<Record<string, any>> | {
2376
+ id: string;
2377
+ name: string;
2378
+ hooks: {
2379
+ onSuccess(context: better_auth_react.SuccessContext<any>): void;
2380
+ };
2381
+ } | {
2382
+ id: string;
2383
+ name: string;
2384
+ hooks: {
2385
+ onSuccess: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
2386
+ onError: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
2387
+ onRequest: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
2388
+ onResponse: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
2389
+ };
2390
+ })[];
2391
+ cache?: RequestCache | undefined;
2392
+ priority?: RequestPriority | undefined;
2393
+ credentials?: RequestCredentials;
2394
+ headers?: (HeadersInit & (HeadersInit | {
2395
+ accept: "application/json" | "text/plain" | "application/octet-stream";
2396
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
2397
+ authorization: "Bearer" | "Basic";
2398
+ })) | undefined;
2399
+ integrity?: string | undefined;
2400
+ keepalive?: boolean | undefined;
2401
+ method: string;
2402
+ mode?: RequestMode | undefined;
2403
+ redirect?: RequestRedirect | undefined;
2404
+ referrer?: string | undefined;
2405
+ referrerPolicy?: ReferrerPolicy | undefined;
2406
+ signal?: (AbortSignal | null) | undefined;
2407
+ window?: null | undefined;
2408
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
2409
+ hookOptions?: {
2410
+ cloneResponse?: boolean;
2411
+ } | undefined;
2412
+ timeout?: number | undefined;
2413
+ customFetchImpl: better_auth_react.FetchEsque;
2414
+ baseURL: string;
2415
+ throw?: boolean | undefined;
2416
+ auth?: ({
2417
+ type: "Bearer";
2418
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
2419
+ } | {
2420
+ type: "Basic";
2421
+ username: string | (() => string | undefined) | undefined;
2422
+ password: string | (() => string | undefined) | undefined;
2423
+ } | {
2424
+ type: "Custom";
2425
+ prefix: string | (() => string | undefined) | undefined;
2426
+ value: string | (() => string | undefined) | undefined;
2427
+ }) | undefined;
2428
+ body?: any;
2429
+ query?: any;
2430
+ params?: any;
2431
+ duplex?: "full" | "half" | undefined;
2432
+ jsonParser: (text: string) => Promise<any> | any;
2433
+ retry?: better_auth_react.RetryOptions | undefined;
2434
+ retryAttempt?: number | undefined;
2435
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
2436
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
2437
+ disableValidation?: boolean | undefined;
2438
+ disableSignal?: boolean | undefined;
2439
+ }, unknown, unknown, {}>;
2440
+ $store: {
2441
+ notify: (signal?: (Omit<string, "$sessionSignal"> | "$sessionSignal") | undefined) => void;
2442
+ listen: (signal: Omit<string, "$sessionSignal"> | "$sessionSignal", listener: (value: boolean, oldValue?: boolean | undefined) => void) => void;
2443
+ atoms: Record<string, better_auth_react.WritableAtom<any>>;
2444
+ };
2445
+ $ERROR_CODES: {
2446
+ INVALID_SESSION_TOKEN: better_auth.RawError<"INVALID_SESSION_TOKEN">;
2447
+ } & {
2448
+ INVALID_OAUTH_CONFIGURATION: better_auth.RawError<"INVALID_OAUTH_CONFIGURATION">;
2449
+ TOKEN_URL_NOT_FOUND: better_auth.RawError<"TOKEN_URL_NOT_FOUND">;
2450
+ PROVIDER_CONFIG_NOT_FOUND: better_auth.RawError<"PROVIDER_CONFIG_NOT_FOUND">;
2451
+ PROVIDER_ID_REQUIRED: better_auth.RawError<"PROVIDER_ID_REQUIRED">;
2452
+ INVALID_OAUTH_CONFIG: better_auth.RawError<"INVALID_OAUTH_CONFIG">;
2453
+ SESSION_REQUIRED: better_auth.RawError<"SESSION_REQUIRED">;
2454
+ ISSUER_MISMATCH: better_auth.RawError<"ISSUER_MISMATCH">;
2455
+ ISSUER_MISSING: better_auth.RawError<"ISSUER_MISSING">;
2456
+ } & {
2457
+ FAILED_TO_CREATE_USER: better_auth.RawError<"FAILED_TO_CREATE_USER">;
2458
+ COULD_NOT_CREATE_SESSION: better_auth.RawError<"COULD_NOT_CREATE_SESSION">;
2459
+ ANONYMOUS_USERS_CANNOT_SIGN_IN_AGAIN_ANONYMOUSLY: better_auth.RawError<"ANONYMOUS_USERS_CANNOT_SIGN_IN_AGAIN_ANONYMOUSLY">;
2460
+ INVALID_EMAIL_FORMAT: better_auth.RawError<"INVALID_EMAIL_FORMAT">;
2461
+ FAILED_TO_DELETE_ANONYMOUS_USER: better_auth.RawError<"FAILED_TO_DELETE_ANONYMOUS_USER">;
2462
+ USER_IS_NOT_ANONYMOUS: better_auth.RawError<"USER_IS_NOT_ANONYMOUS">;
2463
+ DELETE_ANONYMOUS_USER_DISABLED: better_auth.RawError<"DELETE_ANONYMOUS_USER_DISABLED">;
2464
+ } & {
2465
+ INVALID_USERNAME_OR_PASSWORD: better_auth.RawError<"INVALID_USERNAME_OR_PASSWORD">;
2466
+ EMAIL_NOT_VERIFIED: better_auth.RawError<"EMAIL_NOT_VERIFIED">;
2467
+ UNEXPECTED_ERROR: better_auth.RawError<"UNEXPECTED_ERROR">;
2468
+ USERNAME_IS_ALREADY_TAKEN: better_auth.RawError<"USERNAME_IS_ALREADY_TAKEN">;
2469
+ USERNAME_TOO_SHORT: better_auth.RawError<"USERNAME_TOO_SHORT">;
2470
+ USERNAME_TOO_LONG: better_auth.RawError<"USERNAME_TOO_LONG">;
2471
+ INVALID_USERNAME: better_auth.RawError<"INVALID_USERNAME">;
2472
+ INVALID_DISPLAY_USERNAME: better_auth.RawError<"INVALID_DISPLAY_USERNAME">;
2473
+ } & {
2474
+ OTP_EXPIRED: better_auth.RawError<"OTP_EXPIRED">;
2475
+ INVALID_OTP: better_auth.RawError<"INVALID_OTP">;
2476
+ TOO_MANY_ATTEMPTS: better_auth.RawError<"TOO_MANY_ATTEMPTS">;
2477
+ } & {
2478
+ OTP_NOT_ENABLED: better_auth.RawError<"OTP_NOT_ENABLED">;
2479
+ OTP_HAS_EXPIRED: better_auth.RawError<"OTP_HAS_EXPIRED">;
2480
+ TOTP_NOT_ENABLED: better_auth.RawError<"TOTP_NOT_ENABLED">;
2481
+ TWO_FACTOR_NOT_ENABLED: better_auth.RawError<"TWO_FACTOR_NOT_ENABLED">;
2482
+ BACKUP_CODES_NOT_ENABLED: better_auth.RawError<"BACKUP_CODES_NOT_ENABLED">;
2483
+ INVALID_BACKUP_CODE: better_auth.RawError<"INVALID_BACKUP_CODE">;
2484
+ INVALID_CODE: better_auth.RawError<"INVALID_CODE">;
2485
+ TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE: better_auth.RawError<"TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE">;
2486
+ INVALID_TWO_FACTOR_COOKIE: better_auth.RawError<"INVALID_TWO_FACTOR_COOKIE">;
2487
+ } & {
2488
+ YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_ORGANIZATION: better_auth.RawError<"YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_ORGANIZATION">;
2489
+ YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_ORGANIZATIONS: better_auth.RawError<"YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_ORGANIZATIONS">;
2490
+ ORGANIZATION_ALREADY_EXISTS: better_auth.RawError<"ORGANIZATION_ALREADY_EXISTS">;
2491
+ ORGANIZATION_NOT_FOUND: better_auth.RawError<"ORGANIZATION_NOT_FOUND">;
2492
+ USER_IS_NOT_A_MEMBER_OF_THE_ORGANIZATION: better_auth.RawError<"USER_IS_NOT_A_MEMBER_OF_THE_ORGANIZATION">;
2493
+ YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_ORGANIZATION: better_auth.RawError<"YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_ORGANIZATION">;
2494
+ YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_ORGANIZATION: better_auth.RawError<"YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_ORGANIZATION">;
2495
+ NO_ACTIVE_ORGANIZATION: better_auth.RawError<"NO_ACTIVE_ORGANIZATION">;
2496
+ USER_IS_ALREADY_A_MEMBER_OF_THIS_ORGANIZATION: better_auth.RawError<"USER_IS_ALREADY_A_MEMBER_OF_THIS_ORGANIZATION">;
2497
+ MEMBER_NOT_FOUND: better_auth.RawError<"MEMBER_NOT_FOUND">;
2498
+ ROLE_NOT_FOUND: better_auth.RawError<"ROLE_NOT_FOUND">;
2499
+ YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM: better_auth.RawError<"YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM">;
2500
+ TEAM_ALREADY_EXISTS: better_auth.RawError<"TEAM_ALREADY_EXISTS">;
2501
+ TEAM_NOT_FOUND: better_auth.RawError<"TEAM_NOT_FOUND">;
2502
+ YOU_CANNOT_LEAVE_THE_ORGANIZATION_AS_THE_ONLY_OWNER: better_auth.RawError<"YOU_CANNOT_LEAVE_THE_ORGANIZATION_AS_THE_ONLY_OWNER">;
2503
+ YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_MEMBER: better_auth.RawError<"YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_MEMBER">;
2504
+ YOU_ARE_NOT_ALLOWED_TO_INVITE_USERS_TO_THIS_ORGANIZATION: better_auth.RawError<"YOU_ARE_NOT_ALLOWED_TO_INVITE_USERS_TO_THIS_ORGANIZATION">;
2505
+ USER_IS_ALREADY_INVITED_TO_THIS_ORGANIZATION: better_auth.RawError<"USER_IS_ALREADY_INVITED_TO_THIS_ORGANIZATION">;
2506
+ INVITATION_NOT_FOUND: better_auth.RawError<"INVITATION_NOT_FOUND">;
2507
+ YOU_ARE_NOT_THE_RECIPIENT_OF_THE_INVITATION: better_auth.RawError<"YOU_ARE_NOT_THE_RECIPIENT_OF_THE_INVITATION">;
2508
+ YOU_ARE_NOT_ALLOWED_TO_CANCEL_THIS_INVITATION: better_auth.RawError<"YOU_ARE_NOT_ALLOWED_TO_CANCEL_THIS_INVITATION">;
2509
+ INVITER_IS_NO_LONGER_A_MEMBER_OF_THE_ORGANIZATION: better_auth.RawError<"INVITER_IS_NO_LONGER_A_MEMBER_OF_THE_ORGANIZATION">;
2510
+ YOU_ARE_NOT_ALLOWED_TO_INVITE_USER_WITH_THIS_ROLE: better_auth.RawError<"YOU_ARE_NOT_ALLOWED_TO_INVITE_USER_WITH_THIS_ROLE">;
2511
+ FAILED_TO_RETRIEVE_INVITATION: better_auth.RawError<"FAILED_TO_RETRIEVE_INVITATION">;
2512
+ YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_TEAMS: better_auth.RawError<"YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_TEAMS">;
2513
+ UNABLE_TO_REMOVE_LAST_TEAM: better_auth.RawError<"UNABLE_TO_REMOVE_LAST_TEAM">;
2514
+ YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_MEMBER: better_auth.RawError<"YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_MEMBER">;
2515
+ ORGANIZATION_MEMBERSHIP_LIMIT_REACHED: better_auth.RawError<"ORGANIZATION_MEMBERSHIP_LIMIT_REACHED">;
2516
+ YOU_ARE_NOT_ALLOWED_TO_CREATE_TEAMS_IN_THIS_ORGANIZATION: better_auth.RawError<"YOU_ARE_NOT_ALLOWED_TO_CREATE_TEAMS_IN_THIS_ORGANIZATION">;
2517
+ YOU_ARE_NOT_ALLOWED_TO_DELETE_TEAMS_IN_THIS_ORGANIZATION: better_auth.RawError<"YOU_ARE_NOT_ALLOWED_TO_DELETE_TEAMS_IN_THIS_ORGANIZATION">;
2518
+ YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_TEAM: better_auth.RawError<"YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_TEAM">;
2519
+ YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_TEAM: better_auth.RawError<"YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_TEAM">;
2520
+ INVITATION_LIMIT_REACHED: better_auth.RawError<"INVITATION_LIMIT_REACHED">;
2521
+ ORGANIZATION_SLUG_ALREADY_TAKEN: better_auth.RawError<"ORGANIZATION_SLUG_ALREADY_TAKEN">;
2522
+ YOU_CANNOT_LEAVE_THE_ORGANIZATION_WITHOUT_AN_OWNER: better_auth.RawError<"YOU_CANNOT_LEAVE_THE_ORGANIZATION_WITHOUT_AN_OWNER">;
2523
+ EMAIL_VERIFICATION_REQUIRED_BEFORE_ACCEPTING_OR_REJECTING_INVITATION: better_auth.RawError<"EMAIL_VERIFICATION_REQUIRED_BEFORE_ACCEPTING_OR_REJECTING_INVITATION">;
2524
+ TEAM_MEMBER_LIMIT_REACHED: better_auth.RawError<"TEAM_MEMBER_LIMIT_REACHED">;
2525
+ USER_IS_NOT_A_MEMBER_OF_THE_TEAM: better_auth.RawError<"USER_IS_NOT_A_MEMBER_OF_THE_TEAM">;
2526
+ YOU_CAN_NOT_ACCESS_THE_MEMBERS_OF_THIS_TEAM: better_auth.RawError<"YOU_CAN_NOT_ACCESS_THE_MEMBERS_OF_THIS_TEAM">;
2527
+ YOU_DO_NOT_HAVE_AN_ACTIVE_TEAM: better_auth.RawError<"YOU_DO_NOT_HAVE_AN_ACTIVE_TEAM">;
2528
+ YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM_MEMBER: better_auth.RawError<"YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM_MEMBER">;
2529
+ YOU_ARE_NOT_ALLOWED_TO_REMOVE_A_TEAM_MEMBER: better_auth.RawError<"YOU_ARE_NOT_ALLOWED_TO_REMOVE_A_TEAM_MEMBER">;
2530
+ YOU_ARE_NOT_ALLOWED_TO_ACCESS_THIS_ORGANIZATION: better_auth.RawError<"YOU_ARE_NOT_ALLOWED_TO_ACCESS_THIS_ORGANIZATION">;
2531
+ YOU_ARE_NOT_A_MEMBER_OF_THIS_ORGANIZATION: better_auth.RawError<"YOU_ARE_NOT_A_MEMBER_OF_THIS_ORGANIZATION">;
2532
+ MISSING_AC_INSTANCE: better_auth.RawError<"MISSING_AC_INSTANCE">;
2533
+ YOU_MUST_BE_IN_AN_ORGANIZATION_TO_CREATE_A_ROLE: better_auth.RawError<"YOU_MUST_BE_IN_AN_ORGANIZATION_TO_CREATE_A_ROLE">;
2534
+ YOU_ARE_NOT_ALLOWED_TO_CREATE_A_ROLE: better_auth.RawError<"YOU_ARE_NOT_ALLOWED_TO_CREATE_A_ROLE">;
2535
+ YOU_ARE_NOT_ALLOWED_TO_UPDATE_A_ROLE: better_auth.RawError<"YOU_ARE_NOT_ALLOWED_TO_UPDATE_A_ROLE">;
2536
+ YOU_ARE_NOT_ALLOWED_TO_DELETE_A_ROLE: better_auth.RawError<"YOU_ARE_NOT_ALLOWED_TO_DELETE_A_ROLE">;
2537
+ YOU_ARE_NOT_ALLOWED_TO_READ_A_ROLE: better_auth.RawError<"YOU_ARE_NOT_ALLOWED_TO_READ_A_ROLE">;
2538
+ YOU_ARE_NOT_ALLOWED_TO_LIST_A_ROLE: better_auth.RawError<"YOU_ARE_NOT_ALLOWED_TO_LIST_A_ROLE">;
2539
+ YOU_ARE_NOT_ALLOWED_TO_GET_A_ROLE: better_auth.RawError<"YOU_ARE_NOT_ALLOWED_TO_GET_A_ROLE">;
2540
+ TOO_MANY_ROLES: better_auth.RawError<"TOO_MANY_ROLES">;
2541
+ INVALID_RESOURCE: better_auth.RawError<"INVALID_RESOURCE">;
2542
+ ROLE_NAME_IS_ALREADY_TAKEN: better_auth.RawError<"ROLE_NAME_IS_ALREADY_TAKEN">;
2543
+ CANNOT_DELETE_A_PRE_DEFINED_ROLE: better_auth.RawError<"CANNOT_DELETE_A_PRE_DEFINED_ROLE">;
2544
+ ROLE_IS_ASSIGNED_TO_MEMBERS: better_auth.RawError<"ROLE_IS_ASSIGNED_TO_MEMBERS">;
2545
+ } & {
2546
+ USER_NOT_FOUND: better_auth.RawError<"USER_NOT_FOUND">;
2547
+ FAILED_TO_CREATE_USER: better_auth.RawError<"FAILED_TO_CREATE_USER">;
2548
+ FAILED_TO_CREATE_SESSION: better_auth.RawError<"FAILED_TO_CREATE_SESSION">;
2549
+ FAILED_TO_UPDATE_USER: better_auth.RawError<"FAILED_TO_UPDATE_USER">;
2550
+ FAILED_TO_GET_SESSION: better_auth.RawError<"FAILED_TO_GET_SESSION">;
2551
+ INVALID_PASSWORD: better_auth.RawError<"INVALID_PASSWORD">;
2552
+ INVALID_EMAIL: better_auth.RawError<"INVALID_EMAIL">;
2553
+ INVALID_EMAIL_OR_PASSWORD: better_auth.RawError<"INVALID_EMAIL_OR_PASSWORD">;
2554
+ INVALID_USER: better_auth.RawError<"INVALID_USER">;
2555
+ SOCIAL_ACCOUNT_ALREADY_LINKED: better_auth.RawError<"SOCIAL_ACCOUNT_ALREADY_LINKED">;
2556
+ PROVIDER_NOT_FOUND: better_auth.RawError<"PROVIDER_NOT_FOUND">;
2557
+ INVALID_TOKEN: better_auth.RawError<"INVALID_TOKEN">;
2558
+ TOKEN_EXPIRED: better_auth.RawError<"TOKEN_EXPIRED">;
2559
+ ID_TOKEN_NOT_SUPPORTED: better_auth.RawError<"ID_TOKEN_NOT_SUPPORTED">;
2560
+ FAILED_TO_GET_USER_INFO: better_auth.RawError<"FAILED_TO_GET_USER_INFO">;
2561
+ USER_EMAIL_NOT_FOUND: better_auth.RawError<"USER_EMAIL_NOT_FOUND">;
2562
+ EMAIL_NOT_VERIFIED: better_auth.RawError<"EMAIL_NOT_VERIFIED">;
2563
+ PASSWORD_TOO_SHORT: better_auth.RawError<"PASSWORD_TOO_SHORT">;
2564
+ PASSWORD_TOO_LONG: better_auth.RawError<"PASSWORD_TOO_LONG">;
2565
+ USER_ALREADY_EXISTS: better_auth.RawError<"USER_ALREADY_EXISTS">;
2566
+ USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL: better_auth.RawError<"USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL">;
2567
+ EMAIL_CAN_NOT_BE_UPDATED: better_auth.RawError<"EMAIL_CAN_NOT_BE_UPDATED">;
2568
+ CREDENTIAL_ACCOUNT_NOT_FOUND: better_auth.RawError<"CREDENTIAL_ACCOUNT_NOT_FOUND">;
2569
+ ACCOUNT_NOT_FOUND: better_auth.RawError<"ACCOUNT_NOT_FOUND">;
2570
+ SESSION_EXPIRED: better_auth.RawError<"SESSION_EXPIRED">;
2571
+ FAILED_TO_UNLINK_LAST_ACCOUNT: better_auth.RawError<"FAILED_TO_UNLINK_LAST_ACCOUNT">;
2572
+ USER_ALREADY_HAS_PASSWORD: better_auth.RawError<"USER_ALREADY_HAS_PASSWORD">;
2573
+ CROSS_SITE_NAVIGATION_LOGIN_BLOCKED: better_auth.RawError<"CROSS_SITE_NAVIGATION_LOGIN_BLOCKED">;
2574
+ VERIFICATION_EMAIL_NOT_ENABLED: better_auth.RawError<"VERIFICATION_EMAIL_NOT_ENABLED">;
2575
+ EMAIL_ALREADY_VERIFIED: better_auth.RawError<"EMAIL_ALREADY_VERIFIED">;
2576
+ EMAIL_MISMATCH: better_auth.RawError<"EMAIL_MISMATCH">;
2577
+ SESSION_NOT_FRESH: better_auth.RawError<"SESSION_NOT_FRESH">;
2578
+ LINKED_ACCOUNT_ALREADY_EXISTS: better_auth.RawError<"LINKED_ACCOUNT_ALREADY_EXISTS">;
2579
+ INVALID_ORIGIN: better_auth.RawError<"INVALID_ORIGIN">;
2580
+ INVALID_CALLBACK_URL: better_auth.RawError<"INVALID_CALLBACK_URL">;
2581
+ INVALID_REDIRECT_URL: better_auth.RawError<"INVALID_REDIRECT_URL">;
2582
+ INVALID_ERROR_CALLBACK_URL: better_auth.RawError<"INVALID_ERROR_CALLBACK_URL">;
2583
+ INVALID_NEW_USER_CALLBACK_URL: better_auth.RawError<"INVALID_NEW_USER_CALLBACK_URL">;
2584
+ MISSING_OR_NULL_ORIGIN: better_auth.RawError<"MISSING_OR_NULL_ORIGIN">;
2585
+ CALLBACK_URL_REQUIRED: better_auth.RawError<"CALLBACK_URL_REQUIRED">;
2586
+ FAILED_TO_CREATE_VERIFICATION: better_auth.RawError<"FAILED_TO_CREATE_VERIFICATION">;
2587
+ FIELD_NOT_ALLOWED: better_auth.RawError<"FIELD_NOT_ALLOWED">;
2588
+ ASYNC_VALIDATION_NOT_SUPPORTED: better_auth.RawError<"ASYNC_VALIDATION_NOT_SUPPORTED">;
2589
+ VALIDATION_ERROR: better_auth.RawError<"VALIDATION_ERROR">;
2590
+ MISSING_FIELD: better_auth.RawError<"MISSING_FIELD">;
2591
+ METHOD_NOT_ALLOWED_DEFER_SESSION_REQUIRED: better_auth.RawError<"METHOD_NOT_ALLOWED_DEFER_SESSION_REQUIRED">;
2592
+ BODY_MUST_BE_AN_OBJECT: better_auth.RawError<"BODY_MUST_BE_AN_OBJECT">;
2593
+ PASSWORD_ALREADY_SET: better_auth.RawError<"PASSWORD_ALREADY_SET">;
2594
+ };
2595
+ };
2596
+ type AuthClient = typeof authClient & {
2597
+ apiKey: {
2598
+ create: (opts?: any) => Promise<any>;
2599
+ delete: (opts?: any) => Promise<any>;
2600
+ list: (opts?: any) => Promise<any>;
2601
+ };
2602
+ passkey: {
2603
+ addPasskey: (opts?: any) => Promise<any>;
2604
+ deletePasskey: (opts?: any) => Promise<any>;
2605
+ };
2606
+ useListPasskeys: () => {
2607
+ data?: any[];
2608
+ isPending?: boolean;
2609
+ refetch?: () => void;
2610
+ };
2611
+ signIn: typeof authClient.signIn & {
2612
+ passkey: (opts?: any) => Promise<any>;
2613
+ };
2614
+ };
2615
+ type Session = AuthClient["$Infer"]["Session"]["session"];
2616
+ type User = AuthClient["$Infer"]["Session"]["user"];
2617
+
2618
+ type ApiKey = {
2619
+ id: string;
2620
+ name?: string | null;
2621
+ start?: string | null;
2622
+ expiresAt?: Date | null;
2623
+ createdAt: Date;
2624
+ updatedAt: Date;
2625
+ metadata?: Record<string, unknown> | null;
2626
+ };
2627
+
2628
+ type Invitation = {
2629
+ id: string;
2630
+ organizationId: string;
2631
+ email: string;
2632
+ role: string;
2633
+ status: string;
2634
+ inviterId: string;
2635
+ expiresAt: Date;
2636
+ teamId?: string | undefined;
2637
+ };
2638
+
2639
+ type AnyAuthSession = AnyAuthClient["$Infer"]["Session"];
2640
+ type AuthHook<T> = {
2641
+ isPending: boolean;
2642
+ data?: T | null;
2643
+ error?: BetterFetchError | null;
2644
+ refetch?: Refetch;
2645
+ };
2646
+ type AuthHooks = {
2647
+ useSession: () => ReturnType<AnyAuthClient["useSession"]>;
2648
+ useListAccounts: () => AuthHook<Account[]>;
2649
+ useAccountInfo: (params: Parameters<AuthClient["accountInfo"]>[0]) => AuthHook<{
2650
+ user: User$1;
2651
+ }>;
2652
+ useListDeviceSessions: () => AuthHook<AnyAuthClient["$Infer"]["Session"][]>;
2653
+ useListSessions: () => AuthHook<AnyAuthSession["session"][]>;
2654
+ useListPasskeys: () => Partial<ReturnType<AuthClient["useListPasskeys"]>>;
2655
+ useListApiKeys: () => AuthHook<ApiKey[]>;
2656
+ useActiveOrganization: () => Partial<ReturnType<AuthClient["useActiveOrganization"]>>;
2657
+ useListOrganizations: () => Partial<ReturnType<AuthClient["useListOrganizations"]>>;
2658
+ useHasPermission: (params: Parameters<AuthClient["organization"]["hasPermission"]>[0]) => AuthHook<{
2659
+ error: null;
2660
+ success: boolean;
2661
+ }>;
2662
+ useInvitation: (params: Parameters<AuthClient["organization"]["getInvitation"]>[0]) => AuthHook<Invitation & {
2663
+ organizationName: string;
2664
+ organizationSlug: string;
2665
+ organizationLogo?: string;
2666
+ }>;
2667
+ useListInvitations: (params: Parameters<AuthClient["organization"]["listInvitations"]>[0]) => AuthHook<Invitation[]>;
2668
+ useListUserInvitations: () => AuthHook<Invitation[]>;
2669
+ useListMembers: (params: Parameters<AuthClient["organization"]["listMembers"]>[0]) => AuthHook<{
2670
+ members: (Member & {
2671
+ user?: Partial<User$1> | null;
2672
+ })[];
2673
+ total: number;
2674
+ }>;
2675
+ useIsRestoring?: () => boolean;
2676
+ };
2677
+
2678
+ export type { AnyAuthClient as A, Invitation as I, Refetch as R, Session as S, User as U, AuthClient as a, AuthHooks as b };