@meistrari/auth-core 1.11.3 → 1.11.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1,12 +1,11 @@
1
1
  import * as better_auth_plugins from 'better-auth/plugins';
2
2
  import * as better_auth from 'better-auth';
3
3
  import { JWTPayload } from 'better-auth';
4
+ export { APIError } from 'better-auth';
4
5
  import * as better_auth_client from 'better-auth/client';
5
6
  import { BetterFetchOption } from 'better-auth/client';
6
- import * as nanostores from 'nanostores';
7
+ import * as jose from 'jose';
7
8
  import * as _better_auth_sso from '@better-auth/sso';
8
- import * as _better_fetch_fetch from '@better-fetch/fetch';
9
- export { BetterFetchError as APIError } from '@better-fetch/fetch';
10
9
 
11
10
  declare const ac: {
12
11
  newRole<K extends "member" | "access" | "organization" | "invitation" | "team" | "ac">(statements: better_auth_plugins.Subset<K, {
@@ -282,7 +281,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
282
281
  }>>(data_0?: better_auth.Prettify<{
283
282
  query?: Record<string, any> | undefined;
284
283
  fetchOptions?: FetchOptions | undefined;
285
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
284
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
286
285
  teamMembers: {
287
286
  id: string;
288
287
  teamId: string;
@@ -304,7 +303,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
304
303
  origin: string;
305
304
  };
306
305
  fetchOptions?: FetchOptions | undefined;
307
- }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
306
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
308
307
  status: ("OK" | "CREATED" | "ACCEPTED" | "NO_CONTENT" | "MULTIPLE_CHOICES" | "MOVED_PERMANENTLY" | "FOUND" | "SEE_OTHER" | "NOT_MODIFIED" | "TEMPORARY_REDIRECT" | "BAD_REQUEST" | "UNAUTHORIZED" | "PAYMENT_REQUIRED" | "FORBIDDEN" | "NOT_FOUND" | "METHOD_NOT_ALLOWED" | "NOT_ACCEPTABLE" | "PROXY_AUTHENTICATION_REQUIRED" | "REQUEST_TIMEOUT" | "CONFLICT" | "GONE" | "LENGTH_REQUIRED" | "PRECONDITION_FAILED" | "PAYLOAD_TOO_LARGE" | "URI_TOO_LONG" | "UNSUPPORTED_MEDIA_TYPE" | "RANGE_NOT_SATISFIABLE" | "EXPECTATION_FAILED" | "I'M_A_TEAPOT" | "MISDIRECTED_REQUEST" | "UNPROCESSABLE_ENTITY" | "LOCKED" | "FAILED_DEPENDENCY" | "TOO_EARLY" | "UPGRADE_REQUIRED" | "PRECONDITION_REQUIRED" | "TOO_MANY_REQUESTS" | "REQUEST_HEADER_FIELDS_TOO_LARGE" | "UNAVAILABLE_FOR_LEGAL_REASONS" | "INTERNAL_SERVER_ERROR" | "NOT_IMPLEMENTED" | "BAD_GATEWAY" | "SERVICE_UNAVAILABLE" | "GATEWAY_TIMEOUT" | "HTTP_VERSION_NOT_SUPPORTED" | "VARIANT_ALSO_NEGOTIATES" | "INSUFFICIENT_STORAGE" | "LOOP_DETECTED" | "NOT_EXTENDED" | "NETWORK_AUTHENTICATION_REQUIRED") | better_auth.Status;
309
308
  body: ({
310
309
  message?: string;
@@ -330,7 +329,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
330
329
  nonce: string;
331
330
  };
332
331
  fetchOptions?: FetchOptions | undefined;
333
- }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
332
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
334
333
  token: string;
335
334
  }, {
336
335
  code?: string | undefined;
@@ -355,7 +354,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
355
354
  keepCurrentActiveOrganization?: boolean | undefined;
356
355
  } & {
357
356
  fetchOptions?: FetchOptions | undefined;
358
- }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
357
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<NonNullable<{
359
358
  id: string;
360
359
  name: string;
361
360
  slug: string;
@@ -371,7 +370,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
371
370
  role: string;
372
371
  createdAt: Date;
373
372
  } | undefined)[];
374
- }, {
373
+ }>, {
375
374
  code?: string | undefined;
376
375
  message?: string | undefined;
377
376
  }, FetchOptions["throw"] extends true ? true : true>>;
@@ -396,7 +395,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
396
395
  organizationId?: string | undefined;
397
396
  } & {
398
397
  fetchOptions?: FetchOptions | undefined;
399
- }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
398
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
400
399
  id: string;
401
400
  name: string;
402
401
  slug: string;
@@ -416,7 +415,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
416
415
  organizationId: string;
417
416
  } & {
418
417
  fetchOptions?: FetchOptions | undefined;
419
- }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
418
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
420
419
  id: string;
421
420
  name: string;
422
421
  slug: string;
@@ -438,7 +437,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
438
437
  organizationSlug?: string | undefined;
439
438
  } & {
440
439
  fetchOptions?: FetchOptions | undefined;
441
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
440
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
442
441
  members: {
443
442
  id: string;
444
443
  organizationId: string;
@@ -496,7 +495,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
496
495
  membersLimit?: string | number | undefined;
497
496
  } | undefined;
498
497
  fetchOptions?: FetchOptions | undefined;
499
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
498
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
500
499
  members: {
501
500
  id: string;
502
501
  organizationId: string;
@@ -546,7 +545,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
546
545
  list: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
547
546
  query?: Record<string, any> | undefined;
548
547
  fetchOptions?: FetchOptions | undefined;
549
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
548
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
550
549
  id: string;
551
550
  name: string;
552
551
  slug: string;
@@ -576,7 +575,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
576
575
  teamId?: (string | string[]) | undefined;
577
576
  } & {
578
577
  fetchOptions?: FetchOptions | undefined;
579
- }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<NonNullable<{
578
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<NonNullable<{
580
579
  id: string;
581
580
  organizationId: string;
582
581
  email: string;
@@ -609,7 +608,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
609
608
  invitationId: string;
610
609
  } & {
611
610
  fetchOptions?: FetchOptions | undefined;
612
- }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
611
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
613
612
  id: string;
614
613
  organizationId: string;
615
614
  email: string;
@@ -632,7 +631,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
632
631
  invitationId: string;
633
632
  } & {
634
633
  fetchOptions?: FetchOptions | undefined;
635
- }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
634
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
636
635
  invitation: {
637
636
  id: string;
638
637
  organizationId: string;
@@ -665,7 +664,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
665
664
  id: string;
666
665
  };
667
666
  fetchOptions?: FetchOptions | undefined;
668
- }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<NonNullable<{
667
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<NonNullable<{
669
668
  id: string;
670
669
  organizationId: string;
671
670
  email: string;
@@ -692,12 +691,12 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
692
691
  invitationId: string;
693
692
  } & {
694
693
  fetchOptions?: FetchOptions | undefined;
695
- }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
694
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
696
695
  invitation: {
697
696
  id: string;
698
697
  organizationId: string;
699
698
  email: string;
700
- role: "member" | "admin" | "owner";
699
+ role: "admin" | "member" | "owner";
701
700
  status: better_auth_plugins.InvitationStatus;
702
701
  inviterId: string;
703
702
  expiresAt: Date;
@@ -718,7 +717,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
718
717
  organizationId?: string | undefined;
719
718
  } | undefined;
720
719
  fetchOptions?: FetchOptions | undefined;
721
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
720
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
722
721
  id: string;
723
722
  organizationId: string;
724
723
  email: string;
@@ -738,7 +737,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
738
737
  getActiveMember: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
739
738
  query?: Record<string, any> | undefined;
740
739
  fetchOptions?: FetchOptions | undefined;
741
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<Omit<{
740
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<NonNullable<Omit<{
742
741
  id: string;
743
742
  organizationId: string;
744
743
  role: "org:admin" | "org:member" | "org:reviewer";
@@ -752,7 +751,15 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
752
751
  image?: string | undefined;
753
752
  };
754
753
  } & {
755
- user: better_auth.User;
754
+ user: {
755
+ id: string;
756
+ createdAt: Date;
757
+ updatedAt: Date;
758
+ email: string;
759
+ emailVerified: boolean;
760
+ name: string;
761
+ image?: string | null | undefined;
762
+ };
756
763
  }, "user"> & {
757
764
  user: {
758
765
  id: string;
@@ -760,7 +767,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
760
767
  email: string;
761
768
  image: string | undefined;
762
769
  };
763
- }, {
770
+ }>, {
764
771
  code?: string | undefined;
765
772
  message?: string | undefined;
766
773
  }, FetchOptions["throw"] extends true ? true : true>>;
@@ -773,7 +780,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
773
780
  slug: string;
774
781
  } & {
775
782
  fetchOptions?: FetchOptions | undefined;
776
- }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
783
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
777
784
  status: boolean;
778
785
  }, {
779
786
  code?: string | undefined;
@@ -790,7 +797,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
790
797
  organizationId?: string | undefined;
791
798
  } & {
792
799
  fetchOptions?: FetchOptions | undefined;
793
- }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
800
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
794
801
  member: {
795
802
  id: string;
796
803
  organizationId: string;
@@ -822,10 +829,10 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
822
829
  organizationId?: string | undefined;
823
830
  } & {
824
831
  fetchOptions?: FetchOptions | undefined;
825
- }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
832
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
826
833
  id: string;
827
834
  organizationId: string;
828
- role: "member" | "admin" | "owner";
835
+ role: "admin" | "member" | "owner";
829
836
  createdAt: Date;
830
837
  userId: string;
831
838
  user: {
@@ -847,7 +854,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
847
854
  organizationId: string;
848
855
  } & {
849
856
  fetchOptions?: FetchOptions | undefined;
850
- }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<NonNullable<Omit<{
857
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<NonNullable<Omit<{
851
858
  id: string;
852
859
  organizationId: string;
853
860
  role: "org:admin" | "org:member" | "org:reviewer";
@@ -861,7 +868,15 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
861
868
  image?: string | undefined;
862
869
  };
863
870
  } & {
864
- user: better_auth.User;
871
+ user: {
872
+ id: string;
873
+ createdAt: Date;
874
+ updatedAt: Date;
875
+ email: string;
876
+ emailVerified: boolean;
877
+ name: string;
878
+ image?: string | null | undefined;
879
+ };
865
880
  }, "user"> & {
866
881
  user: {
867
882
  id: string;
@@ -883,7 +898,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
883
898
  email?: string | undefined;
884
899
  } | undefined;
885
900
  fetchOptions?: FetchOptions | undefined;
886
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<(Omit<{
901
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<(Omit<{
887
902
  id: string;
888
903
  organizationId: string;
889
904
  email: string;
@@ -917,8 +932,8 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
917
932
  sortBy?: string | undefined;
918
933
  sortDirection?: "asc" | "desc" | undefined;
919
934
  filterField?: string | undefined;
920
- filterValue?: string | number | boolean | undefined;
921
- filterOperator?: "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "contains" | undefined;
935
+ filterValue?: string | number | boolean | string[] | number[] | undefined;
936
+ filterOperator?: "in" | "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
922
937
  organizationId?: string | undefined;
923
938
  organizationSlug?: string | undefined;
924
939
  }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
@@ -928,13 +943,13 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
928
943
  sortBy?: string | undefined;
929
944
  sortDirection?: "asc" | "desc" | undefined;
930
945
  filterField?: string | undefined;
931
- filterValue?: string | number | boolean | undefined;
932
- filterOperator?: "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "contains" | undefined;
946
+ filterValue?: string | number | boolean | string[] | number[] | undefined;
947
+ filterOperator?: "in" | "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
933
948
  organizationId?: string | undefined;
934
949
  organizationSlug?: string | undefined;
935
950
  } | undefined;
936
951
  fetchOptions?: FetchOptions | undefined;
937
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
952
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
938
953
  members: ({
939
954
  id: string;
940
955
  organizationId: string;
@@ -975,7 +990,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
975
990
  organizationSlug?: string | undefined;
976
991
  } | undefined;
977
992
  fetchOptions?: FetchOptions | undefined;
978
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
993
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
979
994
  role: "org:admin" | "org:member" | "org:reviewer";
980
995
  }, {
981
996
  code?: string | undefined;
@@ -984,17 +999,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
984
999
  };
985
1000
  } & {
986
1001
  organization: {
987
- hasPermission: <FetchOptions extends better_auth.ClientFetchOption<Partial<({
988
- permission: {
989
- access?: string[] | undefined;
990
- organization?: ("update" | "delete")[] | undefined;
991
- member?: ("update" | "delete" | "create")[] | undefined;
992
- invitation?: ("create" | "cancel")[] | undefined;
993
- team?: ("update" | "delete" | "create")[] | undefined;
994
- ac?: ("update" | "delete" | "create" | "read")[] | undefined;
995
- };
996
- permissions?: never | undefined;
997
- } | {
1002
+ hasPermission: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
998
1003
  permissions: {
999
1004
  access?: string[] | undefined;
1000
1005
  organization?: ("update" | "delete")[] | undefined;
@@ -1003,20 +1008,9 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1003
1008
  team?: ("update" | "delete" | "create")[] | undefined;
1004
1009
  ac?: ("update" | "delete" | "create" | "read")[] | undefined;
1005
1010
  };
1006
- permission?: never | undefined;
1007
- }) & {
1011
+ } & {
1008
1012
  organizationId?: string | undefined;
1009
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<(({
1010
- permission: {
1011
- access?: string[] | undefined;
1012
- organization?: ("update" | "delete")[] | undefined;
1013
- member?: ("update" | "delete" | "create")[] | undefined;
1014
- invitation?: ("create" | "cancel")[] | undefined;
1015
- team?: ("update" | "delete" | "create")[] | undefined;
1016
- ac?: ("update" | "delete" | "create" | "read")[] | undefined;
1017
- };
1018
- permissions?: never | undefined;
1019
- } | {
1013
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1020
1014
  permissions: {
1021
1015
  access?: string[] | undefined;
1022
1016
  organization?: ("update" | "delete")[] | undefined;
@@ -1025,12 +1019,11 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1025
1019
  team?: ("update" | "delete" | "create")[] | undefined;
1026
1020
  ac?: ("update" | "delete" | "create" | "read")[] | undefined;
1027
1021
  };
1028
- permission?: never | undefined;
1029
- }) & {
1022
+ } & {
1030
1023
  organizationId?: string | undefined;
1031
- }) & {
1024
+ } & {
1032
1025
  fetchOptions?: FetchOptions | undefined;
1033
- }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
1026
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
1034
1027
  error: null;
1035
1028
  success: boolean;
1036
1029
  }, {
@@ -1048,7 +1041,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1048
1041
  organizationId?: string | undefined;
1049
1042
  } & {
1050
1043
  fetchOptions?: FetchOptions | undefined;
1051
- }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
1044
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
1052
1045
  id: string;
1053
1046
  name: string;
1054
1047
  organizationId: string;
@@ -1068,7 +1061,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1068
1061
  organizationId?: string | undefined;
1069
1062
  } | undefined;
1070
1063
  fetchOptions?: FetchOptions | undefined;
1071
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
1064
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
1072
1065
  id: string;
1073
1066
  name: string;
1074
1067
  organizationId: string;
@@ -1089,7 +1082,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1089
1082
  organizationId?: string | undefined;
1090
1083
  } & {
1091
1084
  fetchOptions?: FetchOptions | undefined;
1092
- }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
1085
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
1093
1086
  message: string;
1094
1087
  }, {
1095
1088
  code?: string | undefined;
@@ -1112,7 +1105,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1112
1105
  }>;
1113
1106
  } & {
1114
1107
  fetchOptions?: FetchOptions | undefined;
1115
- }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
1108
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
1116
1109
  id: string;
1117
1110
  name: string;
1118
1111
  organizationId: string;
@@ -1131,7 +1124,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1131
1124
  teamId?: string | null | undefined;
1132
1125
  } & {
1133
1126
  fetchOptions?: FetchOptions | undefined;
1134
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
1127
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
1135
1128
  id: string;
1136
1129
  name: string;
1137
1130
  organizationId: string;
@@ -1147,7 +1140,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1147
1140
  listUserTeams: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
1148
1141
  query?: Record<string, any> | undefined;
1149
1142
  fetchOptions?: FetchOptions | undefined;
1150
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
1143
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
1151
1144
  id: string;
1152
1145
  name: string;
1153
1146
  organizationId: string;
@@ -1167,7 +1160,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1167
1160
  teamId?: string | undefined;
1168
1161
  } | undefined;
1169
1162
  fetchOptions?: FetchOptions | undefined;
1170
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
1163
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
1171
1164
  id: string;
1172
1165
  teamId: string;
1173
1166
  userId: string;
@@ -1187,7 +1180,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1187
1180
  userId: unknown;
1188
1181
  } & {
1189
1182
  fetchOptions?: FetchOptions | undefined;
1190
- }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
1183
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
1191
1184
  id: string;
1192
1185
  teamId: string;
1193
1186
  userId: string;
@@ -1207,7 +1200,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1207
1200
  userId: unknown;
1208
1201
  } & {
1209
1202
  fetchOptions?: FetchOptions | undefined;
1210
- }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
1203
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
1211
1204
  message: string;
1212
1205
  }, {
1213
1206
  code?: string | undefined;
@@ -1227,7 +1220,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1227
1220
  format?: "json" | "xml" | undefined;
1228
1221
  };
1229
1222
  fetchOptions?: FetchOptions | undefined;
1230
- }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<Response, {
1223
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<Response, {
1231
1224
  code?: string | undefined;
1232
1225
  message?: string | undefined;
1233
1226
  }, FetchOptions["throw"] extends true ? true : true>>;
@@ -1291,6 +1284,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1291
1284
  }[] | undefined;
1292
1285
  } | undefined;
1293
1286
  wantAssertionsSigned?: boolean | undefined;
1287
+ authnRequestsSigned?: boolean | undefined;
1294
1288
  signatureAlgorithm?: string | undefined;
1295
1289
  digestAlgorithm?: string | undefined;
1296
1290
  identifierFormat?: string | undefined;
@@ -1364,6 +1358,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1364
1358
  }[] | undefined;
1365
1359
  } | undefined;
1366
1360
  wantAssertionsSigned?: boolean | undefined;
1361
+ authnRequestsSigned?: boolean | undefined;
1367
1362
  signatureAlgorithm?: string | undefined;
1368
1363
  digestAlgorithm?: string | undefined;
1369
1364
  identifierFormat?: string | undefined;
@@ -1384,7 +1379,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1384
1379
  overrideUserInfo?: boolean | undefined;
1385
1380
  } & {
1386
1381
  fetchOptions?: FetchOptions | undefined;
1387
- }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<NonNullable<{
1382
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<NonNullable<{
1388
1383
  redirectURI: string;
1389
1384
  oidcConfig: _better_auth_sso.OIDCConfig | null;
1390
1385
  samlConfig: _better_auth_sso.SAMLConfig | null;
@@ -1429,7 +1424,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1429
1424
  providerType?: "saml" | "oidc" | undefined;
1430
1425
  } & {
1431
1426
  fetchOptions?: FetchOptions | undefined;
1432
- }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
1427
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
1433
1428
  url: string;
1434
1429
  redirect: boolean;
1435
1430
  }, {
@@ -1442,7 +1437,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1442
1437
  providers: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
1443
1438
  query?: Record<string, any> | undefined;
1444
1439
  fetchOptions?: FetchOptions | undefined;
1445
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
1440
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
1446
1441
  providers: {
1447
1442
  providerId: string;
1448
1443
  type: string;
@@ -1466,6 +1461,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1466
1461
  callbackUrl: string;
1467
1462
  audience: string | undefined;
1468
1463
  wantAssertionsSigned: boolean | undefined;
1464
+ authnRequestsSigned: boolean | undefined;
1469
1465
  identifierFormat: string | undefined;
1470
1466
  signatureAlgorithm: string | undefined;
1471
1467
  digestAlgorithm: string | undefined;
@@ -1487,259 +1483,260 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1487
1483
  };
1488
1484
  } & {
1489
1485
  sso: {
1490
- providers: {
1491
- ":providerid": <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, {
1492
- providerId: string;
1493
- }>>(data_0?: better_auth.Prettify<{
1494
- query?: Record<string, any> | undefined;
1495
- fetchOptions?: FetchOptions | undefined;
1496
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
1486
+ getProvider: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
1487
+ providerId: string;
1488
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1489
+ query: {
1497
1490
  providerId: string;
1498
- type: string;
1499
- issuer: string;
1500
- domain: string;
1501
- organizationId: string | null;
1502
- domainVerified: boolean;
1503
- oidcConfig: {
1504
- discoveryEndpoint: string;
1505
- clientIdLastFour: string;
1506
- pkce: boolean;
1507
- authorizationEndpoint: string | undefined;
1508
- tokenEndpoint: string | undefined;
1509
- userInfoEndpoint: string | undefined;
1510
- jwksEndpoint: string | undefined;
1511
- scopes: string[] | undefined;
1512
- tokenEndpointAuthentication: "client_secret_post" | "client_secret_basic" | undefined;
1513
- } | undefined;
1514
- samlConfig: {
1515
- entryPoint: string;
1516
- callbackUrl: string;
1517
- audience: string | undefined;
1518
- wantAssertionsSigned: boolean | undefined;
1519
- identifierFormat: string | undefined;
1520
- signatureAlgorithm: string | undefined;
1521
- digestAlgorithm: string | undefined;
1522
- certificate: {
1523
- fingerprintSha256: string;
1524
- notBefore: string;
1525
- notAfter: string;
1526
- publicKeyAlgorithm: string;
1527
- } | {
1528
- error: string;
1529
- };
1530
- } | undefined;
1531
- spMetadataUrl: string;
1532
- }, {
1533
- code?: string | undefined;
1534
- message?: string | undefined;
1535
- }, FetchOptions["throw"] extends true ? true : true>>;
1536
- };
1491
+ };
1492
+ fetchOptions?: FetchOptions | undefined;
1493
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
1494
+ providerId: string;
1495
+ type: string;
1496
+ issuer: string;
1497
+ domain: string;
1498
+ organizationId: string | null;
1499
+ domainVerified: boolean;
1500
+ oidcConfig: {
1501
+ discoveryEndpoint: string;
1502
+ clientIdLastFour: string;
1503
+ pkce: boolean;
1504
+ authorizationEndpoint: string | undefined;
1505
+ tokenEndpoint: string | undefined;
1506
+ userInfoEndpoint: string | undefined;
1507
+ jwksEndpoint: string | undefined;
1508
+ scopes: string[] | undefined;
1509
+ tokenEndpointAuthentication: "client_secret_post" | "client_secret_basic" | undefined;
1510
+ } | undefined;
1511
+ samlConfig: {
1512
+ entryPoint: string;
1513
+ callbackUrl: string;
1514
+ audience: string | undefined;
1515
+ wantAssertionsSigned: boolean | undefined;
1516
+ authnRequestsSigned: boolean | undefined;
1517
+ identifierFormat: string | undefined;
1518
+ signatureAlgorithm: string | undefined;
1519
+ digestAlgorithm: string | undefined;
1520
+ certificate: {
1521
+ fingerprintSha256: string;
1522
+ notBefore: string;
1523
+ notAfter: string;
1524
+ publicKeyAlgorithm: string;
1525
+ } | {
1526
+ error: string;
1527
+ };
1528
+ } | undefined;
1529
+ spMetadataUrl: string;
1530
+ }, {
1531
+ code?: string | undefined;
1532
+ message?: string | undefined;
1533
+ }, FetchOptions["throw"] extends true ? true : true>>;
1537
1534
  };
1538
1535
  } & {
1539
1536
  sso: {
1540
- providers: {
1541
- ":providerid": <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1542
- issuer?: string | undefined;
1543
- domain?: string | undefined;
1544
- oidcConfig?: {
1545
- clientId?: string | undefined;
1546
- clientSecret?: string | undefined;
1547
- authorizationEndpoint?: string | undefined;
1548
- tokenEndpoint?: string | undefined;
1549
- userInfoEndpoint?: string | undefined;
1550
- tokenEndpointAuthentication?: "client_secret_post" | "client_secret_basic" | undefined;
1551
- jwksEndpoint?: string | undefined;
1552
- discoveryEndpoint?: string | undefined;
1553
- scopes?: string[] | undefined;
1554
- pkce?: boolean | undefined;
1555
- overrideUserInfo?: boolean | undefined;
1556
- mapping?: {
1557
- id?: string | undefined;
1558
- email?: string | undefined;
1559
- emailVerified?: string | undefined;
1560
- name?: string | undefined;
1561
- image?: string | undefined;
1562
- extraFields?: Record<string, any> | undefined;
1563
- } | undefined;
1537
+ updateProvider: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1538
+ providerId: string;
1539
+ issuer?: string | undefined;
1540
+ domain?: string | undefined;
1541
+ oidcConfig?: {
1542
+ clientId?: string | undefined;
1543
+ clientSecret?: string | undefined;
1544
+ authorizationEndpoint?: string | undefined;
1545
+ tokenEndpoint?: string | undefined;
1546
+ userInfoEndpoint?: string | undefined;
1547
+ tokenEndpointAuthentication?: "client_secret_post" | "client_secret_basic" | undefined;
1548
+ jwksEndpoint?: string | undefined;
1549
+ discoveryEndpoint?: string | undefined;
1550
+ scopes?: string[] | undefined;
1551
+ pkce?: boolean | undefined;
1552
+ overrideUserInfo?: boolean | undefined;
1553
+ mapping?: {
1554
+ id?: string | undefined;
1555
+ email?: string | undefined;
1556
+ emailVerified?: string | undefined;
1557
+ name?: string | undefined;
1558
+ image?: string | undefined;
1559
+ extraFields?: Record<string, any> | undefined;
1564
1560
  } | undefined;
1565
- samlConfig?: {
1566
- entryPoint?: string | undefined;
1561
+ } | undefined;
1562
+ samlConfig?: {
1563
+ entryPoint?: string | undefined;
1564
+ cert?: string | undefined;
1565
+ callbackUrl?: string | undefined;
1566
+ audience?: string | undefined;
1567
+ idpMetadata?: {
1568
+ metadata?: string | undefined;
1569
+ entityID?: string | undefined;
1567
1570
  cert?: string | undefined;
1568
- callbackUrl?: string | undefined;
1569
- audience?: string | undefined;
1570
- idpMetadata?: {
1571
- metadata?: string | undefined;
1572
- entityID?: string | undefined;
1573
- cert?: string | undefined;
1574
- privateKey?: string | undefined;
1575
- privateKeyPass?: string | undefined;
1576
- isAssertionEncrypted?: boolean | undefined;
1577
- encPrivateKey?: string | undefined;
1578
- encPrivateKeyPass?: string | undefined;
1579
- singleSignOnService?: {
1580
- Binding: string;
1581
- Location: string;
1582
- }[] | undefined;
1583
- } | undefined;
1584
- spMetadata?: {
1585
- metadata?: string | undefined;
1586
- entityID?: string | undefined;
1587
- binding?: string | undefined;
1588
- privateKey?: string | undefined;
1589
- privateKeyPass?: string | undefined;
1590
- isAssertionEncrypted?: boolean | undefined;
1591
- encPrivateKey?: string | undefined;
1592
- encPrivateKeyPass?: string | undefined;
1593
- } | undefined;
1594
- wantAssertionsSigned?: boolean | undefined;
1595
- signatureAlgorithm?: string | undefined;
1596
- digestAlgorithm?: string | undefined;
1597
- identifierFormat?: string | undefined;
1598
1571
  privateKey?: string | undefined;
1599
- decryptionPvk?: string | undefined;
1600
- additionalParams?: Record<string, any> | undefined;
1601
- mapping?: {
1602
- id?: string | undefined;
1603
- email?: string | undefined;
1604
- emailVerified?: string | undefined;
1605
- name?: string | undefined;
1606
- firstName?: string | undefined;
1607
- lastName?: string | undefined;
1608
- extraFields?: Record<string, any> | undefined;
1609
- } | undefined;
1572
+ privateKeyPass?: string | undefined;
1573
+ isAssertionEncrypted?: boolean | undefined;
1574
+ encPrivateKey?: string | undefined;
1575
+ encPrivateKeyPass?: string | undefined;
1576
+ singleSignOnService?: {
1577
+ Binding: string;
1578
+ Location: string;
1579
+ }[] | undefined;
1610
1580
  } | undefined;
1611
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, {
1612
- providerId: string;
1613
- }>>(data_0?: better_auth.Prettify<{
1614
- issuer?: string | undefined;
1615
- domain?: string | undefined;
1616
- oidcConfig?: {
1617
- clientId?: string | undefined;
1618
- clientSecret?: string | undefined;
1619
- authorizationEndpoint?: string | undefined;
1620
- tokenEndpoint?: string | undefined;
1621
- userInfoEndpoint?: string | undefined;
1622
- tokenEndpointAuthentication?: "client_secret_post" | "client_secret_basic" | undefined;
1623
- jwksEndpoint?: string | undefined;
1624
- discoveryEndpoint?: string | undefined;
1625
- scopes?: string[] | undefined;
1626
- pkce?: boolean | undefined;
1627
- overrideUserInfo?: boolean | undefined;
1628
- mapping?: {
1629
- id?: string | undefined;
1630
- email?: string | undefined;
1631
- emailVerified?: string | undefined;
1632
- name?: string | undefined;
1633
- image?: string | undefined;
1634
- extraFields?: Record<string, any> | undefined;
1635
- } | undefined;
1581
+ spMetadata?: {
1582
+ metadata?: string | undefined;
1583
+ entityID?: string | undefined;
1584
+ binding?: string | undefined;
1585
+ privateKey?: string | undefined;
1586
+ privateKeyPass?: string | undefined;
1587
+ isAssertionEncrypted?: boolean | undefined;
1588
+ encPrivateKey?: string | undefined;
1589
+ encPrivateKeyPass?: string | undefined;
1590
+ } | undefined;
1591
+ wantAssertionsSigned?: boolean | undefined;
1592
+ authnRequestsSigned?: boolean | undefined;
1593
+ signatureAlgorithm?: string | undefined;
1594
+ digestAlgorithm?: string | undefined;
1595
+ identifierFormat?: string | undefined;
1596
+ privateKey?: string | undefined;
1597
+ decryptionPvk?: string | undefined;
1598
+ additionalParams?: Record<string, any> | undefined;
1599
+ mapping?: {
1600
+ id?: string | undefined;
1601
+ email?: string | undefined;
1602
+ emailVerified?: string | undefined;
1603
+ name?: string | undefined;
1604
+ firstName?: string | undefined;
1605
+ lastName?: string | undefined;
1606
+ extraFields?: Record<string, any> | undefined;
1607
+ } | undefined;
1608
+ } | undefined;
1609
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1610
+ providerId: string;
1611
+ issuer?: string | undefined;
1612
+ domain?: string | undefined;
1613
+ oidcConfig?: {
1614
+ clientId?: string | undefined;
1615
+ clientSecret?: string | undefined;
1616
+ authorizationEndpoint?: string | undefined;
1617
+ tokenEndpoint?: string | undefined;
1618
+ userInfoEndpoint?: string | undefined;
1619
+ tokenEndpointAuthentication?: "client_secret_post" | "client_secret_basic" | undefined;
1620
+ jwksEndpoint?: string | undefined;
1621
+ discoveryEndpoint?: string | undefined;
1622
+ scopes?: string[] | undefined;
1623
+ pkce?: boolean | undefined;
1624
+ overrideUserInfo?: boolean | undefined;
1625
+ mapping?: {
1626
+ id?: string | undefined;
1627
+ email?: string | undefined;
1628
+ emailVerified?: string | undefined;
1629
+ name?: string | undefined;
1630
+ image?: string | undefined;
1631
+ extraFields?: Record<string, any> | undefined;
1636
1632
  } | undefined;
1637
- samlConfig?: {
1638
- entryPoint?: string | undefined;
1633
+ } | undefined;
1634
+ samlConfig?: {
1635
+ entryPoint?: string | undefined;
1636
+ cert?: string | undefined;
1637
+ callbackUrl?: string | undefined;
1638
+ audience?: string | undefined;
1639
+ idpMetadata?: {
1640
+ metadata?: string | undefined;
1641
+ entityID?: string | undefined;
1639
1642
  cert?: string | undefined;
1640
- callbackUrl?: string | undefined;
1641
- audience?: string | undefined;
1642
- idpMetadata?: {
1643
- metadata?: string | undefined;
1644
- entityID?: string | undefined;
1645
- cert?: string | undefined;
1646
- privateKey?: string | undefined;
1647
- privateKeyPass?: string | undefined;
1648
- isAssertionEncrypted?: boolean | undefined;
1649
- encPrivateKey?: string | undefined;
1650
- encPrivateKeyPass?: string | undefined;
1651
- singleSignOnService?: {
1652
- Binding: string;
1653
- Location: string;
1654
- }[] | undefined;
1655
- } | undefined;
1656
- spMetadata?: {
1657
- metadata?: string | undefined;
1658
- entityID?: string | undefined;
1659
- binding?: string | undefined;
1660
- privateKey?: string | undefined;
1661
- privateKeyPass?: string | undefined;
1662
- isAssertionEncrypted?: boolean | undefined;
1663
- encPrivateKey?: string | undefined;
1664
- encPrivateKeyPass?: string | undefined;
1665
- } | undefined;
1666
- wantAssertionsSigned?: boolean | undefined;
1667
- signatureAlgorithm?: string | undefined;
1668
- digestAlgorithm?: string | undefined;
1669
- identifierFormat?: string | undefined;
1670
1643
  privateKey?: string | undefined;
1671
- decryptionPvk?: string | undefined;
1672
- additionalParams?: Record<string, any> | undefined;
1673
- mapping?: {
1674
- id?: string | undefined;
1675
- email?: string | undefined;
1676
- emailVerified?: string | undefined;
1677
- name?: string | undefined;
1678
- firstName?: string | undefined;
1679
- lastName?: string | undefined;
1680
- extraFields?: Record<string, any> | undefined;
1681
- } | undefined;
1644
+ privateKeyPass?: string | undefined;
1645
+ isAssertionEncrypted?: boolean | undefined;
1646
+ encPrivateKey?: string | undefined;
1647
+ encPrivateKeyPass?: string | undefined;
1648
+ singleSignOnService?: {
1649
+ Binding: string;
1650
+ Location: string;
1651
+ }[] | undefined;
1682
1652
  } | undefined;
1683
- } & {
1684
- fetchOptions?: FetchOptions | undefined;
1685
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
1686
- providerId: string;
1687
- type: string;
1688
- issuer: string;
1689
- domain: string;
1690
- organizationId: string | null;
1691
- domainVerified: boolean;
1692
- oidcConfig: {
1693
- discoveryEndpoint: string;
1694
- clientIdLastFour: string;
1695
- pkce: boolean;
1696
- authorizationEndpoint: string | undefined;
1697
- tokenEndpoint: string | undefined;
1698
- userInfoEndpoint: string | undefined;
1699
- jwksEndpoint: string | undefined;
1700
- scopes: string[] | undefined;
1701
- tokenEndpointAuthentication: "client_secret_post" | "client_secret_basic" | undefined;
1653
+ spMetadata?: {
1654
+ metadata?: string | undefined;
1655
+ entityID?: string | undefined;
1656
+ binding?: string | undefined;
1657
+ privateKey?: string | undefined;
1658
+ privateKeyPass?: string | undefined;
1659
+ isAssertionEncrypted?: boolean | undefined;
1660
+ encPrivateKey?: string | undefined;
1661
+ encPrivateKeyPass?: string | undefined;
1702
1662
  } | undefined;
1703
- samlConfig: {
1704
- entryPoint: string;
1705
- callbackUrl: string;
1706
- audience: string | undefined;
1707
- wantAssertionsSigned: boolean | undefined;
1708
- identifierFormat: string | undefined;
1709
- signatureAlgorithm: string | undefined;
1710
- digestAlgorithm: string | undefined;
1711
- certificate: {
1712
- fingerprintSha256: string;
1713
- notBefore: string;
1714
- notAfter: string;
1715
- publicKeyAlgorithm: string;
1716
- } | {
1717
- error: string;
1718
- };
1663
+ wantAssertionsSigned?: boolean | undefined;
1664
+ authnRequestsSigned?: boolean | undefined;
1665
+ signatureAlgorithm?: string | undefined;
1666
+ digestAlgorithm?: string | undefined;
1667
+ identifierFormat?: string | undefined;
1668
+ privateKey?: string | undefined;
1669
+ decryptionPvk?: string | undefined;
1670
+ additionalParams?: Record<string, any> | undefined;
1671
+ mapping?: {
1672
+ id?: string | undefined;
1673
+ email?: string | undefined;
1674
+ emailVerified?: string | undefined;
1675
+ name?: string | undefined;
1676
+ firstName?: string | undefined;
1677
+ lastName?: string | undefined;
1678
+ extraFields?: Record<string, any> | undefined;
1719
1679
  } | undefined;
1720
- spMetadataUrl: string;
1721
- }, {
1722
- code?: string | undefined;
1723
- message?: string | undefined;
1724
- }, FetchOptions["throw"] extends true ? true : true>>;
1725
- };
1680
+ } | undefined;
1681
+ } & {
1682
+ fetchOptions?: FetchOptions | undefined;
1683
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
1684
+ providerId: string;
1685
+ type: string;
1686
+ issuer: string;
1687
+ domain: string;
1688
+ organizationId: string | null;
1689
+ domainVerified: boolean;
1690
+ oidcConfig: {
1691
+ discoveryEndpoint: string;
1692
+ clientIdLastFour: string;
1693
+ pkce: boolean;
1694
+ authorizationEndpoint: string | undefined;
1695
+ tokenEndpoint: string | undefined;
1696
+ userInfoEndpoint: string | undefined;
1697
+ jwksEndpoint: string | undefined;
1698
+ scopes: string[] | undefined;
1699
+ tokenEndpointAuthentication: "client_secret_post" | "client_secret_basic" | undefined;
1700
+ } | undefined;
1701
+ samlConfig: {
1702
+ entryPoint: string;
1703
+ callbackUrl: string;
1704
+ audience: string | undefined;
1705
+ wantAssertionsSigned: boolean | undefined;
1706
+ authnRequestsSigned: boolean | undefined;
1707
+ identifierFormat: string | undefined;
1708
+ signatureAlgorithm: string | undefined;
1709
+ digestAlgorithm: string | undefined;
1710
+ certificate: {
1711
+ fingerprintSha256: string;
1712
+ notBefore: string;
1713
+ notAfter: string;
1714
+ publicKeyAlgorithm: string;
1715
+ } | {
1716
+ error: string;
1717
+ };
1718
+ } | undefined;
1719
+ spMetadataUrl: string;
1720
+ }, {
1721
+ code?: string | undefined;
1722
+ message?: string | undefined;
1723
+ }, FetchOptions["throw"] extends true ? true : true>>;
1726
1724
  };
1727
1725
  } & {
1728
1726
  sso: {
1729
- providers: {
1730
- ":providerid": <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, {
1731
- providerId: string;
1732
- }>>(data_0?: better_auth.Prettify<{
1733
- query?: Record<string, any> | undefined;
1734
- fetchOptions?: FetchOptions | undefined;
1735
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
1736
- success: boolean;
1737
- }, {
1738
- code?: string | undefined;
1739
- message?: string | undefined;
1740
- }, FetchOptions["throw"] extends true ? true : true>>;
1741
- };
1742
- };
1727
+ deleteProvider: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1728
+ providerId: string;
1729
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1730
+ providerId: string;
1731
+ } & {
1732
+ fetchOptions?: FetchOptions | undefined;
1733
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
1734
+ success: boolean;
1735
+ }, {
1736
+ code?: string | undefined;
1737
+ message?: string | undefined;
1738
+ }, FetchOptions["throw"] extends true ? true : true>>;
1739
+ };
1743
1740
  } & {
1744
1741
  twoFactor: {
1745
1742
  enable: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
@@ -1750,7 +1747,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1750
1747
  issuer?: string | undefined;
1751
1748
  } & {
1752
1749
  fetchOptions?: FetchOptions | undefined;
1753
- }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
1750
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
1754
1751
  totpURI: string;
1755
1752
  backupCodes: string[];
1756
1753
  }, {
@@ -1766,7 +1763,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1766
1763
  password: string;
1767
1764
  } & {
1768
1765
  fetchOptions?: FetchOptions | undefined;
1769
- }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
1766
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
1770
1767
  status: boolean;
1771
1768
  }, {
1772
1769
  code?: string | undefined;
@@ -1785,7 +1782,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1785
1782
  trustDevice?: boolean | undefined;
1786
1783
  } & {
1787
1784
  fetchOptions?: FetchOptions | undefined;
1788
- }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
1785
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<Omit<{
1789
1786
  token: string | undefined;
1790
1787
  user: (Record<string, any> & {
1791
1788
  id: string;
@@ -1796,6 +1793,26 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1796
1793
  name: string;
1797
1794
  image?: string | null | undefined;
1798
1795
  }) | better_auth_plugins.UserWithTwoFactor;
1796
+ }, "user"> & {
1797
+ user: better_auth.StripEmptyObjects<{
1798
+ id: string;
1799
+ createdAt: Date;
1800
+ updatedAt: Date;
1801
+ email: string;
1802
+ emailVerified: boolean;
1803
+ name: string;
1804
+ image?: string | null | undefined;
1805
+ } & {
1806
+ twoFactorEnabled: boolean | null | undefined;
1807
+ } & {} & {
1808
+ banned: boolean | null | undefined;
1809
+ } & {
1810
+ role?: string | null | undefined;
1811
+ banReason?: string | null | undefined;
1812
+ banExpires?: Date | null | undefined;
1813
+ } & {} & {
1814
+ lastActiveAt?: Date | null | undefined;
1815
+ }>;
1799
1816
  }, {
1800
1817
  code?: string | undefined;
1801
1818
  message?: string | undefined;
@@ -1809,7 +1826,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1809
1826
  password: string;
1810
1827
  } & {
1811
1828
  fetchOptions?: FetchOptions | undefined;
1812
- }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
1829
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
1813
1830
  status: boolean;
1814
1831
  backupCodes: string[];
1815
1832
  }, {
@@ -1824,7 +1841,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1824
1841
  }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
1825
1842
  query?: Record<string, any> | undefined;
1826
1843
  fetchOptions?: FetchOptions | undefined;
1827
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
1844
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
1828
1845
  status: boolean;
1829
1846
  }, {
1830
1847
  code?: string | undefined;
@@ -1841,10 +1858,30 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1841
1858
  trustDevice?: boolean | undefined;
1842
1859
  } & {
1843
1860
  fetchOptions?: FetchOptions | undefined;
1844
- }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<NonNullable<{
1861
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<(Omit<{
1845
1862
  token: string;
1846
1863
  user: better_auth_plugins.UserWithTwoFactor;
1847
- } | {
1864
+ }, "user"> & {
1865
+ user: better_auth.StripEmptyObjects<{
1866
+ id: string;
1867
+ createdAt: Date;
1868
+ updatedAt: Date;
1869
+ email: string;
1870
+ emailVerified: boolean;
1871
+ name: string;
1872
+ image?: string | null | undefined;
1873
+ } & {
1874
+ twoFactorEnabled: boolean | null | undefined;
1875
+ } & {} & {
1876
+ banned: boolean | null | undefined;
1877
+ } & {
1878
+ role?: string | null | undefined;
1879
+ banReason?: string | null | undefined;
1880
+ banExpires?: Date | null | undefined;
1881
+ } & {} & {
1882
+ lastActiveAt?: Date | null | undefined;
1883
+ }>;
1884
+ }) | (Omit<{
1848
1885
  token: string;
1849
1886
  user: Record<string, any> & {
1850
1887
  id: string;
@@ -1855,7 +1892,27 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1855
1892
  name: string;
1856
1893
  image?: string | null | undefined;
1857
1894
  };
1858
- }>, {
1895
+ }, "user"> & {
1896
+ user: better_auth.StripEmptyObjects<{
1897
+ id: string;
1898
+ createdAt: Date;
1899
+ updatedAt: Date;
1900
+ email: string;
1901
+ emailVerified: boolean;
1902
+ name: string;
1903
+ image?: string | null | undefined;
1904
+ } & {
1905
+ twoFactorEnabled: boolean | null | undefined;
1906
+ } & {} & {
1907
+ banned: boolean | null | undefined;
1908
+ } & {
1909
+ role?: string | null | undefined;
1910
+ banReason?: string | null | undefined;
1911
+ banExpires?: Date | null | undefined;
1912
+ } & {} & {
1913
+ lastActiveAt?: Date | null | undefined;
1914
+ }>;
1915
+ }), {
1859
1916
  code?: string | undefined;
1860
1917
  message?: string | undefined;
1861
1918
  }, FetchOptions["throw"] extends true ? true : true>>;
@@ -1868,7 +1925,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1868
1925
  password: string;
1869
1926
  } & {
1870
1927
  fetchOptions?: FetchOptions | undefined;
1871
- }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
1928
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
1872
1929
  totpURI: string;
1873
1930
  }, {
1874
1931
  code?: string | undefined;
@@ -1885,10 +1942,30 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1885
1942
  trustDevice?: boolean | undefined;
1886
1943
  } & {
1887
1944
  fetchOptions?: FetchOptions | undefined;
1888
- }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<NonNullable<{
1945
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<(Omit<{
1889
1946
  token: string;
1890
1947
  user: better_auth_plugins.UserWithTwoFactor;
1891
- } | {
1948
+ }, "user"> & {
1949
+ user: better_auth.StripEmptyObjects<{
1950
+ id: string;
1951
+ createdAt: Date;
1952
+ updatedAt: Date;
1953
+ email: string;
1954
+ emailVerified: boolean;
1955
+ name: string;
1956
+ image?: string | null | undefined;
1957
+ } & {
1958
+ twoFactorEnabled: boolean | null | undefined;
1959
+ } & {} & {
1960
+ banned: boolean | null | undefined;
1961
+ } & {
1962
+ role?: string | null | undefined;
1963
+ banReason?: string | null | undefined;
1964
+ banExpires?: Date | null | undefined;
1965
+ } & {} & {
1966
+ lastActiveAt?: Date | null | undefined;
1967
+ }>;
1968
+ }) | (Omit<{
1892
1969
  token: string;
1893
1970
  user: Record<string, any> & {
1894
1971
  id: string;
@@ -1899,7 +1976,27 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1899
1976
  name: string;
1900
1977
  image?: string | null | undefined;
1901
1978
  };
1902
- }>, {
1979
+ }, "user"> & {
1980
+ user: better_auth.StripEmptyObjects<{
1981
+ id: string;
1982
+ createdAt: Date;
1983
+ updatedAt: Date;
1984
+ email: string;
1985
+ emailVerified: boolean;
1986
+ name: string;
1987
+ image?: string | null | undefined;
1988
+ } & {
1989
+ twoFactorEnabled: boolean | null | undefined;
1990
+ } & {} & {
1991
+ banned: boolean | null | undefined;
1992
+ } & {
1993
+ role?: string | null | undefined;
1994
+ banReason?: string | null | undefined;
1995
+ banExpires?: Date | null | undefined;
1996
+ } & {} & {
1997
+ lastActiveAt?: Date | null | undefined;
1998
+ }>;
1999
+ }), {
1903
2000
  code?: string | undefined;
1904
2001
  message?: string | undefined;
1905
2002
  }, FetchOptions["throw"] extends true ? true : true>>;
@@ -1908,7 +2005,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1908
2005
  token: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
1909
2006
  query?: Record<string, any> | undefined;
1910
2007
  fetchOptions?: FetchOptions | undefined;
1911
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
2008
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
1912
2009
  token: string;
1913
2010
  }, {
1914
2011
  code?: string | undefined;
@@ -1917,9 +2014,9 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1917
2014
  } & {
1918
2015
  apiKey: {
1919
2016
  create: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
2017
+ configId?: string | undefined;
1920
2018
  name?: string | undefined;
1921
2019
  expiresIn?: number | null | undefined;
1922
- userId?: unknown;
1923
2020
  prefix?: string | undefined;
1924
2021
  remaining?: number | null | undefined;
1925
2022
  metadata?: any;
@@ -1929,10 +2026,12 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1929
2026
  rateLimitMax?: number | undefined;
1930
2027
  rateLimitEnabled?: boolean | undefined;
1931
2028
  permissions?: Record<string, string[]> | undefined;
2029
+ userId?: unknown;
2030
+ organizationId?: unknown;
1932
2031
  }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
2032
+ configId?: string | undefined;
1933
2033
  name?: string | undefined;
1934
2034
  expiresIn?: number | null | undefined;
1935
- userId?: unknown;
1936
2035
  prefix?: string | undefined;
1937
2036
  remaining?: number | null | undefined;
1938
2037
  metadata?: any;
@@ -1942,17 +2041,20 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1942
2041
  rateLimitMax?: number | undefined;
1943
2042
  rateLimitEnabled?: boolean | undefined;
1944
2043
  permissions?: Record<string, string[]> | undefined;
2044
+ userId?: unknown;
2045
+ organizationId?: unknown;
1945
2046
  } & {
1946
2047
  fetchOptions?: FetchOptions | undefined;
1947
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
2048
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
1948
2049
  key: string;
1949
2050
  metadata: any;
1950
2051
  permissions: any;
1951
2052
  id: string;
2053
+ configId: string;
1952
2054
  name: string | null;
1953
2055
  start: string | null;
1954
2056
  prefix: string | null;
1955
- userId: string;
2057
+ referenceId: string;
1956
2058
  refillInterval: number | null;
1957
2059
  refillAmount: number | null;
1958
2060
  lastRefillAt: Date | null;
@@ -1975,21 +2077,24 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1975
2077
  apiKey: {
1976
2078
  get: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
1977
2079
  id: string;
2080
+ configId?: string | undefined;
1978
2081
  }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1979
2082
  query: {
1980
2083
  id: string;
2084
+ configId?: string | undefined;
1981
2085
  };
1982
2086
  fetchOptions?: FetchOptions | undefined;
1983
- }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
2087
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
1984
2088
  metadata: Record<string, any> | null;
1985
2089
  permissions: {
1986
2090
  [key: string]: string[];
1987
2091
  } | null;
1988
2092
  id: string;
2093
+ configId: string;
1989
2094
  name: string | null;
1990
2095
  start: string | null;
1991
2096
  prefix: string | null;
1992
- userId: string;
2097
+ referenceId: string;
1993
2098
  refillInterval: number | null;
1994
2099
  refillAmount: number | null;
1995
2100
  lastRefillAt: Date | null;
@@ -2012,6 +2117,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2012
2117
  apiKey: {
2013
2118
  update: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
2014
2119
  keyId: string;
2120
+ configId?: string | undefined;
2015
2121
  userId?: unknown;
2016
2122
  name?: string | undefined;
2017
2123
  enabled?: boolean | undefined;
@@ -2026,6 +2132,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2026
2132
  permissions?: Record<string, string[]> | null | undefined;
2027
2133
  }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
2028
2134
  keyId: string;
2135
+ configId?: string | undefined;
2029
2136
  userId?: unknown;
2030
2137
  name?: string | undefined;
2031
2138
  enabled?: boolean | undefined;
@@ -2040,16 +2147,17 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2040
2147
  permissions?: Record<string, string[]> | null | undefined;
2041
2148
  } & {
2042
2149
  fetchOptions?: FetchOptions | undefined;
2043
- }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
2150
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
2044
2151
  metadata: Record<string, any> | null;
2045
2152
  permissions: {
2046
2153
  [key: string]: string[];
2047
2154
  } | null;
2048
2155
  id: string;
2156
+ configId: string;
2049
2157
  name: string | null;
2050
2158
  start: string | null;
2051
2159
  prefix: string | null;
2052
- userId: string;
2160
+ referenceId: string;
2053
2161
  refillInterval: number | null;
2054
2162
  refillAmount: number | null;
2055
2163
  lastRefillAt: Date | null;
@@ -2072,11 +2180,13 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2072
2180
  apiKey: {
2073
2181
  delete: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
2074
2182
  keyId: string;
2183
+ configId?: string | undefined;
2075
2184
  }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
2076
2185
  keyId: string;
2186
+ configId?: string | undefined;
2077
2187
  } & {
2078
2188
  fetchOptions?: FetchOptions | undefined;
2079
- }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
2189
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
2080
2190
  success: boolean;
2081
2191
  }, {
2082
2192
  code?: string | undefined;
@@ -2085,33 +2195,53 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2085
2195
  };
2086
2196
  } & {
2087
2197
  apiKey: {
2088
- list: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
2089
- query?: Record<string, any> | undefined;
2198
+ list: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
2199
+ configId?: string | undefined;
2200
+ organizationId?: string | undefined;
2201
+ limit?: unknown;
2202
+ offset?: unknown;
2203
+ sortBy?: string | undefined;
2204
+ sortDirection?: "asc" | "desc" | undefined;
2205
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
2206
+ query?: {
2207
+ configId?: string | undefined;
2208
+ organizationId?: string | undefined;
2209
+ limit?: unknown;
2210
+ offset?: unknown;
2211
+ sortBy?: string | undefined;
2212
+ sortDirection?: "asc" | "desc" | undefined;
2213
+ } | undefined;
2090
2214
  fetchOptions?: FetchOptions | undefined;
2091
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
2092
- metadata: Record<string, any> | null;
2093
- permissions: {
2094
- [key: string]: string[];
2095
- } | null;
2096
- id: string;
2097
- name: string | null;
2098
- start: string | null;
2099
- prefix: string | null;
2100
- userId: string;
2101
- refillInterval: number | null;
2102
- refillAmount: number | null;
2103
- lastRefillAt: Date | null;
2104
- enabled: boolean;
2105
- rateLimitEnabled: boolean;
2106
- rateLimitTimeWindow: number | null;
2107
- rateLimitMax: number | null;
2108
- requestCount: number;
2109
- remaining: number | null;
2110
- lastRequest: Date | null;
2111
- expiresAt: Date | null;
2112
- createdAt: Date;
2113
- updatedAt: Date;
2114
- }[], {
2215
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
2216
+ apiKeys: {
2217
+ metadata: Record<string, any> | null;
2218
+ permissions: {
2219
+ [key: string]: string[];
2220
+ } | null;
2221
+ id: string;
2222
+ configId: string;
2223
+ name: string | null;
2224
+ start: string | null;
2225
+ prefix: string | null;
2226
+ referenceId: string;
2227
+ refillInterval: number | null;
2228
+ refillAmount: number | null;
2229
+ lastRefillAt: Date | null;
2230
+ enabled: boolean;
2231
+ rateLimitEnabled: boolean;
2232
+ rateLimitTimeWindow: number | null;
2233
+ rateLimitMax: number | null;
2234
+ requestCount: number;
2235
+ remaining: number | null;
2236
+ lastRequest: Date | null;
2237
+ expiresAt: Date | null;
2238
+ createdAt: Date;
2239
+ updatedAt: Date;
2240
+ }[];
2241
+ total: number;
2242
+ limit: number | undefined;
2243
+ offset: number | undefined;
2244
+ }, {
2115
2245
  code?: string | undefined;
2116
2246
  message?: string | undefined;
2117
2247
  }, FetchOptions["throw"] extends true ? true : true>>;
@@ -2126,7 +2256,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2126
2256
  role: "admin" | "user" | ("admin" | "user")[];
2127
2257
  } & {
2128
2258
  fetchOptions?: FetchOptions | undefined;
2129
- }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
2259
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
2130
2260
  user: better_auth_plugins.UserWithRole;
2131
2261
  }, {
2132
2262
  code?: string | undefined;
@@ -2142,7 +2272,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2142
2272
  id: string;
2143
2273
  };
2144
2274
  fetchOptions?: FetchOptions | undefined;
2145
- }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<better_auth_plugins.UserWithRole, {
2275
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<better_auth_plugins.UserWithRole, {
2146
2276
  code?: string | undefined;
2147
2277
  message?: string | undefined;
2148
2278
  }, FetchOptions["throw"] extends true ? true : true>>;
@@ -2163,7 +2293,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2163
2293
  data?: Record<string, any> | undefined;
2164
2294
  } & {
2165
2295
  fetchOptions?: FetchOptions | undefined;
2166
- }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
2296
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
2167
2297
  user: better_auth_plugins.UserWithRole;
2168
2298
  }, {
2169
2299
  code?: string | undefined;
@@ -2180,7 +2310,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2180
2310
  data: Record<any, any>;
2181
2311
  } & {
2182
2312
  fetchOptions?: FetchOptions | undefined;
2183
- }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<better_auth_plugins.UserWithRole, {
2313
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<better_auth_plugins.UserWithRole, {
2184
2314
  code?: string | undefined;
2185
2315
  message?: string | undefined;
2186
2316
  }, FetchOptions["throw"] extends true ? true : true>>;
@@ -2196,8 +2326,8 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2196
2326
  sortBy?: string | undefined;
2197
2327
  sortDirection?: "asc" | "desc" | undefined;
2198
2328
  filterField?: string | undefined;
2199
- filterValue?: string | number | boolean | undefined;
2200
- filterOperator?: "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "contains" | undefined;
2329
+ filterValue?: string | number | boolean | string[] | number[] | undefined;
2330
+ filterOperator?: "in" | "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
2201
2331
  }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
2202
2332
  query: {
2203
2333
  searchValue?: string | undefined;
@@ -2208,19 +2338,14 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2208
2338
  sortBy?: string | undefined;
2209
2339
  sortDirection?: "asc" | "desc" | undefined;
2210
2340
  filterField?: string | undefined;
2211
- filterValue?: string | number | boolean | undefined;
2212
- filterOperator?: "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "contains" | undefined;
2341
+ filterValue?: string | number | boolean | string[] | number[] | undefined;
2342
+ filterOperator?: "in" | "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
2213
2343
  };
2214
2344
  fetchOptions?: FetchOptions | undefined;
2215
- }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<NonNullable<{
2345
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
2216
2346
  users: better_auth_plugins.UserWithRole[];
2217
2347
  total: number;
2218
- limit: number | undefined;
2219
- offset: number | undefined;
2220
- } | {
2221
- users: never[];
2222
- total: number;
2223
- }>, {
2348
+ }, {
2224
2349
  code?: string | undefined;
2225
2350
  message?: string | undefined;
2226
2351
  }, FetchOptions["throw"] extends true ? true : true>>;
@@ -2233,7 +2358,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2233
2358
  userId: unknown;
2234
2359
  } & {
2235
2360
  fetchOptions?: FetchOptions | undefined;
2236
- }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
2361
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
2237
2362
  sessions: better_auth_plugins.SessionWithImpersonatedBy[];
2238
2363
  }, {
2239
2364
  code?: string | undefined;
@@ -2248,7 +2373,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2248
2373
  userId: unknown;
2249
2374
  } & {
2250
2375
  fetchOptions?: FetchOptions | undefined;
2251
- }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
2376
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
2252
2377
  user: better_auth_plugins.UserWithRole;
2253
2378
  }, {
2254
2379
  code?: string | undefined;
@@ -2267,7 +2392,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2267
2392
  banExpiresIn?: number | undefined;
2268
2393
  } & {
2269
2394
  fetchOptions?: FetchOptions | undefined;
2270
- }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
2395
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
2271
2396
  user: better_auth_plugins.UserWithRole;
2272
2397
  }, {
2273
2398
  code?: string | undefined;
@@ -2282,7 +2407,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2282
2407
  userId: unknown;
2283
2408
  } & {
2284
2409
  fetchOptions?: FetchOptions | undefined;
2285
- }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
2410
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
2286
2411
  session: {
2287
2412
  id: string;
2288
2413
  createdAt: Date;
@@ -2304,7 +2429,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2304
2429
  stopImpersonating: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
2305
2430
  query?: Record<string, any> | undefined;
2306
2431
  fetchOptions?: FetchOptions | undefined;
2307
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
2432
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
2308
2433
  session: {
2309
2434
  id: string;
2310
2435
  createdAt: Date;
@@ -2337,7 +2462,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2337
2462
  sessionToken: string;
2338
2463
  } & {
2339
2464
  fetchOptions?: FetchOptions | undefined;
2340
- }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
2465
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
2341
2466
  success: boolean;
2342
2467
  }, {
2343
2468
  code?: string | undefined;
@@ -2352,7 +2477,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2352
2477
  userId: unknown;
2353
2478
  } & {
2354
2479
  fetchOptions?: FetchOptions | undefined;
2355
- }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
2480
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
2356
2481
  success: boolean;
2357
2482
  }, {
2358
2483
  code?: string | undefined;
@@ -2367,7 +2492,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2367
2492
  userId: unknown;
2368
2493
  } & {
2369
2494
  fetchOptions?: FetchOptions | undefined;
2370
- }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
2495
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
2371
2496
  success: boolean;
2372
2497
  }, {
2373
2498
  code?: string | undefined;
@@ -2384,7 +2509,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2384
2509
  userId: unknown;
2385
2510
  } & {
2386
2511
  fetchOptions?: FetchOptions | undefined;
2387
- }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
2512
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
2388
2513
  status: boolean;
2389
2514
  }, {
2390
2515
  code?: string | undefined;
@@ -2393,39 +2518,25 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2393
2518
  };
2394
2519
  } & {
2395
2520
  admin: {
2396
- hasPermission: <FetchOptions extends better_auth.ClientFetchOption<Partial<({
2397
- permission: {
2398
- readonly user?: ("update" | "delete" | "create" | "list" | "set-role" | "ban" | "impersonate" | "set-password" | "get")[] | undefined;
2399
- readonly session?: ("delete" | "list" | "revoke")[] | undefined;
2400
- };
2401
- permissions?: never | undefined;
2402
- } | {
2521
+ hasPermission: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
2403
2522
  permissions: {
2404
- readonly user?: ("update" | "delete" | "create" | "list" | "set-role" | "ban" | "impersonate" | "set-password" | "get")[] | undefined;
2523
+ readonly user?: ("update" | "delete" | "create" | "list" | "set-role" | "ban" | "impersonate" | "impersonate-admins" | "set-password" | "get")[] | undefined;
2405
2524
  readonly session?: ("delete" | "list" | "revoke")[] | undefined;
2406
2525
  };
2407
- permission?: never | undefined;
2408
- }) & {
2526
+ } & {
2409
2527
  userId?: string | undefined;
2410
2528
  role?: "admin" | "user" | undefined;
2411
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<(({
2412
- permission: {
2413
- readonly user?: ("update" | "delete" | "create" | "list" | "set-role" | "ban" | "impersonate" | "set-password" | "get")[] | undefined;
2414
- readonly session?: ("delete" | "list" | "revoke")[] | undefined;
2415
- };
2416
- permissions?: never | undefined;
2417
- } | {
2529
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
2418
2530
  permissions: {
2419
- readonly user?: ("update" | "delete" | "create" | "list" | "set-role" | "ban" | "impersonate" | "set-password" | "get")[] | undefined;
2531
+ readonly user?: ("update" | "delete" | "create" | "list" | "set-role" | "ban" | "impersonate" | "impersonate-admins" | "set-password" | "get")[] | undefined;
2420
2532
  readonly session?: ("delete" | "list" | "revoke")[] | undefined;
2421
2533
  };
2422
- permission?: never | undefined;
2423
- }) & {
2534
+ } & {
2424
2535
  userId?: string | undefined;
2425
2536
  role?: "admin" | "user" | undefined;
2426
- }) & {
2537
+ } & {
2427
2538
  fetchOptions?: FetchOptions | undefined;
2428
- }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
2539
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
2429
2540
  error: null;
2430
2541
  success: boolean;
2431
2542
  }, {
@@ -2436,7 +2547,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2436
2547
  } & {
2437
2548
  signIn: {
2438
2549
  social: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
2439
- provider: (string & {}) | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "vercel";
2550
+ provider: (string & {}) | "linear" | "huggingface" | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel";
2440
2551
  callbackURL?: string | undefined;
2441
2552
  newUserCallbackURL?: string | undefined;
2442
2553
  errorCallbackURL?: string | undefined;
@@ -2453,7 +2564,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2453
2564
  loginHint?: string | undefined;
2454
2565
  additionalData?: Record<string, any> | undefined;
2455
2566
  }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
2456
- provider: (string & {}) | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "vercel";
2567
+ provider: (string & {}) | "linear" | "huggingface" | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel";
2457
2568
  callbackURL?: string | undefined;
2458
2569
  newUserCallbackURL?: string | undefined;
2459
2570
  errorCallbackURL?: string | undefined;
@@ -2471,10 +2582,10 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2471
2582
  additionalData?: Record<string, any> | undefined;
2472
2583
  } & {
2473
2584
  fetchOptions?: FetchOptions | undefined;
2474
- }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<NonNullable<{
2585
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
2475
2586
  redirect: boolean;
2476
2587
  url: string;
2477
- } | {
2588
+ } | (Omit<{
2478
2589
  redirect: boolean;
2479
2590
  token: string;
2480
2591
  url: undefined;
@@ -2487,7 +2598,27 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2487
2598
  name: string;
2488
2599
  image?: string | null | undefined | undefined;
2489
2600
  };
2490
- }>, {
2601
+ }, "user"> & {
2602
+ user: better_auth.StripEmptyObjects<{
2603
+ id: string;
2604
+ createdAt: Date;
2605
+ updatedAt: Date;
2606
+ email: string;
2607
+ emailVerified: boolean;
2608
+ name: string;
2609
+ image?: string | null | undefined;
2610
+ } & {
2611
+ twoFactorEnabled: boolean | null | undefined;
2612
+ } & {} & {
2613
+ banned: boolean | null | undefined;
2614
+ } & {
2615
+ role?: string | null | undefined;
2616
+ banReason?: string | null | undefined;
2617
+ banExpires?: Date | null | undefined;
2618
+ } & {} & {
2619
+ lastActiveAt?: Date | null | undefined;
2620
+ }>;
2621
+ }), {
2491
2622
  code?: string | undefined;
2492
2623
  message?: string | undefined;
2493
2624
  }, FetchOptions["throw"] extends true ? true : true>>;
@@ -2496,7 +2627,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2496
2627
  signOut: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
2497
2628
  query?: Record<string, any> | undefined;
2498
2629
  fetchOptions?: FetchOptions | undefined;
2499
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
2630
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
2500
2631
  success: boolean;
2501
2632
  }, {
2502
2633
  code?: string | undefined;
@@ -2520,7 +2651,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2520
2651
  fetchOptions?: FetchOptions | undefined;
2521
2652
  } & {} & {} & {} & {} & {} & {
2522
2653
  lastActiveAt?: Date | null | undefined;
2523
- }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<NonNullable<{
2654
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<(Omit<{
2524
2655
  token: null;
2525
2656
  user: {
2526
2657
  id: string;
@@ -2531,7 +2662,27 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2531
2662
  name: string;
2532
2663
  image?: string | null | undefined | undefined;
2533
2664
  };
2534
- } | {
2665
+ }, "user"> & {
2666
+ user: better_auth.StripEmptyObjects<{
2667
+ id: string;
2668
+ createdAt: Date;
2669
+ updatedAt: Date;
2670
+ email: string;
2671
+ emailVerified: boolean;
2672
+ name: string;
2673
+ image?: string | null | undefined;
2674
+ } & {
2675
+ twoFactorEnabled: boolean | null | undefined;
2676
+ } & {} & {
2677
+ banned: boolean | null | undefined;
2678
+ } & {
2679
+ role?: string | null | undefined;
2680
+ banReason?: string | null | undefined;
2681
+ banExpires?: Date | null | undefined;
2682
+ } & {} & {
2683
+ lastActiveAt?: Date | null | undefined;
2684
+ }>;
2685
+ }) | (Omit<{
2535
2686
  token: string;
2536
2687
  user: {
2537
2688
  id: string;
@@ -2542,7 +2693,27 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2542
2693
  name: string;
2543
2694
  image?: string | null | undefined | undefined;
2544
2695
  };
2545
- }>, {
2696
+ }, "user"> & {
2697
+ user: better_auth.StripEmptyObjects<{
2698
+ id: string;
2699
+ createdAt: Date;
2700
+ updatedAt: Date;
2701
+ email: string;
2702
+ emailVerified: boolean;
2703
+ name: string;
2704
+ image?: string | null | undefined;
2705
+ } & {
2706
+ twoFactorEnabled: boolean | null | undefined;
2707
+ } & {} & {
2708
+ banned: boolean | null | undefined;
2709
+ } & {
2710
+ role?: string | null | undefined;
2711
+ banReason?: string | null | undefined;
2712
+ banExpires?: Date | null | undefined;
2713
+ } & {} & {
2714
+ lastActiveAt?: Date | null | undefined;
2715
+ }>;
2716
+ }), {
2546
2717
  code?: string | undefined;
2547
2718
  message?: string | undefined;
2548
2719
  }, FetchOptions["throw"] extends true ? true : true>>;
@@ -2561,7 +2732,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2561
2732
  rememberMe?: boolean | undefined;
2562
2733
  } & {
2563
2734
  fetchOptions?: FetchOptions | undefined;
2564
- }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
2735
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<Omit<{
2565
2736
  redirect: boolean;
2566
2737
  token: string;
2567
2738
  url?: string | undefined;
@@ -2574,6 +2745,26 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2574
2745
  name: string;
2575
2746
  image?: string | null | undefined | undefined;
2576
2747
  };
2748
+ }, "user"> & {
2749
+ user: better_auth.StripEmptyObjects<{
2750
+ id: string;
2751
+ createdAt: Date;
2752
+ updatedAt: Date;
2753
+ email: string;
2754
+ emailVerified: boolean;
2755
+ name: string;
2756
+ image?: string | null | undefined;
2757
+ } & {
2758
+ twoFactorEnabled: boolean | null | undefined;
2759
+ } & {} & {
2760
+ banned: boolean | null | undefined;
2761
+ } & {
2762
+ role?: string | null | undefined;
2763
+ banReason?: string | null | undefined;
2764
+ banExpires?: Date | null | undefined;
2765
+ } & {} & {
2766
+ lastActiveAt?: Date | null | undefined;
2767
+ }>;
2577
2768
  }, {
2578
2769
  code?: string | undefined;
2579
2770
  message?: string | undefined;
@@ -2590,7 +2781,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2590
2781
  token?: string | undefined;
2591
2782
  } & {
2592
2783
  fetchOptions?: FetchOptions | undefined;
2593
- }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
2784
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
2594
2785
  status: boolean;
2595
2786
  }, {
2596
2787
  code?: string | undefined;
@@ -2606,7 +2797,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2606
2797
  callbackURL?: string | undefined;
2607
2798
  };
2608
2799
  fetchOptions?: FetchOptions | undefined;
2609
- }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<NonNullable<void | {
2800
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<NonNullable<void | {
2610
2801
  status: boolean;
2611
2802
  }>, {
2612
2803
  code?: string | undefined;
@@ -2621,7 +2812,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2621
2812
  callbackURL?: string | undefined;
2622
2813
  } & {
2623
2814
  fetchOptions?: FetchOptions | undefined;
2624
- }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
2815
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
2625
2816
  status: boolean;
2626
2817
  }, {
2627
2818
  code?: string | undefined;
@@ -2636,7 +2827,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2636
2827
  callbackURL?: string | undefined;
2637
2828
  } & {
2638
2829
  fetchOptions?: FetchOptions | undefined;
2639
- }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
2830
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
2640
2831
  status: boolean;
2641
2832
  }, {
2642
2833
  code?: string | undefined;
@@ -2653,7 +2844,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2653
2844
  revokeOtherSessions?: boolean | undefined;
2654
2845
  } & {
2655
2846
  fetchOptions?: FetchOptions | undefined;
2656
- }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
2847
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<Omit<{
2657
2848
  token: string | null;
2658
2849
  user: {
2659
2850
  id: string;
@@ -2663,27 +2854,73 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2663
2854
  emailVerified: boolean;
2664
2855
  name: string;
2665
2856
  image?: string | null | undefined;
2666
- } & Record<string, any>;
2667
- }, {
2668
- code?: string | undefined;
2669
- message?: string | undefined;
2670
- }, FetchOptions["throw"] extends true ? true : true>>;
2671
- } & {
2672
- updateUser: <FetchOptions extends better_auth.ClientFetchOption<Partial<Partial<{}> & {
2673
- name?: string | undefined;
2674
- image?: string | undefined | null;
2675
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
2676
- image?: (string | null) | undefined;
2677
- name?: string | undefined;
2678
- fetchOptions?: FetchOptions | undefined;
2679
- } & Partial<{} & {} & {} & {} & {} & {
2680
- lastActiveAt?: Date | null | undefined;
2681
- }>> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
2682
- status: boolean;
2683
- }, {
2684
- code?: string | undefined;
2685
- message?: string | undefined;
2686
- }, FetchOptions["throw"] extends true ? true : true>>;
2857
+ } & Record<string, any> & {
2858
+ id: string;
2859
+ createdAt: Date;
2860
+ updatedAt: Date;
2861
+ email: string;
2862
+ emailVerified: boolean;
2863
+ name: string;
2864
+ image?: string | null | undefined;
2865
+ };
2866
+ }, "user"> & {
2867
+ user: better_auth.StripEmptyObjects<{
2868
+ id: string;
2869
+ createdAt: Date;
2870
+ updatedAt: Date;
2871
+ email: string;
2872
+ emailVerified: boolean;
2873
+ name: string;
2874
+ image?: string | null | undefined;
2875
+ } & {
2876
+ twoFactorEnabled: boolean | null | undefined;
2877
+ } & {} & {
2878
+ banned: boolean | null | undefined;
2879
+ } & {
2880
+ role?: string | null | undefined;
2881
+ banReason?: string | null | undefined;
2882
+ banExpires?: Date | null | undefined;
2883
+ } & {} & {
2884
+ lastActiveAt?: Date | null | undefined;
2885
+ }>;
2886
+ }, {
2887
+ code?: string | undefined;
2888
+ message?: string | undefined;
2889
+ }, FetchOptions["throw"] extends true ? true : true>>;
2890
+ } & {
2891
+ updateSession: <FetchOptions extends better_auth.ClientFetchOption<Partial<Partial<{}>> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<Partial<{}> & {
2892
+ fetchOptions?: FetchOptions | undefined;
2893
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
2894
+ session: {
2895
+ id: string;
2896
+ createdAt: Date;
2897
+ updatedAt: Date;
2898
+ userId: string;
2899
+ expiresAt: Date;
2900
+ token: string;
2901
+ ipAddress?: string | null | undefined;
2902
+ userAgent?: string | null | undefined;
2903
+ };
2904
+ }, {
2905
+ code?: string | undefined;
2906
+ message?: string | undefined;
2907
+ }, FetchOptions["throw"] extends true ? true : true>>;
2908
+ } & {
2909
+ updateUser: <FetchOptions extends better_auth.ClientFetchOption<Partial<Partial<{}> & {
2910
+ name?: string | undefined;
2911
+ image?: string | undefined | null;
2912
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
2913
+ image?: (string | null) | undefined;
2914
+ name?: string | undefined;
2915
+ fetchOptions?: FetchOptions | undefined;
2916
+ } & Partial<{} & {} & {} & {} & {} & {
2917
+ lastActiveAt?: Date | null | undefined;
2918
+ }>> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
2919
+ status: boolean;
2920
+ }, {
2921
+ code?: string | undefined;
2922
+ message?: string | undefined;
2923
+ }, FetchOptions["throw"] extends true ? true : true>>;
2687
2924
  } & {
2688
2925
  deleteUser: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
2689
2926
  callbackURL?: string | undefined;
@@ -2695,7 +2932,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2695
2932
  token?: string | undefined;
2696
2933
  } & {
2697
2934
  fetchOptions?: FetchOptions | undefined;
2698
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
2935
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
2699
2936
  success: boolean;
2700
2937
  message: string;
2701
2938
  }, {
@@ -2711,7 +2948,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2711
2948
  redirectTo?: string | undefined;
2712
2949
  } & {
2713
2950
  fetchOptions?: FetchOptions | undefined;
2714
- }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
2951
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
2715
2952
  status: boolean;
2716
2953
  message: string;
2717
2954
  }, {
@@ -2729,7 +2966,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2729
2966
  callbackURL: string;
2730
2967
  };
2731
2968
  fetchOptions?: FetchOptions | undefined;
2732
- }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<never, {
2969
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<never, {
2733
2970
  code?: string | undefined;
2734
2971
  message?: string | undefined;
2735
2972
  }, FetchOptions["throw"] extends true ? true : true>>;
@@ -2738,7 +2975,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2738
2975
  listSessions: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
2739
2976
  query?: Record<string, any> | undefined;
2740
2977
  fetchOptions?: FetchOptions | undefined;
2741
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<better_auth.Prettify<{
2978
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<better_auth.Prettify<{
2742
2979
  id: string;
2743
2980
  createdAt: Date;
2744
2981
  updatedAt: Date;
@@ -2758,7 +2995,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2758
2995
  token: string;
2759
2996
  } & {
2760
2997
  fetchOptions?: FetchOptions | undefined;
2761
- }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
2998
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
2762
2999
  status: boolean;
2763
3000
  }, {
2764
3001
  code?: string | undefined;
@@ -2768,7 +3005,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2768
3005
  revokeSessions: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
2769
3006
  query?: Record<string, any> | undefined;
2770
3007
  fetchOptions?: FetchOptions | undefined;
2771
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
3008
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
2772
3009
  status: boolean;
2773
3010
  }, {
2774
3011
  code?: string | undefined;
@@ -2778,7 +3015,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2778
3015
  revokeOtherSessions: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
2779
3016
  query?: Record<string, any> | undefined;
2780
3017
  fetchOptions?: FetchOptions | undefined;
2781
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
3018
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
2782
3019
  status: boolean;
2783
3020
  }, {
2784
3021
  code?: string | undefined;
@@ -2817,7 +3054,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2817
3054
  additionalData?: Record<string, any> | undefined;
2818
3055
  } & {
2819
3056
  fetchOptions?: FetchOptions | undefined;
2820
- }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
3057
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
2821
3058
  url: string;
2822
3059
  redirect: boolean;
2823
3060
  }, {
@@ -2828,7 +3065,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2828
3065
  listAccounts: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
2829
3066
  query?: Record<string, any> | undefined;
2830
3067
  fetchOptions?: FetchOptions | undefined;
2831
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
3068
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
2832
3069
  scopes: string[];
2833
3070
  id: string;
2834
3071
  createdAt: Date;
@@ -2851,7 +3088,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2851
3088
  callbackURL?: string | undefined;
2852
3089
  };
2853
3090
  fetchOptions?: FetchOptions | undefined;
2854
- }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
3091
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
2855
3092
  success: boolean;
2856
3093
  message: string;
2857
3094
  }, {
@@ -2868,7 +3105,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2868
3105
  accountId?: string | undefined;
2869
3106
  } & {
2870
3107
  fetchOptions?: FetchOptions | undefined;
2871
- }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
3108
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
2872
3109
  status: boolean;
2873
3110
  }, {
2874
3111
  code?: string | undefined;
@@ -2885,11 +3122,11 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2885
3122
  userId?: string | undefined;
2886
3123
  } & {
2887
3124
  fetchOptions?: FetchOptions | undefined;
2888
- }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
3125
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
2889
3126
  accessToken: string | undefined;
2890
- refreshToken: string | undefined;
3127
+ refreshToken: string;
2891
3128
  accessTokenExpiresAt: Date | undefined;
2892
- refreshTokenExpiresAt: Date | undefined;
3129
+ refreshTokenExpiresAt: Date | null | undefined;
2893
3130
  scope: string | null | undefined;
2894
3131
  idToken: string | null | undefined;
2895
3132
  providerId: string;
@@ -2909,7 +3146,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2909
3146
  userId?: string | undefined;
2910
3147
  } & {
2911
3148
  fetchOptions?: FetchOptions | undefined;
2912
- }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
3149
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
2913
3150
  accessToken: string;
2914
3151
  accessTokenExpiresAt: Date | undefined;
2915
3152
  scopes: string[];
@@ -2926,7 +3163,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2926
3163
  accountId?: string | undefined;
2927
3164
  } | undefined;
2928
3165
  fetchOptions?: FetchOptions | undefined;
2929
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
3166
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
2930
3167
  user: better_auth.OAuth2UserInfo;
2931
3168
  data: Record<string, any>;
2932
3169
  }, {
@@ -2943,8 +3180,8 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2943
3180
  disableRefresh?: unknown;
2944
3181
  } | undefined;
2945
3182
  fetchOptions?: FetchOptions | undefined;
2946
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
2947
- user: {
3183
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_client.BetterFetchResponse<{
3184
+ user: better_auth.StripEmptyObjects<{
2948
3185
  id: string;
2949
3186
  createdAt: Date;
2950
3187
  updatedAt: Date;
@@ -2952,14 +3189,18 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2952
3189
  emailVerified: boolean;
2953
3190
  name: string;
2954
3191
  image?: string | null | undefined;
3192
+ } & {
2955
3193
  twoFactorEnabled: boolean | null | undefined;
3194
+ } & {} & {
2956
3195
  banned: boolean | null | undefined;
3196
+ } & {
2957
3197
  role?: string | null | undefined;
2958
3198
  banReason?: string | null | undefined;
2959
3199
  banExpires?: Date | null | undefined;
3200
+ } & {} & {
2960
3201
  lastActiveAt?: Date | null | undefined;
2961
- };
2962
- session: {
3202
+ }>;
3203
+ session: better_auth.StripEmptyObjects<{
2963
3204
  id: string;
2964
3205
  createdAt: Date;
2965
3206
  updatedAt: Date;
@@ -2968,10 +3209,12 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2968
3209
  token: string;
2969
3210
  ipAddress?: string | null | undefined;
2970
3211
  userAgent?: string | null | undefined;
3212
+ } & {} & {
2971
3213
  activeOrganizationId?: string | null | undefined;
2972
3214
  activeTeamId?: string | null | undefined;
3215
+ } & {} & {
2973
3216
  impersonatedBy?: string | null | undefined;
2974
- };
3217
+ } & {} & {}>;
2975
3218
  } | null, {
2976
3219
  code?: string | undefined;
2977
3220
  message?: string | undefined;
@@ -3147,17 +3390,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
3147
3390
  };
3148
3391
  };
3149
3392
  organization: {
3150
- checkRolePermission: <R extends "org:admin" | "org:member" | "org:reviewer">(data: ({
3151
- permission: {
3152
- access?: string[] | undefined;
3153
- organization?: ("update" | "delete")[] | undefined;
3154
- member?: ("update" | "delete" | "create")[] | undefined;
3155
- invitation?: ("create" | "cancel")[] | undefined;
3156
- team?: ("update" | "delete" | "create")[] | undefined;
3157
- ac?: ("update" | "delete" | "create" | "read")[] | undefined;
3158
- };
3159
- permissions?: never | undefined;
3160
- } | {
3393
+ checkRolePermission: <R extends "org:admin" | "org:member" | "org:reviewer">(data: {
3161
3394
  permissions: {
3162
3395
  access?: string[] | undefined;
3163
3396
  organization?: ("update" | "delete")[] | undefined;
@@ -3166,8 +3399,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
3166
3399
  team?: ("update" | "delete" | "create")[] | undefined;
3167
3400
  ac?: ("update" | "delete" | "create" | "read")[] | undefined;
3168
3401
  };
3169
- permission?: never | undefined;
3170
- }) & {
3402
+ } & {
3171
3403
  role: R;
3172
3404
  }) => boolean;
3173
3405
  };
@@ -3180,31 +3412,24 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
3180
3412
  statusText: string;
3181
3413
  };
3182
3414
  } | {
3183
- data: better_auth.JSONWebKeySet;
3415
+ data: jose.JSONWebKeySet;
3184
3416
  error: null;
3185
3417
  }>;
3186
3418
  } & {
3187
3419
  admin: {
3188
- checkRolePermission: <R extends "admin" | "user">(data: ({
3189
- permission: {
3190
- readonly user?: ("update" | "delete" | "create" | "list" | "set-role" | "ban" | "impersonate" | "set-password" | "get")[] | undefined;
3191
- readonly session?: ("delete" | "list" | "revoke")[] | undefined;
3192
- };
3193
- permissions?: never | undefined;
3194
- } | {
3420
+ checkRolePermission: <R extends "admin" | "user">(data: {
3195
3421
  permissions: {
3196
- readonly user?: ("update" | "delete" | "create" | "list" | "set-role" | "ban" | "impersonate" | "set-password" | "get")[] | undefined;
3422
+ readonly user?: ("update" | "delete" | "create" | "list" | "set-role" | "ban" | "impersonate" | "impersonate-admins" | "set-password" | "get")[] | undefined;
3197
3423
  readonly session?: ("delete" | "list" | "revoke")[] | undefined;
3198
3424
  };
3199
- permission?: never | undefined;
3200
- }) & {
3425
+ } & {
3201
3426
  role: R;
3202
3427
  }) => boolean;
3203
3428
  };
3204
3429
  } & {
3205
- useSession: nanostores.Atom<{
3430
+ useSession: better_auth_client.Atom<{
3206
3431
  data: {
3207
- user: {
3432
+ user: better_auth.StripEmptyObjects<{
3208
3433
  id: string;
3209
3434
  createdAt: Date;
3210
3435
  updatedAt: Date;
@@ -3212,14 +3437,18 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
3212
3437
  emailVerified: boolean;
3213
3438
  name: string;
3214
3439
  image?: string | null | undefined;
3440
+ } & {
3215
3441
  twoFactorEnabled: boolean | null | undefined;
3442
+ } & {} & {
3216
3443
  banned: boolean | null | undefined;
3444
+ } & {
3217
3445
  role?: string | null | undefined;
3218
3446
  banReason?: string | null | undefined;
3219
3447
  banExpires?: Date | null | undefined;
3448
+ } & {} & {
3220
3449
  lastActiveAt?: Date | null | undefined;
3221
- };
3222
- session: {
3450
+ }>;
3451
+ session: better_auth.StripEmptyObjects<{
3223
3452
  id: string;
3224
3453
  createdAt: Date;
3225
3454
  updatedAt: Date;
@@ -3228,58 +3457,60 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
3228
3457
  token: string;
3229
3458
  ipAddress?: string | null | undefined;
3230
3459
  userAgent?: string | null | undefined;
3460
+ } & {} & {
3231
3461
  activeOrganizationId?: string | null | undefined;
3232
3462
  activeTeamId?: string | null | undefined;
3463
+ } & {} & {
3233
3464
  impersonatedBy?: string | null | undefined;
3234
- };
3465
+ } & {} & {}>;
3235
3466
  };
3236
- error: _better_fetch_fetch.BetterFetchError | null;
3467
+ error: better_auth_client.BetterFetchError | null;
3237
3468
  isPending: boolean;
3238
3469
  isRefetching: boolean;
3239
3470
  refetch: (queryParams?: {
3240
3471
  query?: better_auth.SessionQueryParams;
3241
3472
  } | undefined) => Promise<void>;
3242
3473
  }>;
3243
- $fetch: _better_fetch_fetch.BetterFetch<{
3244
- plugins: (_better_fetch_fetch.BetterFetchPlugin<Record<string, any>> | {
3474
+ $fetch: better_auth_client.BetterFetch<{
3475
+ plugins: (better_auth_client.BetterFetchPlugin<Record<string, any>> | {
3245
3476
  id: string;
3246
3477
  name: string;
3247
3478
  hooks: {
3248
- onSuccess(context: _better_fetch_fetch.SuccessContext<any>): void;
3479
+ onSuccess(context: better_auth_client.SuccessContext<any>): void;
3249
3480
  };
3250
3481
  } | {
3251
3482
  id: string;
3252
3483
  name: string;
3253
3484
  hooks: {
3254
- onSuccess: ((context: _better_fetch_fetch.SuccessContext<any>) => Promise<void> | void) | undefined;
3255
- onError: ((context: _better_fetch_fetch.ErrorContext) => Promise<void> | void) | undefined;
3256
- onRequest: (<T extends Record<string, any>>(context: _better_fetch_fetch.RequestContext<T>) => Promise<_better_fetch_fetch.RequestContext | void> | _better_fetch_fetch.RequestContext | void) | undefined;
3257
- onResponse: ((context: _better_fetch_fetch.ResponseContext) => Promise<Response | void | _better_fetch_fetch.ResponseContext> | Response | _better_fetch_fetch.ResponseContext | void) | undefined;
3485
+ onSuccess: ((context: better_auth_client.SuccessContext<any>) => Promise<void> | void) | undefined;
3486
+ onError: ((context: better_auth_client.ErrorContext) => Promise<void> | void) | undefined;
3487
+ onRequest: (<T extends Record<string, any>>(context: better_auth_client.RequestContext<T>) => Promise<better_auth_client.RequestContext | void> | better_auth_client.RequestContext | void) | undefined;
3488
+ onResponse: ((context: better_auth_client.ResponseContext) => Promise<Response | void | better_auth_client.ResponseContext> | Response | better_auth_client.ResponseContext | void) | undefined;
3258
3489
  };
3259
3490
  })[];
3260
3491
  cache?: RequestCache | undefined;
3261
- method: string;
3262
- window?: null | undefined;
3492
+ priority?: RequestPriority | undefined;
3493
+ credentials?: RequestCredentials;
3263
3494
  headers?: (HeadersInit & (HeadersInit | {
3264
3495
  accept: "application/json" | "text/plain" | "application/octet-stream";
3265
3496
  "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
3266
3497
  authorization: "Bearer" | "Basic";
3267
3498
  })) | undefined;
3268
- redirect?: RequestRedirect | undefined;
3269
- credentials?: RequestCredentials;
3270
3499
  integrity?: string | undefined;
3271
3500
  keepalive?: boolean | undefined;
3501
+ method: string;
3272
3502
  mode?: RequestMode | undefined;
3273
- priority?: RequestPriority | undefined;
3503
+ redirect?: RequestRedirect | undefined;
3274
3504
  referrer?: string | undefined;
3275
3505
  referrerPolicy?: ReferrerPolicy | undefined;
3276
3506
  signal?: (AbortSignal | null) | undefined;
3277
- onRetry?: ((response: _better_fetch_fetch.ResponseContext) => Promise<void> | void) | undefined;
3507
+ window?: null | undefined;
3508
+ onRetry?: ((response: better_auth_client.ResponseContext) => Promise<void> | void) | undefined;
3278
3509
  hookOptions?: {
3279
3510
  cloneResponse?: boolean;
3280
3511
  } | undefined;
3281
3512
  timeout?: number | undefined;
3282
- customFetchImpl: _better_fetch_fetch.FetchEsque;
3513
+ customFetchImpl: better_auth_client.FetchEsque;
3283
3514
  baseURL: string;
3284
3515
  throw?: boolean | undefined;
3285
3516
  auth?: ({
@@ -3299,21 +3530,21 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
3299
3530
  params?: any;
3300
3531
  duplex?: "full" | "half" | undefined;
3301
3532
  jsonParser: (text: string) => Promise<any> | any;
3302
- retry?: _better_fetch_fetch.RetryOptions | undefined;
3533
+ retry?: better_auth_client.RetryOptions | undefined;
3303
3534
  retryAttempt?: number | undefined;
3304
- output?: (_better_fetch_fetch.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
3305
- errorSchema?: _better_fetch_fetch.StandardSchemaV1 | undefined;
3535
+ output?: (better_auth_client.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
3536
+ errorSchema?: better_auth_client.StandardSchemaV1 | undefined;
3306
3537
  disableValidation?: boolean | undefined;
3307
3538
  disableSignal?: boolean | undefined;
3308
3539
  }, unknown, unknown, {}>;
3309
3540
  $store: {
3310
3541
  notify: (signal?: (Omit<string, "$sessionSignal"> | "$sessionSignal") | undefined) => void;
3311
3542
  listen: (signal: Omit<string, "$sessionSignal"> | "$sessionSignal", listener: (value: boolean, oldValue?: boolean | undefined) => void) => void;
3312
- atoms: Record<string, nanostores.WritableAtom<any>>;
3543
+ atoms: Record<string, better_auth_client.WritableAtom<any>>;
3313
3544
  };
3314
3545
  $Infer: {
3315
3546
  Session: {
3316
- user: {
3547
+ user: better_auth.StripEmptyObjects<{
3317
3548
  id: string;
3318
3549
  createdAt: Date;
3319
3550
  updatedAt: Date;
@@ -3321,14 +3552,18 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
3321
3552
  emailVerified: boolean;
3322
3553
  name: string;
3323
3554
  image?: string | null | undefined;
3555
+ } & {
3324
3556
  twoFactorEnabled: boolean | null | undefined;
3557
+ } & {} & {
3325
3558
  banned: boolean | null | undefined;
3559
+ } & {
3326
3560
  role?: string | null | undefined;
3327
3561
  banReason?: string | null | undefined;
3328
3562
  banExpires?: Date | null | undefined;
3563
+ } & {} & {
3329
3564
  lastActiveAt?: Date | null | undefined;
3330
- };
3331
- session: {
3565
+ }>;
3566
+ session: better_auth.StripEmptyObjects<{
3332
3567
  id: string;
3333
3568
  createdAt: Date;
3334
3569
  updatedAt: Date;
@@ -3337,164 +3572,667 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
3337
3572
  token: string;
3338
3573
  ipAddress?: string | null | undefined;
3339
3574
  userAgent?: string | null | undefined;
3575
+ } & {} & {
3340
3576
  activeOrganizationId?: string | null | undefined;
3341
3577
  activeTeamId?: string | null | undefined;
3578
+ } & {} & {
3342
3579
  impersonatedBy?: string | null | undefined;
3343
- };
3580
+ } & {} & {}>;
3344
3581
  };
3345
3582
  };
3346
3583
  $ERROR_CODES: {
3347
- readonly YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_ORGANIZATION: "You are not allowed to create a new organization";
3348
- readonly YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_ORGANIZATIONS: "You have reached the maximum number of organizations";
3349
- readonly ORGANIZATION_ALREADY_EXISTS: "Organization already exists";
3350
- readonly ORGANIZATION_SLUG_ALREADY_TAKEN: "Organization slug already taken";
3351
- readonly ORGANIZATION_NOT_FOUND: "Organization not found";
3352
- readonly USER_IS_NOT_A_MEMBER_OF_THE_ORGANIZATION: "User is not a member of the organization";
3353
- readonly YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_ORGANIZATION: "You are not allowed to update this organization";
3354
- readonly YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_ORGANIZATION: "You are not allowed to delete this organization";
3355
- readonly NO_ACTIVE_ORGANIZATION: "No active organization";
3356
- readonly USER_IS_ALREADY_A_MEMBER_OF_THIS_ORGANIZATION: "User is already a member of this organization";
3357
- readonly MEMBER_NOT_FOUND: "Member not found";
3358
- readonly ROLE_NOT_FOUND: "Role not found";
3359
- readonly YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM: "You are not allowed to create a new team";
3360
- readonly TEAM_ALREADY_EXISTS: "Team already exists";
3361
- readonly TEAM_NOT_FOUND: "Team not found";
3362
- readonly YOU_CANNOT_LEAVE_THE_ORGANIZATION_AS_THE_ONLY_OWNER: "You cannot leave the organization as the only owner";
3363
- readonly YOU_CANNOT_LEAVE_THE_ORGANIZATION_WITHOUT_AN_OWNER: "You cannot leave the organization without an owner";
3364
- readonly YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_MEMBER: "You are not allowed to delete this member";
3365
- readonly YOU_ARE_NOT_ALLOWED_TO_INVITE_USERS_TO_THIS_ORGANIZATION: "You are not allowed to invite users to this organization";
3366
- readonly USER_IS_ALREADY_INVITED_TO_THIS_ORGANIZATION: "User is already invited to this organization";
3367
- readonly INVITATION_NOT_FOUND: "Invitation not found";
3368
- readonly YOU_ARE_NOT_THE_RECIPIENT_OF_THE_INVITATION: "You are not the recipient of the invitation";
3369
- readonly EMAIL_VERIFICATION_REQUIRED_BEFORE_ACCEPTING_OR_REJECTING_INVITATION: "Email verification required before accepting or rejecting invitation";
3370
- readonly YOU_ARE_NOT_ALLOWED_TO_CANCEL_THIS_INVITATION: "You are not allowed to cancel this invitation";
3371
- readonly INVITER_IS_NO_LONGER_A_MEMBER_OF_THE_ORGANIZATION: "Inviter is no longer a member of the organization";
3372
- readonly YOU_ARE_NOT_ALLOWED_TO_INVITE_USER_WITH_THIS_ROLE: "You are not allowed to invite a user with this role";
3373
- readonly FAILED_TO_RETRIEVE_INVITATION: "Failed to retrieve invitation";
3374
- readonly YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_TEAMS: "You have reached the maximum number of teams";
3375
- readonly UNABLE_TO_REMOVE_LAST_TEAM: "Unable to remove last team";
3376
- readonly YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_MEMBER: "You are not allowed to update this member";
3377
- readonly ORGANIZATION_MEMBERSHIP_LIMIT_REACHED: "Organization membership limit reached";
3378
- readonly YOU_ARE_NOT_ALLOWED_TO_CREATE_TEAMS_IN_THIS_ORGANIZATION: "You are not allowed to create teams in this organization";
3379
- readonly YOU_ARE_NOT_ALLOWED_TO_DELETE_TEAMS_IN_THIS_ORGANIZATION: "You are not allowed to delete teams in this organization";
3380
- readonly YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_TEAM: "You are not allowed to update this team";
3381
- readonly YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_TEAM: "You are not allowed to delete this team";
3382
- readonly INVITATION_LIMIT_REACHED: "Invitation limit reached";
3383
- readonly TEAM_MEMBER_LIMIT_REACHED: "Team member limit reached";
3384
- readonly USER_IS_NOT_A_MEMBER_OF_THE_TEAM: "User is not a member of the team";
3385
- readonly YOU_CAN_NOT_ACCESS_THE_MEMBERS_OF_THIS_TEAM: "You are not allowed to list the members of this team";
3386
- readonly YOU_DO_NOT_HAVE_AN_ACTIVE_TEAM: "You do not have an active team";
3387
- readonly YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM_MEMBER: "You are not allowed to create a new member";
3388
- readonly YOU_ARE_NOT_ALLOWED_TO_REMOVE_A_TEAM_MEMBER: "You are not allowed to remove a team member";
3389
- readonly YOU_ARE_NOT_ALLOWED_TO_ACCESS_THIS_ORGANIZATION: "You are not allowed to access this organization as an owner";
3390
- readonly YOU_ARE_NOT_A_MEMBER_OF_THIS_ORGANIZATION: "You are not a member of this organization";
3391
- readonly MISSING_AC_INSTANCE: "Dynamic Access Control requires a pre-defined ac instance on the server auth plugin. Read server logs for more information";
3392
- readonly YOU_MUST_BE_IN_AN_ORGANIZATION_TO_CREATE_A_ROLE: "You must be in an organization to create a role";
3393
- readonly YOU_ARE_NOT_ALLOWED_TO_CREATE_A_ROLE: "You are not allowed to create a role";
3394
- readonly YOU_ARE_NOT_ALLOWED_TO_UPDATE_A_ROLE: "You are not allowed to update a role";
3395
- readonly YOU_ARE_NOT_ALLOWED_TO_DELETE_A_ROLE: "You are not allowed to delete a role";
3396
- readonly YOU_ARE_NOT_ALLOWED_TO_READ_A_ROLE: "You are not allowed to read a role";
3397
- readonly YOU_ARE_NOT_ALLOWED_TO_LIST_A_ROLE: "You are not allowed to list a role";
3398
- readonly YOU_ARE_NOT_ALLOWED_TO_GET_A_ROLE: "You are not allowed to get a role";
3399
- readonly TOO_MANY_ROLES: "This organization has too many roles";
3400
- readonly INVALID_RESOURCE: "The provided permission includes an invalid resource";
3401
- readonly ROLE_NAME_IS_ALREADY_TAKEN: "That role name is already taken";
3402
- readonly CANNOT_DELETE_A_PRE_DEFINED_ROLE: "Cannot delete a pre-defined role";
3403
- readonly FAILED_TO_CREATE_USER: "Failed to create user";
3404
- readonly USER_ALREADY_EXISTS: "User already exists.";
3405
- readonly USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL: "User already exists. Use another email.";
3406
- readonly YOU_CANNOT_BAN_YOURSELF: "You cannot ban yourself";
3407
- readonly YOU_ARE_NOT_ALLOWED_TO_CHANGE_USERS_ROLE: "You are not allowed to change users role";
3408
- readonly YOU_ARE_NOT_ALLOWED_TO_CREATE_USERS: "You are not allowed to create users";
3409
- readonly YOU_ARE_NOT_ALLOWED_TO_LIST_USERS: "You are not allowed to list users";
3410
- readonly YOU_ARE_NOT_ALLOWED_TO_LIST_USERS_SESSIONS: "You are not allowed to list users sessions";
3411
- readonly YOU_ARE_NOT_ALLOWED_TO_BAN_USERS: "You are not allowed to ban users";
3412
- readonly YOU_ARE_NOT_ALLOWED_TO_IMPERSONATE_USERS: "You are not allowed to impersonate users";
3413
- readonly YOU_ARE_NOT_ALLOWED_TO_REVOKE_USERS_SESSIONS: "You are not allowed to revoke users sessions";
3414
- readonly YOU_ARE_NOT_ALLOWED_TO_DELETE_USERS: "You are not allowed to delete users";
3415
- readonly YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PASSWORD: "You are not allowed to set users password";
3416
- readonly BANNED_USER: "You have been banned from this application";
3417
- readonly YOU_ARE_NOT_ALLOWED_TO_GET_USER: "You are not allowed to get user";
3418
- readonly NO_DATA_TO_UPDATE: "No data to update";
3419
- readonly YOU_ARE_NOT_ALLOWED_TO_UPDATE_USERS: "You are not allowed to update users";
3420
- readonly YOU_CANNOT_REMOVE_YOURSELF: "You cannot remove yourself";
3421
- readonly YOU_ARE_NOT_ALLOWED_TO_SET_NON_EXISTENT_VALUE: "You are not allowed to set a non-existent role value";
3422
- readonly YOU_CANNOT_IMPERSONATE_ADMINS: "You cannot impersonate admins";
3423
- readonly INVALID_ROLE_TYPE: "Invalid role type";
3424
- readonly OTP_NOT_ENABLED: "OTP not enabled";
3425
- readonly OTP_HAS_EXPIRED: "OTP has expired";
3426
- readonly TOTP_NOT_ENABLED: "TOTP not enabled";
3427
- readonly TWO_FACTOR_NOT_ENABLED: "Two factor isn't enabled";
3428
- readonly BACKUP_CODES_NOT_ENABLED: "Backup codes aren't enabled";
3429
- readonly INVALID_BACKUP_CODE: "Invalid backup code";
3430
- readonly INVALID_CODE: "Invalid code";
3431
- readonly TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE: "Too many attempts. Please request a new code.";
3432
- readonly INVALID_TWO_FACTOR_COOKIE: "Invalid two factor cookie";
3433
- readonly INVALID_METADATA_TYPE: "metadata must be an object or undefined";
3434
- readonly REFILL_AMOUNT_AND_INTERVAL_REQUIRED: "refillAmount is required when refillInterval is provided";
3435
- readonly REFILL_INTERVAL_AND_AMOUNT_REQUIRED: "refillInterval is required when refillAmount is provided";
3436
- readonly USER_BANNED: "User is banned";
3437
- readonly UNAUTHORIZED_SESSION: "Unauthorized or invalid session";
3438
- readonly KEY_NOT_FOUND: "API Key not found";
3439
- readonly KEY_DISABLED: "API Key is disabled";
3440
- readonly KEY_EXPIRED: "API Key has expired";
3441
- readonly USAGE_EXCEEDED: "API Key has reached its usage limit";
3442
- readonly KEY_NOT_RECOVERABLE: "API Key is not recoverable";
3443
- readonly EXPIRES_IN_IS_TOO_SMALL: "The expiresIn is smaller than the predefined minimum value.";
3444
- readonly EXPIRES_IN_IS_TOO_LARGE: "The expiresIn is larger than the predefined maximum value.";
3445
- readonly INVALID_REMAINING: "The remaining count is either too large or too small.";
3446
- readonly INVALID_PREFIX_LENGTH: "The prefix length is either too large or too small.";
3447
- readonly INVALID_NAME_LENGTH: "The name length is either too large or too small.";
3448
- readonly METADATA_DISABLED: "Metadata is disabled.";
3449
- readonly RATE_LIMIT_EXCEEDED: "Rate limit exceeded.";
3450
- readonly NO_VALUES_TO_UPDATE: "No values to update.";
3451
- readonly KEY_DISABLED_EXPIRATION: "Custom key expiration values are disabled.";
3452
- readonly INVALID_API_KEY: "Invalid API key.";
3453
- readonly INVALID_USER_ID_FROM_API_KEY: "The user id from the API key is invalid.";
3454
- readonly INVALID_API_KEY_GETTER_RETURN_TYPE: "API Key getter returned an invalid key type. Expected string.";
3455
- readonly SERVER_ONLY_PROPERTY: "The property you're trying to set can only be set from the server auth instance only.";
3456
- readonly FAILED_TO_UPDATE_API_KEY: "Failed to update API key";
3457
- readonly NAME_REQUIRED: "API Key name is required.";
3458
- readonly USER_NOT_FOUND: "User not found";
3459
- readonly FAILED_TO_CREATE_SESSION: "Failed to create session";
3460
- readonly FAILED_TO_UPDATE_USER: "Failed to update user";
3461
- readonly FAILED_TO_GET_SESSION: "Failed to get session";
3462
- readonly INVALID_PASSWORD: "Invalid password";
3463
- readonly INVALID_EMAIL: "Invalid email";
3464
- readonly INVALID_EMAIL_OR_PASSWORD: "Invalid email or password";
3465
- readonly SOCIAL_ACCOUNT_ALREADY_LINKED: "Social account already linked";
3466
- readonly PROVIDER_NOT_FOUND: "Provider not found";
3467
- readonly INVALID_TOKEN: "Invalid token";
3468
- readonly ID_TOKEN_NOT_SUPPORTED: "id_token not supported";
3469
- readonly FAILED_TO_GET_USER_INFO: "Failed to get user info";
3470
- readonly USER_EMAIL_NOT_FOUND: "User email not found";
3471
- readonly EMAIL_NOT_VERIFIED: "Email not verified";
3472
- readonly PASSWORD_TOO_SHORT: "Password too short";
3473
- readonly PASSWORD_TOO_LONG: "Password too long";
3474
- readonly EMAIL_CAN_NOT_BE_UPDATED: "Email can not be updated";
3475
- readonly CREDENTIAL_ACCOUNT_NOT_FOUND: "Credential account not found";
3476
- readonly SESSION_EXPIRED: "Session expired. Re-authenticate to perform this action.";
3477
- readonly FAILED_TO_UNLINK_LAST_ACCOUNT: "You can't unlink your last account";
3478
- readonly ACCOUNT_NOT_FOUND: "Account not found";
3479
- readonly USER_ALREADY_HAS_PASSWORD: "User already has a password. Provide that to delete the account.";
3480
- readonly CROSS_SITE_NAVIGATION_LOGIN_BLOCKED: "Cross-site navigation login blocked. This request appears to be a CSRF attack.";
3481
- readonly VERIFICATION_EMAIL_NOT_ENABLED: "Verification email isn't enabled";
3482
- readonly EMAIL_ALREADY_VERIFIED: "Email is already verified";
3483
- readonly EMAIL_MISMATCH: "Email mismatch";
3484
- readonly SESSION_NOT_FRESH: "Session is not fresh";
3485
- readonly LINKED_ACCOUNT_ALREADY_EXISTS: "Linked account already exists";
3486
- readonly INVALID_ORIGIN: "Invalid origin";
3487
- readonly INVALID_CALLBACK_URL: "Invalid callbackURL";
3488
- readonly INVALID_REDIRECT_URL: "Invalid redirectURL";
3489
- readonly INVALID_ERROR_CALLBACK_URL: "Invalid errorCallbackURL";
3490
- readonly INVALID_NEW_USER_CALLBACK_URL: "Invalid newUserCallbackURL";
3491
- readonly MISSING_OR_NULL_ORIGIN: "Missing or null Origin";
3492
- readonly CALLBACK_URL_REQUIRED: "callbackURL is required";
3493
- readonly FAILED_TO_CREATE_VERIFICATION: "Unable to create verification";
3494
- readonly FIELD_NOT_ALLOWED: "Field not allowed to be set";
3495
- readonly ASYNC_VALIDATION_NOT_SUPPORTED: "Async validation is not supported";
3496
- readonly VALIDATION_ERROR: "Validation Error";
3497
- readonly MISSING_FIELD: "Field is required";
3584
+ YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_ORGANIZATION: {
3585
+ readonly code: "YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_ORGANIZATION";
3586
+ message: string;
3587
+ };
3588
+ YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_ORGANIZATIONS: {
3589
+ readonly code: "YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_ORGANIZATIONS";
3590
+ message: string;
3591
+ };
3592
+ ORGANIZATION_ALREADY_EXISTS: {
3593
+ readonly code: "ORGANIZATION_ALREADY_EXISTS";
3594
+ message: string;
3595
+ };
3596
+ ORGANIZATION_SLUG_ALREADY_TAKEN: {
3597
+ readonly code: "ORGANIZATION_SLUG_ALREADY_TAKEN";
3598
+ message: string;
3599
+ };
3600
+ ORGANIZATION_NOT_FOUND: {
3601
+ readonly code: "ORGANIZATION_NOT_FOUND";
3602
+ message: string;
3603
+ };
3604
+ USER_IS_NOT_A_MEMBER_OF_THE_ORGANIZATION: {
3605
+ readonly code: "USER_IS_NOT_A_MEMBER_OF_THE_ORGANIZATION";
3606
+ message: string;
3607
+ };
3608
+ YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_ORGANIZATION: {
3609
+ readonly code: "YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_ORGANIZATION";
3610
+ message: string;
3611
+ };
3612
+ YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_ORGANIZATION: {
3613
+ readonly code: "YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_ORGANIZATION";
3614
+ message: string;
3615
+ };
3616
+ NO_ACTIVE_ORGANIZATION: {
3617
+ readonly code: "NO_ACTIVE_ORGANIZATION";
3618
+ message: string;
3619
+ };
3620
+ USER_IS_ALREADY_A_MEMBER_OF_THIS_ORGANIZATION: {
3621
+ readonly code: "USER_IS_ALREADY_A_MEMBER_OF_THIS_ORGANIZATION";
3622
+ message: string;
3623
+ };
3624
+ MEMBER_NOT_FOUND: {
3625
+ readonly code: "MEMBER_NOT_FOUND";
3626
+ message: string;
3627
+ };
3628
+ ROLE_NOT_FOUND: {
3629
+ readonly code: "ROLE_NOT_FOUND";
3630
+ message: string;
3631
+ };
3632
+ YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM: {
3633
+ readonly code: "YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM";
3634
+ message: string;
3635
+ };
3636
+ TEAM_ALREADY_EXISTS: {
3637
+ readonly code: "TEAM_ALREADY_EXISTS";
3638
+ message: string;
3639
+ };
3640
+ TEAM_NOT_FOUND: {
3641
+ readonly code: "TEAM_NOT_FOUND";
3642
+ message: string;
3643
+ };
3644
+ YOU_CANNOT_LEAVE_THE_ORGANIZATION_AS_THE_ONLY_OWNER: {
3645
+ readonly code: "YOU_CANNOT_LEAVE_THE_ORGANIZATION_AS_THE_ONLY_OWNER";
3646
+ message: string;
3647
+ };
3648
+ YOU_CANNOT_LEAVE_THE_ORGANIZATION_WITHOUT_AN_OWNER: {
3649
+ readonly code: "YOU_CANNOT_LEAVE_THE_ORGANIZATION_WITHOUT_AN_OWNER";
3650
+ message: string;
3651
+ };
3652
+ YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_MEMBER: {
3653
+ readonly code: "YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_MEMBER";
3654
+ message: string;
3655
+ };
3656
+ YOU_ARE_NOT_ALLOWED_TO_INVITE_USERS_TO_THIS_ORGANIZATION: {
3657
+ readonly code: "YOU_ARE_NOT_ALLOWED_TO_INVITE_USERS_TO_THIS_ORGANIZATION";
3658
+ message: string;
3659
+ };
3660
+ USER_IS_ALREADY_INVITED_TO_THIS_ORGANIZATION: {
3661
+ readonly code: "USER_IS_ALREADY_INVITED_TO_THIS_ORGANIZATION";
3662
+ message: string;
3663
+ };
3664
+ INVITATION_NOT_FOUND: {
3665
+ readonly code: "INVITATION_NOT_FOUND";
3666
+ message: string;
3667
+ };
3668
+ YOU_ARE_NOT_THE_RECIPIENT_OF_THE_INVITATION: {
3669
+ readonly code: "YOU_ARE_NOT_THE_RECIPIENT_OF_THE_INVITATION";
3670
+ message: string;
3671
+ };
3672
+ EMAIL_VERIFICATION_REQUIRED_BEFORE_ACCEPTING_OR_REJECTING_INVITATION: {
3673
+ readonly code: "EMAIL_VERIFICATION_REQUIRED_BEFORE_ACCEPTING_OR_REJECTING_INVITATION";
3674
+ message: string;
3675
+ };
3676
+ YOU_ARE_NOT_ALLOWED_TO_CANCEL_THIS_INVITATION: {
3677
+ readonly code: "YOU_ARE_NOT_ALLOWED_TO_CANCEL_THIS_INVITATION";
3678
+ message: string;
3679
+ };
3680
+ INVITER_IS_NO_LONGER_A_MEMBER_OF_THE_ORGANIZATION: {
3681
+ readonly code: "INVITER_IS_NO_LONGER_A_MEMBER_OF_THE_ORGANIZATION";
3682
+ message: string;
3683
+ };
3684
+ YOU_ARE_NOT_ALLOWED_TO_INVITE_USER_WITH_THIS_ROLE: {
3685
+ readonly code: "YOU_ARE_NOT_ALLOWED_TO_INVITE_USER_WITH_THIS_ROLE";
3686
+ message: string;
3687
+ };
3688
+ FAILED_TO_RETRIEVE_INVITATION: {
3689
+ readonly code: "FAILED_TO_RETRIEVE_INVITATION";
3690
+ message: string;
3691
+ };
3692
+ YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_TEAMS: {
3693
+ readonly code: "YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_TEAMS";
3694
+ message: string;
3695
+ };
3696
+ UNABLE_TO_REMOVE_LAST_TEAM: {
3697
+ readonly code: "UNABLE_TO_REMOVE_LAST_TEAM";
3698
+ message: string;
3699
+ };
3700
+ YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_MEMBER: {
3701
+ readonly code: "YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_MEMBER";
3702
+ message: string;
3703
+ };
3704
+ ORGANIZATION_MEMBERSHIP_LIMIT_REACHED: {
3705
+ readonly code: "ORGANIZATION_MEMBERSHIP_LIMIT_REACHED";
3706
+ message: string;
3707
+ };
3708
+ YOU_ARE_NOT_ALLOWED_TO_CREATE_TEAMS_IN_THIS_ORGANIZATION: {
3709
+ readonly code: "YOU_ARE_NOT_ALLOWED_TO_CREATE_TEAMS_IN_THIS_ORGANIZATION";
3710
+ message: string;
3711
+ };
3712
+ YOU_ARE_NOT_ALLOWED_TO_DELETE_TEAMS_IN_THIS_ORGANIZATION: {
3713
+ readonly code: "YOU_ARE_NOT_ALLOWED_TO_DELETE_TEAMS_IN_THIS_ORGANIZATION";
3714
+ message: string;
3715
+ };
3716
+ YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_TEAM: {
3717
+ readonly code: "YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_TEAM";
3718
+ message: string;
3719
+ };
3720
+ YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_TEAM: {
3721
+ readonly code: "YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_TEAM";
3722
+ message: string;
3723
+ };
3724
+ INVITATION_LIMIT_REACHED: {
3725
+ readonly code: "INVITATION_LIMIT_REACHED";
3726
+ message: string;
3727
+ };
3728
+ TEAM_MEMBER_LIMIT_REACHED: {
3729
+ readonly code: "TEAM_MEMBER_LIMIT_REACHED";
3730
+ message: string;
3731
+ };
3732
+ USER_IS_NOT_A_MEMBER_OF_THE_TEAM: {
3733
+ readonly code: "USER_IS_NOT_A_MEMBER_OF_THE_TEAM";
3734
+ message: string;
3735
+ };
3736
+ YOU_CAN_NOT_ACCESS_THE_MEMBERS_OF_THIS_TEAM: {
3737
+ readonly code: "YOU_CAN_NOT_ACCESS_THE_MEMBERS_OF_THIS_TEAM";
3738
+ message: string;
3739
+ };
3740
+ YOU_DO_NOT_HAVE_AN_ACTIVE_TEAM: {
3741
+ readonly code: "YOU_DO_NOT_HAVE_AN_ACTIVE_TEAM";
3742
+ message: string;
3743
+ };
3744
+ YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM_MEMBER: {
3745
+ readonly code: "YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM_MEMBER";
3746
+ message: string;
3747
+ };
3748
+ YOU_ARE_NOT_ALLOWED_TO_REMOVE_A_TEAM_MEMBER: {
3749
+ readonly code: "YOU_ARE_NOT_ALLOWED_TO_REMOVE_A_TEAM_MEMBER";
3750
+ message: string;
3751
+ };
3752
+ YOU_ARE_NOT_ALLOWED_TO_ACCESS_THIS_ORGANIZATION: {
3753
+ readonly code: "YOU_ARE_NOT_ALLOWED_TO_ACCESS_THIS_ORGANIZATION";
3754
+ message: string;
3755
+ };
3756
+ YOU_ARE_NOT_A_MEMBER_OF_THIS_ORGANIZATION: {
3757
+ readonly code: "YOU_ARE_NOT_A_MEMBER_OF_THIS_ORGANIZATION";
3758
+ message: string;
3759
+ };
3760
+ MISSING_AC_INSTANCE: {
3761
+ readonly code: "MISSING_AC_INSTANCE";
3762
+ message: string;
3763
+ };
3764
+ YOU_MUST_BE_IN_AN_ORGANIZATION_TO_CREATE_A_ROLE: {
3765
+ readonly code: "YOU_MUST_BE_IN_AN_ORGANIZATION_TO_CREATE_A_ROLE";
3766
+ message: string;
3767
+ };
3768
+ YOU_ARE_NOT_ALLOWED_TO_CREATE_A_ROLE: {
3769
+ readonly code: "YOU_ARE_NOT_ALLOWED_TO_CREATE_A_ROLE";
3770
+ message: string;
3771
+ };
3772
+ YOU_ARE_NOT_ALLOWED_TO_UPDATE_A_ROLE: {
3773
+ readonly code: "YOU_ARE_NOT_ALLOWED_TO_UPDATE_A_ROLE";
3774
+ message: string;
3775
+ };
3776
+ YOU_ARE_NOT_ALLOWED_TO_DELETE_A_ROLE: {
3777
+ readonly code: "YOU_ARE_NOT_ALLOWED_TO_DELETE_A_ROLE";
3778
+ message: string;
3779
+ };
3780
+ YOU_ARE_NOT_ALLOWED_TO_READ_A_ROLE: {
3781
+ readonly code: "YOU_ARE_NOT_ALLOWED_TO_READ_A_ROLE";
3782
+ message: string;
3783
+ };
3784
+ YOU_ARE_NOT_ALLOWED_TO_LIST_A_ROLE: {
3785
+ readonly code: "YOU_ARE_NOT_ALLOWED_TO_LIST_A_ROLE";
3786
+ message: string;
3787
+ };
3788
+ YOU_ARE_NOT_ALLOWED_TO_GET_A_ROLE: {
3789
+ readonly code: "YOU_ARE_NOT_ALLOWED_TO_GET_A_ROLE";
3790
+ message: string;
3791
+ };
3792
+ TOO_MANY_ROLES: {
3793
+ readonly code: "TOO_MANY_ROLES";
3794
+ message: string;
3795
+ };
3796
+ INVALID_RESOURCE: {
3797
+ readonly code: "INVALID_RESOURCE";
3798
+ message: string;
3799
+ };
3800
+ ROLE_NAME_IS_ALREADY_TAKEN: {
3801
+ readonly code: "ROLE_NAME_IS_ALREADY_TAKEN";
3802
+ message: string;
3803
+ };
3804
+ CANNOT_DELETE_A_PRE_DEFINED_ROLE: {
3805
+ readonly code: "CANNOT_DELETE_A_PRE_DEFINED_ROLE";
3806
+ message: string;
3807
+ };
3808
+ ROLE_IS_ASSIGNED_TO_MEMBERS: {
3809
+ readonly code: "ROLE_IS_ASSIGNED_TO_MEMBERS";
3810
+ message: string;
3811
+ };
3812
+ OTP_NOT_ENABLED: {
3813
+ readonly code: "OTP_NOT_ENABLED";
3814
+ message: string;
3815
+ };
3816
+ OTP_HAS_EXPIRED: {
3817
+ readonly code: "OTP_HAS_EXPIRED";
3818
+ message: string;
3819
+ };
3820
+ TOTP_NOT_ENABLED: {
3821
+ readonly code: "TOTP_NOT_ENABLED";
3822
+ message: string;
3823
+ };
3824
+ TWO_FACTOR_NOT_ENABLED: {
3825
+ readonly code: "TWO_FACTOR_NOT_ENABLED";
3826
+ message: string;
3827
+ };
3828
+ BACKUP_CODES_NOT_ENABLED: {
3829
+ readonly code: "BACKUP_CODES_NOT_ENABLED";
3830
+ message: string;
3831
+ };
3832
+ INVALID_BACKUP_CODE: {
3833
+ readonly code: "INVALID_BACKUP_CODE";
3834
+ message: string;
3835
+ };
3836
+ INVALID_CODE: {
3837
+ readonly code: "INVALID_CODE";
3838
+ message: string;
3839
+ };
3840
+ TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE: {
3841
+ readonly code: "TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE";
3842
+ message: string;
3843
+ };
3844
+ INVALID_TWO_FACTOR_COOKIE: {
3845
+ readonly code: "INVALID_TWO_FACTOR_COOKIE";
3846
+ message: string;
3847
+ };
3848
+ INVALID_METADATA_TYPE: {
3849
+ readonly code: "INVALID_METADATA_TYPE";
3850
+ message: string;
3851
+ };
3852
+ REFILL_AMOUNT_AND_INTERVAL_REQUIRED: {
3853
+ readonly code: "REFILL_AMOUNT_AND_INTERVAL_REQUIRED";
3854
+ message: string;
3855
+ };
3856
+ REFILL_INTERVAL_AND_AMOUNT_REQUIRED: {
3857
+ readonly code: "REFILL_INTERVAL_AND_AMOUNT_REQUIRED";
3858
+ message: string;
3859
+ };
3860
+ USER_BANNED: {
3861
+ readonly code: "USER_BANNED";
3862
+ message: string;
3863
+ };
3864
+ UNAUTHORIZED_SESSION: {
3865
+ readonly code: "UNAUTHORIZED_SESSION";
3866
+ message: string;
3867
+ };
3868
+ KEY_NOT_FOUND: {
3869
+ readonly code: "KEY_NOT_FOUND";
3870
+ message: string;
3871
+ };
3872
+ KEY_DISABLED: {
3873
+ readonly code: "KEY_DISABLED";
3874
+ message: string;
3875
+ };
3876
+ KEY_EXPIRED: {
3877
+ readonly code: "KEY_EXPIRED";
3878
+ message: string;
3879
+ };
3880
+ USAGE_EXCEEDED: {
3881
+ readonly code: "USAGE_EXCEEDED";
3882
+ message: string;
3883
+ };
3884
+ KEY_NOT_RECOVERABLE: {
3885
+ readonly code: "KEY_NOT_RECOVERABLE";
3886
+ message: string;
3887
+ };
3888
+ EXPIRES_IN_IS_TOO_SMALL: {
3889
+ readonly code: "EXPIRES_IN_IS_TOO_SMALL";
3890
+ message: string;
3891
+ };
3892
+ EXPIRES_IN_IS_TOO_LARGE: {
3893
+ readonly code: "EXPIRES_IN_IS_TOO_LARGE";
3894
+ message: string;
3895
+ };
3896
+ INVALID_REMAINING: {
3897
+ readonly code: "INVALID_REMAINING";
3898
+ message: string;
3899
+ };
3900
+ INVALID_PREFIX_LENGTH: {
3901
+ readonly code: "INVALID_PREFIX_LENGTH";
3902
+ message: string;
3903
+ };
3904
+ INVALID_NAME_LENGTH: {
3905
+ readonly code: "INVALID_NAME_LENGTH";
3906
+ message: string;
3907
+ };
3908
+ METADATA_DISABLED: {
3909
+ readonly code: "METADATA_DISABLED";
3910
+ message: string;
3911
+ };
3912
+ RATE_LIMIT_EXCEEDED: {
3913
+ readonly code: "RATE_LIMIT_EXCEEDED";
3914
+ message: string;
3915
+ };
3916
+ NO_VALUES_TO_UPDATE: {
3917
+ readonly code: "NO_VALUES_TO_UPDATE";
3918
+ message: string;
3919
+ };
3920
+ KEY_DISABLED_EXPIRATION: {
3921
+ readonly code: "KEY_DISABLED_EXPIRATION";
3922
+ message: string;
3923
+ };
3924
+ INVALID_API_KEY: {
3925
+ readonly code: "INVALID_API_KEY";
3926
+ message: string;
3927
+ };
3928
+ INVALID_USER_ID_FROM_API_KEY: {
3929
+ readonly code: "INVALID_USER_ID_FROM_API_KEY";
3930
+ message: string;
3931
+ };
3932
+ INVALID_REFERENCE_ID_FROM_API_KEY: {
3933
+ readonly code: "INVALID_REFERENCE_ID_FROM_API_KEY";
3934
+ message: string;
3935
+ };
3936
+ INVALID_API_KEY_GETTER_RETURN_TYPE: {
3937
+ readonly code: "INVALID_API_KEY_GETTER_RETURN_TYPE";
3938
+ message: string;
3939
+ };
3940
+ SERVER_ONLY_PROPERTY: {
3941
+ readonly code: "SERVER_ONLY_PROPERTY";
3942
+ message: string;
3943
+ };
3944
+ FAILED_TO_UPDATE_API_KEY: {
3945
+ readonly code: "FAILED_TO_UPDATE_API_KEY";
3946
+ message: string;
3947
+ };
3948
+ NAME_REQUIRED: {
3949
+ readonly code: "NAME_REQUIRED";
3950
+ message: string;
3951
+ };
3952
+ ORGANIZATION_ID_REQUIRED: {
3953
+ readonly code: "ORGANIZATION_ID_REQUIRED";
3954
+ message: string;
3955
+ };
3956
+ USER_NOT_MEMBER_OF_ORGANIZATION: {
3957
+ readonly code: "USER_NOT_MEMBER_OF_ORGANIZATION";
3958
+ message: string;
3959
+ };
3960
+ INSUFFICIENT_API_KEY_PERMISSIONS: {
3961
+ readonly code: "INSUFFICIENT_API_KEY_PERMISSIONS";
3962
+ message: string;
3963
+ };
3964
+ NO_DEFAULT_API_KEY_CONFIGURATION_FOUND: {
3965
+ readonly code: "NO_DEFAULT_API_KEY_CONFIGURATION_FOUND";
3966
+ message: string;
3967
+ };
3968
+ ORGANIZATION_PLUGIN_REQUIRED: {
3969
+ readonly code: "ORGANIZATION_PLUGIN_REQUIRED";
3970
+ message: string;
3971
+ };
3972
+ USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL: {
3973
+ readonly code: "USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL";
3974
+ message: string;
3975
+ };
3976
+ FAILED_TO_CREATE_USER: {
3977
+ readonly code: "FAILED_TO_CREATE_USER";
3978
+ message: string;
3979
+ };
3980
+ USER_ALREADY_EXISTS: {
3981
+ readonly code: "USER_ALREADY_EXISTS";
3982
+ message: string;
3983
+ };
3984
+ YOU_CANNOT_BAN_YOURSELF: {
3985
+ readonly code: "YOU_CANNOT_BAN_YOURSELF";
3986
+ message: string;
3987
+ };
3988
+ YOU_ARE_NOT_ALLOWED_TO_CHANGE_USERS_ROLE: {
3989
+ readonly code: "YOU_ARE_NOT_ALLOWED_TO_CHANGE_USERS_ROLE";
3990
+ message: string;
3991
+ };
3992
+ YOU_ARE_NOT_ALLOWED_TO_CREATE_USERS: {
3993
+ readonly code: "YOU_ARE_NOT_ALLOWED_TO_CREATE_USERS";
3994
+ message: string;
3995
+ };
3996
+ YOU_ARE_NOT_ALLOWED_TO_LIST_USERS: {
3997
+ readonly code: "YOU_ARE_NOT_ALLOWED_TO_LIST_USERS";
3998
+ message: string;
3999
+ };
4000
+ YOU_ARE_NOT_ALLOWED_TO_LIST_USERS_SESSIONS: {
4001
+ readonly code: "YOU_ARE_NOT_ALLOWED_TO_LIST_USERS_SESSIONS";
4002
+ message: string;
4003
+ };
4004
+ YOU_ARE_NOT_ALLOWED_TO_BAN_USERS: {
4005
+ readonly code: "YOU_ARE_NOT_ALLOWED_TO_BAN_USERS";
4006
+ message: string;
4007
+ };
4008
+ YOU_ARE_NOT_ALLOWED_TO_IMPERSONATE_USERS: {
4009
+ readonly code: "YOU_ARE_NOT_ALLOWED_TO_IMPERSONATE_USERS";
4010
+ message: string;
4011
+ };
4012
+ YOU_ARE_NOT_ALLOWED_TO_REVOKE_USERS_SESSIONS: {
4013
+ readonly code: "YOU_ARE_NOT_ALLOWED_TO_REVOKE_USERS_SESSIONS";
4014
+ message: string;
4015
+ };
4016
+ YOU_ARE_NOT_ALLOWED_TO_DELETE_USERS: {
4017
+ readonly code: "YOU_ARE_NOT_ALLOWED_TO_DELETE_USERS";
4018
+ message: string;
4019
+ };
4020
+ YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PASSWORD: {
4021
+ readonly code: "YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PASSWORD";
4022
+ message: string;
4023
+ };
4024
+ BANNED_USER: {
4025
+ readonly code: "BANNED_USER";
4026
+ message: string;
4027
+ };
4028
+ YOU_ARE_NOT_ALLOWED_TO_GET_USER: {
4029
+ readonly code: "YOU_ARE_NOT_ALLOWED_TO_GET_USER";
4030
+ message: string;
4031
+ };
4032
+ NO_DATA_TO_UPDATE: {
4033
+ readonly code: "NO_DATA_TO_UPDATE";
4034
+ message: string;
4035
+ };
4036
+ YOU_ARE_NOT_ALLOWED_TO_UPDATE_USERS: {
4037
+ readonly code: "YOU_ARE_NOT_ALLOWED_TO_UPDATE_USERS";
4038
+ message: string;
4039
+ };
4040
+ YOU_CANNOT_REMOVE_YOURSELF: {
4041
+ readonly code: "YOU_CANNOT_REMOVE_YOURSELF";
4042
+ message: string;
4043
+ };
4044
+ YOU_ARE_NOT_ALLOWED_TO_SET_NON_EXISTENT_VALUE: {
4045
+ readonly code: "YOU_ARE_NOT_ALLOWED_TO_SET_NON_EXISTENT_VALUE";
4046
+ message: string;
4047
+ };
4048
+ YOU_CANNOT_IMPERSONATE_ADMINS: {
4049
+ readonly code: "YOU_CANNOT_IMPERSONATE_ADMINS";
4050
+ message: string;
4051
+ };
4052
+ INVALID_ROLE_TYPE: {
4053
+ readonly code: "INVALID_ROLE_TYPE";
4054
+ message: string;
4055
+ };
4056
+ USER_NOT_FOUND: {
4057
+ readonly code: "USER_NOT_FOUND";
4058
+ message: string;
4059
+ };
4060
+ FAILED_TO_CREATE_SESSION: {
4061
+ readonly code: "FAILED_TO_CREATE_SESSION";
4062
+ message: string;
4063
+ };
4064
+ FAILED_TO_UPDATE_USER: {
4065
+ readonly code: "FAILED_TO_UPDATE_USER";
4066
+ message: string;
4067
+ };
4068
+ FAILED_TO_GET_SESSION: {
4069
+ readonly code: "FAILED_TO_GET_SESSION";
4070
+ message: string;
4071
+ };
4072
+ INVALID_PASSWORD: {
4073
+ readonly code: "INVALID_PASSWORD";
4074
+ message: string;
4075
+ };
4076
+ INVALID_EMAIL: {
4077
+ readonly code: "INVALID_EMAIL";
4078
+ message: string;
4079
+ };
4080
+ INVALID_EMAIL_OR_PASSWORD: {
4081
+ readonly code: "INVALID_EMAIL_OR_PASSWORD";
4082
+ message: string;
4083
+ };
4084
+ INVALID_USER: {
4085
+ readonly code: "INVALID_USER";
4086
+ message: string;
4087
+ };
4088
+ SOCIAL_ACCOUNT_ALREADY_LINKED: {
4089
+ readonly code: "SOCIAL_ACCOUNT_ALREADY_LINKED";
4090
+ message: string;
4091
+ };
4092
+ PROVIDER_NOT_FOUND: {
4093
+ readonly code: "PROVIDER_NOT_FOUND";
4094
+ message: string;
4095
+ };
4096
+ INVALID_TOKEN: {
4097
+ readonly code: "INVALID_TOKEN";
4098
+ message: string;
4099
+ };
4100
+ TOKEN_EXPIRED: {
4101
+ readonly code: "TOKEN_EXPIRED";
4102
+ message: string;
4103
+ };
4104
+ ID_TOKEN_NOT_SUPPORTED: {
4105
+ readonly code: "ID_TOKEN_NOT_SUPPORTED";
4106
+ message: string;
4107
+ };
4108
+ FAILED_TO_GET_USER_INFO: {
4109
+ readonly code: "FAILED_TO_GET_USER_INFO";
4110
+ message: string;
4111
+ };
4112
+ USER_EMAIL_NOT_FOUND: {
4113
+ readonly code: "USER_EMAIL_NOT_FOUND";
4114
+ message: string;
4115
+ };
4116
+ EMAIL_NOT_VERIFIED: {
4117
+ readonly code: "EMAIL_NOT_VERIFIED";
4118
+ message: string;
4119
+ };
4120
+ PASSWORD_TOO_SHORT: {
4121
+ readonly code: "PASSWORD_TOO_SHORT";
4122
+ message: string;
4123
+ };
4124
+ PASSWORD_TOO_LONG: {
4125
+ readonly code: "PASSWORD_TOO_LONG";
4126
+ message: string;
4127
+ };
4128
+ EMAIL_CAN_NOT_BE_UPDATED: {
4129
+ readonly code: "EMAIL_CAN_NOT_BE_UPDATED";
4130
+ message: string;
4131
+ };
4132
+ CREDENTIAL_ACCOUNT_NOT_FOUND: {
4133
+ readonly code: "CREDENTIAL_ACCOUNT_NOT_FOUND";
4134
+ message: string;
4135
+ };
4136
+ ACCOUNT_NOT_FOUND: {
4137
+ readonly code: "ACCOUNT_NOT_FOUND";
4138
+ message: string;
4139
+ };
4140
+ SESSION_EXPIRED: {
4141
+ readonly code: "SESSION_EXPIRED";
4142
+ message: string;
4143
+ };
4144
+ FAILED_TO_UNLINK_LAST_ACCOUNT: {
4145
+ readonly code: "FAILED_TO_UNLINK_LAST_ACCOUNT";
4146
+ message: string;
4147
+ };
4148
+ USER_ALREADY_HAS_PASSWORD: {
4149
+ readonly code: "USER_ALREADY_HAS_PASSWORD";
4150
+ message: string;
4151
+ };
4152
+ CROSS_SITE_NAVIGATION_LOGIN_BLOCKED: {
4153
+ readonly code: "CROSS_SITE_NAVIGATION_LOGIN_BLOCKED";
4154
+ message: string;
4155
+ };
4156
+ VERIFICATION_EMAIL_NOT_ENABLED: {
4157
+ readonly code: "VERIFICATION_EMAIL_NOT_ENABLED";
4158
+ message: string;
4159
+ };
4160
+ EMAIL_ALREADY_VERIFIED: {
4161
+ readonly code: "EMAIL_ALREADY_VERIFIED";
4162
+ message: string;
4163
+ };
4164
+ EMAIL_MISMATCH: {
4165
+ readonly code: "EMAIL_MISMATCH";
4166
+ message: string;
4167
+ };
4168
+ SESSION_NOT_FRESH: {
4169
+ readonly code: "SESSION_NOT_FRESH";
4170
+ message: string;
4171
+ };
4172
+ LINKED_ACCOUNT_ALREADY_EXISTS: {
4173
+ readonly code: "LINKED_ACCOUNT_ALREADY_EXISTS";
4174
+ message: string;
4175
+ };
4176
+ INVALID_ORIGIN: {
4177
+ readonly code: "INVALID_ORIGIN";
4178
+ message: string;
4179
+ };
4180
+ INVALID_CALLBACK_URL: {
4181
+ readonly code: "INVALID_CALLBACK_URL";
4182
+ message: string;
4183
+ };
4184
+ INVALID_REDIRECT_URL: {
4185
+ readonly code: "INVALID_REDIRECT_URL";
4186
+ message: string;
4187
+ };
4188
+ INVALID_ERROR_CALLBACK_URL: {
4189
+ readonly code: "INVALID_ERROR_CALLBACK_URL";
4190
+ message: string;
4191
+ };
4192
+ INVALID_NEW_USER_CALLBACK_URL: {
4193
+ readonly code: "INVALID_NEW_USER_CALLBACK_URL";
4194
+ message: string;
4195
+ };
4196
+ MISSING_OR_NULL_ORIGIN: {
4197
+ readonly code: "MISSING_OR_NULL_ORIGIN";
4198
+ message: string;
4199
+ };
4200
+ CALLBACK_URL_REQUIRED: {
4201
+ readonly code: "CALLBACK_URL_REQUIRED";
4202
+ message: string;
4203
+ };
4204
+ FAILED_TO_CREATE_VERIFICATION: {
4205
+ readonly code: "FAILED_TO_CREATE_VERIFICATION";
4206
+ message: string;
4207
+ };
4208
+ FIELD_NOT_ALLOWED: {
4209
+ readonly code: "FIELD_NOT_ALLOWED";
4210
+ message: string;
4211
+ };
4212
+ ASYNC_VALIDATION_NOT_SUPPORTED: {
4213
+ readonly code: "ASYNC_VALIDATION_NOT_SUPPORTED";
4214
+ message: string;
4215
+ };
4216
+ VALIDATION_ERROR: {
4217
+ readonly code: "VALIDATION_ERROR";
4218
+ message: string;
4219
+ };
4220
+ MISSING_FIELD: {
4221
+ readonly code: "MISSING_FIELD";
4222
+ message: string;
4223
+ };
4224
+ METHOD_NOT_ALLOWED_DEFER_SESSION_REQUIRED: {
4225
+ readonly code: "METHOD_NOT_ALLOWED_DEFER_SESSION_REQUIRED";
4226
+ message: string;
4227
+ };
4228
+ BODY_MUST_BE_AN_OBJECT: {
4229
+ readonly code: "BODY_MUST_BE_AN_OBJECT";
4230
+ message: string;
4231
+ };
4232
+ PASSWORD_ALREADY_SET: {
4233
+ readonly code: "PASSWORD_ALREADY_SET";
4234
+ message: string;
4235
+ };
3498
4236
  };
3499
4237
  };
3500
4238
  type APIClient = ReturnType<typeof createAPIClient>;
@@ -3795,7 +4533,7 @@ declare class OrganizationService {
3795
4533
  *
3796
4534
  * @returns The active member object
3797
4535
  */
3798
- getActiveMember(): Promise<Omit<{
4536
+ getActiveMember(): Promise<NonNullable<Omit<{
3799
4537
  id: string;
3800
4538
  organizationId: string;
3801
4539
  role: "org:admin" | "org:member" | "org:reviewer";
@@ -3809,7 +4547,15 @@ declare class OrganizationService {
3809
4547
  image?: string | undefined;
3810
4548
  };
3811
4549
  } & {
3812
- user: better_auth.User;
4550
+ user: {
4551
+ id: string;
4552
+ createdAt: Date;
4553
+ updatedAt: Date;
4554
+ email: string;
4555
+ emailVerified: boolean;
4556
+ name: string;
4557
+ image?: string | null | undefined;
4558
+ };
3813
4559
  }, "user"> & {
3814
4560
  user: {
3815
4561
  id: string;
@@ -3817,7 +4563,7 @@ declare class OrganizationService {
3817
4563
  email: string;
3818
4564
  image: string | undefined;
3819
4565
  };
3820
- }>;
4566
+ }>>;
3821
4567
  /**
3822
4568
  * Invites a user to join the active organization.
3823
4569
  *
@@ -3997,7 +4743,7 @@ declare class SessionService {
3997
4743
  * @returns The current user session
3998
4744
  */
3999
4745
  getSession(token?: string): Promise<{
4000
- user: {
4746
+ user: better_auth.StripEmptyObjects<{
4001
4747
  id: string;
4002
4748
  createdAt: Date;
4003
4749
  updatedAt: Date;
@@ -4005,14 +4751,18 @@ declare class SessionService {
4005
4751
  emailVerified: boolean;
4006
4752
  name: string;
4007
4753
  image?: string | null | undefined;
4754
+ } & {
4008
4755
  twoFactorEnabled: boolean | null | undefined;
4756
+ } & {} & {
4009
4757
  banned: boolean | null | undefined;
4758
+ } & {
4010
4759
  role?: string | null | undefined;
4011
4760
  banReason?: string | null | undefined;
4012
4761
  banExpires?: Date | null | undefined;
4762
+ } & {} & {
4013
4763
  lastActiveAt?: Date | null | undefined;
4014
- };
4015
- session: {
4764
+ }>;
4765
+ session: better_auth.StripEmptyObjects<{
4016
4766
  id: string;
4017
4767
  createdAt: Date;
4018
4768
  updatedAt: Date;
@@ -4021,10 +4771,12 @@ declare class SessionService {
4021
4771
  token: string;
4022
4772
  ipAddress?: string | null | undefined;
4023
4773
  userAgent?: string | null | undefined;
4774
+ } & {} & {
4024
4775
  activeOrganizationId?: string | null | undefined;
4025
4776
  activeTeamId?: string | null | undefined;
4777
+ } & {} & {
4026
4778
  impersonatedBy?: string | null | undefined;
4027
- };
4779
+ } & {} & {}>;
4028
4780
  } | null>;
4029
4781
  /**
4030
4782
  * Retrieves a valid JWT token.
@@ -4137,10 +4889,11 @@ declare class ApiKeyService {
4137
4889
  metadata: any;
4138
4890
  permissions: any;
4139
4891
  id: string;
4892
+ configId: string;
4140
4893
  name: string | null;
4141
4894
  start: string | null;
4142
4895
  prefix: string | null;
4143
- userId: string;
4896
+ referenceId: string;
4144
4897
  refillInterval: number | null;
4145
4898
  refillAmount: number | null;
4146
4899
  lastRefillAt: Date | null;
@@ -4161,10 +4914,11 @@ declare class ApiKeyService {
4161
4914
  [key: string]: string[];
4162
4915
  } | null;
4163
4916
  id: string;
4917
+ configId: string;
4164
4918
  name: string | null;
4165
4919
  start: string | null;
4166
4920
  prefix: string | null;
4167
- userId: string;
4921
+ referenceId: string;
4168
4922
  refillInterval: number | null;
4169
4923
  refillAmount: number | null;
4170
4924
  lastRefillAt: Date | null;
@@ -4180,39 +4934,46 @@ declare class ApiKeyService {
4180
4934
  updatedAt: Date;
4181
4935
  }>;
4182
4936
  listApiKeys(): Promise<{
4183
- metadata: Record<string, any> | null;
4184
- permissions: {
4185
- [key: string]: string[];
4186
- } | null;
4187
- id: string;
4188
- name: string | null;
4189
- start: string | null;
4190
- prefix: string | null;
4191
- userId: string;
4192
- refillInterval: number | null;
4193
- refillAmount: number | null;
4194
- lastRefillAt: Date | null;
4195
- enabled: boolean;
4196
- rateLimitEnabled: boolean;
4197
- rateLimitTimeWindow: number | null;
4198
- rateLimitMax: number | null;
4199
- requestCount: number;
4200
- remaining: number | null;
4201
- lastRequest: Date | null;
4202
- expiresAt: Date | null;
4203
- createdAt: Date;
4204
- updatedAt: Date;
4205
- }[]>;
4937
+ apiKeys: {
4938
+ metadata: Record<string, any> | null;
4939
+ permissions: {
4940
+ [key: string]: string[];
4941
+ } | null;
4942
+ id: string;
4943
+ configId: string;
4944
+ name: string | null;
4945
+ start: string | null;
4946
+ prefix: string | null;
4947
+ referenceId: string;
4948
+ refillInterval: number | null;
4949
+ refillAmount: number | null;
4950
+ lastRefillAt: Date | null;
4951
+ enabled: boolean;
4952
+ rateLimitEnabled: boolean;
4953
+ rateLimitTimeWindow: number | null;
4954
+ rateLimitMax: number | null;
4955
+ requestCount: number;
4956
+ remaining: number | null;
4957
+ lastRequest: Date | null;
4958
+ expiresAt: Date | null;
4959
+ createdAt: Date;
4960
+ updatedAt: Date;
4961
+ }[];
4962
+ total: number;
4963
+ limit: number | undefined;
4964
+ offset: number | undefined;
4965
+ }>;
4206
4966
  updateApiKey(payload: UpdateApiKeyPayload): Promise<{
4207
4967
  metadata: Record<string, any> | null;
4208
4968
  permissions: {
4209
4969
  [key: string]: string[];
4210
4970
  } | null;
4211
4971
  id: string;
4972
+ configId: string;
4212
4973
  name: string | null;
4213
4974
  start: string | null;
4214
4975
  prefix: string | null;
4215
- userId: string;
4976
+ referenceId: string;
4216
4977
  refillInterval: number | null;
4217
4978
  refillAmount: number | null;
4218
4979
  lastRefillAt: Date | null;