@meistrari/auth-core 1.11.1 → 1.11.3
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 +27 -89
- package/dist/index.d.ts +27 -89
- package/dist/index.mjs +2 -16
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -5,7 +5,6 @@ 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';
|
|
9
8
|
import * as _better_fetch_fetch from '@better-fetch/fetch';
|
|
10
9
|
export { BetterFetchError as APIError } from '@better-fetch/fetch';
|
|
11
10
|
|
|
@@ -204,9 +203,25 @@ type JWTTokenPayload = JWTPayload & {
|
|
|
204
203
|
sessionKey: string;
|
|
205
204
|
};
|
|
206
205
|
|
|
206
|
+
/**
|
|
207
|
+
* Removes index signatures from a type
|
|
208
|
+
* @template T - The type to remove index signatures from
|
|
209
|
+
* @example
|
|
210
|
+
* ```typescript
|
|
211
|
+
* type MyType = {
|
|
212
|
+
* foo: string
|
|
213
|
+
* bar: number
|
|
214
|
+
* [key: string]: any
|
|
215
|
+
* }
|
|
216
|
+
*
|
|
217
|
+
* type StrictMyType = Strict<MyType> // { foo: string; bar: number; }
|
|
218
|
+
* ```
|
|
219
|
+
*/
|
|
220
|
+
type Strict<T> = {
|
|
221
|
+
[K in keyof T as string extends K ? never : number extends K ? never : K]: T[K];
|
|
222
|
+
};
|
|
207
223
|
declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOption): {
|
|
208
224
|
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;
|
|
210
225
|
id: string;
|
|
211
226
|
name: string;
|
|
212
227
|
slug: string;
|
|
@@ -215,7 +230,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
215
230
|
metadata?: any;
|
|
216
231
|
} & {
|
|
217
232
|
members: {
|
|
218
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
219
233
|
id: string;
|
|
220
234
|
organizationId: string;
|
|
221
235
|
role: "org:admin" | "org:member" | "org:reviewer";
|
|
@@ -230,7 +244,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
230
244
|
};
|
|
231
245
|
}[];
|
|
232
246
|
invitations: {
|
|
233
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
234
247
|
id: string;
|
|
235
248
|
organizationId: string;
|
|
236
249
|
email: string;
|
|
@@ -243,7 +256,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
243
256
|
}[];
|
|
244
257
|
}>>;
|
|
245
258
|
useListOrganizations: better_auth_client.AuthQueryAtom<{
|
|
246
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
247
259
|
id: string;
|
|
248
260
|
name: string;
|
|
249
261
|
slug: string;
|
|
@@ -327,18 +339,14 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
327
339
|
};
|
|
328
340
|
} & {
|
|
329
341
|
organization: {
|
|
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
|
-
} & {
|
|
342
|
+
create: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
333
343
|
name: string;
|
|
334
344
|
slug: string;
|
|
335
345
|
userId?: string | undefined;
|
|
336
346
|
logo?: string | undefined;
|
|
337
347
|
metadata?: Record<string, any> | undefined;
|
|
338
348
|
keepCurrentActiveOrganization?: boolean | undefined;
|
|
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
|
-
} & {
|
|
349
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
|
|
342
350
|
name: string;
|
|
343
351
|
slug: string;
|
|
344
352
|
userId?: string | undefined;
|
|
@@ -348,7 +356,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
348
356
|
} & {
|
|
349
357
|
fetchOptions?: FetchOptions | undefined;
|
|
350
358
|
}>, 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;
|
|
352
359
|
id: string;
|
|
353
360
|
name: string;
|
|
354
361
|
slug: string;
|
|
@@ -357,15 +364,13 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
357
364
|
metadata?: any;
|
|
358
365
|
} & {
|
|
359
366
|
metadata: any;
|
|
360
|
-
members: (
|
|
367
|
+
members: ({
|
|
361
368
|
id: string;
|
|
362
369
|
organizationId: string;
|
|
363
370
|
userId: string;
|
|
364
371
|
role: string;
|
|
365
372
|
createdAt: Date;
|
|
366
|
-
}
|
|
367
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
368
|
-
}) | undefined)[];
|
|
373
|
+
} | undefined)[];
|
|
369
374
|
}, {
|
|
370
375
|
code?: string | undefined;
|
|
371
376
|
message?: string | undefined;
|
|
@@ -379,9 +384,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
379
384
|
slug?: string | undefined;
|
|
380
385
|
logo?: string | undefined;
|
|
381
386
|
metadata?: Record<string, any> | undefined;
|
|
382
|
-
} & Partial<
|
|
383
|
-
[x: string]: better_auth.DBFieldAttribute;
|
|
384
|
-
}>>;
|
|
387
|
+
} & Partial<{}>;
|
|
385
388
|
organizationId?: string | undefined;
|
|
386
389
|
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
|
|
387
390
|
data: {
|
|
@@ -389,14 +392,11 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
389
392
|
slug?: string | undefined;
|
|
390
393
|
logo?: string | undefined;
|
|
391
394
|
metadata?: Record<string, any> | undefined;
|
|
392
|
-
} & Partial<
|
|
393
|
-
[x: string]: better_auth.DBFieldAttribute;
|
|
394
|
-
}>>;
|
|
395
|
+
} & Partial<{}>;
|
|
395
396
|
organizationId?: string | undefined;
|
|
396
397
|
} & {
|
|
397
398
|
fetchOptions?: FetchOptions | undefined;
|
|
398
399
|
}>, 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;
|
|
400
400
|
id: string;
|
|
401
401
|
name: string;
|
|
402
402
|
slug: string;
|
|
@@ -417,7 +417,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
417
417
|
} & {
|
|
418
418
|
fetchOptions?: FetchOptions | undefined;
|
|
419
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;
|
|
421
420
|
id: string;
|
|
422
421
|
name: string;
|
|
423
422
|
slug: string;
|
|
@@ -441,7 +440,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
441
440
|
fetchOptions?: FetchOptions | undefined;
|
|
442
441
|
}> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
443
442
|
members: {
|
|
444
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
445
443
|
id: string;
|
|
446
444
|
organizationId: string;
|
|
447
445
|
role: "org:admin" | "org:member" | "org:reviewer";
|
|
@@ -456,7 +454,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
456
454
|
};
|
|
457
455
|
}[];
|
|
458
456
|
invitations: {
|
|
459
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
460
457
|
id: string;
|
|
461
458
|
organizationId: string;
|
|
462
459
|
email: string;
|
|
@@ -468,7 +465,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
468
465
|
teamId?: string | undefined | undefined;
|
|
469
466
|
}[];
|
|
470
467
|
teams: {
|
|
471
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
472
468
|
id: string;
|
|
473
469
|
name: string;
|
|
474
470
|
organizationId: string;
|
|
@@ -476,7 +472,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
476
472
|
updatedAt?: Date | undefined;
|
|
477
473
|
}[];
|
|
478
474
|
} & {
|
|
479
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
480
475
|
id: string;
|
|
481
476
|
name: string;
|
|
482
477
|
slug: string;
|
|
@@ -503,7 +498,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
503
498
|
fetchOptions?: FetchOptions | undefined;
|
|
504
499
|
}> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
505
500
|
members: {
|
|
506
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
507
501
|
id: string;
|
|
508
502
|
organizationId: string;
|
|
509
503
|
role: "org:admin" | "org:member" | "org:reviewer";
|
|
@@ -518,7 +512,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
518
512
|
};
|
|
519
513
|
}[];
|
|
520
514
|
invitations: {
|
|
521
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
522
515
|
id: string;
|
|
523
516
|
organizationId: string;
|
|
524
517
|
email: string;
|
|
@@ -530,7 +523,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
530
523
|
teamId?: string | undefined | undefined;
|
|
531
524
|
}[];
|
|
532
525
|
teams: {
|
|
533
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
534
526
|
id: string;
|
|
535
527
|
name: string;
|
|
536
528
|
organizationId: string;
|
|
@@ -538,7 +530,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
538
530
|
updatedAt?: Date | undefined;
|
|
539
531
|
}[];
|
|
540
532
|
} & {
|
|
541
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
542
533
|
id: string;
|
|
543
534
|
name: string;
|
|
544
535
|
slug: string;
|
|
@@ -556,7 +547,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
556
547
|
query?: Record<string, any> | undefined;
|
|
557
548
|
fetchOptions?: FetchOptions | undefined;
|
|
558
549
|
}> | 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;
|
|
560
550
|
id: string;
|
|
561
551
|
name: string;
|
|
562
552
|
slug: string;
|
|
@@ -577,8 +567,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
577
567
|
resend?: boolean | undefined;
|
|
578
568
|
} & {
|
|
579
569
|
teamId?: (string | string[]) | undefined;
|
|
580
|
-
} & {} & {
|
|
581
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
582
570
|
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
|
|
583
571
|
email: string;
|
|
584
572
|
role: "org:admin" | "org:member" | "org:reviewer" | ("org:admin" | "org:member" | "org:reviewer")[];
|
|
@@ -586,12 +574,9 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
586
574
|
resend?: boolean | undefined;
|
|
587
575
|
} & {
|
|
588
576
|
teamId?: (string | string[]) | undefined;
|
|
589
|
-
} & {} & {
|
|
590
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
591
577
|
} & {
|
|
592
578
|
fetchOptions?: FetchOptions | undefined;
|
|
593
579
|
}>, 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;
|
|
595
580
|
id: string;
|
|
596
581
|
organizationId: string;
|
|
597
582
|
email: string;
|
|
@@ -602,7 +587,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
602
587
|
createdAt: Date;
|
|
603
588
|
teamId?: string | undefined | undefined;
|
|
604
589
|
} | {
|
|
605
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
606
590
|
id: string;
|
|
607
591
|
organizationId: string;
|
|
608
592
|
email: string;
|
|
@@ -626,7 +610,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
626
610
|
} & {
|
|
627
611
|
fetchOptions?: FetchOptions | undefined;
|
|
628
612
|
}>, 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;
|
|
630
613
|
id: string;
|
|
631
614
|
organizationId: string;
|
|
632
615
|
email: string;
|
|
@@ -651,7 +634,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
651
634
|
fetchOptions?: FetchOptions | undefined;
|
|
652
635
|
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
653
636
|
invitation: {
|
|
654
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
655
637
|
id: string;
|
|
656
638
|
organizationId: string;
|
|
657
639
|
email: string;
|
|
@@ -668,8 +650,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
668
650
|
userId: string;
|
|
669
651
|
role: string;
|
|
670
652
|
createdAt: Date;
|
|
671
|
-
} & {} & {
|
|
672
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
673
653
|
};
|
|
674
654
|
}, {
|
|
675
655
|
code?: string | undefined;
|
|
@@ -686,7 +666,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
686
666
|
};
|
|
687
667
|
fetchOptions?: FetchOptions | undefined;
|
|
688
668
|
}>, 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;
|
|
690
669
|
id: string;
|
|
691
670
|
organizationId: string;
|
|
692
671
|
email: string;
|
|
@@ -740,7 +719,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
740
719
|
} | undefined;
|
|
741
720
|
fetchOptions?: FetchOptions | undefined;
|
|
742
721
|
}> | 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;
|
|
744
722
|
id: string;
|
|
745
723
|
organizationId: string;
|
|
746
724
|
email: string;
|
|
@@ -761,7 +739,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
761
739
|
query?: Record<string, any> | undefined;
|
|
762
740
|
fetchOptions?: FetchOptions | undefined;
|
|
763
741
|
}> | 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;
|
|
765
742
|
id: string;
|
|
766
743
|
organizationId: string;
|
|
767
744
|
role: "org:admin" | "org:member" | "org:reviewer";
|
|
@@ -815,7 +792,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
815
792
|
fetchOptions?: FetchOptions | undefined;
|
|
816
793
|
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
817
794
|
member: {
|
|
818
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
819
795
|
id: string;
|
|
820
796
|
organizationId: string;
|
|
821
797
|
role: "org:admin" | "org:member" | "org:reviewer";
|
|
@@ -872,7 +848,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
872
848
|
} & {
|
|
873
849
|
fetchOptions?: FetchOptions | undefined;
|
|
874
850
|
}>, 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;
|
|
876
851
|
id: string;
|
|
877
852
|
organizationId: string;
|
|
878
853
|
role: "org:admin" | "org:member" | "org:reviewer";
|
|
@@ -909,7 +884,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
909
884
|
} | undefined;
|
|
910
885
|
fetchOptions?: FetchOptions | undefined;
|
|
911
886
|
}> | 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;
|
|
913
887
|
id: string;
|
|
914
888
|
organizationId: string;
|
|
915
889
|
email: string;
|
|
@@ -921,7 +895,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
921
895
|
teamId?: string | undefined | undefined;
|
|
922
896
|
} & {
|
|
923
897
|
organization: {
|
|
924
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
925
898
|
id: string;
|
|
926
899
|
name: string;
|
|
927
900
|
slug: string;
|
|
@@ -963,7 +936,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
963
936
|
fetchOptions?: FetchOptions | undefined;
|
|
964
937
|
}> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
965
938
|
members: ({
|
|
966
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
967
939
|
id: string;
|
|
968
940
|
organizationId: string;
|
|
969
941
|
role: "org:admin" | "org:member" | "org:reviewer";
|
|
@@ -1071,17 +1043,12 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
1071
1043
|
createTeam: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
1072
1044
|
name: string;
|
|
1073
1045
|
organizationId?: string | undefined;
|
|
1074
|
-
} & {} & {
|
|
1075
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
1076
1046
|
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
|
|
1077
1047
|
name: string;
|
|
1078
1048
|
organizationId?: string | undefined;
|
|
1079
|
-
} & {} & {
|
|
1080
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
1081
1049
|
} & {
|
|
1082
1050
|
fetchOptions?: FetchOptions | undefined;
|
|
1083
1051
|
}>, 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;
|
|
1085
1052
|
id: string;
|
|
1086
1053
|
name: string;
|
|
1087
1054
|
organizationId: string;
|
|
@@ -1102,7 +1069,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
1102
1069
|
} | undefined;
|
|
1103
1070
|
fetchOptions?: FetchOptions | undefined;
|
|
1104
1071
|
}> | 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;
|
|
1106
1072
|
id: string;
|
|
1107
1073
|
name: string;
|
|
1108
1074
|
organizationId: string;
|
|
@@ -1137,28 +1103,21 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
1137
1103
|
data: Partial<{
|
|
1138
1104
|
name: string;
|
|
1139
1105
|
organizationId: string;
|
|
1140
|
-
} & {} & {
|
|
1141
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
1142
1106
|
}>;
|
|
1143
1107
|
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
|
|
1144
1108
|
teamId: string;
|
|
1145
1109
|
data: Partial<{
|
|
1146
1110
|
name: string;
|
|
1147
1111
|
organizationId: string;
|
|
1148
|
-
} & {} & {
|
|
1149
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
1150
1112
|
}>;
|
|
1151
1113
|
} & {
|
|
1152
1114
|
fetchOptions?: FetchOptions | undefined;
|
|
1153
1115
|
}>, 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;
|
|
1155
1116
|
id: string;
|
|
1156
1117
|
name: string;
|
|
1157
1118
|
organizationId: string;
|
|
1158
1119
|
createdAt: Date;
|
|
1159
1120
|
updatedAt?: Date | undefined;
|
|
1160
|
-
} & {} & {
|
|
1161
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
1162
1121
|
}, {
|
|
1163
1122
|
code?: string | undefined;
|
|
1164
1123
|
message?: string | undefined;
|
|
@@ -3107,7 +3066,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
3107
3066
|
$Infer: {
|
|
3108
3067
|
ActiveOrganization: {
|
|
3109
3068
|
members: {
|
|
3110
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3111
3069
|
id: string;
|
|
3112
3070
|
organizationId: string;
|
|
3113
3071
|
role: "org:admin" | "org:member" | "org:reviewer";
|
|
@@ -3122,7 +3080,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
3122
3080
|
};
|
|
3123
3081
|
}[];
|
|
3124
3082
|
invitations: {
|
|
3125
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3126
3083
|
id: string;
|
|
3127
3084
|
organizationId: string;
|
|
3128
3085
|
email: string;
|
|
@@ -3134,7 +3091,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
3134
3091
|
teamId?: string | undefined | undefined;
|
|
3135
3092
|
}[];
|
|
3136
3093
|
teams: {
|
|
3137
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3138
3094
|
id: string;
|
|
3139
3095
|
name: string;
|
|
3140
3096
|
organizationId: string;
|
|
@@ -3142,7 +3098,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
3142
3098
|
updatedAt?: Date | undefined;
|
|
3143
3099
|
}[];
|
|
3144
3100
|
} & {
|
|
3145
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3146
3101
|
id: string;
|
|
3147
3102
|
name: string;
|
|
3148
3103
|
slug: string;
|
|
@@ -3151,7 +3106,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
3151
3106
|
metadata?: any;
|
|
3152
3107
|
};
|
|
3153
3108
|
Organization: {
|
|
3154
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3155
3109
|
id: string;
|
|
3156
3110
|
name: string;
|
|
3157
3111
|
slug: string;
|
|
@@ -3160,7 +3114,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
3160
3114
|
metadata?: any;
|
|
3161
3115
|
};
|
|
3162
3116
|
Invitation: {
|
|
3163
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3164
3117
|
id: string;
|
|
3165
3118
|
organizationId: string;
|
|
3166
3119
|
email: string;
|
|
@@ -3172,7 +3125,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
3172
3125
|
teamId?: string | undefined | undefined;
|
|
3173
3126
|
};
|
|
3174
3127
|
Member: {
|
|
3175
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3176
3128
|
id: string;
|
|
3177
3129
|
organizationId: string;
|
|
3178
3130
|
role: "org:admin" | "org:member" | "org:reviewer";
|
|
@@ -3187,7 +3139,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
3187
3139
|
};
|
|
3188
3140
|
};
|
|
3189
3141
|
Team: {
|
|
3190
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3191
3142
|
id: string;
|
|
3192
3143
|
name: string;
|
|
3193
3144
|
organizationId: string;
|
|
@@ -3549,10 +3500,10 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
3549
3500
|
type APIClient = ReturnType<typeof createAPIClient>;
|
|
3550
3501
|
type User = APIClient['$Infer']['Session']['user'];
|
|
3551
3502
|
type Session = APIClient['$Infer']['Session'];
|
|
3552
|
-
type Organization = APIClient['$Infer']['Organization']
|
|
3553
|
-
type Team = APIClient['$Infer']['Team']
|
|
3554
|
-
type Invitation = APIClient['$Infer']['Invitation']
|
|
3555
|
-
type Member = APIClient['$Infer']['Member']
|
|
3503
|
+
type Organization = Strict<APIClient['$Infer']['Organization']>;
|
|
3504
|
+
type Team = Strict<APIClient['$Infer']['Team']>;
|
|
3505
|
+
type Invitation = Strict<APIClient['$Infer']['Invitation']>;
|
|
3506
|
+
type Member = Strict<APIClient['$Infer']['Member']>;
|
|
3556
3507
|
type OrganizationSettings = {
|
|
3557
3508
|
disableStorage?: boolean;
|
|
3558
3509
|
dataRetentionHours?: number;
|
|
@@ -3749,7 +3700,6 @@ declare class OrganizationService {
|
|
|
3749
3700
|
*/
|
|
3750
3701
|
getOrganization(id: string): Promise<{
|
|
3751
3702
|
members: {
|
|
3752
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3753
3703
|
id: string;
|
|
3754
3704
|
organizationId: string;
|
|
3755
3705
|
role: "org:admin" | "org:member" | "org:reviewer";
|
|
@@ -3764,7 +3714,6 @@ declare class OrganizationService {
|
|
|
3764
3714
|
};
|
|
3765
3715
|
}[];
|
|
3766
3716
|
invitations: {
|
|
3767
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3768
3717
|
id: string;
|
|
3769
3718
|
organizationId: string;
|
|
3770
3719
|
email: string;
|
|
@@ -3776,7 +3725,6 @@ declare class OrganizationService {
|
|
|
3776
3725
|
teamId?: string | undefined | undefined;
|
|
3777
3726
|
}[];
|
|
3778
3727
|
teams: {
|
|
3779
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3780
3728
|
id: string;
|
|
3781
3729
|
name: string;
|
|
3782
3730
|
organizationId: string;
|
|
@@ -3784,7 +3732,6 @@ declare class OrganizationService {
|
|
|
3784
3732
|
updatedAt?: Date | undefined;
|
|
3785
3733
|
}[];
|
|
3786
3734
|
} & {
|
|
3787
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3788
3735
|
id: string;
|
|
3789
3736
|
name: string;
|
|
3790
3737
|
slug: string;
|
|
@@ -3823,7 +3770,6 @@ declare class OrganizationService {
|
|
|
3823
3770
|
* @returns An array of organization members
|
|
3824
3771
|
*/
|
|
3825
3772
|
listMembers(options?: ListMembersOptions): Promise<({
|
|
3826
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3827
3773
|
id: string;
|
|
3828
3774
|
organizationId: string;
|
|
3829
3775
|
role: "org:admin" | "org:member" | "org:reviewer";
|
|
@@ -3850,7 +3796,6 @@ declare class OrganizationService {
|
|
|
3850
3796
|
* @returns The active member object
|
|
3851
3797
|
*/
|
|
3852
3798
|
getActiveMember(): Promise<Omit<{
|
|
3853
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3854
3799
|
id: string;
|
|
3855
3800
|
organizationId: string;
|
|
3856
3801
|
role: "org:admin" | "org:member" | "org:reviewer";
|
|
@@ -3884,7 +3829,6 @@ declare class OrganizationService {
|
|
|
3884
3829
|
* @returns The created invitation
|
|
3885
3830
|
*/
|
|
3886
3831
|
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;
|
|
3888
3832
|
id: string;
|
|
3889
3833
|
organizationId: string;
|
|
3890
3834
|
email: string;
|
|
@@ -3895,7 +3839,6 @@ declare class OrganizationService {
|
|
|
3895
3839
|
createdAt: Date;
|
|
3896
3840
|
teamId?: string | undefined | undefined;
|
|
3897
3841
|
} | {
|
|
3898
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3899
3842
|
id: string;
|
|
3900
3843
|
organizationId: string;
|
|
3901
3844
|
email: string;
|
|
@@ -3942,7 +3885,6 @@ declare class OrganizationService {
|
|
|
3942
3885
|
* @returns The created team
|
|
3943
3886
|
*/
|
|
3944
3887
|
createTeam(payload: CreateTeamPayload): Promise<{
|
|
3945
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3946
3888
|
id: string;
|
|
3947
3889
|
name: string;
|
|
3948
3890
|
organizationId: string;
|
|
@@ -3958,14 +3900,11 @@ declare class OrganizationService {
|
|
|
3958
3900
|
* @returns The updated team
|
|
3959
3901
|
*/
|
|
3960
3902
|
updateTeam(id: string, payload: UpdateTeamPayload): Promise<{
|
|
3961
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3962
3903
|
id: string;
|
|
3963
3904
|
name: string;
|
|
3964
3905
|
organizationId: string;
|
|
3965
3906
|
createdAt: Date;
|
|
3966
3907
|
updatedAt?: Date | undefined;
|
|
3967
|
-
} & {} & {
|
|
3968
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3969
3908
|
}>;
|
|
3970
3909
|
/**
|
|
3971
3910
|
* Deletes a team from the active organization.
|
|
@@ -3979,7 +3918,6 @@ declare class OrganizationService {
|
|
|
3979
3918
|
* @returns An array of teams
|
|
3980
3919
|
*/
|
|
3981
3920
|
listTeams(): Promise<{
|
|
3982
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3983
3921
|
id: string;
|
|
3984
3922
|
name: string;
|
|
3985
3923
|
organizationId: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -5,7 +5,6 @@ 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';
|
|
9
8
|
import * as _better_fetch_fetch from '@better-fetch/fetch';
|
|
10
9
|
export { BetterFetchError as APIError } from '@better-fetch/fetch';
|
|
11
10
|
|
|
@@ -204,9 +203,25 @@ type JWTTokenPayload = JWTPayload & {
|
|
|
204
203
|
sessionKey: string;
|
|
205
204
|
};
|
|
206
205
|
|
|
206
|
+
/**
|
|
207
|
+
* Removes index signatures from a type
|
|
208
|
+
* @template T - The type to remove index signatures from
|
|
209
|
+
* @example
|
|
210
|
+
* ```typescript
|
|
211
|
+
* type MyType = {
|
|
212
|
+
* foo: string
|
|
213
|
+
* bar: number
|
|
214
|
+
* [key: string]: any
|
|
215
|
+
* }
|
|
216
|
+
*
|
|
217
|
+
* type StrictMyType = Strict<MyType> // { foo: string; bar: number; }
|
|
218
|
+
* ```
|
|
219
|
+
*/
|
|
220
|
+
type Strict<T> = {
|
|
221
|
+
[K in keyof T as string extends K ? never : number extends K ? never : K]: T[K];
|
|
222
|
+
};
|
|
207
223
|
declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOption): {
|
|
208
224
|
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;
|
|
210
225
|
id: string;
|
|
211
226
|
name: string;
|
|
212
227
|
slug: string;
|
|
@@ -215,7 +230,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
215
230
|
metadata?: any;
|
|
216
231
|
} & {
|
|
217
232
|
members: {
|
|
218
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
219
233
|
id: string;
|
|
220
234
|
organizationId: string;
|
|
221
235
|
role: "org:admin" | "org:member" | "org:reviewer";
|
|
@@ -230,7 +244,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
230
244
|
};
|
|
231
245
|
}[];
|
|
232
246
|
invitations: {
|
|
233
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
234
247
|
id: string;
|
|
235
248
|
organizationId: string;
|
|
236
249
|
email: string;
|
|
@@ -243,7 +256,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
243
256
|
}[];
|
|
244
257
|
}>>;
|
|
245
258
|
useListOrganizations: better_auth_client.AuthQueryAtom<{
|
|
246
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
247
259
|
id: string;
|
|
248
260
|
name: string;
|
|
249
261
|
slug: string;
|
|
@@ -327,18 +339,14 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
327
339
|
};
|
|
328
340
|
} & {
|
|
329
341
|
organization: {
|
|
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
|
-
} & {
|
|
342
|
+
create: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
333
343
|
name: string;
|
|
334
344
|
slug: string;
|
|
335
345
|
userId?: string | undefined;
|
|
336
346
|
logo?: string | undefined;
|
|
337
347
|
metadata?: Record<string, any> | undefined;
|
|
338
348
|
keepCurrentActiveOrganization?: boolean | undefined;
|
|
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
|
-
} & {
|
|
349
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
|
|
342
350
|
name: string;
|
|
343
351
|
slug: string;
|
|
344
352
|
userId?: string | undefined;
|
|
@@ -348,7 +356,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
348
356
|
} & {
|
|
349
357
|
fetchOptions?: FetchOptions | undefined;
|
|
350
358
|
}>, 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;
|
|
352
359
|
id: string;
|
|
353
360
|
name: string;
|
|
354
361
|
slug: string;
|
|
@@ -357,15 +364,13 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
357
364
|
metadata?: any;
|
|
358
365
|
} & {
|
|
359
366
|
metadata: any;
|
|
360
|
-
members: (
|
|
367
|
+
members: ({
|
|
361
368
|
id: string;
|
|
362
369
|
organizationId: string;
|
|
363
370
|
userId: string;
|
|
364
371
|
role: string;
|
|
365
372
|
createdAt: Date;
|
|
366
|
-
}
|
|
367
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
368
|
-
}) | undefined)[];
|
|
373
|
+
} | undefined)[];
|
|
369
374
|
}, {
|
|
370
375
|
code?: string | undefined;
|
|
371
376
|
message?: string | undefined;
|
|
@@ -379,9 +384,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
379
384
|
slug?: string | undefined;
|
|
380
385
|
logo?: string | undefined;
|
|
381
386
|
metadata?: Record<string, any> | undefined;
|
|
382
|
-
} & Partial<
|
|
383
|
-
[x: string]: better_auth.DBFieldAttribute;
|
|
384
|
-
}>>;
|
|
387
|
+
} & Partial<{}>;
|
|
385
388
|
organizationId?: string | undefined;
|
|
386
389
|
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
|
|
387
390
|
data: {
|
|
@@ -389,14 +392,11 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
389
392
|
slug?: string | undefined;
|
|
390
393
|
logo?: string | undefined;
|
|
391
394
|
metadata?: Record<string, any> | undefined;
|
|
392
|
-
} & Partial<
|
|
393
|
-
[x: string]: better_auth.DBFieldAttribute;
|
|
394
|
-
}>>;
|
|
395
|
+
} & Partial<{}>;
|
|
395
396
|
organizationId?: string | undefined;
|
|
396
397
|
} & {
|
|
397
398
|
fetchOptions?: FetchOptions | undefined;
|
|
398
399
|
}>, 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;
|
|
400
400
|
id: string;
|
|
401
401
|
name: string;
|
|
402
402
|
slug: string;
|
|
@@ -417,7 +417,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
417
417
|
} & {
|
|
418
418
|
fetchOptions?: FetchOptions | undefined;
|
|
419
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;
|
|
421
420
|
id: string;
|
|
422
421
|
name: string;
|
|
423
422
|
slug: string;
|
|
@@ -441,7 +440,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
441
440
|
fetchOptions?: FetchOptions | undefined;
|
|
442
441
|
}> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
443
442
|
members: {
|
|
444
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
445
443
|
id: string;
|
|
446
444
|
organizationId: string;
|
|
447
445
|
role: "org:admin" | "org:member" | "org:reviewer";
|
|
@@ -456,7 +454,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
456
454
|
};
|
|
457
455
|
}[];
|
|
458
456
|
invitations: {
|
|
459
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
460
457
|
id: string;
|
|
461
458
|
organizationId: string;
|
|
462
459
|
email: string;
|
|
@@ -468,7 +465,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
468
465
|
teamId?: string | undefined | undefined;
|
|
469
466
|
}[];
|
|
470
467
|
teams: {
|
|
471
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
472
468
|
id: string;
|
|
473
469
|
name: string;
|
|
474
470
|
organizationId: string;
|
|
@@ -476,7 +472,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
476
472
|
updatedAt?: Date | undefined;
|
|
477
473
|
}[];
|
|
478
474
|
} & {
|
|
479
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
480
475
|
id: string;
|
|
481
476
|
name: string;
|
|
482
477
|
slug: string;
|
|
@@ -503,7 +498,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
503
498
|
fetchOptions?: FetchOptions | undefined;
|
|
504
499
|
}> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
505
500
|
members: {
|
|
506
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
507
501
|
id: string;
|
|
508
502
|
organizationId: string;
|
|
509
503
|
role: "org:admin" | "org:member" | "org:reviewer";
|
|
@@ -518,7 +512,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
518
512
|
};
|
|
519
513
|
}[];
|
|
520
514
|
invitations: {
|
|
521
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
522
515
|
id: string;
|
|
523
516
|
organizationId: string;
|
|
524
517
|
email: string;
|
|
@@ -530,7 +523,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
530
523
|
teamId?: string | undefined | undefined;
|
|
531
524
|
}[];
|
|
532
525
|
teams: {
|
|
533
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
534
526
|
id: string;
|
|
535
527
|
name: string;
|
|
536
528
|
organizationId: string;
|
|
@@ -538,7 +530,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
538
530
|
updatedAt?: Date | undefined;
|
|
539
531
|
}[];
|
|
540
532
|
} & {
|
|
541
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
542
533
|
id: string;
|
|
543
534
|
name: string;
|
|
544
535
|
slug: string;
|
|
@@ -556,7 +547,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
556
547
|
query?: Record<string, any> | undefined;
|
|
557
548
|
fetchOptions?: FetchOptions | undefined;
|
|
558
549
|
}> | 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;
|
|
560
550
|
id: string;
|
|
561
551
|
name: string;
|
|
562
552
|
slug: string;
|
|
@@ -577,8 +567,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
577
567
|
resend?: boolean | undefined;
|
|
578
568
|
} & {
|
|
579
569
|
teamId?: (string | string[]) | undefined;
|
|
580
|
-
} & {} & {
|
|
581
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
582
570
|
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
|
|
583
571
|
email: string;
|
|
584
572
|
role: "org:admin" | "org:member" | "org:reviewer" | ("org:admin" | "org:member" | "org:reviewer")[];
|
|
@@ -586,12 +574,9 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
586
574
|
resend?: boolean | undefined;
|
|
587
575
|
} & {
|
|
588
576
|
teamId?: (string | string[]) | undefined;
|
|
589
|
-
} & {} & {
|
|
590
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
591
577
|
} & {
|
|
592
578
|
fetchOptions?: FetchOptions | undefined;
|
|
593
579
|
}>, 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;
|
|
595
580
|
id: string;
|
|
596
581
|
organizationId: string;
|
|
597
582
|
email: string;
|
|
@@ -602,7 +587,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
602
587
|
createdAt: Date;
|
|
603
588
|
teamId?: string | undefined | undefined;
|
|
604
589
|
} | {
|
|
605
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
606
590
|
id: string;
|
|
607
591
|
organizationId: string;
|
|
608
592
|
email: string;
|
|
@@ -626,7 +610,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
626
610
|
} & {
|
|
627
611
|
fetchOptions?: FetchOptions | undefined;
|
|
628
612
|
}>, 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;
|
|
630
613
|
id: string;
|
|
631
614
|
organizationId: string;
|
|
632
615
|
email: string;
|
|
@@ -651,7 +634,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
651
634
|
fetchOptions?: FetchOptions | undefined;
|
|
652
635
|
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
653
636
|
invitation: {
|
|
654
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
655
637
|
id: string;
|
|
656
638
|
organizationId: string;
|
|
657
639
|
email: string;
|
|
@@ -668,8 +650,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
668
650
|
userId: string;
|
|
669
651
|
role: string;
|
|
670
652
|
createdAt: Date;
|
|
671
|
-
} & {} & {
|
|
672
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
673
653
|
};
|
|
674
654
|
}, {
|
|
675
655
|
code?: string | undefined;
|
|
@@ -686,7 +666,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
686
666
|
};
|
|
687
667
|
fetchOptions?: FetchOptions | undefined;
|
|
688
668
|
}>, 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;
|
|
690
669
|
id: string;
|
|
691
670
|
organizationId: string;
|
|
692
671
|
email: string;
|
|
@@ -740,7 +719,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
740
719
|
} | undefined;
|
|
741
720
|
fetchOptions?: FetchOptions | undefined;
|
|
742
721
|
}> | 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;
|
|
744
722
|
id: string;
|
|
745
723
|
organizationId: string;
|
|
746
724
|
email: string;
|
|
@@ -761,7 +739,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
761
739
|
query?: Record<string, any> | undefined;
|
|
762
740
|
fetchOptions?: FetchOptions | undefined;
|
|
763
741
|
}> | 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;
|
|
765
742
|
id: string;
|
|
766
743
|
organizationId: string;
|
|
767
744
|
role: "org:admin" | "org:member" | "org:reviewer";
|
|
@@ -815,7 +792,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
815
792
|
fetchOptions?: FetchOptions | undefined;
|
|
816
793
|
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
817
794
|
member: {
|
|
818
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
819
795
|
id: string;
|
|
820
796
|
organizationId: string;
|
|
821
797
|
role: "org:admin" | "org:member" | "org:reviewer";
|
|
@@ -872,7 +848,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
872
848
|
} & {
|
|
873
849
|
fetchOptions?: FetchOptions | undefined;
|
|
874
850
|
}>, 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;
|
|
876
851
|
id: string;
|
|
877
852
|
organizationId: string;
|
|
878
853
|
role: "org:admin" | "org:member" | "org:reviewer";
|
|
@@ -909,7 +884,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
909
884
|
} | undefined;
|
|
910
885
|
fetchOptions?: FetchOptions | undefined;
|
|
911
886
|
}> | 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;
|
|
913
887
|
id: string;
|
|
914
888
|
organizationId: string;
|
|
915
889
|
email: string;
|
|
@@ -921,7 +895,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
921
895
|
teamId?: string | undefined | undefined;
|
|
922
896
|
} & {
|
|
923
897
|
organization: {
|
|
924
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
925
898
|
id: string;
|
|
926
899
|
name: string;
|
|
927
900
|
slug: string;
|
|
@@ -963,7 +936,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
963
936
|
fetchOptions?: FetchOptions | undefined;
|
|
964
937
|
}> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
|
|
965
938
|
members: ({
|
|
966
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
967
939
|
id: string;
|
|
968
940
|
organizationId: string;
|
|
969
941
|
role: "org:admin" | "org:member" | "org:reviewer";
|
|
@@ -1071,17 +1043,12 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
1071
1043
|
createTeam: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
|
|
1072
1044
|
name: string;
|
|
1073
1045
|
organizationId?: string | undefined;
|
|
1074
|
-
} & {} & {
|
|
1075
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
1076
1046
|
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
|
|
1077
1047
|
name: string;
|
|
1078
1048
|
organizationId?: string | undefined;
|
|
1079
|
-
} & {} & {
|
|
1080
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
1081
1049
|
} & {
|
|
1082
1050
|
fetchOptions?: FetchOptions | undefined;
|
|
1083
1051
|
}>, 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;
|
|
1085
1052
|
id: string;
|
|
1086
1053
|
name: string;
|
|
1087
1054
|
organizationId: string;
|
|
@@ -1102,7 +1069,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
1102
1069
|
} | undefined;
|
|
1103
1070
|
fetchOptions?: FetchOptions | undefined;
|
|
1104
1071
|
}> | 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;
|
|
1106
1072
|
id: string;
|
|
1107
1073
|
name: string;
|
|
1108
1074
|
organizationId: string;
|
|
@@ -1137,28 +1103,21 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
1137
1103
|
data: Partial<{
|
|
1138
1104
|
name: string;
|
|
1139
1105
|
organizationId: string;
|
|
1140
|
-
} & {} & {
|
|
1141
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
1142
1106
|
}>;
|
|
1143
1107
|
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
|
|
1144
1108
|
teamId: string;
|
|
1145
1109
|
data: Partial<{
|
|
1146
1110
|
name: string;
|
|
1147
1111
|
organizationId: string;
|
|
1148
|
-
} & {} & {
|
|
1149
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
1150
1112
|
}>;
|
|
1151
1113
|
} & {
|
|
1152
1114
|
fetchOptions?: FetchOptions | undefined;
|
|
1153
1115
|
}>, 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;
|
|
1155
1116
|
id: string;
|
|
1156
1117
|
name: string;
|
|
1157
1118
|
organizationId: string;
|
|
1158
1119
|
createdAt: Date;
|
|
1159
1120
|
updatedAt?: Date | undefined;
|
|
1160
|
-
} & {} & {
|
|
1161
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
1162
1121
|
}, {
|
|
1163
1122
|
code?: string | undefined;
|
|
1164
1123
|
message?: string | undefined;
|
|
@@ -3107,7 +3066,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
3107
3066
|
$Infer: {
|
|
3108
3067
|
ActiveOrganization: {
|
|
3109
3068
|
members: {
|
|
3110
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3111
3069
|
id: string;
|
|
3112
3070
|
organizationId: string;
|
|
3113
3071
|
role: "org:admin" | "org:member" | "org:reviewer";
|
|
@@ -3122,7 +3080,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
3122
3080
|
};
|
|
3123
3081
|
}[];
|
|
3124
3082
|
invitations: {
|
|
3125
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3126
3083
|
id: string;
|
|
3127
3084
|
organizationId: string;
|
|
3128
3085
|
email: string;
|
|
@@ -3134,7 +3091,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
3134
3091
|
teamId?: string | undefined | undefined;
|
|
3135
3092
|
}[];
|
|
3136
3093
|
teams: {
|
|
3137
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3138
3094
|
id: string;
|
|
3139
3095
|
name: string;
|
|
3140
3096
|
organizationId: string;
|
|
@@ -3142,7 +3098,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
3142
3098
|
updatedAt?: Date | undefined;
|
|
3143
3099
|
}[];
|
|
3144
3100
|
} & {
|
|
3145
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3146
3101
|
id: string;
|
|
3147
3102
|
name: string;
|
|
3148
3103
|
slug: string;
|
|
@@ -3151,7 +3106,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
3151
3106
|
metadata?: any;
|
|
3152
3107
|
};
|
|
3153
3108
|
Organization: {
|
|
3154
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3155
3109
|
id: string;
|
|
3156
3110
|
name: string;
|
|
3157
3111
|
slug: string;
|
|
@@ -3160,7 +3114,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
3160
3114
|
metadata?: any;
|
|
3161
3115
|
};
|
|
3162
3116
|
Invitation: {
|
|
3163
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3164
3117
|
id: string;
|
|
3165
3118
|
organizationId: string;
|
|
3166
3119
|
email: string;
|
|
@@ -3172,7 +3125,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
3172
3125
|
teamId?: string | undefined | undefined;
|
|
3173
3126
|
};
|
|
3174
3127
|
Member: {
|
|
3175
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3176
3128
|
id: string;
|
|
3177
3129
|
organizationId: string;
|
|
3178
3130
|
role: "org:admin" | "org:member" | "org:reviewer";
|
|
@@ -3187,7 +3139,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
3187
3139
|
};
|
|
3188
3140
|
};
|
|
3189
3141
|
Team: {
|
|
3190
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3191
3142
|
id: string;
|
|
3192
3143
|
name: string;
|
|
3193
3144
|
organizationId: string;
|
|
@@ -3549,10 +3500,10 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
3549
3500
|
type APIClient = ReturnType<typeof createAPIClient>;
|
|
3550
3501
|
type User = APIClient['$Infer']['Session']['user'];
|
|
3551
3502
|
type Session = APIClient['$Infer']['Session'];
|
|
3552
|
-
type Organization = APIClient['$Infer']['Organization']
|
|
3553
|
-
type Team = APIClient['$Infer']['Team']
|
|
3554
|
-
type Invitation = APIClient['$Infer']['Invitation']
|
|
3555
|
-
type Member = APIClient['$Infer']['Member']
|
|
3503
|
+
type Organization = Strict<APIClient['$Infer']['Organization']>;
|
|
3504
|
+
type Team = Strict<APIClient['$Infer']['Team']>;
|
|
3505
|
+
type Invitation = Strict<APIClient['$Infer']['Invitation']>;
|
|
3506
|
+
type Member = Strict<APIClient['$Infer']['Member']>;
|
|
3556
3507
|
type OrganizationSettings = {
|
|
3557
3508
|
disableStorage?: boolean;
|
|
3558
3509
|
dataRetentionHours?: number;
|
|
@@ -3749,7 +3700,6 @@ declare class OrganizationService {
|
|
|
3749
3700
|
*/
|
|
3750
3701
|
getOrganization(id: string): Promise<{
|
|
3751
3702
|
members: {
|
|
3752
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3753
3703
|
id: string;
|
|
3754
3704
|
organizationId: string;
|
|
3755
3705
|
role: "org:admin" | "org:member" | "org:reviewer";
|
|
@@ -3764,7 +3714,6 @@ declare class OrganizationService {
|
|
|
3764
3714
|
};
|
|
3765
3715
|
}[];
|
|
3766
3716
|
invitations: {
|
|
3767
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3768
3717
|
id: string;
|
|
3769
3718
|
organizationId: string;
|
|
3770
3719
|
email: string;
|
|
@@ -3776,7 +3725,6 @@ declare class OrganizationService {
|
|
|
3776
3725
|
teamId?: string | undefined | undefined;
|
|
3777
3726
|
}[];
|
|
3778
3727
|
teams: {
|
|
3779
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3780
3728
|
id: string;
|
|
3781
3729
|
name: string;
|
|
3782
3730
|
organizationId: string;
|
|
@@ -3784,7 +3732,6 @@ declare class OrganizationService {
|
|
|
3784
3732
|
updatedAt?: Date | undefined;
|
|
3785
3733
|
}[];
|
|
3786
3734
|
} & {
|
|
3787
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3788
3735
|
id: string;
|
|
3789
3736
|
name: string;
|
|
3790
3737
|
slug: string;
|
|
@@ -3823,7 +3770,6 @@ declare class OrganizationService {
|
|
|
3823
3770
|
* @returns An array of organization members
|
|
3824
3771
|
*/
|
|
3825
3772
|
listMembers(options?: ListMembersOptions): Promise<({
|
|
3826
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3827
3773
|
id: string;
|
|
3828
3774
|
organizationId: string;
|
|
3829
3775
|
role: "org:admin" | "org:member" | "org:reviewer";
|
|
@@ -3850,7 +3796,6 @@ declare class OrganizationService {
|
|
|
3850
3796
|
* @returns The active member object
|
|
3851
3797
|
*/
|
|
3852
3798
|
getActiveMember(): Promise<Omit<{
|
|
3853
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3854
3799
|
id: string;
|
|
3855
3800
|
organizationId: string;
|
|
3856
3801
|
role: "org:admin" | "org:member" | "org:reviewer";
|
|
@@ -3884,7 +3829,6 @@ declare class OrganizationService {
|
|
|
3884
3829
|
* @returns The created invitation
|
|
3885
3830
|
*/
|
|
3886
3831
|
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;
|
|
3888
3832
|
id: string;
|
|
3889
3833
|
organizationId: string;
|
|
3890
3834
|
email: string;
|
|
@@ -3895,7 +3839,6 @@ declare class OrganizationService {
|
|
|
3895
3839
|
createdAt: Date;
|
|
3896
3840
|
teamId?: string | undefined | undefined;
|
|
3897
3841
|
} | {
|
|
3898
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3899
3842
|
id: string;
|
|
3900
3843
|
organizationId: string;
|
|
3901
3844
|
email: string;
|
|
@@ -3942,7 +3885,6 @@ declare class OrganizationService {
|
|
|
3942
3885
|
* @returns The created team
|
|
3943
3886
|
*/
|
|
3944
3887
|
createTeam(payload: CreateTeamPayload): Promise<{
|
|
3945
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3946
3888
|
id: string;
|
|
3947
3889
|
name: string;
|
|
3948
3890
|
organizationId: string;
|
|
@@ -3958,14 +3900,11 @@ declare class OrganizationService {
|
|
|
3958
3900
|
* @returns The updated team
|
|
3959
3901
|
*/
|
|
3960
3902
|
updateTeam(id: string, payload: UpdateTeamPayload): Promise<{
|
|
3961
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3962
3903
|
id: string;
|
|
3963
3904
|
name: string;
|
|
3964
3905
|
organizationId: string;
|
|
3965
3906
|
createdAt: Date;
|
|
3966
3907
|
updatedAt?: Date | undefined;
|
|
3967
|
-
} & {} & {
|
|
3968
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3969
3908
|
}>;
|
|
3970
3909
|
/**
|
|
3971
3910
|
* Deletes a team from the active organization.
|
|
@@ -3979,7 +3918,6 @@ declare class OrganizationService {
|
|
|
3979
3918
|
* @returns An array of teams
|
|
3980
3919
|
*/
|
|
3981
3920
|
listTeams(): Promise<{
|
|
3982
|
-
[x: string]: string | number | boolean | string[] | (string & Record<never, never>) | Date | number[] | Record<string, any> | undefined;
|
|
3983
3921
|
id: string;
|
|
3984
3922
|
name: string;
|
|
3985
3923
|
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.11.
|
|
9
|
+
const version = "1.11.3";
|
|
10
10
|
|
|
11
11
|
const statements = {
|
|
12
12
|
...defaultStatements,
|
|
@@ -166,21 +166,7 @@ function createAPIClient(apiUrl, fetchOptions = {}) {
|
|
|
166
166
|
teams: {
|
|
167
167
|
enabled: true
|
|
168
168
|
},
|
|
169
|
-
schema: inferOrgAdditionalFields(
|
|
170
|
-
// TODO: check if this is fixed in the next version
|
|
171
|
-
// organization: {
|
|
172
|
-
// additionalFields: {
|
|
173
|
-
// settings: {
|
|
174
|
-
// type: 'json' as const,
|
|
175
|
-
// input: true,
|
|
176
|
-
// required: false,
|
|
177
|
-
// }
|
|
178
|
-
// },
|
|
179
|
-
// }
|
|
180
|
-
// member: {
|
|
181
|
-
// additionalFields: memberAdditionalFields,
|
|
182
|
-
// },
|
|
183
|
-
})
|
|
169
|
+
schema: inferOrgAdditionalFields()
|
|
184
170
|
}),
|
|
185
171
|
customEndpointsPluginClient(),
|
|
186
172
|
handshakePluginClient(),
|