@meistrari/auth-core 1.10.0 → 1.11.1
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/index.d.mts +83 -43
- package/dist/index.d.ts +83 -43
- package/dist/index.mjs +4 -4
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -5,6 +5,7 @@ import * as better_auth_client from 'better-auth/client';
|
|
|
5
5
|
import { BetterFetchOption } from 'better-auth/client';
|
|
6
6
|
import * as nanostores from 'nanostores';
|
|
7
7
|
import * as _better_auth_sso from '@better-auth/sso';
|
|
8
|
+
import * as better_auth_db from 'better-auth/db';
|
|
8
9
|
import * as _better_fetch_fetch from '@better-fetch/fetch';
|
|
9
10
|
export { BetterFetchError as APIError } from '@better-fetch/fetch';
|
|
10
11
|
|
|
@@ -205,6 +206,7 @@ type JWTTokenPayload = JWTPayload & {
|
|
|
205
206
|
|
|
206
207
|
declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOption): {
|
|
207
208
|
useActiveOrganization: better_auth_client.AuthQueryAtom<better_auth.Prettify<{
|
|
209
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
208
210
|
id: string;
|
|
209
211
|
name: string;
|
|
210
212
|
slug: string;
|
|
@@ -213,6 +215,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
213
215
|
metadata?: any;
|
|
214
216
|
} & {
|
|
215
217
|
members: {
|
|
218
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
216
219
|
id: string;
|
|
217
220
|
organizationId: string;
|
|
218
221
|
role: "org:admin" | "org:member" | "org:reviewer";
|
|
@@ -225,10 +228,9 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
225
228
|
name: string;
|
|
226
229
|
image?: string | undefined;
|
|
227
230
|
};
|
|
228
|
-
deletedAt?: Date | undefined;
|
|
229
|
-
lastActiveAt?: Date | undefined;
|
|
230
231
|
}[];
|
|
231
232
|
invitations: {
|
|
233
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
232
234
|
id: string;
|
|
233
235
|
organizationId: string;
|
|
234
236
|
email: string;
|
|
@@ -241,6 +243,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
241
243
|
}[];
|
|
242
244
|
}>>;
|
|
243
245
|
useListOrganizations: better_auth_client.AuthQueryAtom<{
|
|
246
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
244
247
|
id: string;
|
|
245
248
|
name: string;
|
|
246
249
|
slug: string;
|
|
@@ -324,14 +327,18 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
324
327
|
};
|
|
325
328
|
} & {
|
|
326
329
|
organization: {
|
|
327
|
-
create: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
330
|
+
create: <FetchOptions extends better_auth.ClientFetchOption<Partial<{} & {
|
|
331
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
332
|
+
} & {
|
|
328
333
|
name: string;
|
|
329
334
|
slug: string;
|
|
330
335
|
userId?: string | undefined;
|
|
331
336
|
logo?: string | undefined;
|
|
332
337
|
metadata?: Record<string, any> | undefined;
|
|
333
338
|
keepCurrentActiveOrganization?: boolean | undefined;
|
|
334
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
|
|
339
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{} & {
|
|
340
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
341
|
+
} & {
|
|
335
342
|
name: string;
|
|
336
343
|
slug: string;
|
|
337
344
|
userId?: string | undefined;
|
|
@@ -341,6 +348,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
341
348
|
} & {
|
|
342
349
|
fetchOptions?: FetchOptions | undefined;
|
|
343
350
|
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
351
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
344
352
|
id: string;
|
|
345
353
|
name: string;
|
|
346
354
|
slug: string;
|
|
@@ -356,8 +364,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
356
364
|
role: string;
|
|
357
365
|
createdAt: Date;
|
|
358
366
|
} & {} & {
|
|
359
|
-
|
|
360
|
-
lastActiveAt?: Date | undefined;
|
|
367
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
361
368
|
}) | undefined)[];
|
|
362
369
|
}, {
|
|
363
370
|
code?: string | undefined;
|
|
@@ -372,7 +379,9 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
372
379
|
slug?: string | undefined;
|
|
373
380
|
logo?: string | undefined;
|
|
374
381
|
metadata?: Record<string, any> | undefined;
|
|
375
|
-
} & Partial<{
|
|
382
|
+
} & Partial<better_auth_db.FieldAttributeToObject<{
|
|
383
|
+
[x: string]: better_auth.DBFieldAttribute;
|
|
384
|
+
}>>;
|
|
376
385
|
organizationId?: string | undefined;
|
|
377
386
|
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
|
|
378
387
|
data: {
|
|
@@ -380,11 +389,14 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
380
389
|
slug?: string | undefined;
|
|
381
390
|
logo?: string | undefined;
|
|
382
391
|
metadata?: Record<string, any> | undefined;
|
|
383
|
-
} & Partial<{
|
|
392
|
+
} & Partial<better_auth_db.FieldAttributeToObject<{
|
|
393
|
+
[x: string]: better_auth.DBFieldAttribute;
|
|
394
|
+
}>>;
|
|
384
395
|
organizationId?: string | undefined;
|
|
385
396
|
} & {
|
|
386
397
|
fetchOptions?: FetchOptions | undefined;
|
|
387
398
|
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
399
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
388
400
|
id: string;
|
|
389
401
|
name: string;
|
|
390
402
|
slug: string;
|
|
@@ -405,6 +417,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
405
417
|
} & {
|
|
406
418
|
fetchOptions?: FetchOptions | undefined;
|
|
407
419
|
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
420
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
408
421
|
id: string;
|
|
409
422
|
name: string;
|
|
410
423
|
slug: string;
|
|
@@ -428,6 +441,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
428
441
|
fetchOptions?: FetchOptions | undefined;
|
|
429
442
|
}> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
430
443
|
members: {
|
|
444
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
431
445
|
id: string;
|
|
432
446
|
organizationId: string;
|
|
433
447
|
role: "org:admin" | "org:member" | "org:reviewer";
|
|
@@ -440,10 +454,9 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
440
454
|
name: string;
|
|
441
455
|
image?: string | undefined;
|
|
442
456
|
};
|
|
443
|
-
deletedAt?: Date | undefined;
|
|
444
|
-
lastActiveAt?: Date | undefined;
|
|
445
457
|
}[];
|
|
446
458
|
invitations: {
|
|
459
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
447
460
|
id: string;
|
|
448
461
|
organizationId: string;
|
|
449
462
|
email: string;
|
|
@@ -455,6 +468,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
455
468
|
teamId?: string | undefined | undefined;
|
|
456
469
|
}[];
|
|
457
470
|
teams: {
|
|
471
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
458
472
|
id: string;
|
|
459
473
|
name: string;
|
|
460
474
|
organizationId: string;
|
|
@@ -462,6 +476,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
462
476
|
updatedAt?: Date | undefined;
|
|
463
477
|
}[];
|
|
464
478
|
} & {
|
|
479
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
465
480
|
id: string;
|
|
466
481
|
name: string;
|
|
467
482
|
slug: string;
|
|
@@ -488,6 +503,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
488
503
|
fetchOptions?: FetchOptions | undefined;
|
|
489
504
|
}> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
490
505
|
members: {
|
|
506
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
491
507
|
id: string;
|
|
492
508
|
organizationId: string;
|
|
493
509
|
role: "org:admin" | "org:member" | "org:reviewer";
|
|
@@ -500,10 +516,9 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
500
516
|
name: string;
|
|
501
517
|
image?: string | undefined;
|
|
502
518
|
};
|
|
503
|
-
deletedAt?: Date | undefined;
|
|
504
|
-
lastActiveAt?: Date | undefined;
|
|
505
519
|
}[];
|
|
506
520
|
invitations: {
|
|
521
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
507
522
|
id: string;
|
|
508
523
|
organizationId: string;
|
|
509
524
|
email: string;
|
|
@@ -515,6 +530,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
515
530
|
teamId?: string | undefined | undefined;
|
|
516
531
|
}[];
|
|
517
532
|
teams: {
|
|
533
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
518
534
|
id: string;
|
|
519
535
|
name: string;
|
|
520
536
|
organizationId: string;
|
|
@@ -522,6 +538,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
522
538
|
updatedAt?: Date | undefined;
|
|
523
539
|
}[];
|
|
524
540
|
} & {
|
|
541
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
525
542
|
id: string;
|
|
526
543
|
name: string;
|
|
527
544
|
slug: string;
|
|
@@ -539,6 +556,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
539
556
|
query?: Record<string, any> | undefined;
|
|
540
557
|
fetchOptions?: FetchOptions | undefined;
|
|
541
558
|
}> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
559
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
542
560
|
id: string;
|
|
543
561
|
name: string;
|
|
544
562
|
slug: string;
|
|
@@ -559,6 +577,8 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
559
577
|
resend?: boolean | undefined;
|
|
560
578
|
} & {
|
|
561
579
|
teamId?: (string | string[]) | undefined;
|
|
580
|
+
} & {} & {
|
|
581
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
562
582
|
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
|
|
563
583
|
email: string;
|
|
564
584
|
role: "org:admin" | "org:member" | "org:reviewer" | ("org:admin" | "org:member" | "org:reviewer")[];
|
|
@@ -566,9 +586,12 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
566
586
|
resend?: boolean | undefined;
|
|
567
587
|
} & {
|
|
568
588
|
teamId?: (string | string[]) | undefined;
|
|
589
|
+
} & {} & {
|
|
590
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
569
591
|
} & {
|
|
570
592
|
fetchOptions?: FetchOptions | undefined;
|
|
571
593
|
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<NonNullable<{
|
|
594
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
572
595
|
id: string;
|
|
573
596
|
organizationId: string;
|
|
574
597
|
email: string;
|
|
@@ -579,6 +602,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
579
602
|
createdAt: Date;
|
|
580
603
|
teamId?: string | undefined | undefined;
|
|
581
604
|
} | {
|
|
605
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
582
606
|
id: string;
|
|
583
607
|
organizationId: string;
|
|
584
608
|
email: string;
|
|
@@ -602,6 +626,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
602
626
|
} & {
|
|
603
627
|
fetchOptions?: FetchOptions | undefined;
|
|
604
628
|
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
629
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
605
630
|
id: string;
|
|
606
631
|
organizationId: string;
|
|
607
632
|
email: string;
|
|
@@ -626,6 +651,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
626
651
|
fetchOptions?: FetchOptions | undefined;
|
|
627
652
|
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
628
653
|
invitation: {
|
|
654
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
629
655
|
id: string;
|
|
630
656
|
organizationId: string;
|
|
631
657
|
email: string;
|
|
@@ -643,8 +669,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
643
669
|
role: string;
|
|
644
670
|
createdAt: Date;
|
|
645
671
|
} & {} & {
|
|
646
|
-
|
|
647
|
-
lastActiveAt?: Date | undefined;
|
|
672
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
648
673
|
};
|
|
649
674
|
}, {
|
|
650
675
|
code?: string | undefined;
|
|
@@ -661,6 +686,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
661
686
|
};
|
|
662
687
|
fetchOptions?: FetchOptions | undefined;
|
|
663
688
|
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<NonNullable<{
|
|
689
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
664
690
|
id: string;
|
|
665
691
|
organizationId: string;
|
|
666
692
|
email: string;
|
|
@@ -714,6 +740,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
714
740
|
} | undefined;
|
|
715
741
|
fetchOptions?: FetchOptions | undefined;
|
|
716
742
|
}> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
743
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
717
744
|
id: string;
|
|
718
745
|
organizationId: string;
|
|
719
746
|
email: string;
|
|
@@ -734,6 +761,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
734
761
|
query?: Record<string, any> | undefined;
|
|
735
762
|
fetchOptions?: FetchOptions | undefined;
|
|
736
763
|
}> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<Omit<{
|
|
764
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
737
765
|
id: string;
|
|
738
766
|
organizationId: string;
|
|
739
767
|
role: "org:admin" | "org:member" | "org:reviewer";
|
|
@@ -746,8 +774,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
746
774
|
name: string;
|
|
747
775
|
image?: string | undefined;
|
|
748
776
|
};
|
|
749
|
-
deletedAt?: Date | undefined;
|
|
750
|
-
lastActiveAt?: Date | undefined;
|
|
751
777
|
} & {
|
|
752
778
|
user: better_auth.User;
|
|
753
779
|
}, "user"> & {
|
|
@@ -789,6 +815,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
789
815
|
fetchOptions?: FetchOptions | undefined;
|
|
790
816
|
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
791
817
|
member: {
|
|
818
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
792
819
|
id: string;
|
|
793
820
|
organizationId: string;
|
|
794
821
|
role: "org:admin" | "org:member" | "org:reviewer";
|
|
@@ -801,8 +828,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
801
828
|
name: string;
|
|
802
829
|
image?: string | undefined;
|
|
803
830
|
};
|
|
804
|
-
deletedAt?: Date | undefined;
|
|
805
|
-
lastActiveAt?: Date | undefined;
|
|
806
831
|
};
|
|
807
832
|
}, {
|
|
808
833
|
code?: string | undefined;
|
|
@@ -847,6 +872,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
847
872
|
} & {
|
|
848
873
|
fetchOptions?: FetchOptions | undefined;
|
|
849
874
|
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<NonNullable<Omit<{
|
|
875
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
850
876
|
id: string;
|
|
851
877
|
organizationId: string;
|
|
852
878
|
role: "org:admin" | "org:member" | "org:reviewer";
|
|
@@ -859,8 +885,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
859
885
|
name: string;
|
|
860
886
|
image?: string | undefined;
|
|
861
887
|
};
|
|
862
|
-
deletedAt?: Date | undefined;
|
|
863
|
-
lastActiveAt?: Date | undefined;
|
|
864
888
|
} & {
|
|
865
889
|
user: better_auth.User;
|
|
866
890
|
}, "user"> & {
|
|
@@ -885,6 +909,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
885
909
|
} | undefined;
|
|
886
910
|
fetchOptions?: FetchOptions | undefined;
|
|
887
911
|
}> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<(Omit<{
|
|
912
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
888
913
|
id: string;
|
|
889
914
|
organizationId: string;
|
|
890
915
|
email: string;
|
|
@@ -896,6 +921,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
896
921
|
teamId?: string | undefined | undefined;
|
|
897
922
|
} & {
|
|
898
923
|
organization: {
|
|
924
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
899
925
|
id: string;
|
|
900
926
|
name: string;
|
|
901
927
|
slug: string;
|
|
@@ -937,6 +963,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
937
963
|
fetchOptions?: FetchOptions | undefined;
|
|
938
964
|
}> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
939
965
|
members: ({
|
|
966
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
940
967
|
id: string;
|
|
941
968
|
organizationId: string;
|
|
942
969
|
role: "org:admin" | "org:member" | "org:reviewer";
|
|
@@ -949,8 +976,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
949
976
|
name: string;
|
|
950
977
|
image?: string | undefined;
|
|
951
978
|
};
|
|
952
|
-
deletedAt?: Date | undefined;
|
|
953
|
-
lastActiveAt?: Date | undefined;
|
|
954
979
|
} & {
|
|
955
980
|
user: {
|
|
956
981
|
id: string;
|
|
@@ -1046,12 +1071,17 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
1046
1071
|
createTeam: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
1047
1072
|
name: string;
|
|
1048
1073
|
organizationId?: string | undefined;
|
|
1074
|
+
} & {} & {
|
|
1075
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
1049
1076
|
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
|
|
1050
1077
|
name: string;
|
|
1051
1078
|
organizationId?: string | undefined;
|
|
1079
|
+
} & {} & {
|
|
1080
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
1052
1081
|
} & {
|
|
1053
1082
|
fetchOptions?: FetchOptions | undefined;
|
|
1054
1083
|
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
1084
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
1055
1085
|
id: string;
|
|
1056
1086
|
name: string;
|
|
1057
1087
|
organizationId: string;
|
|
@@ -1072,6 +1102,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
1072
1102
|
} | undefined;
|
|
1073
1103
|
fetchOptions?: FetchOptions | undefined;
|
|
1074
1104
|
}> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
1105
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
1075
1106
|
id: string;
|
|
1076
1107
|
name: string;
|
|
1077
1108
|
organizationId: string;
|
|
@@ -1106,21 +1137,28 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
1106
1137
|
data: Partial<{
|
|
1107
1138
|
name: string;
|
|
1108
1139
|
organizationId: string;
|
|
1140
|
+
} & {} & {
|
|
1141
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
1109
1142
|
}>;
|
|
1110
1143
|
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
|
|
1111
1144
|
teamId: string;
|
|
1112
1145
|
data: Partial<{
|
|
1113
1146
|
name: string;
|
|
1114
1147
|
organizationId: string;
|
|
1148
|
+
} & {} & {
|
|
1149
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
1115
1150
|
}>;
|
|
1116
1151
|
} & {
|
|
1117
1152
|
fetchOptions?: FetchOptions | undefined;
|
|
1118
1153
|
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
1154
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
1119
1155
|
id: string;
|
|
1120
1156
|
name: string;
|
|
1121
1157
|
organizationId: string;
|
|
1122
1158
|
createdAt: Date;
|
|
1123
1159
|
updatedAt?: Date | undefined;
|
|
1160
|
+
} & {} & {
|
|
1161
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
1124
1162
|
}, {
|
|
1125
1163
|
code?: string | undefined;
|
|
1126
1164
|
message?: string | undefined;
|
|
@@ -3069,6 +3107,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
3069
3107
|
$Infer: {
|
|
3070
3108
|
ActiveOrganization: {
|
|
3071
3109
|
members: {
|
|
3110
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3072
3111
|
id: string;
|
|
3073
3112
|
organizationId: string;
|
|
3074
3113
|
role: "org:admin" | "org:member" | "org:reviewer";
|
|
@@ -3081,10 +3120,9 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
3081
3120
|
name: string;
|
|
3082
3121
|
image?: string | undefined;
|
|
3083
3122
|
};
|
|
3084
|
-
deletedAt?: Date | undefined;
|
|
3085
|
-
lastActiveAt?: Date | undefined;
|
|
3086
3123
|
}[];
|
|
3087
3124
|
invitations: {
|
|
3125
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3088
3126
|
id: string;
|
|
3089
3127
|
organizationId: string;
|
|
3090
3128
|
email: string;
|
|
@@ -3096,6 +3134,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
3096
3134
|
teamId?: string | undefined | undefined;
|
|
3097
3135
|
}[];
|
|
3098
3136
|
teams: {
|
|
3137
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3099
3138
|
id: string;
|
|
3100
3139
|
name: string;
|
|
3101
3140
|
organizationId: string;
|
|
@@ -3103,6 +3142,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
3103
3142
|
updatedAt?: Date | undefined;
|
|
3104
3143
|
}[];
|
|
3105
3144
|
} & {
|
|
3145
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3106
3146
|
id: string;
|
|
3107
3147
|
name: string;
|
|
3108
3148
|
slug: string;
|
|
@@ -3111,6 +3151,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
3111
3151
|
metadata?: any;
|
|
3112
3152
|
};
|
|
3113
3153
|
Organization: {
|
|
3154
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3114
3155
|
id: string;
|
|
3115
3156
|
name: string;
|
|
3116
3157
|
slug: string;
|
|
@@ -3119,6 +3160,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
3119
3160
|
metadata?: any;
|
|
3120
3161
|
};
|
|
3121
3162
|
Invitation: {
|
|
3163
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3122
3164
|
id: string;
|
|
3123
3165
|
organizationId: string;
|
|
3124
3166
|
email: string;
|
|
@@ -3130,6 +3172,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
3130
3172
|
teamId?: string | undefined | undefined;
|
|
3131
3173
|
};
|
|
3132
3174
|
Member: {
|
|
3175
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3133
3176
|
id: string;
|
|
3134
3177
|
organizationId: string;
|
|
3135
3178
|
role: "org:admin" | "org:member" | "org:reviewer";
|
|
@@ -3142,10 +3185,9 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
3142
3185
|
name: string;
|
|
3143
3186
|
image?: string | undefined;
|
|
3144
3187
|
};
|
|
3145
|
-
deletedAt?: Date | undefined;
|
|
3146
|
-
lastActiveAt?: Date | undefined;
|
|
3147
3188
|
};
|
|
3148
3189
|
Team: {
|
|
3190
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3149
3191
|
id: string;
|
|
3150
3192
|
name: string;
|
|
3151
3193
|
organizationId: string;
|
|
@@ -3531,15 +3573,6 @@ type TeamMember = {
|
|
|
3531
3573
|
createdAt: Date;
|
|
3532
3574
|
};
|
|
3533
3575
|
|
|
3534
|
-
type InternalOrganization = {
|
|
3535
|
-
id: string;
|
|
3536
|
-
title: string;
|
|
3537
|
-
slug: string | null;
|
|
3538
|
-
avatarUrl: string | null;
|
|
3539
|
-
createdAt: Date;
|
|
3540
|
-
metadata: string | null;
|
|
3541
|
-
settings: unknown;
|
|
3542
|
-
};
|
|
3543
3576
|
type Application = {
|
|
3544
3577
|
id: string;
|
|
3545
3578
|
name: string;
|
|
@@ -3557,11 +3590,11 @@ type CompleteAuthorizationFlowResponse = {
|
|
|
3557
3590
|
accessToken: string;
|
|
3558
3591
|
refreshToken: string;
|
|
3559
3592
|
user: User;
|
|
3560
|
-
organization:
|
|
3593
|
+
organization: FullOrganization;
|
|
3561
3594
|
};
|
|
3562
3595
|
type WhoAmIResponse = {
|
|
3563
3596
|
user: User;
|
|
3564
|
-
organization:
|
|
3597
|
+
organization: FullOrganization;
|
|
3565
3598
|
};
|
|
3566
3599
|
|
|
3567
3600
|
declare class BaseError extends Error {
|
|
@@ -3716,6 +3749,7 @@ declare class OrganizationService {
|
|
|
3716
3749
|
*/
|
|
3717
3750
|
getOrganization(id: string): Promise<{
|
|
3718
3751
|
members: {
|
|
3752
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3719
3753
|
id: string;
|
|
3720
3754
|
organizationId: string;
|
|
3721
3755
|
role: "org:admin" | "org:member" | "org:reviewer";
|
|
@@ -3728,10 +3762,9 @@ declare class OrganizationService {
|
|
|
3728
3762
|
name: string;
|
|
3729
3763
|
image?: string | undefined;
|
|
3730
3764
|
};
|
|
3731
|
-
deletedAt?: Date | undefined;
|
|
3732
|
-
lastActiveAt?: Date | undefined;
|
|
3733
3765
|
}[];
|
|
3734
3766
|
invitations: {
|
|
3767
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3735
3768
|
id: string;
|
|
3736
3769
|
organizationId: string;
|
|
3737
3770
|
email: string;
|
|
@@ -3743,6 +3776,7 @@ declare class OrganizationService {
|
|
|
3743
3776
|
teamId?: string | undefined | undefined;
|
|
3744
3777
|
}[];
|
|
3745
3778
|
teams: {
|
|
3779
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3746
3780
|
id: string;
|
|
3747
3781
|
name: string;
|
|
3748
3782
|
organizationId: string;
|
|
@@ -3750,6 +3784,7 @@ declare class OrganizationService {
|
|
|
3750
3784
|
updatedAt?: Date | undefined;
|
|
3751
3785
|
}[];
|
|
3752
3786
|
} & {
|
|
3787
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3753
3788
|
id: string;
|
|
3754
3789
|
name: string;
|
|
3755
3790
|
slug: string;
|
|
@@ -3788,6 +3823,7 @@ declare class OrganizationService {
|
|
|
3788
3823
|
* @returns An array of organization members
|
|
3789
3824
|
*/
|
|
3790
3825
|
listMembers(options?: ListMembersOptions): Promise<({
|
|
3826
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3791
3827
|
id: string;
|
|
3792
3828
|
organizationId: string;
|
|
3793
3829
|
role: "org:admin" | "org:member" | "org:reviewer";
|
|
@@ -3800,8 +3836,6 @@ declare class OrganizationService {
|
|
|
3800
3836
|
name: string;
|
|
3801
3837
|
image?: string | undefined;
|
|
3802
3838
|
};
|
|
3803
|
-
deletedAt?: Date | undefined;
|
|
3804
|
-
lastActiveAt?: Date | undefined;
|
|
3805
3839
|
} & {
|
|
3806
3840
|
user: {
|
|
3807
3841
|
id: string;
|
|
@@ -3816,6 +3850,7 @@ declare class OrganizationService {
|
|
|
3816
3850
|
* @returns The active member object
|
|
3817
3851
|
*/
|
|
3818
3852
|
getActiveMember(): Promise<Omit<{
|
|
3853
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3819
3854
|
id: string;
|
|
3820
3855
|
organizationId: string;
|
|
3821
3856
|
role: "org:admin" | "org:member" | "org:reviewer";
|
|
@@ -3828,8 +3863,6 @@ declare class OrganizationService {
|
|
|
3828
3863
|
name: string;
|
|
3829
3864
|
image?: string | undefined;
|
|
3830
3865
|
};
|
|
3831
|
-
deletedAt?: Date | undefined;
|
|
3832
|
-
lastActiveAt?: Date | undefined;
|
|
3833
3866
|
} & {
|
|
3834
3867
|
user: better_auth.User;
|
|
3835
3868
|
}, "user"> & {
|
|
@@ -3851,6 +3884,7 @@ declare class OrganizationService {
|
|
|
3851
3884
|
* @returns The created invitation
|
|
3852
3885
|
*/
|
|
3853
3886
|
inviteUserToOrganization({ userEmail, role, teamId, resend }: InviteUserToOrganizationOptions): Promise<NonNullable<{
|
|
3887
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3854
3888
|
id: string;
|
|
3855
3889
|
organizationId: string;
|
|
3856
3890
|
email: string;
|
|
@@ -3861,6 +3895,7 @@ declare class OrganizationService {
|
|
|
3861
3895
|
createdAt: Date;
|
|
3862
3896
|
teamId?: string | undefined | undefined;
|
|
3863
3897
|
} | {
|
|
3898
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3864
3899
|
id: string;
|
|
3865
3900
|
organizationId: string;
|
|
3866
3901
|
email: string;
|
|
@@ -3907,6 +3942,7 @@ declare class OrganizationService {
|
|
|
3907
3942
|
* @returns The created team
|
|
3908
3943
|
*/
|
|
3909
3944
|
createTeam(payload: CreateTeamPayload): Promise<{
|
|
3945
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3910
3946
|
id: string;
|
|
3911
3947
|
name: string;
|
|
3912
3948
|
organizationId: string;
|
|
@@ -3922,11 +3958,14 @@ declare class OrganizationService {
|
|
|
3922
3958
|
* @returns The updated team
|
|
3923
3959
|
*/
|
|
3924
3960
|
updateTeam(id: string, payload: UpdateTeamPayload): Promise<{
|
|
3961
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3925
3962
|
id: string;
|
|
3926
3963
|
name: string;
|
|
3927
3964
|
organizationId: string;
|
|
3928
3965
|
createdAt: Date;
|
|
3929
3966
|
updatedAt?: Date | undefined;
|
|
3967
|
+
} & {} & {
|
|
3968
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3930
3969
|
}>;
|
|
3931
3970
|
/**
|
|
3932
3971
|
* Deletes a team from the active organization.
|
|
@@ -3940,6 +3979,7 @@ declare class OrganizationService {
|
|
|
3940
3979
|
* @returns An array of teams
|
|
3941
3980
|
*/
|
|
3942
3981
|
listTeams(): Promise<{
|
|
3982
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3943
3983
|
id: string;
|
|
3944
3984
|
name: string;
|
|
3945
3985
|
organizationId: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import * as better_auth_client from 'better-auth/client';
|
|
|
5
5
|
import { BetterFetchOption } from 'better-auth/client';
|
|
6
6
|
import * as nanostores from 'nanostores';
|
|
7
7
|
import * as _better_auth_sso from '@better-auth/sso';
|
|
8
|
+
import * as better_auth_db from 'better-auth/db';
|
|
8
9
|
import * as _better_fetch_fetch from '@better-fetch/fetch';
|
|
9
10
|
export { BetterFetchError as APIError } from '@better-fetch/fetch';
|
|
10
11
|
|
|
@@ -205,6 +206,7 @@ type JWTTokenPayload = JWTPayload & {
|
|
|
205
206
|
|
|
206
207
|
declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOption): {
|
|
207
208
|
useActiveOrganization: better_auth_client.AuthQueryAtom<better_auth.Prettify<{
|
|
209
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
208
210
|
id: string;
|
|
209
211
|
name: string;
|
|
210
212
|
slug: string;
|
|
@@ -213,6 +215,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
213
215
|
metadata?: any;
|
|
214
216
|
} & {
|
|
215
217
|
members: {
|
|
218
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
216
219
|
id: string;
|
|
217
220
|
organizationId: string;
|
|
218
221
|
role: "org:admin" | "org:member" | "org:reviewer";
|
|
@@ -225,10 +228,9 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
225
228
|
name: string;
|
|
226
229
|
image?: string | undefined;
|
|
227
230
|
};
|
|
228
|
-
deletedAt?: Date | undefined;
|
|
229
|
-
lastActiveAt?: Date | undefined;
|
|
230
231
|
}[];
|
|
231
232
|
invitations: {
|
|
233
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
232
234
|
id: string;
|
|
233
235
|
organizationId: string;
|
|
234
236
|
email: string;
|
|
@@ -241,6 +243,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
241
243
|
}[];
|
|
242
244
|
}>>;
|
|
243
245
|
useListOrganizations: better_auth_client.AuthQueryAtom<{
|
|
246
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
244
247
|
id: string;
|
|
245
248
|
name: string;
|
|
246
249
|
slug: string;
|
|
@@ -324,14 +327,18 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
324
327
|
};
|
|
325
328
|
} & {
|
|
326
329
|
organization: {
|
|
327
|
-
create: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
330
|
+
create: <FetchOptions extends better_auth.ClientFetchOption<Partial<{} & {
|
|
331
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
332
|
+
} & {
|
|
328
333
|
name: string;
|
|
329
334
|
slug: string;
|
|
330
335
|
userId?: string | undefined;
|
|
331
336
|
logo?: string | undefined;
|
|
332
337
|
metadata?: Record<string, any> | undefined;
|
|
333
338
|
keepCurrentActiveOrganization?: boolean | undefined;
|
|
334
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
|
|
339
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{} & {
|
|
340
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
341
|
+
} & {
|
|
335
342
|
name: string;
|
|
336
343
|
slug: string;
|
|
337
344
|
userId?: string | undefined;
|
|
@@ -341,6 +348,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
341
348
|
} & {
|
|
342
349
|
fetchOptions?: FetchOptions | undefined;
|
|
343
350
|
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
351
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
344
352
|
id: string;
|
|
345
353
|
name: string;
|
|
346
354
|
slug: string;
|
|
@@ -356,8 +364,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
356
364
|
role: string;
|
|
357
365
|
createdAt: Date;
|
|
358
366
|
} & {} & {
|
|
359
|
-
|
|
360
|
-
lastActiveAt?: Date | undefined;
|
|
367
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
361
368
|
}) | undefined)[];
|
|
362
369
|
}, {
|
|
363
370
|
code?: string | undefined;
|
|
@@ -372,7 +379,9 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
372
379
|
slug?: string | undefined;
|
|
373
380
|
logo?: string | undefined;
|
|
374
381
|
metadata?: Record<string, any> | undefined;
|
|
375
|
-
} & Partial<{
|
|
382
|
+
} & Partial<better_auth_db.FieldAttributeToObject<{
|
|
383
|
+
[x: string]: better_auth.DBFieldAttribute;
|
|
384
|
+
}>>;
|
|
376
385
|
organizationId?: string | undefined;
|
|
377
386
|
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
|
|
378
387
|
data: {
|
|
@@ -380,11 +389,14 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
380
389
|
slug?: string | undefined;
|
|
381
390
|
logo?: string | undefined;
|
|
382
391
|
metadata?: Record<string, any> | undefined;
|
|
383
|
-
} & Partial<{
|
|
392
|
+
} & Partial<better_auth_db.FieldAttributeToObject<{
|
|
393
|
+
[x: string]: better_auth.DBFieldAttribute;
|
|
394
|
+
}>>;
|
|
384
395
|
organizationId?: string | undefined;
|
|
385
396
|
} & {
|
|
386
397
|
fetchOptions?: FetchOptions | undefined;
|
|
387
398
|
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
399
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
388
400
|
id: string;
|
|
389
401
|
name: string;
|
|
390
402
|
slug: string;
|
|
@@ -405,6 +417,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
405
417
|
} & {
|
|
406
418
|
fetchOptions?: FetchOptions | undefined;
|
|
407
419
|
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
420
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
408
421
|
id: string;
|
|
409
422
|
name: string;
|
|
410
423
|
slug: string;
|
|
@@ -428,6 +441,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
428
441
|
fetchOptions?: FetchOptions | undefined;
|
|
429
442
|
}> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
430
443
|
members: {
|
|
444
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
431
445
|
id: string;
|
|
432
446
|
organizationId: string;
|
|
433
447
|
role: "org:admin" | "org:member" | "org:reviewer";
|
|
@@ -440,10 +454,9 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
440
454
|
name: string;
|
|
441
455
|
image?: string | undefined;
|
|
442
456
|
};
|
|
443
|
-
deletedAt?: Date | undefined;
|
|
444
|
-
lastActiveAt?: Date | undefined;
|
|
445
457
|
}[];
|
|
446
458
|
invitations: {
|
|
459
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
447
460
|
id: string;
|
|
448
461
|
organizationId: string;
|
|
449
462
|
email: string;
|
|
@@ -455,6 +468,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
455
468
|
teamId?: string | undefined | undefined;
|
|
456
469
|
}[];
|
|
457
470
|
teams: {
|
|
471
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
458
472
|
id: string;
|
|
459
473
|
name: string;
|
|
460
474
|
organizationId: string;
|
|
@@ -462,6 +476,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
462
476
|
updatedAt?: Date | undefined;
|
|
463
477
|
}[];
|
|
464
478
|
} & {
|
|
479
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
465
480
|
id: string;
|
|
466
481
|
name: string;
|
|
467
482
|
slug: string;
|
|
@@ -488,6 +503,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
488
503
|
fetchOptions?: FetchOptions | undefined;
|
|
489
504
|
}> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
490
505
|
members: {
|
|
506
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
491
507
|
id: string;
|
|
492
508
|
organizationId: string;
|
|
493
509
|
role: "org:admin" | "org:member" | "org:reviewer";
|
|
@@ -500,10 +516,9 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
500
516
|
name: string;
|
|
501
517
|
image?: string | undefined;
|
|
502
518
|
};
|
|
503
|
-
deletedAt?: Date | undefined;
|
|
504
|
-
lastActiveAt?: Date | undefined;
|
|
505
519
|
}[];
|
|
506
520
|
invitations: {
|
|
521
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
507
522
|
id: string;
|
|
508
523
|
organizationId: string;
|
|
509
524
|
email: string;
|
|
@@ -515,6 +530,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
515
530
|
teamId?: string | undefined | undefined;
|
|
516
531
|
}[];
|
|
517
532
|
teams: {
|
|
533
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
518
534
|
id: string;
|
|
519
535
|
name: string;
|
|
520
536
|
organizationId: string;
|
|
@@ -522,6 +538,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
522
538
|
updatedAt?: Date | undefined;
|
|
523
539
|
}[];
|
|
524
540
|
} & {
|
|
541
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
525
542
|
id: string;
|
|
526
543
|
name: string;
|
|
527
544
|
slug: string;
|
|
@@ -539,6 +556,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
539
556
|
query?: Record<string, any> | undefined;
|
|
540
557
|
fetchOptions?: FetchOptions | undefined;
|
|
541
558
|
}> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
559
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
542
560
|
id: string;
|
|
543
561
|
name: string;
|
|
544
562
|
slug: string;
|
|
@@ -559,6 +577,8 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
559
577
|
resend?: boolean | undefined;
|
|
560
578
|
} & {
|
|
561
579
|
teamId?: (string | string[]) | undefined;
|
|
580
|
+
} & {} & {
|
|
581
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
562
582
|
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
|
|
563
583
|
email: string;
|
|
564
584
|
role: "org:admin" | "org:member" | "org:reviewer" | ("org:admin" | "org:member" | "org:reviewer")[];
|
|
@@ -566,9 +586,12 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
566
586
|
resend?: boolean | undefined;
|
|
567
587
|
} & {
|
|
568
588
|
teamId?: (string | string[]) | undefined;
|
|
589
|
+
} & {} & {
|
|
590
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
569
591
|
} & {
|
|
570
592
|
fetchOptions?: FetchOptions | undefined;
|
|
571
593
|
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<NonNullable<{
|
|
594
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
572
595
|
id: string;
|
|
573
596
|
organizationId: string;
|
|
574
597
|
email: string;
|
|
@@ -579,6 +602,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
579
602
|
createdAt: Date;
|
|
580
603
|
teamId?: string | undefined | undefined;
|
|
581
604
|
} | {
|
|
605
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
582
606
|
id: string;
|
|
583
607
|
organizationId: string;
|
|
584
608
|
email: string;
|
|
@@ -602,6 +626,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
602
626
|
} & {
|
|
603
627
|
fetchOptions?: FetchOptions | undefined;
|
|
604
628
|
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
629
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
605
630
|
id: string;
|
|
606
631
|
organizationId: string;
|
|
607
632
|
email: string;
|
|
@@ -626,6 +651,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
626
651
|
fetchOptions?: FetchOptions | undefined;
|
|
627
652
|
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
628
653
|
invitation: {
|
|
654
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
629
655
|
id: string;
|
|
630
656
|
organizationId: string;
|
|
631
657
|
email: string;
|
|
@@ -643,8 +669,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
643
669
|
role: string;
|
|
644
670
|
createdAt: Date;
|
|
645
671
|
} & {} & {
|
|
646
|
-
|
|
647
|
-
lastActiveAt?: Date | undefined;
|
|
672
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
648
673
|
};
|
|
649
674
|
}, {
|
|
650
675
|
code?: string | undefined;
|
|
@@ -661,6 +686,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
661
686
|
};
|
|
662
687
|
fetchOptions?: FetchOptions | undefined;
|
|
663
688
|
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<NonNullable<{
|
|
689
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
664
690
|
id: string;
|
|
665
691
|
organizationId: string;
|
|
666
692
|
email: string;
|
|
@@ -714,6 +740,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
714
740
|
} | undefined;
|
|
715
741
|
fetchOptions?: FetchOptions | undefined;
|
|
716
742
|
}> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
743
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
717
744
|
id: string;
|
|
718
745
|
organizationId: string;
|
|
719
746
|
email: string;
|
|
@@ -734,6 +761,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
734
761
|
query?: Record<string, any> | undefined;
|
|
735
762
|
fetchOptions?: FetchOptions | undefined;
|
|
736
763
|
}> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<Omit<{
|
|
764
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
737
765
|
id: string;
|
|
738
766
|
organizationId: string;
|
|
739
767
|
role: "org:admin" | "org:member" | "org:reviewer";
|
|
@@ -746,8 +774,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
746
774
|
name: string;
|
|
747
775
|
image?: string | undefined;
|
|
748
776
|
};
|
|
749
|
-
deletedAt?: Date | undefined;
|
|
750
|
-
lastActiveAt?: Date | undefined;
|
|
751
777
|
} & {
|
|
752
778
|
user: better_auth.User;
|
|
753
779
|
}, "user"> & {
|
|
@@ -789,6 +815,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
789
815
|
fetchOptions?: FetchOptions | undefined;
|
|
790
816
|
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
791
817
|
member: {
|
|
818
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
792
819
|
id: string;
|
|
793
820
|
organizationId: string;
|
|
794
821
|
role: "org:admin" | "org:member" | "org:reviewer";
|
|
@@ -801,8 +828,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
801
828
|
name: string;
|
|
802
829
|
image?: string | undefined;
|
|
803
830
|
};
|
|
804
|
-
deletedAt?: Date | undefined;
|
|
805
|
-
lastActiveAt?: Date | undefined;
|
|
806
831
|
};
|
|
807
832
|
}, {
|
|
808
833
|
code?: string | undefined;
|
|
@@ -847,6 +872,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
847
872
|
} & {
|
|
848
873
|
fetchOptions?: FetchOptions | undefined;
|
|
849
874
|
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<NonNullable<Omit<{
|
|
875
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
850
876
|
id: string;
|
|
851
877
|
organizationId: string;
|
|
852
878
|
role: "org:admin" | "org:member" | "org:reviewer";
|
|
@@ -859,8 +885,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
859
885
|
name: string;
|
|
860
886
|
image?: string | undefined;
|
|
861
887
|
};
|
|
862
|
-
deletedAt?: Date | undefined;
|
|
863
|
-
lastActiveAt?: Date | undefined;
|
|
864
888
|
} & {
|
|
865
889
|
user: better_auth.User;
|
|
866
890
|
}, "user"> & {
|
|
@@ -885,6 +909,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
885
909
|
} | undefined;
|
|
886
910
|
fetchOptions?: FetchOptions | undefined;
|
|
887
911
|
}> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<(Omit<{
|
|
912
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
888
913
|
id: string;
|
|
889
914
|
organizationId: string;
|
|
890
915
|
email: string;
|
|
@@ -896,6 +921,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
896
921
|
teamId?: string | undefined | undefined;
|
|
897
922
|
} & {
|
|
898
923
|
organization: {
|
|
924
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
899
925
|
id: string;
|
|
900
926
|
name: string;
|
|
901
927
|
slug: string;
|
|
@@ -937,6 +963,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
937
963
|
fetchOptions?: FetchOptions | undefined;
|
|
938
964
|
}> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
939
965
|
members: ({
|
|
966
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
940
967
|
id: string;
|
|
941
968
|
organizationId: string;
|
|
942
969
|
role: "org:admin" | "org:member" | "org:reviewer";
|
|
@@ -949,8 +976,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
949
976
|
name: string;
|
|
950
977
|
image?: string | undefined;
|
|
951
978
|
};
|
|
952
|
-
deletedAt?: Date | undefined;
|
|
953
|
-
lastActiveAt?: Date | undefined;
|
|
954
979
|
} & {
|
|
955
980
|
user: {
|
|
956
981
|
id: string;
|
|
@@ -1046,12 +1071,17 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
1046
1071
|
createTeam: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
1047
1072
|
name: string;
|
|
1048
1073
|
organizationId?: string | undefined;
|
|
1074
|
+
} & {} & {
|
|
1075
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
1049
1076
|
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
|
|
1050
1077
|
name: string;
|
|
1051
1078
|
organizationId?: string | undefined;
|
|
1079
|
+
} & {} & {
|
|
1080
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
1052
1081
|
} & {
|
|
1053
1082
|
fetchOptions?: FetchOptions | undefined;
|
|
1054
1083
|
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
1084
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
1055
1085
|
id: string;
|
|
1056
1086
|
name: string;
|
|
1057
1087
|
organizationId: string;
|
|
@@ -1072,6 +1102,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
1072
1102
|
} | undefined;
|
|
1073
1103
|
fetchOptions?: FetchOptions | undefined;
|
|
1074
1104
|
}> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
1105
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
1075
1106
|
id: string;
|
|
1076
1107
|
name: string;
|
|
1077
1108
|
organizationId: string;
|
|
@@ -1106,21 +1137,28 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
1106
1137
|
data: Partial<{
|
|
1107
1138
|
name: string;
|
|
1108
1139
|
organizationId: string;
|
|
1140
|
+
} & {} & {
|
|
1141
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
1109
1142
|
}>;
|
|
1110
1143
|
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
|
|
1111
1144
|
teamId: string;
|
|
1112
1145
|
data: Partial<{
|
|
1113
1146
|
name: string;
|
|
1114
1147
|
organizationId: string;
|
|
1148
|
+
} & {} & {
|
|
1149
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
1115
1150
|
}>;
|
|
1116
1151
|
} & {
|
|
1117
1152
|
fetchOptions?: FetchOptions | undefined;
|
|
1118
1153
|
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
1154
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
1119
1155
|
id: string;
|
|
1120
1156
|
name: string;
|
|
1121
1157
|
organizationId: string;
|
|
1122
1158
|
createdAt: Date;
|
|
1123
1159
|
updatedAt?: Date | undefined;
|
|
1160
|
+
} & {} & {
|
|
1161
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
1124
1162
|
}, {
|
|
1125
1163
|
code?: string | undefined;
|
|
1126
1164
|
message?: string | undefined;
|
|
@@ -3069,6 +3107,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
3069
3107
|
$Infer: {
|
|
3070
3108
|
ActiveOrganization: {
|
|
3071
3109
|
members: {
|
|
3110
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3072
3111
|
id: string;
|
|
3073
3112
|
organizationId: string;
|
|
3074
3113
|
role: "org:admin" | "org:member" | "org:reviewer";
|
|
@@ -3081,10 +3120,9 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
3081
3120
|
name: string;
|
|
3082
3121
|
image?: string | undefined;
|
|
3083
3122
|
};
|
|
3084
|
-
deletedAt?: Date | undefined;
|
|
3085
|
-
lastActiveAt?: Date | undefined;
|
|
3086
3123
|
}[];
|
|
3087
3124
|
invitations: {
|
|
3125
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3088
3126
|
id: string;
|
|
3089
3127
|
organizationId: string;
|
|
3090
3128
|
email: string;
|
|
@@ -3096,6 +3134,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
3096
3134
|
teamId?: string | undefined | undefined;
|
|
3097
3135
|
}[];
|
|
3098
3136
|
teams: {
|
|
3137
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3099
3138
|
id: string;
|
|
3100
3139
|
name: string;
|
|
3101
3140
|
organizationId: string;
|
|
@@ -3103,6 +3142,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
3103
3142
|
updatedAt?: Date | undefined;
|
|
3104
3143
|
}[];
|
|
3105
3144
|
} & {
|
|
3145
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3106
3146
|
id: string;
|
|
3107
3147
|
name: string;
|
|
3108
3148
|
slug: string;
|
|
@@ -3111,6 +3151,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
3111
3151
|
metadata?: any;
|
|
3112
3152
|
};
|
|
3113
3153
|
Organization: {
|
|
3154
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3114
3155
|
id: string;
|
|
3115
3156
|
name: string;
|
|
3116
3157
|
slug: string;
|
|
@@ -3119,6 +3160,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
3119
3160
|
metadata?: any;
|
|
3120
3161
|
};
|
|
3121
3162
|
Invitation: {
|
|
3163
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3122
3164
|
id: string;
|
|
3123
3165
|
organizationId: string;
|
|
3124
3166
|
email: string;
|
|
@@ -3130,6 +3172,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
3130
3172
|
teamId?: string | undefined | undefined;
|
|
3131
3173
|
};
|
|
3132
3174
|
Member: {
|
|
3175
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3133
3176
|
id: string;
|
|
3134
3177
|
organizationId: string;
|
|
3135
3178
|
role: "org:admin" | "org:member" | "org:reviewer";
|
|
@@ -3142,10 +3185,9 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
3142
3185
|
name: string;
|
|
3143
3186
|
image?: string | undefined;
|
|
3144
3187
|
};
|
|
3145
|
-
deletedAt?: Date | undefined;
|
|
3146
|
-
lastActiveAt?: Date | undefined;
|
|
3147
3188
|
};
|
|
3148
3189
|
Team: {
|
|
3190
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3149
3191
|
id: string;
|
|
3150
3192
|
name: string;
|
|
3151
3193
|
organizationId: string;
|
|
@@ -3531,15 +3573,6 @@ type TeamMember = {
|
|
|
3531
3573
|
createdAt: Date;
|
|
3532
3574
|
};
|
|
3533
3575
|
|
|
3534
|
-
type InternalOrganization = {
|
|
3535
|
-
id: string;
|
|
3536
|
-
title: string;
|
|
3537
|
-
slug: string | null;
|
|
3538
|
-
avatarUrl: string | null;
|
|
3539
|
-
createdAt: Date;
|
|
3540
|
-
metadata: string | null;
|
|
3541
|
-
settings: unknown;
|
|
3542
|
-
};
|
|
3543
3576
|
type Application = {
|
|
3544
3577
|
id: string;
|
|
3545
3578
|
name: string;
|
|
@@ -3557,11 +3590,11 @@ type CompleteAuthorizationFlowResponse = {
|
|
|
3557
3590
|
accessToken: string;
|
|
3558
3591
|
refreshToken: string;
|
|
3559
3592
|
user: User;
|
|
3560
|
-
organization:
|
|
3593
|
+
organization: FullOrganization;
|
|
3561
3594
|
};
|
|
3562
3595
|
type WhoAmIResponse = {
|
|
3563
3596
|
user: User;
|
|
3564
|
-
organization:
|
|
3597
|
+
organization: FullOrganization;
|
|
3565
3598
|
};
|
|
3566
3599
|
|
|
3567
3600
|
declare class BaseError extends Error {
|
|
@@ -3716,6 +3749,7 @@ declare class OrganizationService {
|
|
|
3716
3749
|
*/
|
|
3717
3750
|
getOrganization(id: string): Promise<{
|
|
3718
3751
|
members: {
|
|
3752
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3719
3753
|
id: string;
|
|
3720
3754
|
organizationId: string;
|
|
3721
3755
|
role: "org:admin" | "org:member" | "org:reviewer";
|
|
@@ -3728,10 +3762,9 @@ declare class OrganizationService {
|
|
|
3728
3762
|
name: string;
|
|
3729
3763
|
image?: string | undefined;
|
|
3730
3764
|
};
|
|
3731
|
-
deletedAt?: Date | undefined;
|
|
3732
|
-
lastActiveAt?: Date | undefined;
|
|
3733
3765
|
}[];
|
|
3734
3766
|
invitations: {
|
|
3767
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3735
3768
|
id: string;
|
|
3736
3769
|
organizationId: string;
|
|
3737
3770
|
email: string;
|
|
@@ -3743,6 +3776,7 @@ declare class OrganizationService {
|
|
|
3743
3776
|
teamId?: string | undefined | undefined;
|
|
3744
3777
|
}[];
|
|
3745
3778
|
teams: {
|
|
3779
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3746
3780
|
id: string;
|
|
3747
3781
|
name: string;
|
|
3748
3782
|
organizationId: string;
|
|
@@ -3750,6 +3784,7 @@ declare class OrganizationService {
|
|
|
3750
3784
|
updatedAt?: Date | undefined;
|
|
3751
3785
|
}[];
|
|
3752
3786
|
} & {
|
|
3787
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3753
3788
|
id: string;
|
|
3754
3789
|
name: string;
|
|
3755
3790
|
slug: string;
|
|
@@ -3788,6 +3823,7 @@ declare class OrganizationService {
|
|
|
3788
3823
|
* @returns An array of organization members
|
|
3789
3824
|
*/
|
|
3790
3825
|
listMembers(options?: ListMembersOptions): Promise<({
|
|
3826
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3791
3827
|
id: string;
|
|
3792
3828
|
organizationId: string;
|
|
3793
3829
|
role: "org:admin" | "org:member" | "org:reviewer";
|
|
@@ -3800,8 +3836,6 @@ declare class OrganizationService {
|
|
|
3800
3836
|
name: string;
|
|
3801
3837
|
image?: string | undefined;
|
|
3802
3838
|
};
|
|
3803
|
-
deletedAt?: Date | undefined;
|
|
3804
|
-
lastActiveAt?: Date | undefined;
|
|
3805
3839
|
} & {
|
|
3806
3840
|
user: {
|
|
3807
3841
|
id: string;
|
|
@@ -3816,6 +3850,7 @@ declare class OrganizationService {
|
|
|
3816
3850
|
* @returns The active member object
|
|
3817
3851
|
*/
|
|
3818
3852
|
getActiveMember(): Promise<Omit<{
|
|
3853
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3819
3854
|
id: string;
|
|
3820
3855
|
organizationId: string;
|
|
3821
3856
|
role: "org:admin" | "org:member" | "org:reviewer";
|
|
@@ -3828,8 +3863,6 @@ declare class OrganizationService {
|
|
|
3828
3863
|
name: string;
|
|
3829
3864
|
image?: string | undefined;
|
|
3830
3865
|
};
|
|
3831
|
-
deletedAt?: Date | undefined;
|
|
3832
|
-
lastActiveAt?: Date | undefined;
|
|
3833
3866
|
} & {
|
|
3834
3867
|
user: better_auth.User;
|
|
3835
3868
|
}, "user"> & {
|
|
@@ -3851,6 +3884,7 @@ declare class OrganizationService {
|
|
|
3851
3884
|
* @returns The created invitation
|
|
3852
3885
|
*/
|
|
3853
3886
|
inviteUserToOrganization({ userEmail, role, teamId, resend }: InviteUserToOrganizationOptions): Promise<NonNullable<{
|
|
3887
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3854
3888
|
id: string;
|
|
3855
3889
|
organizationId: string;
|
|
3856
3890
|
email: string;
|
|
@@ -3861,6 +3895,7 @@ declare class OrganizationService {
|
|
|
3861
3895
|
createdAt: Date;
|
|
3862
3896
|
teamId?: string | undefined | undefined;
|
|
3863
3897
|
} | {
|
|
3898
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3864
3899
|
id: string;
|
|
3865
3900
|
organizationId: string;
|
|
3866
3901
|
email: string;
|
|
@@ -3907,6 +3942,7 @@ declare class OrganizationService {
|
|
|
3907
3942
|
* @returns The created team
|
|
3908
3943
|
*/
|
|
3909
3944
|
createTeam(payload: CreateTeamPayload): Promise<{
|
|
3945
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3910
3946
|
id: string;
|
|
3911
3947
|
name: string;
|
|
3912
3948
|
organizationId: string;
|
|
@@ -3922,11 +3958,14 @@ declare class OrganizationService {
|
|
|
3922
3958
|
* @returns The updated team
|
|
3923
3959
|
*/
|
|
3924
3960
|
updateTeam(id: string, payload: UpdateTeamPayload): Promise<{
|
|
3961
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3925
3962
|
id: string;
|
|
3926
3963
|
name: string;
|
|
3927
3964
|
organizationId: string;
|
|
3928
3965
|
createdAt: Date;
|
|
3929
3966
|
updatedAt?: Date | undefined;
|
|
3967
|
+
} & {} & {
|
|
3968
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3930
3969
|
}>;
|
|
3931
3970
|
/**
|
|
3932
3971
|
* Deletes a team from the active organization.
|
|
@@ -3940,6 +3979,7 @@ declare class OrganizationService {
|
|
|
3940
3979
|
* @returns An array of teams
|
|
3941
3980
|
*/
|
|
3942
3981
|
listTeams(): Promise<{
|
|
3982
|
+
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3943
3983
|
id: string;
|
|
3944
3984
|
name: string;
|
|
3945
3985
|
organizationId: string;
|
package/dist/index.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import { createAccessControl } from 'better-auth/plugins/access';
|
|
|
6
6
|
import { defaultStatements } from 'better-auth/plugins/organization/access';
|
|
7
7
|
export { BetterFetchError as APIError } from '@better-fetch/fetch';
|
|
8
8
|
|
|
9
|
-
const version = "1.
|
|
9
|
+
const version = "1.11.1";
|
|
10
10
|
|
|
11
11
|
const statements = {
|
|
12
12
|
...defaultStatements,
|
|
@@ -177,9 +177,9 @@ function createAPIClient(apiUrl, fetchOptions = {}) {
|
|
|
177
177
|
// }
|
|
178
178
|
// },
|
|
179
179
|
// }
|
|
180
|
-
member: {
|
|
181
|
-
|
|
182
|
-
}
|
|
180
|
+
// member: {
|
|
181
|
+
// additionalFields: memberAdditionalFields,
|
|
182
|
+
// },
|
|
183
183
|
})
|
|
184
184
|
}),
|
|
185
185
|
customEndpointsPluginClient(),
|