@voyantjs/auth 0.1.0 → 0.2.0

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