@pelatform/starter 0.1.5

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,3439 @@
1
+ import * as better_auth_react from 'better-auth/react';
2
+ import { BetterFetchResponse, createAuthClient, BetterFetchOption } from 'better-auth/react';
3
+ import * as node_modules_better_auth_dist_index_BLP8lbCx_mjs from 'node_modules/better-auth/dist/index-BLP8lbCx.mjs';
4
+ import * as node_modules_better_auth_dist_index_CfImj7fH_mjs from 'node_modules/better-auth/dist/index-CfImj7fH.mjs';
5
+ import * as _simplewebauthn_server from '@simplewebauthn/server';
6
+ import { AuthenticationResponseJSON } from '@simplewebauthn/server';
7
+ import * as better_auth_client_plugins from 'better-auth/client/plugins';
8
+ import * as better_auth_plugins_organization from 'better-auth/plugins/organization';
9
+ import * as better_auth from 'better-auth';
10
+ import * as _better_fetch_fetch from '@better-fetch/fetch';
11
+ import * as node_modules__better_auth_passkey_dist_index_BosVYrMJ_mjs from 'node_modules/@better-auth/passkey/dist/index-BosVYrMJ.mjs';
12
+ import { AnyUseQueryOptions, QueryKey } from '@pelatform/ui/re/tanstack-query';
13
+ import { ComponentType, ComponentProps, ReactNode } from 'react';
14
+ import { Dialog, Card, Avatar, buttonVariants } from '@pelatform/ui/default';
15
+
16
+ type AnyAuthClient = Omit<ReturnType<typeof createAuthClient>, 'signUp' | 'getSession'>;
17
+ declare const authClient: {} & {
18
+ useListPasskeys: () => {
19
+ data: node_modules__better_auth_passkey_dist_index_BosVYrMJ_mjs.n[] | null;
20
+ error: null | _better_fetch_fetch.BetterFetchError;
21
+ isPending: boolean;
22
+ isRefetching: boolean;
23
+ refetch: (queryParams?: {
24
+ query?: better_auth.SessionQueryParams;
25
+ } | undefined) => Promise<void>;
26
+ };
27
+ } & {
28
+ useActiveOrganization: () => {
29
+ data: better_auth_client_plugins.Prettify<{
30
+ id: string;
31
+ name: string;
32
+ slug: string;
33
+ createdAt: Date;
34
+ logo?: string | null | undefined | undefined;
35
+ metadata?: any;
36
+ } & {
37
+ members: {
38
+ id: string;
39
+ organizationId: string;
40
+ role: "admin" | "member" | "owner";
41
+ createdAt: Date;
42
+ userId: string;
43
+ user: {
44
+ id: string;
45
+ email: string;
46
+ name: string;
47
+ image?: string | undefined;
48
+ };
49
+ }[];
50
+ invitations: {
51
+ id: string;
52
+ organizationId: string;
53
+ email: string;
54
+ role: "admin" | "member" | "owner";
55
+ status: better_auth_plugins_organization.InvitationStatus;
56
+ inviterId: string;
57
+ expiresAt: Date;
58
+ createdAt: Date;
59
+ }[];
60
+ }> | null;
61
+ error: null | _better_fetch_fetch.BetterFetchError;
62
+ isPending: boolean;
63
+ isRefetching: boolean;
64
+ refetch: (queryParams?: {
65
+ query?: better_auth.SessionQueryParams;
66
+ } | undefined) => Promise<void>;
67
+ };
68
+ useListOrganizations: () => {
69
+ data: {
70
+ id: string;
71
+ name: string;
72
+ slug: string;
73
+ createdAt: Date;
74
+ logo?: string | null | undefined | undefined;
75
+ metadata?: any;
76
+ }[] | null;
77
+ error: null | _better_fetch_fetch.BetterFetchError;
78
+ isPending: boolean;
79
+ isRefetching: boolean;
80
+ refetch: (queryParams?: {
81
+ query?: better_auth.SessionQueryParams;
82
+ } | undefined) => Promise<void>;
83
+ };
84
+ useActiveMember: () => {
85
+ data: {
86
+ id: string;
87
+ organizationId: string;
88
+ userId: string;
89
+ role: string;
90
+ createdAt: Date;
91
+ } | null;
92
+ error: null | _better_fetch_fetch.BetterFetchError;
93
+ isPending: boolean;
94
+ isRefetching: boolean;
95
+ refetch: (queryParams?: {
96
+ query?: better_auth.SessionQueryParams;
97
+ } | undefined) => Promise<void>;
98
+ };
99
+ useActiveMemberRole: () => {
100
+ data: {
101
+ role: string;
102
+ } | null;
103
+ error: null | _better_fetch_fetch.BetterFetchError;
104
+ isPending: boolean;
105
+ isRefetching: boolean;
106
+ refetch: (queryParams?: {
107
+ query?: better_auth.SessionQueryParams;
108
+ } | undefined) => Promise<void>;
109
+ };
110
+ } & {
111
+ signIn: {
112
+ social: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
113
+ provider: unknown;
114
+ callbackURL?: string | undefined;
115
+ newUserCallbackURL?: string | undefined;
116
+ errorCallbackURL?: string | undefined;
117
+ disableRedirect?: boolean | undefined;
118
+ idToken?: {
119
+ token: string;
120
+ nonce?: string | undefined;
121
+ accessToken?: string | undefined;
122
+ refreshToken?: string | undefined;
123
+ expiresAt?: number | undefined;
124
+ } | undefined;
125
+ scopes?: string[] | undefined;
126
+ requestSignUp?: boolean | undefined;
127
+ loginHint?: string | undefined;
128
+ additionalData?: Record<string, any> | undefined;
129
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
130
+ provider: unknown;
131
+ callbackURL?: string | undefined;
132
+ newUserCallbackURL?: string | undefined;
133
+ errorCallbackURL?: string | undefined;
134
+ disableRedirect?: boolean | undefined;
135
+ idToken?: {
136
+ token: string;
137
+ nonce?: string | undefined;
138
+ accessToken?: string | undefined;
139
+ refreshToken?: string | undefined;
140
+ expiresAt?: number | undefined;
141
+ } | undefined;
142
+ scopes?: string[] | undefined;
143
+ requestSignUp?: boolean | undefined;
144
+ loginHint?: string | undefined;
145
+ additionalData?: Record<string, any> | undefined;
146
+ } & {
147
+ fetchOptions?: FetchOptions | undefined;
148
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<NonNullable<{
149
+ redirect: boolean;
150
+ token: string;
151
+ url: undefined;
152
+ user: {
153
+ id: string;
154
+ email: string;
155
+ name: string;
156
+ image: string | null | undefined;
157
+ emailVerified: boolean;
158
+ createdAt: Date;
159
+ updatedAt: Date;
160
+ };
161
+ } | {
162
+ url: string;
163
+ redirect: boolean;
164
+ }>, {
165
+ code?: string | undefined;
166
+ message?: string | undefined;
167
+ }, FetchOptions["throw"] extends true ? true : false>>;
168
+ };
169
+ } & {
170
+ signOut: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
171
+ query?: Record<string, any> | undefined;
172
+ fetchOptions?: FetchOptions | undefined;
173
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
174
+ success: boolean;
175
+ }, {
176
+ code?: string | undefined;
177
+ message?: string | undefined;
178
+ }, FetchOptions["throw"] extends true ? true : false>>;
179
+ } & {
180
+ signUp: {
181
+ email: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
182
+ name: string;
183
+ email: string;
184
+ password: string;
185
+ image?: string | undefined;
186
+ callbackURL?: string | undefined;
187
+ rememberMe?: boolean | undefined;
188
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
189
+ email: string;
190
+ name: string;
191
+ password: string;
192
+ image?: string | undefined;
193
+ callbackURL?: string | undefined;
194
+ fetchOptions?: FetchOptions | undefined;
195
+ } & {} & {} & {} & {
196
+ phoneNumber?: string | null | undefined;
197
+ } & {} & {} & {} & {
198
+ username?: string | null | undefined;
199
+ displayUsername?: string | null | undefined;
200
+ } & {} & {}>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<NonNullable<{
201
+ token: null;
202
+ user: {
203
+ id: string;
204
+ email: string;
205
+ name: string;
206
+ image: string | null | undefined;
207
+ emailVerified: boolean;
208
+ createdAt: Date;
209
+ updatedAt: Date;
210
+ };
211
+ } | {
212
+ token: string;
213
+ user: {
214
+ id: string;
215
+ email: string;
216
+ name: string;
217
+ image: string | null | undefined;
218
+ emailVerified: boolean;
219
+ createdAt: Date;
220
+ updatedAt: Date;
221
+ };
222
+ }>, {
223
+ code?: string | undefined;
224
+ message?: string | undefined;
225
+ }, FetchOptions["throw"] extends true ? true : false>>;
226
+ };
227
+ } & {
228
+ signIn: {
229
+ email: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
230
+ email: string;
231
+ password: string;
232
+ callbackURL?: string | undefined;
233
+ rememberMe?: boolean | undefined;
234
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
235
+ email: string;
236
+ password: string;
237
+ callbackURL?: string | undefined;
238
+ rememberMe?: boolean | undefined;
239
+ } & {
240
+ fetchOptions?: FetchOptions | undefined;
241
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
242
+ redirect: boolean;
243
+ token: string;
244
+ url: string | undefined;
245
+ user: {
246
+ id: string;
247
+ email: string;
248
+ name: string;
249
+ image: string | null | undefined;
250
+ emailVerified: boolean;
251
+ createdAt: Date;
252
+ updatedAt: Date;
253
+ };
254
+ }, {
255
+ code?: string | undefined;
256
+ message?: string | undefined;
257
+ }, FetchOptions["throw"] extends true ? true : false>>;
258
+ };
259
+ } & {
260
+ resetPassword: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
261
+ newPassword: string;
262
+ token?: string | undefined;
263
+ }> & Record<string, any>, Partial<{
264
+ token?: string | undefined;
265
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
266
+ newPassword: string;
267
+ token?: string | undefined;
268
+ } & {
269
+ fetchOptions?: FetchOptions | undefined;
270
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
271
+ status: boolean;
272
+ }, {
273
+ code?: string | undefined;
274
+ message?: string | undefined;
275
+ }, FetchOptions["throw"] extends true ? true : false>>;
276
+ } & {
277
+ verifyEmail: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
278
+ token: string;
279
+ callbackURL?: string | undefined;
280
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
281
+ query: {
282
+ token: string;
283
+ callbackURL?: string | undefined;
284
+ };
285
+ fetchOptions?: FetchOptions | undefined;
286
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<NonNullable<void | {
287
+ status: boolean;
288
+ }>, {
289
+ code?: string | undefined;
290
+ message?: string | undefined;
291
+ }, FetchOptions["throw"] extends true ? true : false>>;
292
+ } & {
293
+ sendVerificationEmail: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
294
+ email: string;
295
+ callbackURL?: string | undefined;
296
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
297
+ email: string;
298
+ callbackURL?: string | undefined;
299
+ } & {
300
+ fetchOptions?: FetchOptions | undefined;
301
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
302
+ status: boolean;
303
+ }, {
304
+ code?: string | undefined;
305
+ message?: string | undefined;
306
+ }, FetchOptions["throw"] extends true ? true : false>>;
307
+ } & {
308
+ changeEmail: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
309
+ newEmail: string;
310
+ callbackURL?: string | undefined;
311
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
312
+ newEmail: string;
313
+ callbackURL?: string | undefined;
314
+ } & {
315
+ fetchOptions?: FetchOptions | undefined;
316
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
317
+ status: boolean;
318
+ }, {
319
+ code?: string | undefined;
320
+ message?: string | undefined;
321
+ }, FetchOptions["throw"] extends true ? true : false>>;
322
+ } & {
323
+ changePassword: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
324
+ newPassword: string;
325
+ currentPassword: string;
326
+ revokeOtherSessions?: boolean | undefined;
327
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
328
+ newPassword: string;
329
+ currentPassword: string;
330
+ revokeOtherSessions?: boolean | undefined;
331
+ } & {
332
+ fetchOptions?: FetchOptions | undefined;
333
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
334
+ token: string | null;
335
+ user: {
336
+ id: string;
337
+ email: string;
338
+ name: string;
339
+ image: string | null | undefined;
340
+ emailVerified: boolean;
341
+ createdAt: Date;
342
+ updatedAt: Date;
343
+ };
344
+ }, {
345
+ code?: string | undefined;
346
+ message?: string | undefined;
347
+ }, FetchOptions["throw"] extends true ? true : false>>;
348
+ } & {
349
+ updateUser: <FetchOptions extends better_auth.ClientFetchOption<Partial<Partial<{}> & {
350
+ name?: string | undefined;
351
+ image?: string | undefined;
352
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
353
+ image?: (string | null) | undefined;
354
+ name?: string | undefined;
355
+ fetchOptions?: FetchOptions | undefined;
356
+ } & Partial<{} & {} & {} & {
357
+ phoneNumber?: string | null | undefined;
358
+ } & {} & {} & {} & {
359
+ username?: string | null | undefined;
360
+ displayUsername?: string | null | undefined;
361
+ } & {} & {}>> | undefined, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
362
+ status: boolean;
363
+ }, {
364
+ code?: string | undefined;
365
+ message?: string | undefined;
366
+ }, FetchOptions["throw"] extends true ? true : false>>;
367
+ } & {
368
+ deleteUser: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
369
+ callbackURL?: string | undefined;
370
+ password?: string | undefined;
371
+ token?: string | undefined;
372
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
373
+ callbackURL?: string | undefined;
374
+ password?: string | undefined;
375
+ token?: string | undefined;
376
+ } & {
377
+ fetchOptions?: FetchOptions | undefined;
378
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
379
+ success: boolean;
380
+ message: string;
381
+ }, {
382
+ code?: string | undefined;
383
+ message?: string | undefined;
384
+ }, FetchOptions["throw"] extends true ? true : false>>;
385
+ } & {
386
+ requestPasswordReset: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
387
+ email: string;
388
+ redirectTo?: string | undefined;
389
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
390
+ email: string;
391
+ redirectTo?: string | undefined;
392
+ } & {
393
+ fetchOptions?: FetchOptions | undefined;
394
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
395
+ status: boolean;
396
+ message: string;
397
+ }, {
398
+ code?: string | undefined;
399
+ message?: string | undefined;
400
+ }, FetchOptions["throw"] extends true ? true : false>>;
401
+ } & {
402
+ resetPassword: {
403
+ ":token": <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
404
+ callbackURL: string;
405
+ }> & Record<string, any>, {
406
+ token: string;
407
+ }>>(data_0: better_auth_client_plugins.Prettify<{
408
+ query: {
409
+ callbackURL: string;
410
+ };
411
+ fetchOptions?: FetchOptions | undefined;
412
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<never, {
413
+ code?: string | undefined;
414
+ message?: string | undefined;
415
+ }, FetchOptions["throw"] extends true ? true : false>>;
416
+ };
417
+ } & {
418
+ listSessions: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
419
+ query?: Record<string, any> | undefined;
420
+ fetchOptions?: FetchOptions | undefined;
421
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<better_auth_client_plugins.Prettify<{
422
+ id: string;
423
+ createdAt: Date;
424
+ updatedAt: Date;
425
+ userId: string;
426
+ expiresAt: Date;
427
+ token: string;
428
+ ipAddress?: string | null | undefined | undefined;
429
+ userAgent?: string | null | undefined | undefined;
430
+ }>[], {
431
+ code?: string | undefined;
432
+ message?: string | undefined;
433
+ }, FetchOptions["throw"] extends true ? true : false>>;
434
+ } & {
435
+ revokeSession: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
436
+ token: string;
437
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
438
+ token: string;
439
+ } & {
440
+ fetchOptions?: FetchOptions | undefined;
441
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
442
+ status: boolean;
443
+ }, {
444
+ code?: string | undefined;
445
+ message?: string | undefined;
446
+ }, FetchOptions["throw"] extends true ? true : false>>;
447
+ } & {
448
+ revokeSessions: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
449
+ query?: Record<string, any> | undefined;
450
+ fetchOptions?: FetchOptions | undefined;
451
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
452
+ status: boolean;
453
+ }, {
454
+ code?: string | undefined;
455
+ message?: string | undefined;
456
+ }, FetchOptions["throw"] extends true ? true : false>>;
457
+ } & {
458
+ revokeOtherSessions: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
459
+ query?: Record<string, any> | undefined;
460
+ fetchOptions?: FetchOptions | undefined;
461
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
462
+ status: boolean;
463
+ }, {
464
+ code?: string | undefined;
465
+ message?: string | undefined;
466
+ }, FetchOptions["throw"] extends true ? true : false>>;
467
+ } & {
468
+ linkSocial: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
469
+ provider: unknown;
470
+ callbackURL?: string | undefined;
471
+ idToken?: {
472
+ token: string;
473
+ nonce?: string | undefined;
474
+ accessToken?: string | undefined;
475
+ refreshToken?: string | undefined;
476
+ scopes?: string[] | undefined;
477
+ } | undefined;
478
+ requestSignUp?: boolean | undefined;
479
+ scopes?: string[] | undefined;
480
+ errorCallbackURL?: string | undefined;
481
+ disableRedirect?: boolean | undefined;
482
+ additionalData?: Record<string, any> | undefined;
483
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
484
+ provider: unknown;
485
+ callbackURL?: string | undefined;
486
+ idToken?: {
487
+ token: string;
488
+ nonce?: string | undefined;
489
+ accessToken?: string | undefined;
490
+ refreshToken?: string | undefined;
491
+ scopes?: string[] | undefined;
492
+ } | undefined;
493
+ requestSignUp?: boolean | undefined;
494
+ scopes?: string[] | undefined;
495
+ errorCallbackURL?: string | undefined;
496
+ disableRedirect?: boolean | undefined;
497
+ additionalData?: Record<string, any> | undefined;
498
+ } & {
499
+ fetchOptions?: FetchOptions | undefined;
500
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
501
+ url: string;
502
+ redirect: boolean;
503
+ }, {
504
+ code?: string | undefined;
505
+ message?: string | undefined;
506
+ }, FetchOptions["throw"] extends true ? true : false>>;
507
+ } & {
508
+ listAccounts: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
509
+ query?: Record<string, any> | undefined;
510
+ fetchOptions?: FetchOptions | undefined;
511
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
512
+ id: string;
513
+ providerId: string;
514
+ createdAt: Date;
515
+ updatedAt: Date;
516
+ accountId: string;
517
+ userId: string;
518
+ scopes: string[];
519
+ }[], {
520
+ code?: string | undefined;
521
+ message?: string | undefined;
522
+ }, FetchOptions["throw"] extends true ? true : false>>;
523
+ } & {
524
+ deleteUser: {
525
+ callback: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
526
+ token: string;
527
+ callbackURL?: string | undefined;
528
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
529
+ query: {
530
+ token: string;
531
+ callbackURL?: string | undefined;
532
+ };
533
+ fetchOptions?: FetchOptions | undefined;
534
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
535
+ success: boolean;
536
+ message: string;
537
+ }, {
538
+ code?: string | undefined;
539
+ message?: string | undefined;
540
+ }, FetchOptions["throw"] extends true ? true : false>>;
541
+ };
542
+ } & {
543
+ unlinkAccount: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
544
+ providerId: string;
545
+ accountId?: string | undefined;
546
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
547
+ providerId: string;
548
+ accountId?: string | undefined;
549
+ } & {
550
+ fetchOptions?: FetchOptions | undefined;
551
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
552
+ status: boolean;
553
+ }, {
554
+ code?: string | undefined;
555
+ message?: string | undefined;
556
+ }, FetchOptions["throw"] extends true ? true : false>>;
557
+ } & {
558
+ refreshToken: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
559
+ providerId: string;
560
+ accountId?: string | undefined;
561
+ userId?: string | undefined;
562
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
563
+ providerId: string;
564
+ accountId?: string | undefined;
565
+ userId?: string | undefined;
566
+ } & {
567
+ fetchOptions?: FetchOptions | undefined;
568
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
569
+ accessToken: string | undefined;
570
+ refreshToken: string | undefined;
571
+ accessTokenExpiresAt: Date | undefined;
572
+ refreshTokenExpiresAt: Date | undefined;
573
+ scope: string | null | undefined;
574
+ idToken: string | null | undefined;
575
+ providerId: string;
576
+ accountId: string;
577
+ }, {
578
+ code?: string | undefined;
579
+ message?: string | undefined;
580
+ }, FetchOptions["throw"] extends true ? true : false>>;
581
+ } & {
582
+ getAccessToken: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
583
+ providerId: string;
584
+ accountId?: string | undefined;
585
+ userId?: string | undefined;
586
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
587
+ providerId: string;
588
+ accountId?: string | undefined;
589
+ userId?: string | undefined;
590
+ } & {
591
+ fetchOptions?: FetchOptions | undefined;
592
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
593
+ accessToken: string;
594
+ accessTokenExpiresAt: Date | undefined;
595
+ scopes: string[];
596
+ idToken: string | undefined;
597
+ }, {
598
+ code?: string | undefined;
599
+ message?: string | undefined;
600
+ }, FetchOptions["throw"] extends true ? true : false>>;
601
+ } & {
602
+ accountInfo: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
603
+ accountId?: string | undefined;
604
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
605
+ query?: {
606
+ accountId?: string | undefined;
607
+ } | undefined;
608
+ fetchOptions?: FetchOptions | undefined;
609
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
610
+ user: better_auth.OAuth2UserInfo;
611
+ data: Record<string, any>;
612
+ }, {
613
+ code?: string | undefined;
614
+ message?: string | undefined;
615
+ }, FetchOptions["throw"] extends true ? true : false>>;
616
+ } & {
617
+ getSession: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
618
+ disableCookieCache?: unknown;
619
+ disableRefresh?: unknown;
620
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
621
+ query?: {
622
+ disableCookieCache?: unknown;
623
+ disableRefresh?: unknown;
624
+ } | undefined;
625
+ fetchOptions?: FetchOptions | undefined;
626
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
627
+ user: {
628
+ id: string;
629
+ createdAt: Date;
630
+ updatedAt: Date;
631
+ email: string;
632
+ emailVerified: boolean;
633
+ name: string;
634
+ image?: string | null | undefined;
635
+ isAnonymous: boolean | null | undefined;
636
+ phoneNumber?: string | null | undefined;
637
+ phoneNumberVerified?: boolean | null | undefined;
638
+ twoFactorEnabled: boolean | null | undefined;
639
+ username?: string | null | undefined;
640
+ displayUsername?: string | null | undefined;
641
+ banned: boolean | null | undefined;
642
+ role?: string | null | undefined;
643
+ banReason?: string | null | undefined;
644
+ banExpires?: Date | null | undefined;
645
+ };
646
+ session: {
647
+ id: string;
648
+ createdAt: Date;
649
+ updatedAt: Date;
650
+ userId: string;
651
+ expiresAt: Date;
652
+ token: string;
653
+ ipAddress?: string | null | undefined;
654
+ userAgent?: string | null | undefined;
655
+ impersonatedBy?: string | null | undefined;
656
+ activeOrganizationId?: string | null | undefined;
657
+ };
658
+ } | null, {
659
+ code?: string | undefined;
660
+ message?: string | undefined;
661
+ }, FetchOptions["throw"] extends true ? true : false>>;
662
+ } & {
663
+ signIn: {
664
+ anonymous: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
665
+ query?: Record<string, any> | undefined;
666
+ fetchOptions?: FetchOptions | undefined;
667
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
668
+ token: string;
669
+ user: {
670
+ id: string;
671
+ email: string;
672
+ emailVerified: boolean;
673
+ name: string;
674
+ createdAt: Date;
675
+ updatedAt: Date;
676
+ };
677
+ }, {
678
+ code?: string | undefined;
679
+ message?: string | undefined;
680
+ }, FetchOptions["throw"] extends true ? true : false>>;
681
+ };
682
+ } & {
683
+ emailOtp: {
684
+ checkVerificationOtp: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
685
+ email: string;
686
+ type: "sign-in" | "email-verification" | "forget-password";
687
+ otp: string;
688
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
689
+ email: string;
690
+ type: "sign-in" | "email-verification" | "forget-password";
691
+ otp: string;
692
+ } & {
693
+ fetchOptions?: FetchOptions | undefined;
694
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
695
+ success: boolean;
696
+ }, {
697
+ code?: string | undefined;
698
+ message?: string | undefined;
699
+ }, FetchOptions["throw"] extends true ? true : false>>;
700
+ };
701
+ } & {
702
+ emailOtp: {
703
+ verifyEmail: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
704
+ email: string;
705
+ otp: string;
706
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
707
+ email: string;
708
+ otp: string;
709
+ } & {
710
+ fetchOptions?: FetchOptions | undefined;
711
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<NonNullable<{
712
+ status: boolean;
713
+ token: string;
714
+ user: {
715
+ id: string;
716
+ email: string;
717
+ emailVerified: boolean;
718
+ name: string;
719
+ image: string | null | undefined;
720
+ createdAt: Date;
721
+ updatedAt: Date;
722
+ };
723
+ } | {
724
+ status: boolean;
725
+ token: null;
726
+ user: {
727
+ id: string;
728
+ email: string;
729
+ emailVerified: boolean;
730
+ name: string;
731
+ image: string | null | undefined;
732
+ createdAt: Date;
733
+ updatedAt: Date;
734
+ };
735
+ }>, {
736
+ code?: string | undefined;
737
+ message?: string | undefined;
738
+ }, FetchOptions["throw"] extends true ? true : false>>;
739
+ };
740
+ } & {
741
+ signIn: {
742
+ emailOtp: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
743
+ email: string;
744
+ otp: string;
745
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
746
+ email: string;
747
+ otp: string;
748
+ } & {
749
+ fetchOptions?: FetchOptions | undefined;
750
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
751
+ token: string;
752
+ user: {
753
+ id: string;
754
+ email: string;
755
+ emailVerified: boolean;
756
+ name: string;
757
+ image: string | null | undefined;
758
+ createdAt: Date;
759
+ updatedAt: Date;
760
+ };
761
+ }, {
762
+ code?: string | undefined;
763
+ message?: string | undefined;
764
+ }, FetchOptions["throw"] extends true ? true : false>>;
765
+ };
766
+ } & {
767
+ forgetPassword: {
768
+ emailOtp: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
769
+ email: string;
770
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
771
+ email: string;
772
+ } & {
773
+ fetchOptions?: FetchOptions | undefined;
774
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
775
+ success: boolean;
776
+ }, {
777
+ code?: string | undefined;
778
+ message?: string | undefined;
779
+ }, FetchOptions["throw"] extends true ? true : false>>;
780
+ };
781
+ } & {
782
+ emailOtp: {
783
+ resetPassword: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
784
+ email: string;
785
+ otp: string;
786
+ password: string;
787
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
788
+ email: string;
789
+ otp: string;
790
+ password: string;
791
+ } & {
792
+ fetchOptions?: FetchOptions | undefined;
793
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
794
+ success: boolean;
795
+ }, {
796
+ code?: string | undefined;
797
+ message?: string | undefined;
798
+ }, FetchOptions["throw"] extends true ? true : false>>;
799
+ };
800
+ } & {
801
+ emailOtp: {
802
+ sendVerificationOtp: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
803
+ email: string;
804
+ type: "sign-in" | "email-verification" | "forget-password";
805
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
806
+ email: string;
807
+ type: "sign-in" | "email-verification" | "forget-password";
808
+ } & {
809
+ fetchOptions?: FetchOptions | undefined;
810
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
811
+ success: boolean;
812
+ }, {
813
+ code?: string | undefined;
814
+ message?: string | undefined;
815
+ }, FetchOptions["throw"] extends true ? true : false>>;
816
+ };
817
+ } & {
818
+ signIn: {
819
+ magicLink: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
820
+ email: string;
821
+ name?: string | undefined;
822
+ callbackURL?: string | undefined;
823
+ newUserCallbackURL?: string | undefined;
824
+ errorCallbackURL?: string | undefined;
825
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
826
+ email: string;
827
+ name?: string | undefined;
828
+ callbackURL?: string | undefined;
829
+ newUserCallbackURL?: string | undefined;
830
+ errorCallbackURL?: string | undefined;
831
+ } & {
832
+ fetchOptions?: FetchOptions | undefined;
833
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
834
+ status: boolean;
835
+ }, {
836
+ code?: string | undefined;
837
+ message?: string | undefined;
838
+ }, FetchOptions["throw"] extends true ? true : false>>;
839
+ };
840
+ } & {
841
+ magicLink: {
842
+ verify: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
843
+ token: string;
844
+ callbackURL?: string | undefined;
845
+ errorCallbackURL?: string | undefined;
846
+ newUserCallbackURL?: string | undefined;
847
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
848
+ query: {
849
+ token: string;
850
+ callbackURL?: string | undefined;
851
+ errorCallbackURL?: string | undefined;
852
+ newUserCallbackURL?: string | undefined;
853
+ };
854
+ fetchOptions?: FetchOptions | undefined;
855
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
856
+ token: string;
857
+ user: {
858
+ id: string;
859
+ email: string;
860
+ emailVerified: boolean;
861
+ name: string;
862
+ image: string | null | undefined;
863
+ createdAt: Date;
864
+ updatedAt: Date;
865
+ };
866
+ }, {
867
+ code?: string | undefined;
868
+ message?: string | undefined;
869
+ }, FetchOptions["throw"] extends true ? true : false>>;
870
+ };
871
+ } & {
872
+ signIn: {
873
+ oauth2: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
874
+ providerId: string;
875
+ callbackURL?: string | undefined;
876
+ errorCallbackURL?: string | undefined;
877
+ newUserCallbackURL?: string | undefined;
878
+ disableRedirect?: boolean | undefined;
879
+ scopes?: string[] | undefined;
880
+ requestSignUp?: boolean | undefined;
881
+ additionalData?: Record<string, any> | undefined;
882
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
883
+ providerId: string;
884
+ callbackURL?: string | undefined;
885
+ errorCallbackURL?: string | undefined;
886
+ newUserCallbackURL?: string | undefined;
887
+ disableRedirect?: boolean | undefined;
888
+ scopes?: string[] | undefined;
889
+ requestSignUp?: boolean | undefined;
890
+ additionalData?: Record<string, any> | undefined;
891
+ } & {
892
+ fetchOptions?: FetchOptions | undefined;
893
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
894
+ url: string;
895
+ redirect: boolean;
896
+ }, {
897
+ code?: string | undefined;
898
+ message?: string | undefined;
899
+ }, FetchOptions["throw"] extends true ? true : false>>;
900
+ };
901
+ } & {
902
+ oauth2: {
903
+ callback: {
904
+ ":providerid": <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
905
+ code?: string | undefined;
906
+ error?: string | undefined;
907
+ error_description?: string | undefined;
908
+ state?: string | undefined;
909
+ }> & Record<string, any>, {
910
+ providerId: string;
911
+ }>>(data_0: better_auth_client_plugins.Prettify<{
912
+ query: {
913
+ code?: string | undefined;
914
+ error?: string | undefined;
915
+ error_description?: string | undefined;
916
+ state?: string | undefined;
917
+ };
918
+ fetchOptions?: FetchOptions | undefined;
919
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<NonNullable<void>, {
920
+ code?: string | undefined;
921
+ message?: string | undefined;
922
+ }, FetchOptions["throw"] extends true ? true : false>>;
923
+ };
924
+ };
925
+ } & {
926
+ oauth2: {
927
+ link: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
928
+ providerId: string;
929
+ callbackURL: string;
930
+ scopes?: string[] | undefined;
931
+ errorCallbackURL?: string | undefined;
932
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
933
+ providerId: string;
934
+ callbackURL: string;
935
+ scopes?: string[] | undefined;
936
+ errorCallbackURL?: string | undefined;
937
+ } & {
938
+ fetchOptions?: FetchOptions | undefined;
939
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
940
+ url: string;
941
+ redirect: boolean;
942
+ }, {
943
+ code?: string | undefined;
944
+ message?: string | undefined;
945
+ }, FetchOptions["throw"] extends true ? true : false>>;
946
+ };
947
+ } & {
948
+ passkey: {
949
+ generateRegisterOptions: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
950
+ authenticatorAttachment?: "platform" | "cross-platform" | undefined;
951
+ name?: string | undefined;
952
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
953
+ query?: {
954
+ authenticatorAttachment?: "platform" | "cross-platform" | undefined;
955
+ name?: string | undefined;
956
+ } | undefined;
957
+ fetchOptions?: FetchOptions | undefined;
958
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<_simplewebauthn_server.PublicKeyCredentialCreationOptionsJSON, {
959
+ code?: string | undefined;
960
+ message?: string | undefined;
961
+ }, FetchOptions["throw"] extends true ? true : false>>;
962
+ };
963
+ } & {
964
+ passkey: {
965
+ generateAuthenticateOptions: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
966
+ query?: Record<string, any> | undefined;
967
+ fetchOptions?: FetchOptions | undefined;
968
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<_simplewebauthn_server.PublicKeyCredentialRequestOptionsJSON, {
969
+ code?: string | undefined;
970
+ message?: string | undefined;
971
+ }, FetchOptions["throw"] extends true ? true : false>>;
972
+ };
973
+ } & {
974
+ passkey: {
975
+ verifyRegistration: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
976
+ response: any;
977
+ name?: string | undefined;
978
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
979
+ response: any;
980
+ name?: string | undefined;
981
+ } & {
982
+ fetchOptions?: FetchOptions | undefined;
983
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<node_modules__better_auth_passkey_dist_index_BosVYrMJ_mjs.n, {
984
+ code?: string | undefined;
985
+ message?: string | undefined;
986
+ }, FetchOptions["throw"] extends true ? true : false>>;
987
+ };
988
+ } & {
989
+ passkey: {
990
+ verifyAuthentication: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
991
+ response: AuthenticationResponseJSON;
992
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
993
+ response: AuthenticationResponseJSON;
994
+ } & {
995
+ fetchOptions?: FetchOptions | undefined;
996
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
997
+ session: {
998
+ id: string;
999
+ createdAt: Date;
1000
+ updatedAt: Date;
1001
+ userId: string;
1002
+ expiresAt: Date;
1003
+ token: string;
1004
+ ipAddress?: string | null | undefined;
1005
+ userAgent?: string | null | undefined;
1006
+ };
1007
+ }, {
1008
+ code?: string | undefined;
1009
+ message?: string | undefined;
1010
+ }, FetchOptions["throw"] extends true ? true : false>>;
1011
+ };
1012
+ } & {
1013
+ passkey: {
1014
+ listUserPasskeys: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
1015
+ query?: Record<string, any> | undefined;
1016
+ fetchOptions?: FetchOptions | undefined;
1017
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<node_modules__better_auth_passkey_dist_index_BosVYrMJ_mjs.n[], {
1018
+ code?: string | undefined;
1019
+ message?: string | undefined;
1020
+ }, FetchOptions["throw"] extends true ? true : false>>;
1021
+ };
1022
+ } & {
1023
+ passkey: {
1024
+ deletePasskey: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1025
+ id: string;
1026
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
1027
+ id: string;
1028
+ } & {
1029
+ fetchOptions?: FetchOptions | undefined;
1030
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<never, {
1031
+ code?: string | undefined;
1032
+ message?: string | undefined;
1033
+ }, FetchOptions["throw"] extends true ? true : false>>;
1034
+ };
1035
+ } & {
1036
+ passkey: {
1037
+ updatePasskey: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1038
+ id: string;
1039
+ name: string;
1040
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
1041
+ id: string;
1042
+ name: string;
1043
+ } & {
1044
+ fetchOptions?: FetchOptions | undefined;
1045
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
1046
+ passkey: node_modules__better_auth_passkey_dist_index_BosVYrMJ_mjs.n;
1047
+ }, {
1048
+ code?: string | undefined;
1049
+ message?: string | undefined;
1050
+ }, FetchOptions["throw"] extends true ? true : false>>;
1051
+ };
1052
+ } & {
1053
+ signIn: {
1054
+ phoneNumber: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1055
+ phoneNumber: string;
1056
+ password: string;
1057
+ rememberMe?: boolean | undefined;
1058
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
1059
+ phoneNumber: string;
1060
+ password: string;
1061
+ rememberMe?: boolean | undefined;
1062
+ } & {
1063
+ fetchOptions?: FetchOptions | undefined;
1064
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
1065
+ token: string;
1066
+ user: node_modules_better_auth_dist_index_CfImj7fH_mjs.r;
1067
+ }, {
1068
+ code?: string | undefined;
1069
+ message?: string | undefined;
1070
+ }, FetchOptions["throw"] extends true ? true : false>>;
1071
+ };
1072
+ } & {
1073
+ phoneNumber: {
1074
+ sendOtp: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1075
+ phoneNumber: string;
1076
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
1077
+ phoneNumber: string;
1078
+ } & {
1079
+ fetchOptions?: FetchOptions | undefined;
1080
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
1081
+ message: string;
1082
+ }, {
1083
+ code?: string | undefined;
1084
+ message?: string | undefined;
1085
+ }, FetchOptions["throw"] extends true ? true : false>>;
1086
+ };
1087
+ } & {
1088
+ phoneNumber: {
1089
+ verify: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1090
+ phoneNumber: string;
1091
+ code: string;
1092
+ disableSession?: boolean | undefined;
1093
+ updatePhoneNumber?: boolean | undefined;
1094
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
1095
+ phoneNumber: string;
1096
+ code: string;
1097
+ disableSession?: boolean | undefined;
1098
+ updatePhoneNumber?: boolean | undefined;
1099
+ } & {
1100
+ fetchOptions?: FetchOptions | undefined;
1101
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<NonNullable<{
1102
+ status: boolean;
1103
+ token: string;
1104
+ user: node_modules_better_auth_dist_index_CfImj7fH_mjs.r;
1105
+ } | {
1106
+ status: boolean;
1107
+ token: null;
1108
+ user: node_modules_better_auth_dist_index_CfImj7fH_mjs.r;
1109
+ }>, {
1110
+ code?: string | undefined;
1111
+ message?: string | undefined;
1112
+ }, FetchOptions["throw"] extends true ? true : false>>;
1113
+ };
1114
+ } & {
1115
+ phoneNumber: {
1116
+ requestPasswordReset: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1117
+ phoneNumber: string;
1118
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
1119
+ phoneNumber: string;
1120
+ } & {
1121
+ fetchOptions?: FetchOptions | undefined;
1122
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
1123
+ status: boolean;
1124
+ }, {
1125
+ code?: string | undefined;
1126
+ message?: string | undefined;
1127
+ }, FetchOptions["throw"] extends true ? true : false>>;
1128
+ };
1129
+ } & {
1130
+ phoneNumber: {
1131
+ resetPassword: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1132
+ otp: string;
1133
+ phoneNumber: string;
1134
+ newPassword: string;
1135
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
1136
+ otp: string;
1137
+ phoneNumber: string;
1138
+ newPassword: string;
1139
+ } & {
1140
+ fetchOptions?: FetchOptions | undefined;
1141
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
1142
+ status: boolean;
1143
+ }, {
1144
+ code?: string | undefined;
1145
+ message?: string | undefined;
1146
+ }, FetchOptions["throw"] extends true ? true : false>>;
1147
+ };
1148
+ } & {
1149
+ twoFactor: {
1150
+ enable: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1151
+ password: string;
1152
+ issuer?: string | undefined;
1153
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
1154
+ password: string;
1155
+ issuer?: string | undefined;
1156
+ } & {
1157
+ fetchOptions?: FetchOptions | undefined;
1158
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
1159
+ totpURI: string;
1160
+ backupCodes: string[];
1161
+ }, {
1162
+ code?: string | undefined;
1163
+ message?: string | undefined;
1164
+ }, FetchOptions["throw"] extends true ? true : false>>;
1165
+ };
1166
+ } & {
1167
+ twoFactor: {
1168
+ disable: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1169
+ password: string;
1170
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
1171
+ password: string;
1172
+ } & {
1173
+ fetchOptions?: FetchOptions | undefined;
1174
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
1175
+ status: boolean;
1176
+ }, {
1177
+ code?: string | undefined;
1178
+ message?: string | undefined;
1179
+ }, FetchOptions["throw"] extends true ? true : false>>;
1180
+ };
1181
+ } & {
1182
+ twoFactor: {
1183
+ verifyBackupCode: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1184
+ code: string;
1185
+ disableSession?: boolean | undefined;
1186
+ trustDevice?: boolean | undefined;
1187
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
1188
+ code: string;
1189
+ disableSession?: boolean | undefined;
1190
+ trustDevice?: boolean | undefined;
1191
+ } & {
1192
+ fetchOptions?: FetchOptions | undefined;
1193
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
1194
+ token: string | undefined;
1195
+ user: {
1196
+ id: string;
1197
+ email: string;
1198
+ emailVerified: boolean;
1199
+ name: string;
1200
+ image: string | null | undefined;
1201
+ createdAt: Date;
1202
+ updatedAt: Date;
1203
+ };
1204
+ }, {
1205
+ code?: string | undefined;
1206
+ message?: string | undefined;
1207
+ }, FetchOptions["throw"] extends true ? true : false>>;
1208
+ };
1209
+ } & {
1210
+ twoFactor: {
1211
+ generateBackupCodes: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1212
+ password: string;
1213
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
1214
+ password: string;
1215
+ } & {
1216
+ fetchOptions?: FetchOptions | undefined;
1217
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
1218
+ status: boolean;
1219
+ backupCodes: string[];
1220
+ }, {
1221
+ code?: string | undefined;
1222
+ message?: string | undefined;
1223
+ }, FetchOptions["throw"] extends true ? true : false>>;
1224
+ };
1225
+ } & {
1226
+ twoFactor: {
1227
+ sendOtp: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1228
+ trustDevice?: boolean | undefined;
1229
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
1230
+ query?: Record<string, any> | undefined;
1231
+ fetchOptions?: FetchOptions | undefined;
1232
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
1233
+ status: boolean;
1234
+ }, {
1235
+ code?: string | undefined;
1236
+ message?: string | undefined;
1237
+ }, FetchOptions["throw"] extends true ? true : false>>;
1238
+ };
1239
+ } & {
1240
+ twoFactor: {
1241
+ verifyOtp: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1242
+ code: string;
1243
+ trustDevice?: boolean | undefined;
1244
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
1245
+ code: string;
1246
+ trustDevice?: boolean | undefined;
1247
+ } & {
1248
+ fetchOptions?: FetchOptions | undefined;
1249
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
1250
+ token: string;
1251
+ user: {
1252
+ id: string;
1253
+ email: string;
1254
+ emailVerified: boolean;
1255
+ name: string;
1256
+ image: string | null | undefined;
1257
+ createdAt: Date;
1258
+ updatedAt: Date;
1259
+ };
1260
+ }, {
1261
+ code?: string | undefined;
1262
+ message?: string | undefined;
1263
+ }, FetchOptions["throw"] extends true ? true : false>>;
1264
+ };
1265
+ } & {
1266
+ twoFactor: {
1267
+ getTotpUri: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1268
+ password: string;
1269
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
1270
+ password: string;
1271
+ } & {
1272
+ fetchOptions?: FetchOptions | undefined;
1273
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
1274
+ totpURI: string;
1275
+ }, {
1276
+ code?: string | undefined;
1277
+ message?: string | undefined;
1278
+ }, FetchOptions["throw"] extends true ? true : false>>;
1279
+ };
1280
+ } & {
1281
+ twoFactor: {
1282
+ verifyTotp: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1283
+ code: string;
1284
+ trustDevice?: boolean | undefined;
1285
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
1286
+ code: string;
1287
+ trustDevice?: boolean | undefined;
1288
+ } & {
1289
+ fetchOptions?: FetchOptions | undefined;
1290
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
1291
+ token: string;
1292
+ user: {
1293
+ id: string;
1294
+ email: string;
1295
+ emailVerified: boolean;
1296
+ name: string;
1297
+ image: string | null | undefined;
1298
+ createdAt: Date;
1299
+ updatedAt: Date;
1300
+ };
1301
+ }, {
1302
+ code?: string | undefined;
1303
+ message?: string | undefined;
1304
+ }, FetchOptions["throw"] extends true ? true : false>>;
1305
+ };
1306
+ } & {
1307
+ signIn: {
1308
+ username: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1309
+ username: string;
1310
+ password: string;
1311
+ rememberMe?: boolean | undefined;
1312
+ callbackURL?: string | undefined;
1313
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
1314
+ username: string;
1315
+ password: string;
1316
+ rememberMe?: boolean | undefined;
1317
+ callbackURL?: string | undefined;
1318
+ } & {
1319
+ fetchOptions?: FetchOptions | undefined;
1320
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
1321
+ token: string;
1322
+ user: {
1323
+ id: string;
1324
+ email: string;
1325
+ emailVerified: boolean;
1326
+ username: string;
1327
+ displayUsername: string;
1328
+ name: string;
1329
+ image: string | null | undefined;
1330
+ createdAt: Date;
1331
+ updatedAt: Date;
1332
+ };
1333
+ }, {
1334
+ code?: string | undefined;
1335
+ message?: string | undefined;
1336
+ }, FetchOptions["throw"] extends true ? true : false>>;
1337
+ };
1338
+ } & {
1339
+ isUsernameAvailable: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1340
+ username: string;
1341
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
1342
+ username: string;
1343
+ } & {
1344
+ fetchOptions?: FetchOptions | undefined;
1345
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
1346
+ available: boolean;
1347
+ }, {
1348
+ code?: string | undefined;
1349
+ message?: string | undefined;
1350
+ }, FetchOptions["throw"] extends true ? true : false>>;
1351
+ } & {
1352
+ admin: {
1353
+ setRole: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1354
+ userId: string;
1355
+ role: "user" | "admin" | ("user" | "admin")[];
1356
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
1357
+ userId: string;
1358
+ role: "user" | "admin" | ("user" | "admin")[];
1359
+ } & {
1360
+ fetchOptions?: FetchOptions | undefined;
1361
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
1362
+ user: node_modules_better_auth_dist_index_BLP8lbCx_mjs.yt;
1363
+ }, {
1364
+ code?: string | undefined;
1365
+ message?: string | undefined;
1366
+ }, FetchOptions["throw"] extends true ? true : false>>;
1367
+ };
1368
+ } & {
1369
+ admin: {
1370
+ getUser: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
1371
+ id: string;
1372
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
1373
+ query: {
1374
+ id: string;
1375
+ };
1376
+ fetchOptions?: FetchOptions | undefined;
1377
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
1378
+ id: string;
1379
+ createdAt: Date;
1380
+ updatedAt: Date;
1381
+ email: string;
1382
+ emailVerified: boolean;
1383
+ name: string;
1384
+ image?: string | null | undefined;
1385
+ }, {
1386
+ code?: string | undefined;
1387
+ message?: string | undefined;
1388
+ }, FetchOptions["throw"] extends true ? true : false>>;
1389
+ };
1390
+ } & {
1391
+ admin: {
1392
+ createUser: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1393
+ email: string;
1394
+ password: string;
1395
+ name: string;
1396
+ role?: "user" | "admin" | ("user" | "admin")[] | undefined;
1397
+ data?: Record<string, any> | undefined;
1398
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
1399
+ email: string;
1400
+ password: string;
1401
+ name: string;
1402
+ role?: "user" | "admin" | ("user" | "admin")[] | undefined;
1403
+ data?: Record<string, any> | undefined;
1404
+ } & {
1405
+ fetchOptions?: FetchOptions | undefined;
1406
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
1407
+ user: node_modules_better_auth_dist_index_BLP8lbCx_mjs.yt;
1408
+ }, {
1409
+ code?: string | undefined;
1410
+ message?: string | undefined;
1411
+ }, FetchOptions["throw"] extends true ? true : false>>;
1412
+ };
1413
+ } & {
1414
+ admin: {
1415
+ updateUser: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1416
+ userId: unknown;
1417
+ data: Record<any, any>;
1418
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
1419
+ userId: unknown;
1420
+ data: Record<any, any>;
1421
+ } & {
1422
+ fetchOptions?: FetchOptions | undefined;
1423
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<node_modules_better_auth_dist_index_BLP8lbCx_mjs.yt, {
1424
+ code?: string | undefined;
1425
+ message?: string | undefined;
1426
+ }, FetchOptions["throw"] extends true ? true : false>>;
1427
+ };
1428
+ } & {
1429
+ admin: {
1430
+ listUsers: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
1431
+ searchValue?: string | undefined;
1432
+ searchField?: "email" | "name" | undefined;
1433
+ searchOperator?: "contains" | "starts_with" | "ends_with" | undefined;
1434
+ limit?: string | number | undefined;
1435
+ offset?: string | number | undefined;
1436
+ sortBy?: string | undefined;
1437
+ sortDirection?: "asc" | "desc" | undefined;
1438
+ filterField?: string | undefined;
1439
+ filterValue?: string | number | boolean | undefined;
1440
+ filterOperator?: "contains" | "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | undefined;
1441
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
1442
+ query: {
1443
+ searchValue?: string | undefined;
1444
+ searchField?: "email" | "name" | undefined;
1445
+ searchOperator?: "contains" | "starts_with" | "ends_with" | undefined;
1446
+ limit?: string | number | undefined;
1447
+ offset?: string | number | undefined;
1448
+ sortBy?: string | undefined;
1449
+ sortDirection?: "asc" | "desc" | undefined;
1450
+ filterField?: string | undefined;
1451
+ filterValue?: string | number | boolean | undefined;
1452
+ filterOperator?: "contains" | "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | undefined;
1453
+ };
1454
+ fetchOptions?: FetchOptions | undefined;
1455
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<NonNullable<{
1456
+ users: node_modules_better_auth_dist_index_BLP8lbCx_mjs.yt[];
1457
+ total: number;
1458
+ limit: number | undefined;
1459
+ offset: number | undefined;
1460
+ } | {
1461
+ users: never[];
1462
+ total: number;
1463
+ }>, {
1464
+ code?: string | undefined;
1465
+ message?: string | undefined;
1466
+ }, FetchOptions["throw"] extends true ? true : false>>;
1467
+ };
1468
+ } & {
1469
+ admin: {
1470
+ listUserSessions: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1471
+ userId: unknown;
1472
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
1473
+ userId: unknown;
1474
+ } & {
1475
+ fetchOptions?: FetchOptions | undefined;
1476
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
1477
+ sessions: node_modules_better_auth_dist_index_BLP8lbCx_mjs.vt[];
1478
+ }, {
1479
+ code?: string | undefined;
1480
+ message?: string | undefined;
1481
+ }, FetchOptions["throw"] extends true ? true : false>>;
1482
+ };
1483
+ } & {
1484
+ admin: {
1485
+ unbanUser: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1486
+ userId: unknown;
1487
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
1488
+ userId: unknown;
1489
+ } & {
1490
+ fetchOptions?: FetchOptions | undefined;
1491
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
1492
+ user: {
1493
+ id: string;
1494
+ createdAt: Date;
1495
+ updatedAt: Date;
1496
+ email: string;
1497
+ emailVerified: boolean;
1498
+ name: string;
1499
+ image?: string | null | undefined;
1500
+ } & Record<string, any>;
1501
+ }, {
1502
+ code?: string | undefined;
1503
+ message?: string | undefined;
1504
+ }, FetchOptions["throw"] extends true ? true : false>>;
1505
+ };
1506
+ } & {
1507
+ admin: {
1508
+ banUser: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1509
+ userId: unknown;
1510
+ banReason?: string | undefined;
1511
+ banExpiresIn?: number | undefined;
1512
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
1513
+ userId: unknown;
1514
+ banReason?: string | undefined;
1515
+ banExpiresIn?: number | undefined;
1516
+ } & {
1517
+ fetchOptions?: FetchOptions | undefined;
1518
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
1519
+ user: {
1520
+ id: string;
1521
+ createdAt: Date;
1522
+ updatedAt: Date;
1523
+ email: string;
1524
+ emailVerified: boolean;
1525
+ name: string;
1526
+ image?: string | null | undefined;
1527
+ } & Record<string, any>;
1528
+ }, {
1529
+ code?: string | undefined;
1530
+ message?: string | undefined;
1531
+ }, FetchOptions["throw"] extends true ? true : false>>;
1532
+ };
1533
+ } & {
1534
+ admin: {
1535
+ impersonateUser: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1536
+ userId: unknown;
1537
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
1538
+ userId: unknown;
1539
+ } & {
1540
+ fetchOptions?: FetchOptions | undefined;
1541
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
1542
+ session: {
1543
+ id: string;
1544
+ createdAt: Date;
1545
+ updatedAt: Date;
1546
+ userId: string;
1547
+ expiresAt: Date;
1548
+ token: string;
1549
+ ipAddress?: string | null | undefined;
1550
+ userAgent?: string | null | undefined;
1551
+ };
1552
+ user: {
1553
+ id: string;
1554
+ createdAt: Date;
1555
+ updatedAt: Date;
1556
+ email: string;
1557
+ emailVerified: boolean;
1558
+ name: string;
1559
+ image?: string | null | undefined;
1560
+ };
1561
+ }, {
1562
+ code?: string | undefined;
1563
+ message?: string | undefined;
1564
+ }, FetchOptions["throw"] extends true ? true : false>>;
1565
+ };
1566
+ } & {
1567
+ admin: {
1568
+ stopImpersonating: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
1569
+ query?: Record<string, any> | undefined;
1570
+ fetchOptions?: FetchOptions | undefined;
1571
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
1572
+ session: better_auth.Session & Record<string, any>;
1573
+ user: better_auth.User & Record<string, any>;
1574
+ }, {
1575
+ code?: string | undefined;
1576
+ message?: string | undefined;
1577
+ }, FetchOptions["throw"] extends true ? true : false>>;
1578
+ };
1579
+ } & {
1580
+ admin: {
1581
+ revokeUserSession: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1582
+ sessionToken: string;
1583
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
1584
+ sessionToken: string;
1585
+ } & {
1586
+ fetchOptions?: FetchOptions | undefined;
1587
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
1588
+ success: boolean;
1589
+ }, {
1590
+ code?: string | undefined;
1591
+ message?: string | undefined;
1592
+ }, FetchOptions["throw"] extends true ? true : false>>;
1593
+ };
1594
+ } & {
1595
+ admin: {
1596
+ revokeUserSessions: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1597
+ userId: unknown;
1598
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
1599
+ userId: unknown;
1600
+ } & {
1601
+ fetchOptions?: FetchOptions | undefined;
1602
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
1603
+ success: boolean;
1604
+ }, {
1605
+ code?: string | undefined;
1606
+ message?: string | undefined;
1607
+ }, FetchOptions["throw"] extends true ? true : false>>;
1608
+ };
1609
+ } & {
1610
+ admin: {
1611
+ removeUser: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1612
+ userId: unknown;
1613
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
1614
+ userId: unknown;
1615
+ } & {
1616
+ fetchOptions?: FetchOptions | undefined;
1617
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
1618
+ success: boolean;
1619
+ }, {
1620
+ code?: string | undefined;
1621
+ message?: string | undefined;
1622
+ }, FetchOptions["throw"] extends true ? true : false>>;
1623
+ };
1624
+ } & {
1625
+ admin: {
1626
+ setUserPassword: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1627
+ newPassword: string;
1628
+ userId: unknown;
1629
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
1630
+ newPassword: string;
1631
+ userId: unknown;
1632
+ } & {
1633
+ fetchOptions?: FetchOptions | undefined;
1634
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
1635
+ status: boolean;
1636
+ }, {
1637
+ code?: string | undefined;
1638
+ message?: string | undefined;
1639
+ }, FetchOptions["throw"] extends true ? true : false>>;
1640
+ };
1641
+ } & {
1642
+ admin: {
1643
+ hasPermission: <FetchOptions extends better_auth.ClientFetchOption<Partial<({
1644
+ permission: {
1645
+ readonly user?: ("set-password" | "update" | "delete" | "list" | "get" | "create" | "set-role" | "ban" | "impersonate")[] | undefined;
1646
+ readonly session?: ("delete" | "list" | "revoke")[] | undefined;
1647
+ };
1648
+ permissions?: never | undefined;
1649
+ } | {
1650
+ permissions: {
1651
+ readonly user?: ("set-password" | "update" | "delete" | "list" | "get" | "create" | "set-role" | "ban" | "impersonate")[] | undefined;
1652
+ readonly session?: ("delete" | "list" | "revoke")[] | undefined;
1653
+ };
1654
+ permission?: never | undefined;
1655
+ }) & {
1656
+ userId?: string | undefined;
1657
+ role?: "user" | "admin" | undefined;
1658
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<(({
1659
+ permission: {
1660
+ readonly user?: ("set-password" | "update" | "delete" | "list" | "get" | "create" | "set-role" | "ban" | "impersonate")[] | undefined;
1661
+ readonly session?: ("delete" | "list" | "revoke")[] | undefined;
1662
+ };
1663
+ permissions?: never | undefined;
1664
+ } | {
1665
+ permissions: {
1666
+ readonly user?: ("set-password" | "update" | "delete" | "list" | "get" | "create" | "set-role" | "ban" | "impersonate")[] | undefined;
1667
+ readonly session?: ("delete" | "list" | "revoke")[] | undefined;
1668
+ };
1669
+ permission?: never | undefined;
1670
+ }) & {
1671
+ userId?: string | undefined;
1672
+ role?: "user" | "admin" | undefined;
1673
+ }) & {
1674
+ fetchOptions?: FetchOptions | undefined;
1675
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
1676
+ error: null;
1677
+ success: boolean;
1678
+ }, {
1679
+ code?: string | undefined;
1680
+ message?: string | undefined;
1681
+ }, FetchOptions["throw"] extends true ? true : false>>;
1682
+ };
1683
+ } & {
1684
+ apiKey: {
1685
+ create: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1686
+ name?: string | undefined;
1687
+ expiresIn?: number | null | undefined;
1688
+ userId?: unknown;
1689
+ prefix?: string | undefined;
1690
+ remaining?: number | null | undefined;
1691
+ metadata?: any;
1692
+ refillAmount?: number | undefined;
1693
+ refillInterval?: number | undefined;
1694
+ rateLimitTimeWindow?: number | undefined;
1695
+ rateLimitMax?: number | undefined;
1696
+ rateLimitEnabled?: boolean | undefined;
1697
+ permissions?: Record<string, string[]> | undefined;
1698
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
1699
+ name?: string | undefined;
1700
+ expiresIn?: number | null | undefined;
1701
+ userId?: unknown;
1702
+ prefix?: string | undefined;
1703
+ remaining?: number | null | undefined;
1704
+ metadata?: any;
1705
+ refillAmount?: number | undefined;
1706
+ refillInterval?: number | undefined;
1707
+ rateLimitTimeWindow?: number | undefined;
1708
+ rateLimitMax?: number | undefined;
1709
+ rateLimitEnabled?: boolean | undefined;
1710
+ permissions?: Record<string, string[]> | undefined;
1711
+ } & {
1712
+ fetchOptions?: FetchOptions | undefined;
1713
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
1714
+ key: string;
1715
+ metadata: any;
1716
+ permissions: any;
1717
+ id: string;
1718
+ name: string | null;
1719
+ start: string | null;
1720
+ prefix: string | null;
1721
+ userId: string;
1722
+ refillInterval: number | null;
1723
+ refillAmount: number | null;
1724
+ lastRefillAt: Date | null;
1725
+ enabled: boolean;
1726
+ rateLimitEnabled: boolean;
1727
+ rateLimitTimeWindow: number | null;
1728
+ rateLimitMax: number | null;
1729
+ requestCount: number;
1730
+ remaining: number | null;
1731
+ lastRequest: Date | null;
1732
+ expiresAt: Date | null;
1733
+ createdAt: Date;
1734
+ updatedAt: Date;
1735
+ }, {
1736
+ code?: string | undefined;
1737
+ message?: string | undefined;
1738
+ }, FetchOptions["throw"] extends true ? true : false>>;
1739
+ };
1740
+ } & {
1741
+ apiKey: {
1742
+ get: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
1743
+ id: string;
1744
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
1745
+ query: {
1746
+ id: string;
1747
+ };
1748
+ fetchOptions?: FetchOptions | undefined;
1749
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
1750
+ permissions: {
1751
+ [key: string]: string[];
1752
+ } | null;
1753
+ id: string;
1754
+ name: string | null;
1755
+ start: string | null;
1756
+ prefix: string | null;
1757
+ userId: string;
1758
+ refillInterval: number | null;
1759
+ refillAmount: number | null;
1760
+ lastRefillAt: Date | null;
1761
+ enabled: boolean;
1762
+ rateLimitEnabled: boolean;
1763
+ rateLimitTimeWindow: number | null;
1764
+ rateLimitMax: number | null;
1765
+ requestCount: number;
1766
+ remaining: number | null;
1767
+ lastRequest: Date | null;
1768
+ expiresAt: Date | null;
1769
+ createdAt: Date;
1770
+ updatedAt: Date;
1771
+ metadata: Record<string, any> | null;
1772
+ }, {
1773
+ code?: string | undefined;
1774
+ message?: string | undefined;
1775
+ }, FetchOptions["throw"] extends true ? true : false>>;
1776
+ };
1777
+ } & {
1778
+ apiKey: {
1779
+ update: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1780
+ keyId: string;
1781
+ userId?: unknown;
1782
+ name?: string | undefined;
1783
+ enabled?: boolean | undefined;
1784
+ remaining?: number | undefined;
1785
+ refillAmount?: number | undefined;
1786
+ refillInterval?: number | undefined;
1787
+ metadata?: any;
1788
+ expiresIn?: number | null | undefined;
1789
+ rateLimitEnabled?: boolean | undefined;
1790
+ rateLimitTimeWindow?: number | undefined;
1791
+ rateLimitMax?: number | undefined;
1792
+ permissions?: Record<string, string[]> | null | undefined;
1793
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
1794
+ keyId: string;
1795
+ userId?: unknown;
1796
+ name?: string | undefined;
1797
+ enabled?: boolean | undefined;
1798
+ remaining?: number | undefined;
1799
+ refillAmount?: number | undefined;
1800
+ refillInterval?: number | undefined;
1801
+ metadata?: any;
1802
+ expiresIn?: number | null | undefined;
1803
+ rateLimitEnabled?: boolean | undefined;
1804
+ rateLimitTimeWindow?: number | undefined;
1805
+ rateLimitMax?: number | undefined;
1806
+ permissions?: Record<string, string[]> | null | undefined;
1807
+ } & {
1808
+ fetchOptions?: FetchOptions | undefined;
1809
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
1810
+ permissions: {
1811
+ [key: string]: string[];
1812
+ } | null;
1813
+ id: string;
1814
+ name: string | null;
1815
+ start: string | null;
1816
+ prefix: string | null;
1817
+ userId: string;
1818
+ refillInterval: number | null;
1819
+ refillAmount: number | null;
1820
+ lastRefillAt: Date | null;
1821
+ enabled: boolean;
1822
+ rateLimitEnabled: boolean;
1823
+ rateLimitTimeWindow: number | null;
1824
+ rateLimitMax: number | null;
1825
+ requestCount: number;
1826
+ remaining: number | null;
1827
+ lastRequest: Date | null;
1828
+ expiresAt: Date | null;
1829
+ createdAt: Date;
1830
+ updatedAt: Date;
1831
+ metadata: Record<string, any> | null;
1832
+ }, {
1833
+ code?: string | undefined;
1834
+ message?: string | undefined;
1835
+ }, FetchOptions["throw"] extends true ? true : false>>;
1836
+ };
1837
+ } & {
1838
+ apiKey: {
1839
+ delete: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1840
+ keyId: string;
1841
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
1842
+ keyId: string;
1843
+ } & {
1844
+ fetchOptions?: FetchOptions | undefined;
1845
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
1846
+ success: boolean;
1847
+ }, {
1848
+ code?: string | undefined;
1849
+ message?: string | undefined;
1850
+ }, FetchOptions["throw"] extends true ? true : false>>;
1851
+ };
1852
+ } & {
1853
+ apiKey: {
1854
+ list: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
1855
+ query?: Record<string, any> | undefined;
1856
+ fetchOptions?: FetchOptions | undefined;
1857
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
1858
+ permissions: {
1859
+ [key: string]: string[];
1860
+ } | null;
1861
+ id: string;
1862
+ name: string | null;
1863
+ start: string | null;
1864
+ prefix: string | null;
1865
+ userId: string;
1866
+ refillInterval: number | null;
1867
+ refillAmount: number | null;
1868
+ lastRefillAt: Date | null;
1869
+ enabled: boolean;
1870
+ rateLimitEnabled: boolean;
1871
+ rateLimitTimeWindow: number | null;
1872
+ rateLimitMax: number | null;
1873
+ requestCount: number;
1874
+ remaining: number | null;
1875
+ lastRequest: Date | null;
1876
+ expiresAt: Date | null;
1877
+ createdAt: Date;
1878
+ updatedAt: Date;
1879
+ metadata: Record<string, any> | null;
1880
+ }[], {
1881
+ code?: string | undefined;
1882
+ message?: string | undefined;
1883
+ }, FetchOptions["throw"] extends true ? true : false>>;
1884
+ };
1885
+ } & {
1886
+ organization: {
1887
+ create: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1888
+ name: string;
1889
+ slug: string;
1890
+ userId?: string | undefined;
1891
+ logo?: string | undefined;
1892
+ metadata?: Record<string, any> | undefined;
1893
+ keepCurrentActiveOrganization?: boolean | undefined;
1894
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
1895
+ name: string;
1896
+ slug: string;
1897
+ userId?: string | undefined;
1898
+ logo?: string | undefined;
1899
+ metadata?: Record<string, any> | undefined;
1900
+ keepCurrentActiveOrganization?: boolean | undefined;
1901
+ } & {
1902
+ fetchOptions?: FetchOptions | undefined;
1903
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
1904
+ id: string;
1905
+ name: string;
1906
+ slug: string;
1907
+ createdAt: Date;
1908
+ logo?: string | null | undefined | undefined;
1909
+ metadata?: any;
1910
+ } & {
1911
+ metadata: any;
1912
+ members: ({
1913
+ id: string;
1914
+ organizationId: string;
1915
+ userId: string;
1916
+ role: string;
1917
+ createdAt: Date;
1918
+ } | undefined)[];
1919
+ }, {
1920
+ code?: string | undefined;
1921
+ message?: string | undefined;
1922
+ }, FetchOptions["throw"] extends true ? true : false>>;
1923
+ };
1924
+ } & {
1925
+ organization: {
1926
+ update: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1927
+ data: {
1928
+ name?: string | undefined;
1929
+ slug?: string | undefined;
1930
+ logo?: string | undefined;
1931
+ metadata?: Record<string, any> | undefined;
1932
+ } & Partial<{}>;
1933
+ organizationId?: string | undefined;
1934
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
1935
+ data: {
1936
+ name?: string | undefined;
1937
+ slug?: string | undefined;
1938
+ logo?: string | undefined;
1939
+ metadata?: Record<string, any> | undefined;
1940
+ } & Partial<{}>;
1941
+ organizationId?: string | undefined;
1942
+ } & {
1943
+ fetchOptions?: FetchOptions | undefined;
1944
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
1945
+ id: string;
1946
+ name: string;
1947
+ slug: string;
1948
+ createdAt: Date;
1949
+ logo?: string | null | undefined | undefined;
1950
+ metadata?: any;
1951
+ } & {
1952
+ metadata: Record<string, any> | undefined;
1953
+ }, {
1954
+ code?: string | undefined;
1955
+ message?: string | undefined;
1956
+ }, FetchOptions["throw"] extends true ? true : false>>;
1957
+ };
1958
+ } & {
1959
+ organization: {
1960
+ delete: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1961
+ organizationId: string;
1962
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
1963
+ organizationId: string;
1964
+ } & {
1965
+ fetchOptions?: FetchOptions | undefined;
1966
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
1967
+ id: string;
1968
+ name: string;
1969
+ slug: string;
1970
+ createdAt: Date;
1971
+ logo?: string | null | undefined | undefined;
1972
+ metadata?: any;
1973
+ }, {
1974
+ code?: string | undefined;
1975
+ message?: string | undefined;
1976
+ }, FetchOptions["throw"] extends true ? true : false>>;
1977
+ };
1978
+ } & {
1979
+ organization: {
1980
+ setActive: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1981
+ organizationId?: string | null | undefined;
1982
+ organizationSlug?: string | undefined;
1983
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
1984
+ organizationId?: string | null | undefined;
1985
+ organizationSlug?: string | undefined;
1986
+ } & {
1987
+ fetchOptions?: FetchOptions | undefined;
1988
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
1989
+ members: {
1990
+ id: string;
1991
+ organizationId: string;
1992
+ role: "admin" | "member" | "owner";
1993
+ createdAt: Date;
1994
+ userId: string;
1995
+ user: {
1996
+ id: string;
1997
+ email: string;
1998
+ name: string;
1999
+ image?: string | undefined;
2000
+ };
2001
+ }[];
2002
+ invitations: {
2003
+ id: string;
2004
+ organizationId: string;
2005
+ email: string;
2006
+ role: "admin" | "member" | "owner";
2007
+ status: better_auth_plugins_organization.InvitationStatus;
2008
+ inviterId: string;
2009
+ expiresAt: Date;
2010
+ createdAt: Date;
2011
+ }[];
2012
+ } & {
2013
+ id: string;
2014
+ name: string;
2015
+ slug: string;
2016
+ createdAt: Date;
2017
+ logo?: string | null | undefined | undefined;
2018
+ metadata?: any;
2019
+ }, {
2020
+ code?: string | undefined;
2021
+ message?: string | undefined;
2022
+ }, FetchOptions["throw"] extends true ? true : false>>;
2023
+ };
2024
+ } & {
2025
+ organization: {
2026
+ getFullOrganization: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
2027
+ organizationId?: string | undefined;
2028
+ organizationSlug?: string | undefined;
2029
+ membersLimit?: string | number | undefined;
2030
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
2031
+ query?: {
2032
+ organizationId?: string | undefined;
2033
+ organizationSlug?: string | undefined;
2034
+ membersLimit?: string | number | undefined;
2035
+ } | undefined;
2036
+ fetchOptions?: FetchOptions | undefined;
2037
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
2038
+ members: {
2039
+ id: string;
2040
+ organizationId: string;
2041
+ role: "admin" | "member" | "owner";
2042
+ createdAt: Date;
2043
+ userId: string;
2044
+ user: {
2045
+ id: string;
2046
+ email: string;
2047
+ name: string;
2048
+ image?: string | undefined;
2049
+ };
2050
+ }[];
2051
+ invitations: {
2052
+ id: string;
2053
+ organizationId: string;
2054
+ email: string;
2055
+ role: "admin" | "member" | "owner";
2056
+ status: better_auth_plugins_organization.InvitationStatus;
2057
+ inviterId: string;
2058
+ expiresAt: Date;
2059
+ createdAt: Date;
2060
+ }[];
2061
+ } & {
2062
+ id: string;
2063
+ name: string;
2064
+ slug: string;
2065
+ createdAt: Date;
2066
+ logo?: string | null | undefined | undefined;
2067
+ metadata?: any;
2068
+ }, {
2069
+ code?: string | undefined;
2070
+ message?: string | undefined;
2071
+ }, FetchOptions["throw"] extends true ? true : false>>;
2072
+ };
2073
+ } & {
2074
+ organization: {
2075
+ list: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
2076
+ query?: Record<string, any> | undefined;
2077
+ fetchOptions?: FetchOptions | undefined;
2078
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
2079
+ id: string;
2080
+ name: string;
2081
+ slug: string;
2082
+ createdAt: Date;
2083
+ logo?: string | null | undefined | undefined;
2084
+ metadata?: any;
2085
+ }[], {
2086
+ code?: string | undefined;
2087
+ message?: string | undefined;
2088
+ }, FetchOptions["throw"] extends true ? true : false>>;
2089
+ };
2090
+ } & {
2091
+ organization: {
2092
+ inviteMember: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
2093
+ email: string;
2094
+ role: "admin" | "member" | "owner" | ("admin" | "member" | "owner")[];
2095
+ organizationId?: string | undefined;
2096
+ resend?: boolean | undefined;
2097
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
2098
+ email: string;
2099
+ role: "admin" | "member" | "owner" | ("admin" | "member" | "owner")[];
2100
+ organizationId?: string | undefined;
2101
+ resend?: boolean | undefined;
2102
+ } & {
2103
+ fetchOptions?: FetchOptions | undefined;
2104
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
2105
+ id: string;
2106
+ organizationId: string;
2107
+ email: string;
2108
+ role: "admin" | "member" | "owner";
2109
+ status: better_auth_plugins_organization.InvitationStatus;
2110
+ inviterId: string;
2111
+ expiresAt: Date;
2112
+ createdAt: Date;
2113
+ }, {
2114
+ code?: string | undefined;
2115
+ message?: string | undefined;
2116
+ }, FetchOptions["throw"] extends true ? true : false>>;
2117
+ };
2118
+ } & {
2119
+ organization: {
2120
+ cancelInvitation: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
2121
+ invitationId: string;
2122
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
2123
+ invitationId: string;
2124
+ } & {
2125
+ fetchOptions?: FetchOptions | undefined;
2126
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
2127
+ id: string;
2128
+ organizationId: string;
2129
+ email: string;
2130
+ role: "admin" | "member" | "owner";
2131
+ status: better_auth_plugins_organization.InvitationStatus;
2132
+ inviterId: string;
2133
+ expiresAt: Date;
2134
+ createdAt: Date;
2135
+ }, {
2136
+ code?: string | undefined;
2137
+ message?: string | undefined;
2138
+ }, FetchOptions["throw"] extends true ? true : false>>;
2139
+ };
2140
+ } & {
2141
+ organization: {
2142
+ acceptInvitation: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
2143
+ invitationId: string;
2144
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
2145
+ invitationId: string;
2146
+ } & {
2147
+ fetchOptions?: FetchOptions | undefined;
2148
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
2149
+ invitation: {
2150
+ id: string;
2151
+ organizationId: string;
2152
+ email: string;
2153
+ role: "admin" | "member" | "owner";
2154
+ status: better_auth_plugins_organization.InvitationStatus;
2155
+ inviterId: string;
2156
+ expiresAt: Date;
2157
+ createdAt: Date;
2158
+ };
2159
+ member: {
2160
+ id: string;
2161
+ organizationId: string;
2162
+ userId: string;
2163
+ role: string;
2164
+ createdAt: Date;
2165
+ };
2166
+ }, {
2167
+ code?: string | undefined;
2168
+ message?: string | undefined;
2169
+ }, FetchOptions["throw"] extends true ? true : false>>;
2170
+ };
2171
+ } & {
2172
+ organization: {
2173
+ getInvitation: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
2174
+ id: string;
2175
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
2176
+ query: {
2177
+ id: string;
2178
+ };
2179
+ fetchOptions?: FetchOptions | undefined;
2180
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<NonNullable<{
2181
+ id: string;
2182
+ organizationId: string;
2183
+ email: string;
2184
+ role: "admin" | "member" | "owner";
2185
+ status: better_auth_plugins_organization.InvitationStatus;
2186
+ inviterId: string;
2187
+ expiresAt: Date;
2188
+ createdAt: Date;
2189
+ } & {
2190
+ organizationName: string;
2191
+ organizationSlug: string;
2192
+ inviterEmail: string;
2193
+ }>, {
2194
+ code?: string | undefined;
2195
+ message?: string | undefined;
2196
+ }, FetchOptions["throw"] extends true ? true : false>>;
2197
+ };
2198
+ } & {
2199
+ organization: {
2200
+ rejectInvitation: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
2201
+ invitationId: string;
2202
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
2203
+ invitationId: string;
2204
+ } & {
2205
+ fetchOptions?: FetchOptions | undefined;
2206
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
2207
+ invitation: {
2208
+ id: string;
2209
+ organizationId: string;
2210
+ email: string;
2211
+ role: "member" | "admin" | "owner";
2212
+ status: better_auth_plugins_organization.InvitationStatus;
2213
+ inviterId: string;
2214
+ expiresAt: Date;
2215
+ createdAt: Date;
2216
+ } | null;
2217
+ member: null;
2218
+ }, {
2219
+ code?: string | undefined;
2220
+ message?: string | undefined;
2221
+ }, FetchOptions["throw"] extends true ? true : false>>;
2222
+ };
2223
+ } & {
2224
+ organization: {
2225
+ listInvitations: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
2226
+ organizationId?: string | undefined;
2227
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
2228
+ query?: {
2229
+ organizationId?: string | undefined;
2230
+ } | undefined;
2231
+ fetchOptions?: FetchOptions | undefined;
2232
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
2233
+ id: string;
2234
+ organizationId: string;
2235
+ email: string;
2236
+ role: "admin" | "member" | "owner";
2237
+ status: better_auth_plugins_organization.InvitationStatus;
2238
+ inviterId: string;
2239
+ expiresAt: Date;
2240
+ createdAt: Date;
2241
+ }[], {
2242
+ code?: string | undefined;
2243
+ message?: string | undefined;
2244
+ }, FetchOptions["throw"] extends true ? true : false>>;
2245
+ };
2246
+ } & {
2247
+ organization: {
2248
+ getActiveMember: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
2249
+ query?: Record<string, any> | undefined;
2250
+ fetchOptions?: FetchOptions | undefined;
2251
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<Omit<{
2252
+ id: string;
2253
+ organizationId: string;
2254
+ role: "admin" | "member" | "owner";
2255
+ createdAt: Date;
2256
+ userId: string;
2257
+ user: {
2258
+ id: string;
2259
+ email: string;
2260
+ name: string;
2261
+ image?: string | undefined;
2262
+ };
2263
+ } & {
2264
+ user: better_auth.User;
2265
+ }, "user"> & {
2266
+ user: {
2267
+ id: string;
2268
+ name: string;
2269
+ email: string;
2270
+ image: string | undefined;
2271
+ };
2272
+ }, {
2273
+ code?: string | undefined;
2274
+ message?: string | undefined;
2275
+ }, FetchOptions["throw"] extends true ? true : false>>;
2276
+ };
2277
+ } & {
2278
+ organization: {
2279
+ checkSlug: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
2280
+ slug: string;
2281
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
2282
+ slug: string;
2283
+ } & {
2284
+ fetchOptions?: FetchOptions | undefined;
2285
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
2286
+ status: boolean;
2287
+ }, {
2288
+ code?: string | undefined;
2289
+ message?: string | undefined;
2290
+ }, FetchOptions["throw"] extends true ? true : false>>;
2291
+ };
2292
+ } & {
2293
+ organization: {
2294
+ removeMember: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
2295
+ memberIdOrEmail: string;
2296
+ organizationId?: string | undefined;
2297
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
2298
+ memberIdOrEmail: string;
2299
+ organizationId?: string | undefined;
2300
+ } & {
2301
+ fetchOptions?: FetchOptions | undefined;
2302
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
2303
+ member: {
2304
+ id: string;
2305
+ organizationId: string;
2306
+ role: "admin" | "member" | "owner";
2307
+ createdAt: Date;
2308
+ userId: string;
2309
+ user: {
2310
+ id: string;
2311
+ email: string;
2312
+ name: string;
2313
+ image?: string | undefined;
2314
+ };
2315
+ };
2316
+ }, {
2317
+ code?: string | undefined;
2318
+ message?: string | undefined;
2319
+ }, FetchOptions["throw"] extends true ? true : false>>;
2320
+ };
2321
+ } & {
2322
+ organization: {
2323
+ updateMemberRole: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
2324
+ role: better_auth_client_plugins.LiteralString | "admin" | "member" | "owner" | ("admin" | "member" | "owner")[] | better_auth_client_plugins.LiteralString[];
2325
+ memberId: string;
2326
+ organizationId?: string | undefined;
2327
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
2328
+ role: better_auth_client_plugins.LiteralString | "admin" | "member" | "owner" | ("admin" | "member" | "owner")[] | better_auth_client_plugins.LiteralString[];
2329
+ memberId: string;
2330
+ organizationId?: string | undefined;
2331
+ } & {
2332
+ fetchOptions?: FetchOptions | undefined;
2333
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
2334
+ id: string;
2335
+ organizationId: string;
2336
+ role: "member" | "admin" | "owner";
2337
+ createdAt: Date;
2338
+ userId: string;
2339
+ user: {
2340
+ id: string;
2341
+ email: string;
2342
+ name: string;
2343
+ image?: string | undefined;
2344
+ };
2345
+ }, {
2346
+ code?: string | undefined;
2347
+ message?: string | undefined;
2348
+ }, FetchOptions["throw"] extends true ? true : false>>;
2349
+ };
2350
+ } & {
2351
+ organization: {
2352
+ leave: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
2353
+ organizationId: string;
2354
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
2355
+ organizationId: string;
2356
+ } & {
2357
+ fetchOptions?: FetchOptions | undefined;
2358
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<NonNullable<Omit<{
2359
+ id: string;
2360
+ organizationId: string;
2361
+ role: "admin" | "member" | "owner";
2362
+ createdAt: Date;
2363
+ userId: string;
2364
+ user: {
2365
+ id: string;
2366
+ email: string;
2367
+ name: string;
2368
+ image?: string | undefined;
2369
+ };
2370
+ } & {
2371
+ user: better_auth.User;
2372
+ }, "user"> & {
2373
+ user: {
2374
+ id: string;
2375
+ name: string;
2376
+ email: string;
2377
+ image: string | undefined;
2378
+ };
2379
+ }>, {
2380
+ code?: string | undefined;
2381
+ message?: string | undefined;
2382
+ }, FetchOptions["throw"] extends true ? true : false>>;
2383
+ };
2384
+ } & {
2385
+ organization: {
2386
+ listUserInvitations: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
2387
+ email?: string | undefined;
2388
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
2389
+ query?: {
2390
+ email?: string | undefined;
2391
+ } | undefined;
2392
+ fetchOptions?: FetchOptions | undefined;
2393
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
2394
+ id: string;
2395
+ organizationId: string;
2396
+ email: string;
2397
+ role: "admin" | "member" | "owner";
2398
+ status: better_auth_plugins_organization.InvitationStatus;
2399
+ inviterId: string;
2400
+ expiresAt: Date;
2401
+ createdAt: Date;
2402
+ }[], {
2403
+ code?: string | undefined;
2404
+ message?: string | undefined;
2405
+ }, FetchOptions["throw"] extends true ? true : false>>;
2406
+ };
2407
+ } & {
2408
+ organization: {
2409
+ listMembers: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
2410
+ limit?: string | number | undefined;
2411
+ offset?: string | number | undefined;
2412
+ sortBy?: string | undefined;
2413
+ sortDirection?: "asc" | "desc" | undefined;
2414
+ filterField?: string | undefined;
2415
+ filterValue?: string | number | boolean | undefined;
2416
+ filterOperator?: "contains" | "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | undefined;
2417
+ organizationId?: string | undefined;
2418
+ organizationSlug?: string | undefined;
2419
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
2420
+ query?: {
2421
+ limit?: string | number | undefined;
2422
+ offset?: string | number | undefined;
2423
+ sortBy?: string | undefined;
2424
+ sortDirection?: "asc" | "desc" | undefined;
2425
+ filterField?: string | undefined;
2426
+ filterValue?: string | number | boolean | undefined;
2427
+ filterOperator?: "contains" | "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | undefined;
2428
+ organizationId?: string | undefined;
2429
+ organizationSlug?: string | undefined;
2430
+ } | undefined;
2431
+ fetchOptions?: FetchOptions | undefined;
2432
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
2433
+ members: ({
2434
+ id: string;
2435
+ organizationId: string;
2436
+ role: "admin" | "member" | "owner";
2437
+ createdAt: Date;
2438
+ userId: string;
2439
+ user: {
2440
+ id: string;
2441
+ email: string;
2442
+ name: string;
2443
+ image?: string | undefined;
2444
+ };
2445
+ } & {
2446
+ user: {
2447
+ id: string;
2448
+ name: string;
2449
+ email: string;
2450
+ image: string | null | undefined;
2451
+ };
2452
+ })[];
2453
+ total: number;
2454
+ }, {
2455
+ code?: string | undefined;
2456
+ message?: string | undefined;
2457
+ }, FetchOptions["throw"] extends true ? true : false>>;
2458
+ };
2459
+ } & {
2460
+ organization: {
2461
+ getActiveMemberRole: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
2462
+ userId?: string | undefined;
2463
+ organizationId?: string | undefined;
2464
+ organizationSlug?: string | undefined;
2465
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
2466
+ query?: {
2467
+ userId?: string | undefined;
2468
+ organizationId?: string | undefined;
2469
+ organizationSlug?: string | undefined;
2470
+ } | undefined;
2471
+ fetchOptions?: FetchOptions | undefined;
2472
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
2473
+ role: "admin" | "member" | "owner";
2474
+ }, {
2475
+ code?: string | undefined;
2476
+ message?: string | undefined;
2477
+ }, FetchOptions["throw"] extends true ? true : false>>;
2478
+ };
2479
+ } & {
2480
+ organization: {
2481
+ hasPermission: <FetchOptions extends better_auth.ClientFetchOption<Partial<({
2482
+ permission: {
2483
+ readonly organization?: ("update" | "delete")[] | undefined;
2484
+ readonly member?: ("update" | "delete" | "create")[] | undefined;
2485
+ readonly invitation?: ("create" | "cancel")[] | undefined;
2486
+ readonly team?: ("update" | "delete" | "create")[] | undefined;
2487
+ readonly ac?: ("update" | "delete" | "create" | "read")[] | undefined;
2488
+ };
2489
+ permissions?: never | undefined;
2490
+ } | {
2491
+ permissions: {
2492
+ readonly organization?: ("update" | "delete")[] | undefined;
2493
+ readonly member?: ("update" | "delete" | "create")[] | undefined;
2494
+ readonly invitation?: ("create" | "cancel")[] | undefined;
2495
+ readonly team?: ("update" | "delete" | "create")[] | undefined;
2496
+ readonly ac?: ("update" | "delete" | "create" | "read")[] | undefined;
2497
+ };
2498
+ permission?: never | undefined;
2499
+ }) & {
2500
+ organizationId?: string | undefined;
2501
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<(({
2502
+ permission: {
2503
+ readonly organization?: ("update" | "delete")[] | undefined;
2504
+ readonly member?: ("update" | "delete" | "create")[] | undefined;
2505
+ readonly invitation?: ("create" | "cancel")[] | undefined;
2506
+ readonly team?: ("update" | "delete" | "create")[] | undefined;
2507
+ readonly ac?: ("update" | "delete" | "create" | "read")[] | undefined;
2508
+ };
2509
+ permissions?: never | undefined;
2510
+ } | {
2511
+ permissions: {
2512
+ readonly organization?: ("update" | "delete")[] | undefined;
2513
+ readonly member?: ("update" | "delete" | "create")[] | undefined;
2514
+ readonly invitation?: ("create" | "cancel")[] | undefined;
2515
+ readonly team?: ("update" | "delete" | "create")[] | undefined;
2516
+ readonly ac?: ("update" | "delete" | "create" | "read")[] | undefined;
2517
+ };
2518
+ permission?: never | undefined;
2519
+ }) & {
2520
+ organizationId?: string | undefined;
2521
+ }) & {
2522
+ fetchOptions?: FetchOptions | undefined;
2523
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
2524
+ error: null;
2525
+ success: boolean;
2526
+ }, {
2527
+ code?: string | undefined;
2528
+ message?: string | undefined;
2529
+ }, FetchOptions["throw"] extends true ? true : false>>;
2530
+ };
2531
+ } & {
2532
+ device: {
2533
+ code: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
2534
+ client_id: string;
2535
+ scope?: string | undefined;
2536
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
2537
+ client_id: string;
2538
+ scope?: string | undefined;
2539
+ } & {
2540
+ fetchOptions?: FetchOptions | undefined;
2541
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
2542
+ device_code: string;
2543
+ user_code: string;
2544
+ verification_uri: string;
2545
+ verification_uri_complete: string;
2546
+ expires_in: number;
2547
+ interval: number;
2548
+ }, {
2549
+ error: "invalid_request" | "invalid_client";
2550
+ error_description: string;
2551
+ }, FetchOptions["throw"] extends true ? true : false>>;
2552
+ };
2553
+ } & {
2554
+ device: {
2555
+ token: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
2556
+ grant_type: "urn:ietf:params:oauth:grant-type:device_code";
2557
+ device_code: string;
2558
+ client_id: string;
2559
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
2560
+ grant_type: "urn:ietf:params:oauth:grant-type:device_code";
2561
+ device_code: string;
2562
+ client_id: string;
2563
+ } & {
2564
+ fetchOptions?: FetchOptions | undefined;
2565
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
2566
+ access_token: string;
2567
+ token_type: string;
2568
+ expires_in: number;
2569
+ scope: string;
2570
+ }, {
2571
+ error: "invalid_request" | "authorization_pending" | "slow_down" | "expired_token" | "access_denied" | "invalid_grant";
2572
+ error_description: string;
2573
+ }, FetchOptions["throw"] extends true ? true : false>>;
2574
+ };
2575
+ } & {
2576
+ device: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
2577
+ user_code: string;
2578
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
2579
+ query: {
2580
+ user_code: string;
2581
+ };
2582
+ fetchOptions?: FetchOptions | undefined;
2583
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
2584
+ user_code: string;
2585
+ status: string;
2586
+ }, {
2587
+ error: "invalid_request";
2588
+ error_description: string;
2589
+ }, FetchOptions["throw"] extends true ? true : false>>;
2590
+ } & {
2591
+ device: {
2592
+ approve: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
2593
+ userCode: string;
2594
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
2595
+ userCode: string;
2596
+ } & {
2597
+ fetchOptions?: FetchOptions | undefined;
2598
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
2599
+ success: boolean;
2600
+ }, {
2601
+ error: "invalid_request" | "expired_token" | "device_code_already_processed";
2602
+ error_description: string;
2603
+ }, FetchOptions["throw"] extends true ? true : false>>;
2604
+ };
2605
+ } & {
2606
+ device: {
2607
+ deny: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
2608
+ userCode: string;
2609
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
2610
+ userCode: string;
2611
+ } & {
2612
+ fetchOptions?: FetchOptions | undefined;
2613
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
2614
+ success: boolean;
2615
+ }, {
2616
+ error: "invalid_request" | "expired_token";
2617
+ error_description: string;
2618
+ }, FetchOptions["throw"] extends true ? true : false>>;
2619
+ };
2620
+ } & {
2621
+ multiSession: {
2622
+ listDeviceSessions: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
2623
+ query?: Record<string, any> | undefined;
2624
+ fetchOptions?: FetchOptions | undefined;
2625
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
2626
+ session: better_auth.Session;
2627
+ user: better_auth.User;
2628
+ }[], {
2629
+ code?: string | undefined;
2630
+ message?: string | undefined;
2631
+ }, FetchOptions["throw"] extends true ? true : false>>;
2632
+ };
2633
+ } & {
2634
+ multiSession: {
2635
+ setActive: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
2636
+ sessionToken: string;
2637
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
2638
+ sessionToken: string;
2639
+ } & {
2640
+ fetchOptions?: FetchOptions | undefined;
2641
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
2642
+ session: better_auth.Session & Record<string, any>;
2643
+ user: better_auth.User & Record<string, any>;
2644
+ }, {
2645
+ code?: string | undefined;
2646
+ message?: string | undefined;
2647
+ }, FetchOptions["throw"] extends true ? true : false>>;
2648
+ };
2649
+ } & {
2650
+ multiSession: {
2651
+ revoke: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
2652
+ sessionToken: string;
2653
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
2654
+ sessionToken: string;
2655
+ } & {
2656
+ fetchOptions?: FetchOptions | undefined;
2657
+ }>, data_1?: FetchOptions | undefined) => Promise<BetterFetchResponse<{
2658
+ status: boolean;
2659
+ }, {
2660
+ code?: string | undefined;
2661
+ message?: string | undefined;
2662
+ }, FetchOptions["throw"] extends true ? true : false>>;
2663
+ };
2664
+ } & {
2665
+ oneTap: (opts?: better_auth_client_plugins.GoogleOneTapActionOptions | undefined, fetchOptions?: better_auth.ClientFetchOption | undefined) => Promise<void>;
2666
+ } & {
2667
+ signIn: {
2668
+ passkey: (opts?: {
2669
+ autoFill?: boolean;
2670
+ fetchOptions?: better_auth.ClientFetchOption;
2671
+ } | undefined, options?: better_auth.ClientFetchOption | undefined) => Promise<{
2672
+ data: null;
2673
+ error: {
2674
+ message?: string | undefined;
2675
+ status: number;
2676
+ statusText: string;
2677
+ };
2678
+ } | {
2679
+ data: {
2680
+ session: better_auth.Session;
2681
+ user: better_auth.User;
2682
+ };
2683
+ error: null;
2684
+ } | {
2685
+ data: null;
2686
+ error: {
2687
+ code: string;
2688
+ message: string;
2689
+ status: number;
2690
+ statusText: string;
2691
+ };
2692
+ }>;
2693
+ };
2694
+ passkey: {
2695
+ addPasskey: (opts?: {
2696
+ fetchOptions?: better_auth.ClientFetchOption;
2697
+ name?: string;
2698
+ authenticatorAttachment?: "platform" | "cross-platform";
2699
+ useAutoRegister?: boolean;
2700
+ } | undefined, fetchOpts?: better_auth.ClientFetchOption | undefined) => Promise<{
2701
+ data: null;
2702
+ error: {
2703
+ message?: string | undefined;
2704
+ status: number;
2705
+ statusText: string;
2706
+ };
2707
+ } | {
2708
+ data: node_modules__better_auth_passkey_dist_index_BosVYrMJ_mjs.n;
2709
+ error: null;
2710
+ } | {
2711
+ data: null;
2712
+ error: {
2713
+ code: string;
2714
+ message: string;
2715
+ status: number;
2716
+ statusText: string;
2717
+ };
2718
+ }>;
2719
+ };
2720
+ $Infer: {
2721
+ Passkey: node_modules__better_auth_passkey_dist_index_BosVYrMJ_mjs.n;
2722
+ };
2723
+ } & {
2724
+ admin: {
2725
+ checkRolePermission: <R extends "user" | "admin">(data: ({
2726
+ permission: {
2727
+ readonly user?: ("set-password" | "update" | "delete" | "list" | "get" | "create" | "set-role" | "ban" | "impersonate")[] | undefined;
2728
+ readonly session?: ("delete" | "list" | "revoke")[] | undefined;
2729
+ };
2730
+ permissions?: never | undefined;
2731
+ } | {
2732
+ permissions: {
2733
+ readonly user?: ("set-password" | "update" | "delete" | "list" | "get" | "create" | "set-role" | "ban" | "impersonate")[] | undefined;
2734
+ readonly session?: ("delete" | "list" | "revoke")[] | undefined;
2735
+ };
2736
+ permission?: never | undefined;
2737
+ }) & {
2738
+ role: R;
2739
+ }) => boolean;
2740
+ };
2741
+ } & {
2742
+ $Infer: {
2743
+ ActiveOrganization: {
2744
+ members: {
2745
+ id: string;
2746
+ organizationId: string;
2747
+ role: "admin" | "member" | "owner";
2748
+ createdAt: Date;
2749
+ userId: string;
2750
+ user: {
2751
+ id: string;
2752
+ email: string;
2753
+ name: string;
2754
+ image?: string | undefined;
2755
+ };
2756
+ }[];
2757
+ invitations: {
2758
+ id: string;
2759
+ organizationId: string;
2760
+ email: string;
2761
+ role: "admin" | "member" | "owner";
2762
+ status: better_auth_plugins_organization.InvitationStatus;
2763
+ inviterId: string;
2764
+ expiresAt: Date;
2765
+ createdAt: Date;
2766
+ }[];
2767
+ } & {
2768
+ id: string;
2769
+ name: string;
2770
+ slug: string;
2771
+ createdAt: Date;
2772
+ logo?: string | null | undefined | undefined;
2773
+ metadata?: any;
2774
+ };
2775
+ Organization: {
2776
+ id: string;
2777
+ name: string;
2778
+ slug: string;
2779
+ createdAt: Date;
2780
+ logo?: string | null | undefined;
2781
+ metadata?: any;
2782
+ };
2783
+ Invitation: {
2784
+ id: string;
2785
+ organizationId: string;
2786
+ email: string;
2787
+ role: "admin" | "member" | "owner";
2788
+ status: better_auth_plugins_organization.InvitationStatus;
2789
+ inviterId: string;
2790
+ expiresAt: Date;
2791
+ createdAt: Date;
2792
+ };
2793
+ Member: {
2794
+ id: string;
2795
+ organizationId: string;
2796
+ role: "admin" | "member" | "owner";
2797
+ createdAt: Date;
2798
+ userId: string;
2799
+ user: {
2800
+ id: string;
2801
+ email: string;
2802
+ name: string;
2803
+ image?: string | undefined;
2804
+ };
2805
+ };
2806
+ Team: {
2807
+ id: string;
2808
+ name: string;
2809
+ organizationId: string;
2810
+ createdAt: Date;
2811
+ updatedAt?: Date | undefined;
2812
+ };
2813
+ };
2814
+ organization: {
2815
+ checkRolePermission: <R extends "admin" | "member" | "owner">(data: ({
2816
+ permission: {
2817
+ readonly organization?: ("update" | "delete")[] | undefined;
2818
+ readonly member?: ("update" | "delete" | "create")[] | undefined;
2819
+ readonly invitation?: ("create" | "cancel")[] | undefined;
2820
+ readonly team?: ("update" | "delete" | "create")[] | undefined;
2821
+ readonly ac?: ("update" | "delete" | "create" | "read")[] | undefined;
2822
+ };
2823
+ permissions?: never | undefined;
2824
+ } | {
2825
+ permissions: {
2826
+ readonly organization?: ("update" | "delete")[] | undefined;
2827
+ readonly member?: ("update" | "delete" | "create")[] | undefined;
2828
+ readonly invitation?: ("create" | "cancel")[] | undefined;
2829
+ readonly team?: ("update" | "delete" | "create")[] | undefined;
2830
+ readonly ac?: ("update" | "delete" | "create" | "read")[] | undefined;
2831
+ };
2832
+ permission?: never | undefined;
2833
+ }) & {
2834
+ role: R;
2835
+ }) => boolean;
2836
+ };
2837
+ } & {
2838
+ getLastUsedLoginMethod: () => string | null;
2839
+ clearLastUsedLoginMethod: () => void;
2840
+ isLastUsedLoginMethod: (method: string) => boolean;
2841
+ } & {
2842
+ useSession: () => {
2843
+ data: {
2844
+ user: {
2845
+ id: string;
2846
+ createdAt: Date;
2847
+ updatedAt: Date;
2848
+ email: string;
2849
+ emailVerified: boolean;
2850
+ name: string;
2851
+ image?: string | null | undefined;
2852
+ isAnonymous: boolean | null | undefined;
2853
+ phoneNumber?: string | null | undefined;
2854
+ phoneNumberVerified?: boolean | null | undefined;
2855
+ twoFactorEnabled: boolean | null | undefined;
2856
+ username?: string | null | undefined;
2857
+ displayUsername?: string | null | undefined;
2858
+ banned: boolean | null | undefined;
2859
+ role?: string | null | undefined;
2860
+ banReason?: string | null | undefined;
2861
+ banExpires?: Date | null | undefined;
2862
+ };
2863
+ session: {
2864
+ id: string;
2865
+ createdAt: Date;
2866
+ updatedAt: Date;
2867
+ userId: string;
2868
+ expiresAt: Date;
2869
+ token: string;
2870
+ ipAddress?: string | null | undefined;
2871
+ userAgent?: string | null | undefined;
2872
+ impersonatedBy?: string | null | undefined;
2873
+ activeOrganizationId?: string | null | undefined;
2874
+ };
2875
+ } | null;
2876
+ isPending: boolean;
2877
+ isRefetching: boolean;
2878
+ error: _better_fetch_fetch.BetterFetchError | null;
2879
+ refetch: (queryParams?: {
2880
+ query?: better_auth.SessionQueryParams;
2881
+ } | undefined) => Promise<void>;
2882
+ };
2883
+ $Infer: {
2884
+ Session: {
2885
+ user: {
2886
+ id: string;
2887
+ createdAt: Date;
2888
+ updatedAt: Date;
2889
+ email: string;
2890
+ emailVerified: boolean;
2891
+ name: string;
2892
+ image?: string | null | undefined;
2893
+ isAnonymous: boolean | null | undefined;
2894
+ phoneNumber?: string | null | undefined;
2895
+ phoneNumberVerified?: boolean | null | undefined;
2896
+ twoFactorEnabled: boolean | null | undefined;
2897
+ username?: string | null | undefined;
2898
+ displayUsername?: string | null | undefined;
2899
+ banned: boolean | null | undefined;
2900
+ role?: string | null | undefined;
2901
+ banReason?: string | null | undefined;
2902
+ banExpires?: Date | null | undefined;
2903
+ };
2904
+ session: {
2905
+ id: string;
2906
+ createdAt: Date;
2907
+ updatedAt: Date;
2908
+ userId: string;
2909
+ expiresAt: Date;
2910
+ token: string;
2911
+ ipAddress?: string | null | undefined;
2912
+ userAgent?: string | null | undefined;
2913
+ impersonatedBy?: string | null | undefined;
2914
+ activeOrganizationId?: string | null | undefined;
2915
+ };
2916
+ };
2917
+ };
2918
+ $fetch: _better_fetch_fetch.BetterFetch<{
2919
+ plugins: (_better_fetch_fetch.BetterFetchPlugin | {
2920
+ id: string;
2921
+ name: string;
2922
+ hooks: {
2923
+ onSuccess(context: _better_fetch_fetch.SuccessContext<any>): void;
2924
+ };
2925
+ } | {
2926
+ id: string;
2927
+ name: string;
2928
+ hooks: {
2929
+ onRequest<T extends Record<string, any>>(context: _better_fetch_fetch.RequestContext<T>): void;
2930
+ };
2931
+ } | {
2932
+ id: string;
2933
+ name: string;
2934
+ hooks: {
2935
+ onSuccess: ((context: _better_fetch_fetch.SuccessContext<any>) => Promise<void> | void) | undefined;
2936
+ onError: ((context: _better_fetch_fetch.ErrorContext) => Promise<void> | void) | undefined;
2937
+ onRequest: (<T extends Record<string, any>>(context: _better_fetch_fetch.RequestContext<T>) => Promise<_better_fetch_fetch.RequestContext | void> | _better_fetch_fetch.RequestContext | void) | undefined;
2938
+ onResponse: ((context: _better_fetch_fetch.ResponseContext) => Promise<Response | void | _better_fetch_fetch.ResponseContext> | Response | _better_fetch_fetch.ResponseContext | void) | undefined;
2939
+ };
2940
+ })[];
2941
+ cache?: RequestCache | undefined;
2942
+ method: string;
2943
+ headers?: (HeadersInit & (HeadersInit | {
2944
+ accept: "application/json" | "text/plain" | "application/octet-stream";
2945
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
2946
+ authorization: "Bearer" | "Basic";
2947
+ })) | undefined;
2948
+ redirect?: RequestRedirect | undefined;
2949
+ credentials?: RequestCredentials;
2950
+ integrity?: string | undefined;
2951
+ keepalive?: boolean | undefined;
2952
+ mode?: RequestMode | undefined;
2953
+ priority?: RequestPriority | undefined;
2954
+ referrer?: string | undefined;
2955
+ referrerPolicy?: ReferrerPolicy | undefined;
2956
+ signal?: (AbortSignal | null) | undefined;
2957
+ window?: null | undefined;
2958
+ onRetry?: ((response: _better_fetch_fetch.ResponseContext) => Promise<void> | void) | undefined;
2959
+ hookOptions?: {
2960
+ cloneResponse?: boolean;
2961
+ } | undefined;
2962
+ timeout?: number | undefined;
2963
+ customFetchImpl: _better_fetch_fetch.FetchEsque;
2964
+ baseURL: string;
2965
+ throw?: boolean | undefined;
2966
+ auth?: ({
2967
+ type: "Bearer";
2968
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
2969
+ } | {
2970
+ type: "Basic";
2971
+ username: string | (() => string | undefined) | undefined;
2972
+ password: string | (() => string | undefined) | undefined;
2973
+ } | {
2974
+ type: "Custom";
2975
+ prefix: string | (() => string | undefined) | undefined;
2976
+ value: string | (() => string | undefined) | undefined;
2977
+ }) | undefined;
2978
+ body?: any;
2979
+ query?: any;
2980
+ params?: any;
2981
+ duplex?: "full" | "half" | undefined;
2982
+ jsonParser: (text: string) => Promise<any> | any;
2983
+ retry?: _better_fetch_fetch.RetryOptions | undefined;
2984
+ retryAttempt?: number | undefined;
2985
+ output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
2986
+ errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined;
2987
+ disableValidation?: boolean | undefined;
2988
+ disableSignal?: boolean | undefined;
2989
+ }, unknown, unknown, {}>;
2990
+ $store: {
2991
+ notify: (signal?: (Omit<string, "$sessionSignal"> | "$sessionSignal") | undefined) => void;
2992
+ listen: (signal: Omit<string, "$sessionSignal"> | "$sessionSignal", listener: (value: boolean, oldValue?: boolean | undefined) => void) => void;
2993
+ atoms: Record<string, better_auth_react.WritableAtom<any>>;
2994
+ };
2995
+ $ERROR_CODES: {
2996
+ readonly USER_NOT_FOUND: "User not found";
2997
+ readonly FAILED_TO_CREATE_USER: "Failed to create user";
2998
+ readonly FAILED_TO_CREATE_SESSION: "Failed to create session";
2999
+ readonly FAILED_TO_UPDATE_USER: "Failed to update user";
3000
+ readonly FAILED_TO_GET_SESSION: "Failed to get session";
3001
+ readonly INVALID_PASSWORD: "Invalid password";
3002
+ readonly INVALID_EMAIL: "Invalid email";
3003
+ readonly INVALID_EMAIL_OR_PASSWORD: "Invalid email or password";
3004
+ readonly SOCIAL_ACCOUNT_ALREADY_LINKED: "Social account already linked";
3005
+ readonly PROVIDER_NOT_FOUND: "Provider not found";
3006
+ readonly INVALID_TOKEN: "Invalid token";
3007
+ readonly ID_TOKEN_NOT_SUPPORTED: "id_token not supported";
3008
+ readonly FAILED_TO_GET_USER_INFO: "Failed to get user info";
3009
+ readonly USER_EMAIL_NOT_FOUND: "User email not found";
3010
+ readonly EMAIL_NOT_VERIFIED: "Email not verified";
3011
+ readonly PASSWORD_TOO_SHORT: "Password too short";
3012
+ readonly PASSWORD_TOO_LONG: "Password too long";
3013
+ readonly USER_ALREADY_EXISTS: "User already exists.";
3014
+ readonly USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL: "User already exists. Use another email.";
3015
+ readonly EMAIL_CAN_NOT_BE_UPDATED: "Email can not be updated";
3016
+ readonly CREDENTIAL_ACCOUNT_NOT_FOUND: "Credential account not found";
3017
+ readonly SESSION_EXPIRED: "Session expired. Re-authenticate to perform this action.";
3018
+ readonly FAILED_TO_UNLINK_LAST_ACCOUNT: "You can't unlink your last account";
3019
+ readonly ACCOUNT_NOT_FOUND: "Account not found";
3020
+ readonly USER_ALREADY_HAS_PASSWORD: "User already has a password. Provide that to delete the account.";
3021
+ };
3022
+ };
3023
+ type AuthClient = typeof authClient;
3024
+ type SessionData = AuthClient['$Infer']['Session'];
3025
+ type Session = AuthClient['$Infer']['Session']['session'];
3026
+ type User = AuthClient['$Infer']['Session']['user'];
3027
+ type ActiveOrganization = typeof authClient.$Infer.ActiveOrganization;
3028
+
3029
+ type BetterFetchRequest<TData> = ({ fetchOptions, }: {
3030
+ fetchOptions: BetterFetchOption;
3031
+ }) => Promise<BetterFetchResponse<TData>>;
3032
+
3033
+ /**
3034
+ * Application configuration type definitions
3035
+ * These types define the structure of the configuration object that can be passed to the starter kit
3036
+ */
3037
+ /**
3038
+ * Application metadata configuration
3039
+ */
3040
+ type AppConfig = {
3041
+ /** Application name */
3042
+ name: string;
3043
+ /** Application domain (e.g., localhost:3000, app.example.com) */
3044
+ domain: string;
3045
+ /** Full application URL (e.g., http://localhost:3000) */
3046
+ url: string;
3047
+ /** API endpoint URL (e.g., http://localhost:3001 or /api) */
3048
+ api: string;
3049
+ };
3050
+ /**
3051
+ * Locale configuration for internationalization
3052
+ */
3053
+ type LocaleConfig = {
3054
+ /** Locale code (e.g., en, id, ar) */
3055
+ code: string;
3056
+ /** Display name of the locale */
3057
+ name: string;
3058
+ /** Text direction for the locale */
3059
+ direction: 'ltr' | 'rtl';
3060
+ /** Flag identifier for the locale */
3061
+ flag: string;
3062
+ };
3063
+ /**
3064
+ * Internationalization configuration
3065
+ */
3066
+ type I18nConfig = {
3067
+ /** Whether i18n is enabled */
3068
+ enabled: boolean;
3069
+ /** Available locales mapping */
3070
+ locales: {
3071
+ [locale: string]: LocaleConfig;
3072
+ };
3073
+ /** Default locale code */
3074
+ defaultLocale: string;
3075
+ /** Default currency code */
3076
+ defaultCurrency: string;
3077
+ /** Cookie name for storing locale preference */
3078
+ localeCookieName: string;
3079
+ };
3080
+ /**
3081
+ * Authentication methods configuration
3082
+ */
3083
+ type AuthenticationConfig = {
3084
+ /** Allow anonymous authentication */
3085
+ anonymous: boolean;
3086
+ /** Allow email OTP authentication */
3087
+ emailOtp: boolean;
3088
+ /** Allow magic link authentication */
3089
+ magicLink: boolean;
3090
+ /** Allow Google One Tap authentication */
3091
+ oneTap: boolean;
3092
+ /** Allow passkey authentication */
3093
+ passkey: boolean;
3094
+ /** Allow password authentication */
3095
+ password: boolean;
3096
+ /** Allow phone number authentication */
3097
+ phoneNumber: boolean;
3098
+ /** Allow two-factor authentication */
3099
+ twoFactor: boolean;
3100
+ /** Allow username authentication */
3101
+ username: boolean;
3102
+ };
3103
+ /**
3104
+ * Authentication configuration
3105
+ */
3106
+ type AuthConfig = {
3107
+ /** Allow user signup */
3108
+ enableSignup: boolean;
3109
+ /** Allow users to change their email */
3110
+ allowChangeEmail: boolean;
3111
+ /** Allow users to delete their account */
3112
+ allowDeleteUser: boolean;
3113
+ /** Enable or disable email verification for account deletion */
3114
+ deleteUserVerification: boolean;
3115
+ /** Redirect path after successful sign in */
3116
+ redirectAfterSignIn: string;
3117
+ /** Redirect path after logout */
3118
+ redirectAfterLogout: string;
3119
+ /** Freshness age for Session data */
3120
+ freshAge: number;
3121
+ /** Session cookie max age in seconds */
3122
+ sessionCookieMaxAge: number;
3123
+ /** Enabled social authentication providers */
3124
+ socialProviders: string[];
3125
+ /** Authentication methods configuration */
3126
+ authentication: AuthenticationConfig;
3127
+ };
3128
+ /**
3129
+ * Feature flags configuration
3130
+ */
3131
+ type FeaturesConfig = {
3132
+ /** Enable admin features */
3133
+ admin: boolean;
3134
+ /** Enable API key authentication */
3135
+ apiKey: boolean;
3136
+ /** Enable CAPTCHA */
3137
+ captcha: boolean;
3138
+ /** Enable device authorization */
3139
+ deviceAuthorization: boolean;
3140
+ /** Enable HaveIBeenPwned password breach detection */
3141
+ haveIBeenPwned: boolean;
3142
+ /** Track last login method */
3143
+ lastLoginMethod: boolean;
3144
+ /** Enable multi-session support */
3145
+ multiSession: boolean;
3146
+ /** Enable Polar payment integration */
3147
+ polar: boolean;
3148
+ /** Enable rate limiting */
3149
+ rateLimit: boolean;
3150
+ /** Enable workspace/organization features */
3151
+ workspace: boolean;
3152
+ };
3153
+ /**
3154
+ * Application path configuration
3155
+ */
3156
+ type PathConfig = {
3157
+ /** Main application paths */
3158
+ main: {
3159
+ ERROR: string;
3160
+ HOME: string;
3161
+ FEATURES: string;
3162
+ PRICING: string;
3163
+ TERMS: string;
3164
+ PRIVACY: string;
3165
+ [key: string]: string;
3166
+ };
3167
+ /** Authentication related paths */
3168
+ auth: {
3169
+ ACCEPT_INVITATION: string;
3170
+ CALLBACK: string;
3171
+ EMAIL_OTP: string;
3172
+ FORGOT_PASSWORD: string;
3173
+ MAGIC_LINK: string;
3174
+ RECOVER_ACCOUNT: string;
3175
+ RESET_PASSWORD: string;
3176
+ SIGN_IN: string;
3177
+ SIGN_OUT: string;
3178
+ SIGN_UP: string;
3179
+ TWO_FACTOR: string;
3180
+ [key: string]: string;
3181
+ };
3182
+ /** Onboarding flow paths */
3183
+ onboarding: {
3184
+ WELCOME: string;
3185
+ WORKSPACE: string;
3186
+ [key: string]: string;
3187
+ };
3188
+ /** User account settings paths */
3189
+ account: {
3190
+ SETTINGS: string;
3191
+ SECURITY: string;
3192
+ API_KEYS: string;
3193
+ WORKSPACES: string;
3194
+ [key: string]: string;
3195
+ };
3196
+ /** Workspace settings paths */
3197
+ workspaces: {
3198
+ SETTINGS: string;
3199
+ MEMBERS: string;
3200
+ API_KEYS: string;
3201
+ BILLINGS: string;
3202
+ WEBHOOKS: string;
3203
+ [key: string]: string;
3204
+ };
3205
+ /** Admin paths */
3206
+ admin: {
3207
+ OVERVIEW: string;
3208
+ USERS: string;
3209
+ [key: string]: string;
3210
+ };
3211
+ };
3212
+ /**
3213
+ * UI configuration
3214
+ */
3215
+ type UIConfig = {
3216
+ /** Enable multiple theme support */
3217
+ enableMultiThemes: boolean;
3218
+ /** Default theme name */
3219
+ defaultTheme: string;
3220
+ /** Enable workspace slug in URLs */
3221
+ enableWorkspaceSlug: boolean;
3222
+ };
3223
+ /**
3224
+ * Main configuration object structure
3225
+ * This is the complete configuration that should be passed to ConfigProvider
3226
+ */
3227
+ type Config = {
3228
+ /** Application metadata */
3229
+ app: AppConfig;
3230
+ /** Internationalization settings */
3231
+ i18n: I18nConfig;
3232
+ /** Authentication settings */
3233
+ auth: AuthConfig;
3234
+ /** Feature flags */
3235
+ features: FeaturesConfig;
3236
+ /** Application paths */
3237
+ path: PathConfig;
3238
+ /** UI settings */
3239
+ ui: UIConfig;
3240
+ };
3241
+
3242
+ type AuthQueryOptions = {
3243
+ /**
3244
+ * The default query options for all queries.
3245
+ */
3246
+ queryOptions?: Partial<AnyUseQueryOptions>;
3247
+ /**
3248
+ * The default query options for session queries.
3249
+ */
3250
+ sessionQueryOptions?: Partial<AnyUseQueryOptions>;
3251
+ /**
3252
+ * Whether to use optimistic updates for mutations.
3253
+ */
3254
+ optimistic: boolean;
3255
+ /**
3256
+ * Whether to refetch queries on mutations.
3257
+ */
3258
+ refetchOnMutate: boolean;
3259
+ /**
3260
+ * The query keys for session queries.
3261
+ */
3262
+ queryKey: {
3263
+ accountInfo: QueryKey;
3264
+ listAccounts: QueryKey;
3265
+ listApiKeys: QueryKey;
3266
+ listDeviceSessions: QueryKey;
3267
+ listPasskeys: QueryKey;
3268
+ listSessions: QueryKey;
3269
+ session: QueryKey;
3270
+ };
3271
+ };
3272
+ declare const defaultAuthQueryOptions: AuthQueryOptions;
3273
+
3274
+ type Locale = keyof Config['i18n']['locales'] & string;
3275
+ type FieldType = 'string' | 'number' | 'boolean';
3276
+ type ImageOptions = {
3277
+ upload?: (file: File) => Promise<string | undefined | null>;
3278
+ delete?: (url: string) => Promise<void>;
3279
+ size?: number;
3280
+ extension?: string;
3281
+ };
3282
+ type ProviderIcon = ComponentType<{
3283
+ className?: string;
3284
+ }>;
3285
+ type Provider = {
3286
+ provider: string;
3287
+ name: string;
3288
+ icon?: ProviderIcon;
3289
+ };
3290
+ type ApiKey = {
3291
+ id: string;
3292
+ name?: string | null;
3293
+ start?: string | null;
3294
+ expiresAt?: Date | null;
3295
+ createdAt: Date;
3296
+ updatedAt: Date;
3297
+ metadata?: Record<string, unknown> | null;
3298
+ };
3299
+ type Invitation = {
3300
+ id: string;
3301
+ organizationId: string;
3302
+ email: string;
3303
+ role: string;
3304
+ status: string;
3305
+ inviterId: string;
3306
+ expiresAt: Date;
3307
+ teamId?: string | undefined;
3308
+ };
3309
+ type PasswordValidation = {
3310
+ maxLength?: number;
3311
+ minLength?: number;
3312
+ regex?: RegExp;
3313
+ };
3314
+ type Profile = {
3315
+ id?: string | number;
3316
+ email?: string | null;
3317
+ name?: string | null;
3318
+ displayUsername?: string | null;
3319
+ username?: string | null;
3320
+ displayName?: string | null;
3321
+ firstName?: string | null;
3322
+ fullName?: string | null;
3323
+ isAnonymous?: boolean | null;
3324
+ emailVerified?: boolean | null;
3325
+ image?: string | null;
3326
+ avatar?: string | null;
3327
+ avatarUrl?: string | null;
3328
+ };
3329
+ type FetchError = {
3330
+ code?: string | undefined;
3331
+ message?: string | undefined;
3332
+ status?: number;
3333
+ statusText?: string;
3334
+ };
3335
+ type Refetch = () => Promise<unknown> | unknown;
3336
+ type NonThrowableResult = {
3337
+ data: {
3338
+ status?: boolean;
3339
+ success?: boolean;
3340
+ [key: string]: unknown;
3341
+ } | null;
3342
+ error: {
3343
+ code?: string | undefined;
3344
+ message?: string | undefined;
3345
+ status: number;
3346
+ statusText: string;
3347
+ } | null;
3348
+ };
3349
+ type ThrowableResult = {
3350
+ status?: boolean;
3351
+ [key: string]: unknown;
3352
+ };
3353
+
3354
+ type AvatarClassNames = {
3355
+ base?: string;
3356
+ fallback?: string;
3357
+ fallbackIcon?: string;
3358
+ image?: string;
3359
+ skeleton?: string;
3360
+ };
3361
+ type ViewClassNames = {
3362
+ base?: string;
3363
+ content?: string;
3364
+ title?: string;
3365
+ subtitle?: string;
3366
+ skeleton?: string;
3367
+ icon?: string;
3368
+ avatar?: AvatarClassNames;
3369
+ };
3370
+ type DialogClassNames = {
3371
+ content?: string;
3372
+ header?: string;
3373
+ footer?: string;
3374
+ };
3375
+ type CardClassNames = {
3376
+ base?: string;
3377
+ cell?: string;
3378
+ content?: string;
3379
+ header?: string;
3380
+ footer?: string;
3381
+ grid?: string;
3382
+ skeleton?: string;
3383
+ title?: string;
3384
+ description?: string;
3385
+ instructions?: string;
3386
+ error?: string;
3387
+ label?: string;
3388
+ input?: string;
3389
+ checkbox?: string;
3390
+ icon?: string;
3391
+ button?: string;
3392
+ primaryButton?: string;
3393
+ secondaryButton?: string;
3394
+ outlineButton?: string;
3395
+ destructiveButton?: string;
3396
+ avatar?: AvatarClassNames;
3397
+ dialog?: DialogClassNames;
3398
+ };
3399
+ interface AvatarProps extends ComponentProps<typeof Avatar> {
3400
+ className?: string;
3401
+ classNames?: AvatarClassNames;
3402
+ isPending?: boolean;
3403
+ size?: NonNullable<Parameters<typeof buttonVariants>[0]>['size'] | null | undefined;
3404
+ user?: Profile | null;
3405
+ }
3406
+ interface ViewProps {
3407
+ className?: string;
3408
+ classNames?: ViewClassNames;
3409
+ isPending?: boolean;
3410
+ size?: NonNullable<Parameters<typeof buttonVariants>[0]>['size'] | null | undefined;
3411
+ user?: Profile | null;
3412
+ }
3413
+ interface DialogComponentProps extends ComponentProps<typeof Dialog> {
3414
+ className?: string;
3415
+ children?: ReactNode;
3416
+ classNames?: CardClassNames;
3417
+ title?: string;
3418
+ description?: string;
3419
+ disableFooter?: boolean;
3420
+ cancelButton?: boolean;
3421
+ cancelButtonDisabled?: boolean;
3422
+ button?: ReactNode;
3423
+ }
3424
+ interface CardComponentProps extends Omit<ComponentProps<typeof Card>, 'title' | 'variant'> {
3425
+ className?: string;
3426
+ children?: ReactNode;
3427
+ classNames?: CardClassNames;
3428
+ title?: ReactNode;
3429
+ description?: ReactNode;
3430
+ instructions?: ReactNode;
3431
+ actionLabel?: ReactNode;
3432
+ action?: () => Promise<unknown> | unknown;
3433
+ disabled?: boolean;
3434
+ isDestructive?: boolean;
3435
+ isPending?: boolean;
3436
+ isSubmitting?: boolean;
3437
+ }
3438
+
3439
+ export { type AuthClient as A, type BetterFetchRequest as B, type Config as C, type DialogComponentProps as D, type FieldType as F, type ImageOptions as I, type LocaleConfig as L, type NonThrowableResult as N, type PasswordValidation as P, type Refetch as R, type Session as S, type ThrowableResult as T, type User as U, type ViewProps as V, type AuthQueryOptions as a, type AnyAuthClient as b, type CardComponentProps as c, type CardClassNames as d, type ApiKey as e, type PathConfig as f, type Provider as g, type Profile as h, type AvatarProps as i, type ProviderIcon as j, defaultAuthQueryOptions as k, type AppConfig as l, type I18nConfig as m, type AuthenticationConfig as n, type AuthConfig as o, type FeaturesConfig as p, type UIConfig as q, authClient as r, type SessionData as s, type ActiveOrganization as t, type Locale as u, type Invitation as v, type FetchError as w, type AvatarClassNames as x, type ViewClassNames as y, type DialogClassNames as z };