@meistrari/auth-core 1.2.1 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1,18 +1,15 @@
1
- import * as better_auth_client from 'better-auth/client';
2
- import { BetterFetchOption } from 'better-auth/client';
3
- export { BetterFetchError as APIError } from 'better-auth/client';
1
+ import * as better_auth_plugins from 'better-auth/plugins';
4
2
  import * as better_auth from 'better-auth';
5
3
  import { JWTPayload } from 'better-auth';
6
- import * as better_auth_plugins from 'better-auth/plugins';
4
+ import { BetterFetchOption } from 'better-auth/client';
7
5
  import * as jose from 'jose';
8
6
  import * as _better_auth_sso from '@better-auth/sso';
9
- import * as better_call from 'better-call';
10
7
  import * as nanostores from 'nanostores';
11
8
  import * as _better_fetch_fetch from '@better-fetch/fetch';
12
- import * as better_auth_client_plugins from 'better-auth/client/plugins';
9
+ export { BetterFetchError as APIError } from '@better-fetch/fetch';
13
10
 
14
11
  declare const ac: {
15
- newRole<K extends "member" | "access" | "organization" | "invitation" | "team" | "ac">(statements: better_auth_client.Subset<K, {
12
+ newRole<K extends "member" | "access" | "organization" | "invitation" | "team" | "ac">(statements: better_auth_plugins.Subset<K, {
16
13
  access: string[];
17
14
  organization: readonly ["update", "delete"];
18
15
  member: readonly ["create", "update", "delete"];
@@ -20,7 +17,7 @@ declare const ac: {
20
17
  team: readonly ["create", "update", "delete"];
21
18
  ac: readonly ["create", "read", "update", "delete"];
22
19
  }>): {
23
- authorize<K_1 extends K>(request: K_1 extends infer T extends K_2 ? { [key in T]?: better_auth_client.Subset<K, {
20
+ authorize<K_1 extends K>(request: K_1 extends infer T extends K_2 ? { [key in T]?: better_auth_plugins.Subset<K, {
24
21
  access: string[];
25
22
  organization: readonly ["update", "delete"];
26
23
  member: readonly ["create", "update", "delete"];
@@ -28,7 +25,7 @@ declare const ac: {
28
25
  team: readonly ["create", "update", "delete"];
29
26
  ac: readonly ["create", "read", "update", "delete"];
30
27
  }>[key] | {
31
- actions: better_auth_client.Subset<K, {
28
+ actions: better_auth_plugins.Subset<K, {
32
29
  access: string[];
33
30
  organization: readonly ["update", "delete"];
34
31
  member: readonly ["create", "update", "delete"];
@@ -37,8 +34,8 @@ declare const ac: {
37
34
  ac: readonly ["create", "read", "update", "delete"];
38
35
  }>[key];
39
36
  connector: "OR" | "AND";
40
- } | undefined; } : never, connector?: "OR" | "AND"): better_auth_client.AuthorizeResponse;
41
- statements: better_auth_client.Subset<K, {
37
+ } | undefined; } : never, connector?: "OR" | "AND"): better_auth_plugins.AuthorizeResponse;
38
+ statements: better_auth_plugins.Subset<K, {
42
39
  access: string[];
43
40
  organization: readonly ["update", "delete"];
44
41
  member: readonly ["create", "update", "delete"];
@@ -81,7 +78,7 @@ declare const Roles: {
81
78
  type Role = typeof Roles[keyof typeof Roles];
82
79
  declare const rolesAccessControl: {
83
80
  "org:admin": {
84
- authorize<K_1 extends "member" | "access" | "organization" | "invitation" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_client.Subset<"member" | "access" | "organization" | "invitation" | "team", {
81
+ authorize<K_1 extends "member" | "access" | "organization" | "invitation" | "team">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins.Subset<"member" | "access" | "organization" | "invitation" | "team", {
85
82
  access: string[];
86
83
  organization: readonly ["update", "delete"];
87
84
  member: readonly ["create", "update", "delete"];
@@ -89,7 +86,7 @@ declare const rolesAccessControl: {
89
86
  team: readonly ["create", "update", "delete"];
90
87
  ac: readonly ["create", "read", "update", "delete"];
91
88
  }>[key] | {
92
- actions: better_auth_client.Subset<"member" | "access" | "organization" | "invitation" | "team", {
89
+ actions: better_auth_plugins.Subset<"member" | "access" | "organization" | "invitation" | "team", {
93
90
  access: string[];
94
91
  organization: readonly ["update", "delete"];
95
92
  member: readonly ["create", "update", "delete"];
@@ -98,8 +95,8 @@ declare const rolesAccessControl: {
98
95
  ac: readonly ["create", "read", "update", "delete"];
99
96
  }>[key];
100
97
  connector: "OR" | "AND";
101
- } | undefined; } : never, connector?: "OR" | "AND"): better_auth_client.AuthorizeResponse;
102
- statements: better_auth_client.Subset<"member" | "access" | "organization" | "invitation" | "team", {
98
+ } | undefined; } : never, connector?: "OR" | "AND"): better_auth_plugins.AuthorizeResponse;
99
+ statements: better_auth_plugins.Subset<"member" | "access" | "organization" | "invitation" | "team", {
103
100
  access: string[];
104
101
  organization: readonly ["update", "delete"];
105
102
  member: readonly ["create", "update", "delete"];
@@ -109,7 +106,7 @@ declare const rolesAccessControl: {
109
106
  }>;
110
107
  };
111
108
  "org:member": {
112
- authorize<K_1 extends "access">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_client.Subset<"access", {
109
+ authorize<K_1 extends "access">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins.Subset<"access", {
113
110
  access: string[];
114
111
  organization: readonly ["update", "delete"];
115
112
  member: readonly ["create", "update", "delete"];
@@ -117,7 +114,7 @@ declare const rolesAccessControl: {
117
114
  team: readonly ["create", "update", "delete"];
118
115
  ac: readonly ["create", "read", "update", "delete"];
119
116
  }>[key] | {
120
- actions: better_auth_client.Subset<"access", {
117
+ actions: better_auth_plugins.Subset<"access", {
121
118
  access: string[];
122
119
  organization: readonly ["update", "delete"];
123
120
  member: readonly ["create", "update", "delete"];
@@ -126,8 +123,8 @@ declare const rolesAccessControl: {
126
123
  ac: readonly ["create", "read", "update", "delete"];
127
124
  }>[key];
128
125
  connector: "OR" | "AND";
129
- } | undefined; } : never, connector?: "OR" | "AND"): better_auth_client.AuthorizeResponse;
130
- statements: better_auth_client.Subset<"access", {
126
+ } | undefined; } : never, connector?: "OR" | "AND"): better_auth_plugins.AuthorizeResponse;
127
+ statements: better_auth_plugins.Subset<"access", {
131
128
  access: string[];
132
129
  organization: readonly ["update", "delete"];
133
130
  member: readonly ["create", "update", "delete"];
@@ -137,7 +134,7 @@ declare const rolesAccessControl: {
137
134
  }>;
138
135
  };
139
136
  "org:reviewer": {
140
- authorize<K_1 extends "access">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_client.Subset<"access", {
137
+ authorize<K_1 extends "access">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins.Subset<"access", {
141
138
  access: string[];
142
139
  organization: readonly ["update", "delete"];
143
140
  member: readonly ["create", "update", "delete"];
@@ -145,7 +142,7 @@ declare const rolesAccessControl: {
145
142
  team: readonly ["create", "update", "delete"];
146
143
  ac: readonly ["create", "read", "update", "delete"];
147
144
  }>[key] | {
148
- actions: better_auth_client.Subset<"access", {
145
+ actions: better_auth_plugins.Subset<"access", {
149
146
  access: string[];
150
147
  organization: readonly ["update", "delete"];
151
148
  member: readonly ["create", "update", "delete"];
@@ -154,8 +151,8 @@ declare const rolesAccessControl: {
154
151
  ac: readonly ["create", "read", "update", "delete"];
155
152
  }>[key];
156
153
  connector: "OR" | "AND";
157
- } | undefined; } : never, connector?: "OR" | "AND"): better_auth_client.AuthorizeResponse;
158
- statements: better_auth_client.Subset<"access", {
154
+ } | undefined; } : never, connector?: "OR" | "AND"): better_auth_plugins.AuthorizeResponse;
155
+ statements: better_auth_plugins.Subset<"access", {
159
156
  access: string[];
160
157
  organization: readonly ["update", "delete"];
161
158
  member: readonly ["create", "update", "delete"];
@@ -195,7 +192,7 @@ type JWTTokenPayload = JWTPayload & {
195
192
 
196
193
  declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOption): {
197
194
  useActiveOrganization: nanostores.PreinitializedWritableAtom<{
198
- data: better_auth_client_plugins.Prettify<{
195
+ data: better_auth.Prettify<{
199
196
  id: string;
200
197
  name: string;
201
198
  slug: string;
@@ -284,7 +281,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
284
281
  ":id": {
285
282
  members: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, {
286
283
  id: string;
287
- }>>(data_0?: better_auth_client_plugins.Prettify<{
284
+ }>>(data_0?: better_auth.Prettify<{
288
285
  query?: Record<string, any> | undefined;
289
286
  fetchOptions?: FetchOptions | undefined;
290
287
  }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
@@ -302,11 +299,15 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
302
299
  };
303
300
  };
304
301
  } & {
305
- handshake: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
306
- query?: Record<string, any> | undefined;
302
+ handshake: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
303
+ origin: string;
304
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
305
+ query: {
306
+ origin: string;
307
+ };
307
308
  fetchOptions?: FetchOptions | undefined;
308
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
309
- 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_call.Status;
309
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
310
+ 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;
310
311
  body: ({
311
312
  message?: string;
312
313
  code?: string;
@@ -326,7 +327,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
326
327
  handshake: {
327
328
  noncePayload: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
328
329
  nonce: string;
329
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
330
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
330
331
  query: {
331
332
  nonce: string;
332
333
  };
@@ -347,7 +348,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
347
348
  logo?: string | undefined;
348
349
  metadata?: Record<string, any> | undefined;
349
350
  keepCurrentActiveOrganization?: boolean | undefined;
350
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
351
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
351
352
  name: string;
352
353
  slug: string;
353
354
  userId?: string | undefined;
@@ -387,7 +388,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
387
388
  metadata?: Record<string, any> | undefined;
388
389
  } & Partial<{}>;
389
390
  organizationId?: string | undefined;
390
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
391
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
391
392
  data: {
392
393
  name?: string | undefined;
393
394
  slug?: string | undefined;
@@ -415,7 +416,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
415
416
  organization: {
416
417
  delete: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
417
418
  organizationId: string;
418
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
419
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
419
420
  organizationId: string;
420
421
  } & {
421
422
  fetchOptions?: FetchOptions | undefined;
@@ -436,7 +437,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
436
437
  setActive: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
437
438
  organizationId?: string | null | undefined;
438
439
  organizationSlug?: string | undefined;
439
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
440
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
440
441
  organizationId?: string | null | undefined;
441
442
  organizationSlug?: string | undefined;
442
443
  } & {
@@ -492,7 +493,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
492
493
  organizationId?: string | undefined;
493
494
  organizationSlug?: string | undefined;
494
495
  membersLimit?: string | number | undefined;
495
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
496
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
496
497
  query?: {
497
498
  organizationId?: string | undefined;
498
499
  organizationSlug?: string | undefined;
@@ -546,7 +547,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
546
547
  };
547
548
  } & {
548
549
  organization: {
549
- list: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
550
+ list: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
550
551
  query?: Record<string, any> | undefined;
551
552
  fetchOptions?: FetchOptions | undefined;
552
553
  }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
@@ -570,7 +571,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
570
571
  resend?: boolean | undefined;
571
572
  } & {
572
573
  teamId?: (string | string[]) | undefined;
573
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
574
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
574
575
  email: string;
575
576
  role: "org:admin" | "org:member" | "org:reviewer" | ("org:admin" | "org:member" | "org:reviewer")[];
576
577
  organizationId?: string | undefined;
@@ -598,7 +599,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
598
599
  organization: {
599
600
  cancelInvitation: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
600
601
  invitationId: string;
601
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
602
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
602
603
  invitationId: string;
603
604
  } & {
604
605
  fetchOptions?: FetchOptions | undefined;
@@ -621,7 +622,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
621
622
  organization: {
622
623
  acceptInvitation: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
623
624
  invitationId: string;
624
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
625
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
625
626
  invitationId: string;
626
627
  } & {
627
628
  fetchOptions?: FetchOptions | undefined;
@@ -653,7 +654,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
653
654
  organization: {
654
655
  getInvitation: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
655
656
  id: string;
656
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
657
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
657
658
  query: {
658
659
  id: string;
659
660
  };
@@ -681,7 +682,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
681
682
  organization: {
682
683
  rejectInvitation: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
683
684
  invitationId: string;
684
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
685
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
685
686
  invitationId: string;
686
687
  } & {
687
688
  fetchOptions?: FetchOptions | undefined;
@@ -706,7 +707,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
706
707
  organization: {
707
708
  listInvitations: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
708
709
  organizationId?: string | undefined;
709
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
710
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
710
711
  query?: {
711
712
  organizationId?: string | undefined;
712
713
  } | undefined;
@@ -728,7 +729,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
728
729
  };
729
730
  } & {
730
731
  organization: {
731
- getActiveMember: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
732
+ getActiveMember: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
732
733
  query?: Record<string, any> | undefined;
733
734
  fetchOptions?: FetchOptions | undefined;
734
735
  }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<Omit<{
@@ -762,7 +763,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
762
763
  organization: {
763
764
  checkSlug: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
764
765
  slug: string;
765
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
766
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
766
767
  slug: string;
767
768
  } & {
768
769
  fetchOptions?: FetchOptions | undefined;
@@ -778,7 +779,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
778
779
  removeMember: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
779
780
  memberIdOrEmail: string;
780
781
  organizationId?: string | undefined;
781
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
782
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
782
783
  memberIdOrEmail: string;
783
784
  organizationId?: string | undefined;
784
785
  } & {
@@ -806,11 +807,11 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
806
807
  } & {
807
808
  organization: {
808
809
  updateMemberRole: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
809
- role: better_auth_client_plugins.LiteralString | "org:admin" | "org:member" | "org:reviewer" | better_auth_client_plugins.LiteralString[] | ("org:admin" | "org:member" | "org:reviewer")[];
810
+ role: better_auth.LiteralString | "org:admin" | "org:member" | "org:reviewer" | better_auth.LiteralString[] | ("org:admin" | "org:member" | "org:reviewer")[];
810
811
  memberId: string;
811
812
  organizationId?: string | undefined;
812
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
813
- role: better_auth_client_plugins.LiteralString | "org:admin" | "org:member" | "org:reviewer" | better_auth_client_plugins.LiteralString[] | ("org:admin" | "org:member" | "org:reviewer")[];
813
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
814
+ role: better_auth.LiteralString | "org:admin" | "org:member" | "org:reviewer" | better_auth.LiteralString[] | ("org:admin" | "org:member" | "org:reviewer")[];
814
815
  memberId: string;
815
816
  organizationId?: string | undefined;
816
817
  } & {
@@ -836,7 +837,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
836
837
  organization: {
837
838
  leave: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
838
839
  organizationId: string;
839
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
840
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
840
841
  organizationId: string;
841
842
  } & {
842
843
  fetchOptions?: FetchOptions | undefined;
@@ -871,12 +872,12 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
871
872
  organization: {
872
873
  listUserInvitations: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
873
874
  email?: string | undefined;
874
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
875
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
875
876
  query?: {
876
877
  email?: string | undefined;
877
878
  } | undefined;
878
879
  fetchOptions?: FetchOptions | undefined;
879
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
880
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<(Omit<{
880
881
  id: string;
881
882
  organizationId: string;
882
883
  email: string;
@@ -886,7 +887,18 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
886
887
  expiresAt: Date;
887
888
  createdAt: Date;
888
889
  teamId?: string | undefined | undefined;
889
- }[], {
890
+ } & {
891
+ organization: {
892
+ id: string;
893
+ name: string;
894
+ slug: string;
895
+ createdAt: Date;
896
+ logo?: string | null | undefined | undefined;
897
+ metadata?: any;
898
+ };
899
+ }, "organization"> & {
900
+ organizationName: string;
901
+ })[], {
890
902
  code?: string | undefined;
891
903
  message?: string | undefined;
892
904
  }, FetchOptions["throw"] extends true ? true : true>>;
@@ -903,7 +915,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
903
915
  filterOperator?: "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "contains" | undefined;
904
916
  organizationId?: string | undefined;
905
917
  organizationSlug?: string | undefined;
906
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
918
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
907
919
  query?: {
908
920
  limit?: string | number | undefined;
909
921
  offset?: string | number | undefined;
@@ -950,7 +962,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
950
962
  userId?: string | undefined;
951
963
  organizationId?: string | undefined;
952
964
  organizationSlug?: string | undefined;
953
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
965
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
954
966
  query?: {
955
967
  userId?: string | undefined;
956
968
  organizationId?: string | undefined;
@@ -988,7 +1000,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
988
1000
  permission?: never | undefined;
989
1001
  }) & {
990
1002
  organizationId?: string | undefined;
991
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<(({
1003
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<(({
992
1004
  permission: {
993
1005
  access?: string[] | undefined;
994
1006
  organization?: ("update" | "delete")[] | undefined;
@@ -1025,7 +1037,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1025
1037
  createTeam: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1026
1038
  name: string;
1027
1039
  organizationId?: string | undefined;
1028
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
1040
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1029
1041
  name: string;
1030
1042
  organizationId?: string | undefined;
1031
1043
  } & {
@@ -1045,7 +1057,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1045
1057
  organization: {
1046
1058
  listTeams: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
1047
1059
  organizationId?: string | undefined;
1048
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
1060
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
1049
1061
  query?: {
1050
1062
  organizationId?: string | undefined;
1051
1063
  } | undefined;
@@ -1066,7 +1078,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1066
1078
  removeTeam: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1067
1079
  teamId: string;
1068
1080
  organizationId?: string | undefined;
1069
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
1081
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1070
1082
  teamId: string;
1071
1083
  organizationId?: string | undefined;
1072
1084
  } & {
@@ -1086,7 +1098,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1086
1098
  name: string;
1087
1099
  organizationId: string;
1088
1100
  }>;
1089
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
1101
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1090
1102
  teamId: string;
1091
1103
  data: Partial<{
1092
1104
  name: string;
@@ -1109,7 +1121,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1109
1121
  organization: {
1110
1122
  setActiveTeam: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1111
1123
  teamId?: string | null | undefined;
1112
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
1124
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
1113
1125
  teamId?: string | null | undefined;
1114
1126
  } & {
1115
1127
  fetchOptions?: FetchOptions | undefined;
@@ -1126,7 +1138,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1126
1138
  };
1127
1139
  } & {
1128
1140
  organization: {
1129
- listUserTeams: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
1141
+ listUserTeams: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
1130
1142
  query?: Record<string, any> | undefined;
1131
1143
  fetchOptions?: FetchOptions | undefined;
1132
1144
  }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
@@ -1144,7 +1156,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1144
1156
  organization: {
1145
1157
  listTeamMembers: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
1146
1158
  teamId?: string | undefined;
1147
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
1159
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
1148
1160
  query?: {
1149
1161
  teamId?: string | undefined;
1150
1162
  } | undefined;
@@ -1164,7 +1176,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1164
1176
  addTeamMember: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1165
1177
  teamId: string;
1166
1178
  userId: unknown;
1167
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
1179
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1168
1180
  teamId: string;
1169
1181
  userId: unknown;
1170
1182
  } & {
@@ -1184,7 +1196,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1184
1196
  removeTeamMember: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1185
1197
  teamId: string;
1186
1198
  userId: unknown;
1187
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
1199
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1188
1200
  teamId: string;
1189
1201
  userId: unknown;
1190
1202
  } & {
@@ -1203,7 +1215,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1203
1215
  metadata: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
1204
1216
  providerId: string;
1205
1217
  format?: "json" | "xml" | undefined;
1206
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
1218
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1207
1219
  query: {
1208
1220
  providerId: string;
1209
1221
  format?: "json" | "xml" | undefined;
@@ -1231,6 +1243,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1231
1243
  tokenEndpointAuthentication?: "client_secret_post" | "client_secret_basic" | undefined;
1232
1244
  jwksEndpoint?: string | undefined;
1233
1245
  discoveryEndpoint?: string | undefined;
1246
+ skipDiscovery?: boolean | undefined;
1234
1247
  scopes?: string[] | undefined;
1235
1248
  pkce?: boolean | undefined;
1236
1249
  mapping?: {
@@ -1290,7 +1303,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1290
1303
  } | undefined;
1291
1304
  organizationId?: string | undefined;
1292
1305
  overrideUserInfo?: boolean | undefined;
1293
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
1306
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1294
1307
  providerId: string;
1295
1308
  issuer: string;
1296
1309
  domain: string;
@@ -1303,6 +1316,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1303
1316
  tokenEndpointAuthentication?: "client_secret_post" | "client_secret_basic" | undefined;
1304
1317
  jwksEndpoint?: string | undefined;
1305
1318
  discoveryEndpoint?: string | undefined;
1319
+ skipDiscovery?: boolean | undefined;
1306
1320
  scopes?: string[] | undefined;
1307
1321
  pkce?: boolean | undefined;
1308
1322
  mapping?: {
@@ -1390,8 +1404,8 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1390
1404
  scopes?: string[] | undefined;
1391
1405
  loginHint?: string | undefined;
1392
1406
  requestSignUp?: boolean | undefined;
1393
- providerType?: "oidc" | "saml" | undefined;
1394
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
1407
+ providerType?: "saml" | "oidc" | undefined;
1408
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1395
1409
  callbackURL: string;
1396
1410
  email?: string | undefined;
1397
1411
  organizationSlug?: string | undefined;
@@ -1402,7 +1416,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1402
1416
  scopes?: string[] | undefined;
1403
1417
  loginHint?: string | undefined;
1404
1418
  requestSignUp?: boolean | undefined;
1405
- providerType?: "oidc" | "saml" | undefined;
1419
+ providerType?: "saml" | "oidc" | undefined;
1406
1420
  } & {
1407
1421
  fetchOptions?: FetchOptions | undefined;
1408
1422
  }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
@@ -1418,7 +1432,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1418
1432
  enable: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1419
1433
  password: string;
1420
1434
  issuer?: string | undefined;
1421
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
1435
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1422
1436
  password: string;
1423
1437
  issuer?: string | undefined;
1424
1438
  } & {
@@ -1435,7 +1449,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1435
1449
  twoFactor: {
1436
1450
  disable: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1437
1451
  password: string;
1438
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
1452
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1439
1453
  password: string;
1440
1454
  } & {
1441
1455
  fetchOptions?: FetchOptions | undefined;
@@ -1452,7 +1466,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1452
1466
  code: string;
1453
1467
  disableSession?: boolean | undefined;
1454
1468
  trustDevice?: boolean | undefined;
1455
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
1469
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1456
1470
  code: string;
1457
1471
  disableSession?: boolean | undefined;
1458
1472
  trustDevice?: boolean | undefined;
@@ -1478,7 +1492,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1478
1492
  twoFactor: {
1479
1493
  generateBackupCodes: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1480
1494
  password: string;
1481
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
1495
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1482
1496
  password: string;
1483
1497
  } & {
1484
1498
  fetchOptions?: FetchOptions | undefined;
@@ -1494,7 +1508,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1494
1508
  twoFactor: {
1495
1509
  sendOtp: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1496
1510
  trustDevice?: boolean | undefined;
1497
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
1511
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
1498
1512
  query?: Record<string, any> | undefined;
1499
1513
  fetchOptions?: FetchOptions | undefined;
1500
1514
  }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
@@ -1509,7 +1523,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1509
1523
  verifyOtp: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1510
1524
  code: string;
1511
1525
  trustDevice?: boolean | undefined;
1512
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
1526
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1513
1527
  code: string;
1514
1528
  trustDevice?: boolean | undefined;
1515
1529
  } & {
@@ -1534,7 +1548,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1534
1548
  twoFactor: {
1535
1549
  getTotpUri: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1536
1550
  password: string;
1537
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
1551
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1538
1552
  password: string;
1539
1553
  } & {
1540
1554
  fetchOptions?: FetchOptions | undefined;
@@ -1550,7 +1564,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1550
1564
  verifyTotp: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1551
1565
  code: string;
1552
1566
  trustDevice?: boolean | undefined;
1553
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
1567
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1554
1568
  code: string;
1555
1569
  trustDevice?: boolean | undefined;
1556
1570
  } & {
@@ -1572,15 +1586,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1572
1586
  }, FetchOptions["throw"] extends true ? true : true>>;
1573
1587
  };
1574
1588
  } & {
1575
- jwks: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
1576
- query?: Record<string, any> | undefined;
1577
- fetchOptions?: FetchOptions | undefined;
1578
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<jose.JSONWebKeySet, {
1579
- code?: string | undefined;
1580
- message?: string | undefined;
1581
- }, FetchOptions["throw"] extends true ? true : true>>;
1582
- } & {
1583
- token: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
1589
+ token: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
1584
1590
  query?: Record<string, any> | undefined;
1585
1591
  fetchOptions?: FetchOptions | undefined;
1586
1592
  }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
@@ -1604,7 +1610,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1604
1610
  rateLimitMax?: number | undefined;
1605
1611
  rateLimitEnabled?: boolean | undefined;
1606
1612
  permissions?: Record<string, string[]> | undefined;
1607
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
1613
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
1608
1614
  name?: string | undefined;
1609
1615
  expiresIn?: number | null | undefined;
1610
1616
  userId?: unknown;
@@ -1650,7 +1656,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1650
1656
  apiKey: {
1651
1657
  get: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
1652
1658
  id: string;
1653
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
1659
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1654
1660
  query: {
1655
1661
  id: string;
1656
1662
  };
@@ -1699,7 +1705,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1699
1705
  rateLimitTimeWindow?: number | undefined;
1700
1706
  rateLimitMax?: number | undefined;
1701
1707
  permissions?: Record<string, string[]> | null | undefined;
1702
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
1708
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1703
1709
  keyId: string;
1704
1710
  userId?: unknown;
1705
1711
  name?: string | undefined;
@@ -1747,7 +1753,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1747
1753
  apiKey: {
1748
1754
  delete: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1749
1755
  keyId: string;
1750
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
1756
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1751
1757
  keyId: string;
1752
1758
  } & {
1753
1759
  fetchOptions?: FetchOptions | undefined;
@@ -1760,7 +1766,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1760
1766
  };
1761
1767
  } & {
1762
1768
  apiKey: {
1763
- list: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
1769
+ list: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
1764
1770
  query?: Record<string, any> | undefined;
1765
1771
  fetchOptions?: FetchOptions | undefined;
1766
1772
  }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
@@ -1795,10 +1801,10 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1795
1801
  admin: {
1796
1802
  setRole: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1797
1803
  userId: string;
1798
- role: "admin" | "user" | ("admin" | "user")[];
1799
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
1804
+ role: "user" | "admin" | ("user" | "admin")[];
1805
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1800
1806
  userId: string;
1801
- role: "admin" | "user" | ("admin" | "user")[];
1807
+ role: "user" | "admin" | ("user" | "admin")[];
1802
1808
  } & {
1803
1809
  fetchOptions?: FetchOptions | undefined;
1804
1810
  }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
@@ -1812,7 +1818,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1812
1818
  admin: {
1813
1819
  getUser: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
1814
1820
  id: string;
1815
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
1821
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1816
1822
  query: {
1817
1823
  id: string;
1818
1824
  };
@@ -1836,13 +1842,13 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1836
1842
  email: string;
1837
1843
  password: string;
1838
1844
  name: string;
1839
- role?: "admin" | "user" | ("admin" | "user")[] | undefined;
1845
+ role?: "user" | "admin" | ("user" | "admin")[] | undefined;
1840
1846
  data?: Record<string, any> | undefined;
1841
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
1847
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1842
1848
  email: string;
1843
1849
  password: string;
1844
1850
  name: string;
1845
- role?: "admin" | "user" | ("admin" | "user")[] | undefined;
1851
+ role?: "user" | "admin" | ("user" | "admin")[] | undefined;
1846
1852
  data?: Record<string, any> | undefined;
1847
1853
  } & {
1848
1854
  fetchOptions?: FetchOptions | undefined;
@@ -1858,7 +1864,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1858
1864
  updateUser: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1859
1865
  userId: unknown;
1860
1866
  data: Record<any, any>;
1861
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
1867
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1862
1868
  userId: unknown;
1863
1869
  data: Record<any, any>;
1864
1870
  } & {
@@ -1881,7 +1887,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1881
1887
  filterField?: string | undefined;
1882
1888
  filterValue?: string | number | boolean | undefined;
1883
1889
  filterOperator?: "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "contains" | undefined;
1884
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
1890
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1885
1891
  query: {
1886
1892
  searchValue?: string | undefined;
1887
1893
  searchField?: "name" | "email" | undefined;
@@ -1912,7 +1918,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1912
1918
  admin: {
1913
1919
  listUserSessions: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1914
1920
  userId: unknown;
1915
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
1921
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1916
1922
  userId: unknown;
1917
1923
  } & {
1918
1924
  fetchOptions?: FetchOptions | undefined;
@@ -1927,7 +1933,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1927
1933
  admin: {
1928
1934
  unbanUser: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1929
1935
  userId: unknown;
1930
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
1936
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1931
1937
  userId: unknown;
1932
1938
  } & {
1933
1939
  fetchOptions?: FetchOptions | undefined;
@@ -1952,7 +1958,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1952
1958
  userId: unknown;
1953
1959
  banReason?: string | undefined;
1954
1960
  banExpiresIn?: number | undefined;
1955
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
1961
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1956
1962
  userId: unknown;
1957
1963
  banReason?: string | undefined;
1958
1964
  banExpiresIn?: number | undefined;
@@ -1977,7 +1983,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1977
1983
  admin: {
1978
1984
  impersonateUser: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
1979
1985
  userId: unknown;
1980
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
1986
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
1981
1987
  userId: unknown;
1982
1988
  } & {
1983
1989
  fetchOptions?: FetchOptions | undefined;
@@ -1992,15 +1998,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
1992
1998
  ipAddress?: string | null | undefined;
1993
1999
  userAgent?: string | null | undefined;
1994
2000
  };
1995
- user: {
1996
- id: string;
1997
- createdAt: Date;
1998
- updatedAt: Date;
1999
- email: string;
2000
- emailVerified: boolean;
2001
- name: string;
2002
- image?: string | null | undefined;
2003
- };
2001
+ user: better_auth_plugins.UserWithRole;
2004
2002
  }, {
2005
2003
  code?: string | undefined;
2006
2004
  message?: string | undefined;
@@ -2008,7 +2006,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2008
2006
  };
2009
2007
  } & {
2010
2008
  admin: {
2011
- stopImpersonating: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
2009
+ stopImpersonating: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
2012
2010
  query?: Record<string, any> | undefined;
2013
2011
  fetchOptions?: FetchOptions | undefined;
2014
2012
  }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
@@ -2023,7 +2021,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2023
2021
  admin: {
2024
2022
  revokeUserSession: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
2025
2023
  sessionToken: string;
2026
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
2024
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
2027
2025
  sessionToken: string;
2028
2026
  } & {
2029
2027
  fetchOptions?: FetchOptions | undefined;
@@ -2038,7 +2036,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2038
2036
  admin: {
2039
2037
  revokeUserSessions: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
2040
2038
  userId: unknown;
2041
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
2039
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
2042
2040
  userId: unknown;
2043
2041
  } & {
2044
2042
  fetchOptions?: FetchOptions | undefined;
@@ -2053,7 +2051,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2053
2051
  admin: {
2054
2052
  removeUser: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
2055
2053
  userId: unknown;
2056
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
2054
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
2057
2055
  userId: unknown;
2058
2056
  } & {
2059
2057
  fetchOptions?: FetchOptions | undefined;
@@ -2069,7 +2067,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2069
2067
  setUserPassword: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
2070
2068
  newPassword: string;
2071
2069
  userId: unknown;
2072
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
2070
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
2073
2071
  newPassword: string;
2074
2072
  userId: unknown;
2075
2073
  } & {
@@ -2098,7 +2096,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2098
2096
  }) & {
2099
2097
  userId?: string | undefined;
2100
2098
  role?: "admin" | "user" | undefined;
2101
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<(({
2099
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<(({
2102
2100
  permission: {
2103
2101
  readonly user?: ("update" | "delete" | "create" | "list" | "set-role" | "ban" | "impersonate" | "set-password" | "get")[] | undefined;
2104
2102
  readonly session?: ("delete" | "list" | "revoke")[] | undefined;
@@ -2126,7 +2124,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2126
2124
  } & {
2127
2125
  signIn: {
2128
2126
  social: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
2129
- provider: unknown;
2127
+ 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";
2130
2128
  callbackURL?: string | undefined;
2131
2129
  newUserCallbackURL?: string | undefined;
2132
2130
  errorCallbackURL?: string | undefined;
@@ -2142,8 +2140,8 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2142
2140
  requestSignUp?: boolean | undefined;
2143
2141
  loginHint?: string | undefined;
2144
2142
  additionalData?: Record<string, any> | undefined;
2145
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
2146
- provider: unknown;
2143
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
2144
+ 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";
2147
2145
  callbackURL?: string | undefined;
2148
2146
  newUserCallbackURL?: string | undefined;
2149
2147
  errorCallbackURL?: string | undefined;
@@ -2162,28 +2160,28 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2162
2160
  } & {
2163
2161
  fetchOptions?: FetchOptions | undefined;
2164
2162
  }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<NonNullable<{
2163
+ redirect: boolean;
2164
+ url: string;
2165
+ } | {
2165
2166
  redirect: boolean;
2166
2167
  token: string;
2167
2168
  url: undefined;
2168
2169
  user: {
2169
2170
  id: string;
2170
- email: string;
2171
- name: string;
2172
- image: string | null | undefined;
2173
- emailVerified: boolean;
2174
2171
  createdAt: Date;
2175
2172
  updatedAt: Date;
2173
+ email: string;
2174
+ emailVerified: boolean;
2175
+ name: string;
2176
+ image?: string | null | undefined | undefined;
2176
2177
  };
2177
- } | {
2178
- url: string;
2179
- redirect: boolean;
2180
2178
  }>, {
2181
2179
  code?: string | undefined;
2182
2180
  message?: string | undefined;
2183
2181
  }, FetchOptions["throw"] extends true ? true : true>>;
2184
2182
  };
2185
2183
  } & {
2186
- signOut: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
2184
+ signOut: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
2187
2185
  query?: Record<string, any> | undefined;
2188
2186
  fetchOptions?: FetchOptions | undefined;
2189
2187
  }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
@@ -2201,7 +2199,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2201
2199
  image?: string | undefined;
2202
2200
  callbackURL?: string | undefined;
2203
2201
  rememberMe?: boolean | undefined;
2204
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
2202
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
2205
2203
  email: string;
2206
2204
  name: string;
2207
2205
  password: string;
@@ -2214,23 +2212,23 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2214
2212
  token: null;
2215
2213
  user: {
2216
2214
  id: string;
2217
- email: string;
2218
- name: string;
2219
- image: string | null | undefined;
2220
- emailVerified: boolean;
2221
2215
  createdAt: Date;
2222
2216
  updatedAt: Date;
2217
+ email: string;
2218
+ emailVerified: boolean;
2219
+ name: string;
2220
+ image?: string | null | undefined | undefined;
2223
2221
  };
2224
2222
  } | {
2225
2223
  token: string;
2226
2224
  user: {
2227
2225
  id: string;
2228
- email: string;
2229
- name: string;
2230
- image: string | null | undefined;
2231
- emailVerified: boolean;
2232
2226
  createdAt: Date;
2233
2227
  updatedAt: Date;
2228
+ email: string;
2229
+ emailVerified: boolean;
2230
+ name: string;
2231
+ image?: string | null | undefined | undefined;
2234
2232
  };
2235
2233
  }>, {
2236
2234
  code?: string | undefined;
@@ -2244,7 +2242,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2244
2242
  password: string;
2245
2243
  callbackURL?: string | undefined;
2246
2244
  rememberMe?: boolean | undefined;
2247
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
2245
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
2248
2246
  email: string;
2249
2247
  password: string;
2250
2248
  callbackURL?: string | undefined;
@@ -2254,15 +2252,15 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2254
2252
  }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
2255
2253
  redirect: boolean;
2256
2254
  token: string;
2257
- url: string | undefined;
2255
+ url?: string | undefined;
2258
2256
  user: {
2259
2257
  id: string;
2260
- email: string;
2261
- name: string;
2262
- image: string | null | undefined;
2263
- emailVerified: boolean;
2264
2258
  createdAt: Date;
2265
2259
  updatedAt: Date;
2260
+ email: string;
2261
+ emailVerified: boolean;
2262
+ name: string;
2263
+ image?: string | null | undefined | undefined;
2266
2264
  };
2267
2265
  }, {
2268
2266
  code?: string | undefined;
@@ -2275,7 +2273,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2275
2273
  token?: string | undefined;
2276
2274
  }> & Record<string, any>, Partial<{
2277
2275
  token?: string | undefined;
2278
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
2276
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
2279
2277
  newPassword: string;
2280
2278
  token?: string | undefined;
2281
2279
  } & {
@@ -2290,7 +2288,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2290
2288
  verifyEmail: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
2291
2289
  token: string;
2292
2290
  callbackURL?: string | undefined;
2293
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
2291
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
2294
2292
  query: {
2295
2293
  token: string;
2296
2294
  callbackURL?: string | undefined;
@@ -2306,7 +2304,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2306
2304
  sendVerificationEmail: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
2307
2305
  email: string;
2308
2306
  callbackURL?: string | undefined;
2309
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
2307
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
2310
2308
  email: string;
2311
2309
  callbackURL?: string | undefined;
2312
2310
  } & {
@@ -2321,7 +2319,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2321
2319
  changeEmail: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
2322
2320
  newEmail: string;
2323
2321
  callbackURL?: string | undefined;
2324
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
2322
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
2325
2323
  newEmail: string;
2326
2324
  callbackURL?: string | undefined;
2327
2325
  } & {
@@ -2337,7 +2335,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2337
2335
  newPassword: string;
2338
2336
  currentPassword: string;
2339
2337
  revokeOtherSessions?: boolean | undefined;
2340
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
2338
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
2341
2339
  newPassword: string;
2342
2340
  currentPassword: string;
2343
2341
  revokeOtherSessions?: boolean | undefined;
@@ -2361,8 +2359,8 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2361
2359
  } & {
2362
2360
  updateUser: <FetchOptions extends better_auth.ClientFetchOption<Partial<Partial<{}> & {
2363
2361
  name?: string | undefined;
2364
- image?: string | undefined;
2365
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
2362
+ image?: string | undefined | null;
2363
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
2366
2364
  image?: (string | null) | undefined;
2367
2365
  name?: string | undefined;
2368
2366
  fetchOptions?: FetchOptions | undefined;
@@ -2379,7 +2377,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2379
2377
  callbackURL?: string | undefined;
2380
2378
  password?: string | undefined;
2381
2379
  token?: string | undefined;
2382
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
2380
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
2383
2381
  callbackURL?: string | undefined;
2384
2382
  password?: string | undefined;
2385
2383
  token?: string | undefined;
@@ -2396,7 +2394,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2396
2394
  requestPasswordReset: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
2397
2395
  email: string;
2398
2396
  redirectTo?: string | undefined;
2399
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
2397
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
2400
2398
  email: string;
2401
2399
  redirectTo?: string | undefined;
2402
2400
  } & {
@@ -2414,7 +2412,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2414
2412
  callbackURL: string;
2415
2413
  }> & Record<string, any>, {
2416
2414
  token: string;
2417
- }>>(data_0: better_auth_client_plugins.Prettify<{
2415
+ }>>(data_0: better_auth.Prettify<{
2418
2416
  query: {
2419
2417
  callbackURL: string;
2420
2418
  };
@@ -2425,10 +2423,10 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2425
2423
  }, FetchOptions["throw"] extends true ? true : true>>;
2426
2424
  };
2427
2425
  } & {
2428
- listSessions: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
2426
+ listSessions: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
2429
2427
  query?: Record<string, any> | undefined;
2430
2428
  fetchOptions?: FetchOptions | undefined;
2431
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<better_auth_client_plugins.Prettify<{
2429
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<better_auth.Prettify<{
2432
2430
  id: string;
2433
2431
  createdAt: Date;
2434
2432
  updatedAt: Date;
@@ -2444,7 +2442,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2444
2442
  } & {
2445
2443
  revokeSession: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
2446
2444
  token: string;
2447
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
2445
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
2448
2446
  token: string;
2449
2447
  } & {
2450
2448
  fetchOptions?: FetchOptions | undefined;
@@ -2455,7 +2453,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2455
2453
  message?: string | undefined;
2456
2454
  }, FetchOptions["throw"] extends true ? true : true>>;
2457
2455
  } & {
2458
- revokeSessions: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
2456
+ revokeSessions: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
2459
2457
  query?: Record<string, any> | undefined;
2460
2458
  fetchOptions?: FetchOptions | undefined;
2461
2459
  }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
@@ -2465,7 +2463,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2465
2463
  message?: string | undefined;
2466
2464
  }, FetchOptions["throw"] extends true ? true : true>>;
2467
2465
  } & {
2468
- revokeOtherSessions: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
2466
+ revokeOtherSessions: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
2469
2467
  query?: Record<string, any> | undefined;
2470
2468
  fetchOptions?: FetchOptions | undefined;
2471
2469
  }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
@@ -2490,7 +2488,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2490
2488
  errorCallbackURL?: string | undefined;
2491
2489
  disableRedirect?: boolean | undefined;
2492
2490
  additionalData?: Record<string, any> | undefined;
2493
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
2491
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
2494
2492
  provider: unknown;
2495
2493
  callbackURL?: string | undefined;
2496
2494
  idToken?: {
@@ -2515,7 +2513,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2515
2513
  message?: string | undefined;
2516
2514
  }, FetchOptions["throw"] extends true ? true : true>>;
2517
2515
  } & {
2518
- listAccounts: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
2516
+ listAccounts: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
2519
2517
  query?: Record<string, any> | undefined;
2520
2518
  fetchOptions?: FetchOptions | undefined;
2521
2519
  }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
@@ -2535,7 +2533,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2535
2533
  callback: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
2536
2534
  token: string;
2537
2535
  callbackURL?: string | undefined;
2538
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
2536
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
2539
2537
  query: {
2540
2538
  token: string;
2541
2539
  callbackURL?: string | undefined;
@@ -2553,7 +2551,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2553
2551
  unlinkAccount: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
2554
2552
  providerId: string;
2555
2553
  accountId?: string | undefined;
2556
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
2554
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
2557
2555
  providerId: string;
2558
2556
  accountId?: string | undefined;
2559
2557
  } & {
@@ -2569,7 +2567,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2569
2567
  providerId: string;
2570
2568
  accountId?: string | undefined;
2571
2569
  userId?: string | undefined;
2572
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
2570
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
2573
2571
  providerId: string;
2574
2572
  accountId?: string | undefined;
2575
2573
  userId?: string | undefined;
@@ -2593,7 +2591,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2593
2591
  providerId: string;
2594
2592
  accountId?: string | undefined;
2595
2593
  userId?: string | undefined;
2596
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
2594
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
2597
2595
  providerId: string;
2598
2596
  accountId?: string | undefined;
2599
2597
  userId?: string | undefined;
@@ -2611,7 +2609,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2611
2609
  } & {
2612
2610
  accountInfo: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
2613
2611
  accountId?: string | undefined;
2614
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
2612
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
2615
2613
  query?: {
2616
2614
  accountId?: string | undefined;
2617
2615
  } | undefined;
@@ -2627,7 +2625,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2627
2625
  getSession: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
2628
2626
  disableCookieCache?: unknown;
2629
2627
  disableRefresh?: unknown;
2630
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
2628
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
2631
2629
  query?: {
2632
2630
  disableCookieCache?: unknown;
2633
2631
  disableRefresh?: unknown;
@@ -2775,6 +2773,18 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2775
2773
  role: R;
2776
2774
  }) => boolean;
2777
2775
  };
2776
+ } & {
2777
+ jwks: (fetchOptions?: any) => Promise<{
2778
+ data: null;
2779
+ error: {
2780
+ message?: string | undefined;
2781
+ status: number;
2782
+ statusText: string;
2783
+ };
2784
+ } | {
2785
+ data: jose.JSONWebKeySet;
2786
+ error: null;
2787
+ }>;
2778
2788
  } & {
2779
2789
  admin: {
2780
2790
  checkRolePermission: <R extends "admin" | "user">(data: ({
@@ -2829,18 +2839,12 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2829
2839
  isPending: boolean;
2830
2840
  }>;
2831
2841
  $fetch: _better_fetch_fetch.BetterFetch<{
2832
- plugins: (_better_fetch_fetch.BetterFetchPlugin | {
2842
+ plugins: (_better_fetch_fetch.BetterFetchPlugin<Record<string, any>> | {
2833
2843
  id: string;
2834
2844
  name: string;
2835
2845
  hooks: {
2836
2846
  onSuccess(context: _better_fetch_fetch.SuccessContext<any>): void;
2837
2847
  };
2838
- } | {
2839
- id: string;
2840
- name: string;
2841
- hooks: {
2842
- onRequest<T extends Record<string, any>>(context: _better_fetch_fetch.RequestContext<T>): void;
2843
- };
2844
2848
  } | {
2845
2849
  id: string;
2846
2850
  name: string;
@@ -2938,8 +2942,118 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2938
2942
  };
2939
2943
  };
2940
2944
  $ERROR_CODES: {
2941
- readonly USER_NOT_FOUND: "User not found";
2945
+ readonly YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_ORGANIZATION: "You are not allowed to create a new organization";
2946
+ readonly YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_ORGANIZATIONS: "You have reached the maximum number of organizations";
2947
+ readonly ORGANIZATION_ALREADY_EXISTS: "Organization already exists";
2948
+ readonly ORGANIZATION_SLUG_ALREADY_TAKEN: "Organization slug already taken";
2949
+ readonly ORGANIZATION_NOT_FOUND: "Organization not found";
2950
+ readonly USER_IS_NOT_A_MEMBER_OF_THE_ORGANIZATION: "User is not a member of the organization";
2951
+ readonly YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_ORGANIZATION: "You are not allowed to update this organization";
2952
+ readonly YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_ORGANIZATION: "You are not allowed to delete this organization";
2953
+ readonly NO_ACTIVE_ORGANIZATION: "No active organization";
2954
+ readonly USER_IS_ALREADY_A_MEMBER_OF_THIS_ORGANIZATION: "User is already a member of this organization";
2955
+ readonly MEMBER_NOT_FOUND: "Member not found";
2956
+ readonly ROLE_NOT_FOUND: "Role not found";
2957
+ readonly YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM: "You are not allowed to create a new team";
2958
+ readonly TEAM_ALREADY_EXISTS: "Team already exists";
2959
+ readonly TEAM_NOT_FOUND: "Team not found";
2960
+ readonly YOU_CANNOT_LEAVE_THE_ORGANIZATION_AS_THE_ONLY_OWNER: "You cannot leave the organization as the only owner";
2961
+ readonly YOU_CANNOT_LEAVE_THE_ORGANIZATION_WITHOUT_AN_OWNER: "You cannot leave the organization without an owner";
2962
+ readonly YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_MEMBER: "You are not allowed to delete this member";
2963
+ readonly YOU_ARE_NOT_ALLOWED_TO_INVITE_USERS_TO_THIS_ORGANIZATION: "You are not allowed to invite users to this organization";
2964
+ readonly USER_IS_ALREADY_INVITED_TO_THIS_ORGANIZATION: "User is already invited to this organization";
2965
+ readonly INVITATION_NOT_FOUND: "Invitation not found";
2966
+ readonly YOU_ARE_NOT_THE_RECIPIENT_OF_THE_INVITATION: "You are not the recipient of the invitation";
2967
+ readonly EMAIL_VERIFICATION_REQUIRED_BEFORE_ACCEPTING_OR_REJECTING_INVITATION: "Email verification required before accepting or rejecting invitation";
2968
+ readonly YOU_ARE_NOT_ALLOWED_TO_CANCEL_THIS_INVITATION: "You are not allowed to cancel this invitation";
2969
+ readonly INVITER_IS_NO_LONGER_A_MEMBER_OF_THE_ORGANIZATION: "Inviter is no longer a member of the organization";
2970
+ readonly YOU_ARE_NOT_ALLOWED_TO_INVITE_USER_WITH_THIS_ROLE: "You are not allowed to invite a user with this role";
2971
+ readonly FAILED_TO_RETRIEVE_INVITATION: "Failed to retrieve invitation";
2972
+ readonly YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_TEAMS: "You have reached the maximum number of teams";
2973
+ readonly UNABLE_TO_REMOVE_LAST_TEAM: "Unable to remove last team";
2974
+ readonly YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_MEMBER: "You are not allowed to update this member";
2975
+ readonly ORGANIZATION_MEMBERSHIP_LIMIT_REACHED: "Organization membership limit reached";
2976
+ readonly YOU_ARE_NOT_ALLOWED_TO_CREATE_TEAMS_IN_THIS_ORGANIZATION: "You are not allowed to create teams in this organization";
2977
+ readonly YOU_ARE_NOT_ALLOWED_TO_DELETE_TEAMS_IN_THIS_ORGANIZATION: "You are not allowed to delete teams in this organization";
2978
+ readonly YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_TEAM: "You are not allowed to update this team";
2979
+ readonly YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_TEAM: "You are not allowed to delete this team";
2980
+ readonly INVITATION_LIMIT_REACHED: "Invitation limit reached";
2981
+ readonly TEAM_MEMBER_LIMIT_REACHED: "Team member limit reached";
2982
+ readonly USER_IS_NOT_A_MEMBER_OF_THE_TEAM: "User is not a member of the team";
2983
+ readonly YOU_CAN_NOT_ACCESS_THE_MEMBERS_OF_THIS_TEAM: "You are not allowed to list the members of this team";
2984
+ readonly YOU_DO_NOT_HAVE_AN_ACTIVE_TEAM: "You do not have an active team";
2985
+ readonly YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM_MEMBER: "You are not allowed to create a new member";
2986
+ readonly YOU_ARE_NOT_ALLOWED_TO_REMOVE_A_TEAM_MEMBER: "You are not allowed to remove a team member";
2987
+ readonly YOU_ARE_NOT_ALLOWED_TO_ACCESS_THIS_ORGANIZATION: "You are not allowed to access this organization as an owner";
2988
+ readonly YOU_ARE_NOT_A_MEMBER_OF_THIS_ORGANIZATION: "You are not a member of this organization";
2989
+ readonly MISSING_AC_INSTANCE: "Dynamic Access Control requires a pre-defined ac instance on the server auth plugin. Read server logs for more information";
2990
+ readonly YOU_MUST_BE_IN_AN_ORGANIZATION_TO_CREATE_A_ROLE: "You must be in an organization to create a role";
2991
+ readonly YOU_ARE_NOT_ALLOWED_TO_CREATE_A_ROLE: "You are not allowed to create a role";
2992
+ readonly YOU_ARE_NOT_ALLOWED_TO_UPDATE_A_ROLE: "You are not allowed to update a role";
2993
+ readonly YOU_ARE_NOT_ALLOWED_TO_DELETE_A_ROLE: "You are not allowed to delete a role";
2994
+ readonly YOU_ARE_NOT_ALLOWED_TO_READ_A_ROLE: "You are not allowed to read a role";
2995
+ readonly YOU_ARE_NOT_ALLOWED_TO_LIST_A_ROLE: "You are not allowed to list a role";
2996
+ readonly YOU_ARE_NOT_ALLOWED_TO_GET_A_ROLE: "You are not allowed to get a role";
2997
+ readonly TOO_MANY_ROLES: "This organization has too many roles";
2998
+ readonly INVALID_RESOURCE: "The provided permission includes an invalid resource";
2999
+ readonly ROLE_NAME_IS_ALREADY_TAKEN: "That role name is already taken";
3000
+ readonly CANNOT_DELETE_A_PRE_DEFINED_ROLE: "Cannot delete a pre-defined role";
2942
3001
  readonly FAILED_TO_CREATE_USER: "Failed to create user";
3002
+ readonly USER_ALREADY_EXISTS: "User already exists.";
3003
+ readonly USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL: "User already exists. Use another email.";
3004
+ readonly YOU_CANNOT_BAN_YOURSELF: "You cannot ban yourself";
3005
+ readonly YOU_ARE_NOT_ALLOWED_TO_CHANGE_USERS_ROLE: "You are not allowed to change users role";
3006
+ readonly YOU_ARE_NOT_ALLOWED_TO_CREATE_USERS: "You are not allowed to create users";
3007
+ readonly YOU_ARE_NOT_ALLOWED_TO_LIST_USERS: "You are not allowed to list users";
3008
+ readonly YOU_ARE_NOT_ALLOWED_TO_LIST_USERS_SESSIONS: "You are not allowed to list users sessions";
3009
+ readonly YOU_ARE_NOT_ALLOWED_TO_BAN_USERS: "You are not allowed to ban users";
3010
+ readonly YOU_ARE_NOT_ALLOWED_TO_IMPERSONATE_USERS: "You are not allowed to impersonate users";
3011
+ readonly YOU_ARE_NOT_ALLOWED_TO_REVOKE_USERS_SESSIONS: "You are not allowed to revoke users sessions";
3012
+ readonly YOU_ARE_NOT_ALLOWED_TO_DELETE_USERS: "You are not allowed to delete users";
3013
+ readonly YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PASSWORD: "You are not allowed to set users password";
3014
+ readonly BANNED_USER: "You have been banned from this application";
3015
+ readonly YOU_ARE_NOT_ALLOWED_TO_GET_USER: "You are not allowed to get user";
3016
+ readonly NO_DATA_TO_UPDATE: "No data to update";
3017
+ readonly YOU_ARE_NOT_ALLOWED_TO_UPDATE_USERS: "You are not allowed to update users";
3018
+ readonly YOU_CANNOT_REMOVE_YOURSELF: "You cannot remove yourself";
3019
+ readonly YOU_ARE_NOT_ALLOWED_TO_SET_NON_EXISTENT_VALUE: "You are not allowed to set a non-existent role value";
3020
+ readonly YOU_CANNOT_IMPERSONATE_ADMINS: "You cannot impersonate admins";
3021
+ readonly INVALID_ROLE_TYPE: "Invalid role type";
3022
+ readonly OTP_NOT_ENABLED: "OTP not enabled";
3023
+ readonly OTP_HAS_EXPIRED: "OTP has expired";
3024
+ readonly TOTP_NOT_ENABLED: "TOTP not enabled";
3025
+ readonly TWO_FACTOR_NOT_ENABLED: "Two factor isn't enabled";
3026
+ readonly BACKUP_CODES_NOT_ENABLED: "Backup codes aren't enabled";
3027
+ readonly INVALID_BACKUP_CODE: "Invalid backup code";
3028
+ readonly INVALID_CODE: "Invalid code";
3029
+ readonly TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE: "Too many attempts. Please request a new code.";
3030
+ readonly INVALID_TWO_FACTOR_COOKIE: "Invalid two factor cookie";
3031
+ readonly INVALID_METADATA_TYPE: "metadata must be an object or undefined";
3032
+ readonly REFILL_AMOUNT_AND_INTERVAL_REQUIRED: "refillAmount is required when refillInterval is provided";
3033
+ readonly REFILL_INTERVAL_AND_AMOUNT_REQUIRED: "refillInterval is required when refillAmount is provided";
3034
+ readonly USER_BANNED: "User is banned";
3035
+ readonly UNAUTHORIZED_SESSION: "Unauthorized or invalid session";
3036
+ readonly KEY_NOT_FOUND: "API Key not found";
3037
+ readonly KEY_DISABLED: "API Key is disabled";
3038
+ readonly KEY_EXPIRED: "API Key has expired";
3039
+ readonly USAGE_EXCEEDED: "API Key has reached its usage limit";
3040
+ readonly KEY_NOT_RECOVERABLE: "API Key is not recoverable";
3041
+ readonly EXPIRES_IN_IS_TOO_SMALL: "The expiresIn is smaller than the predefined minimum value.";
3042
+ readonly EXPIRES_IN_IS_TOO_LARGE: "The expiresIn is larger than the predefined maximum value.";
3043
+ readonly INVALID_REMAINING: "The remaining count is either too large or too small.";
3044
+ readonly INVALID_PREFIX_LENGTH: "The prefix length is either too large or too small.";
3045
+ readonly INVALID_NAME_LENGTH: "The name length is either too large or too small.";
3046
+ readonly METADATA_DISABLED: "Metadata is disabled.";
3047
+ readonly RATE_LIMIT_EXCEEDED: "Rate limit exceeded.";
3048
+ readonly NO_VALUES_TO_UPDATE: "No values to update.";
3049
+ readonly KEY_DISABLED_EXPIRATION: "Custom key expiration values are disabled.";
3050
+ readonly INVALID_API_KEY: "Invalid API key.";
3051
+ readonly INVALID_USER_ID_FROM_API_KEY: "The user id from the API key is invalid.";
3052
+ readonly INVALID_API_KEY_GETTER_RETURN_TYPE: "API Key getter returned an invalid key type. Expected string.";
3053
+ readonly SERVER_ONLY_PROPERTY: "The property you're trying to set can only be set from the server auth instance only.";
3054
+ readonly FAILED_TO_UPDATE_API_KEY: "Failed to update API key";
3055
+ readonly NAME_REQUIRED: "API Key name is required.";
3056
+ readonly USER_NOT_FOUND: "User not found";
2943
3057
  readonly FAILED_TO_CREATE_SESSION: "Failed to create session";
2944
3058
  readonly FAILED_TO_UPDATE_USER: "Failed to update user";
2945
3059
  readonly FAILED_TO_GET_SESSION: "Failed to get session";
@@ -2955,8 +3069,6 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2955
3069
  readonly EMAIL_NOT_VERIFIED: "Email not verified";
2956
3070
  readonly PASSWORD_TOO_SHORT: "Password too short";
2957
3071
  readonly PASSWORD_TOO_LONG: "Password too long";
2958
- readonly USER_ALREADY_EXISTS: "User already exists.";
2959
- readonly USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL: "User already exists. Use another email.";
2960
3072
  readonly EMAIL_CAN_NOT_BE_UPDATED: "Email can not be updated";
2961
3073
  readonly CREDENTIAL_ACCOUNT_NOT_FOUND: "Credential account not found";
2962
3074
  readonly SESSION_EXPIRED: "Session expired. Re-authenticate to perform this action.";
@@ -2968,7 +3080,7 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
2968
3080
  type APIClient = ReturnType<typeof createAPIClient>;
2969
3081
  declare const stub: {
2970
3082
  useActiveOrganization: nanostores.PreinitializedWritableAtom<{
2971
- data: better_auth_client_plugins.Prettify<{
3083
+ data: better_auth.Prettify<{
2972
3084
  id: string;
2973
3085
  name: string;
2974
3086
  slug: string;
@@ -3057,7 +3169,7 @@ declare const stub: {
3057
3169
  ":id": {
3058
3170
  members: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, {
3059
3171
  id: string;
3060
- }>>(data_0?: better_auth_client_plugins.Prettify<{
3172
+ }>>(data_0?: better_auth.Prettify<{
3061
3173
  query?: Record<string, any> | undefined;
3062
3174
  fetchOptions?: FetchOptions | undefined;
3063
3175
  }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
@@ -3075,11 +3187,15 @@ declare const stub: {
3075
3187
  };
3076
3188
  };
3077
3189
  } & {
3078
- handshake: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
3079
- query?: Record<string, any> | undefined;
3190
+ handshake: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
3191
+ origin: string;
3192
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
3193
+ query: {
3194
+ origin: string;
3195
+ };
3080
3196
  fetchOptions?: FetchOptions | undefined;
3081
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
3082
- 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_call.Status;
3197
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
3198
+ 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;
3083
3199
  body: ({
3084
3200
  message?: string;
3085
3201
  code?: string;
@@ -3099,7 +3215,7 @@ declare const stub: {
3099
3215
  handshake: {
3100
3216
  noncePayload: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
3101
3217
  nonce: string;
3102
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
3218
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
3103
3219
  query: {
3104
3220
  nonce: string;
3105
3221
  };
@@ -3120,7 +3236,7 @@ declare const stub: {
3120
3236
  logo?: string | undefined;
3121
3237
  metadata?: Record<string, any> | undefined;
3122
3238
  keepCurrentActiveOrganization?: boolean | undefined;
3123
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
3239
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
3124
3240
  name: string;
3125
3241
  slug: string;
3126
3242
  userId?: string | undefined;
@@ -3160,7 +3276,7 @@ declare const stub: {
3160
3276
  metadata?: Record<string, any> | undefined;
3161
3277
  } & Partial<{}>;
3162
3278
  organizationId?: string | undefined;
3163
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
3279
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
3164
3280
  data: {
3165
3281
  name?: string | undefined;
3166
3282
  slug?: string | undefined;
@@ -3188,7 +3304,7 @@ declare const stub: {
3188
3304
  organization: {
3189
3305
  delete: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
3190
3306
  organizationId: string;
3191
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
3307
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
3192
3308
  organizationId: string;
3193
3309
  } & {
3194
3310
  fetchOptions?: FetchOptions | undefined;
@@ -3209,7 +3325,7 @@ declare const stub: {
3209
3325
  setActive: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
3210
3326
  organizationId?: string | null | undefined;
3211
3327
  organizationSlug?: string | undefined;
3212
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
3328
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
3213
3329
  organizationId?: string | null | undefined;
3214
3330
  organizationSlug?: string | undefined;
3215
3331
  } & {
@@ -3265,7 +3381,7 @@ declare const stub: {
3265
3381
  organizationId?: string | undefined;
3266
3382
  organizationSlug?: string | undefined;
3267
3383
  membersLimit?: string | number | undefined;
3268
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
3384
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
3269
3385
  query?: {
3270
3386
  organizationId?: string | undefined;
3271
3387
  organizationSlug?: string | undefined;
@@ -3319,7 +3435,7 @@ declare const stub: {
3319
3435
  };
3320
3436
  } & {
3321
3437
  organization: {
3322
- list: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
3438
+ list: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
3323
3439
  query?: Record<string, any> | undefined;
3324
3440
  fetchOptions?: FetchOptions | undefined;
3325
3441
  }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
@@ -3343,7 +3459,7 @@ declare const stub: {
3343
3459
  resend?: boolean | undefined;
3344
3460
  } & {
3345
3461
  teamId?: (string | string[]) | undefined;
3346
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
3462
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
3347
3463
  email: string;
3348
3464
  role: "org:admin" | "org:member" | "org:reviewer" | ("org:admin" | "org:member" | "org:reviewer")[];
3349
3465
  organizationId?: string | undefined;
@@ -3371,7 +3487,7 @@ declare const stub: {
3371
3487
  organization: {
3372
3488
  cancelInvitation: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
3373
3489
  invitationId: string;
3374
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
3490
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
3375
3491
  invitationId: string;
3376
3492
  } & {
3377
3493
  fetchOptions?: FetchOptions | undefined;
@@ -3394,7 +3510,7 @@ declare const stub: {
3394
3510
  organization: {
3395
3511
  acceptInvitation: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
3396
3512
  invitationId: string;
3397
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
3513
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
3398
3514
  invitationId: string;
3399
3515
  } & {
3400
3516
  fetchOptions?: FetchOptions | undefined;
@@ -3426,7 +3542,7 @@ declare const stub: {
3426
3542
  organization: {
3427
3543
  getInvitation: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
3428
3544
  id: string;
3429
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
3545
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
3430
3546
  query: {
3431
3547
  id: string;
3432
3548
  };
@@ -3454,7 +3570,7 @@ declare const stub: {
3454
3570
  organization: {
3455
3571
  rejectInvitation: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
3456
3572
  invitationId: string;
3457
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
3573
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
3458
3574
  invitationId: string;
3459
3575
  } & {
3460
3576
  fetchOptions?: FetchOptions | undefined;
@@ -3479,7 +3595,7 @@ declare const stub: {
3479
3595
  organization: {
3480
3596
  listInvitations: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
3481
3597
  organizationId?: string | undefined;
3482
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
3598
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
3483
3599
  query?: {
3484
3600
  organizationId?: string | undefined;
3485
3601
  } | undefined;
@@ -3501,7 +3617,7 @@ declare const stub: {
3501
3617
  };
3502
3618
  } & {
3503
3619
  organization: {
3504
- getActiveMember: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
3620
+ getActiveMember: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
3505
3621
  query?: Record<string, any> | undefined;
3506
3622
  fetchOptions?: FetchOptions | undefined;
3507
3623
  }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<Omit<{
@@ -3535,7 +3651,7 @@ declare const stub: {
3535
3651
  organization: {
3536
3652
  checkSlug: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
3537
3653
  slug: string;
3538
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
3654
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
3539
3655
  slug: string;
3540
3656
  } & {
3541
3657
  fetchOptions?: FetchOptions | undefined;
@@ -3551,7 +3667,7 @@ declare const stub: {
3551
3667
  removeMember: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
3552
3668
  memberIdOrEmail: string;
3553
3669
  organizationId?: string | undefined;
3554
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
3670
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
3555
3671
  memberIdOrEmail: string;
3556
3672
  organizationId?: string | undefined;
3557
3673
  } & {
@@ -3579,11 +3695,11 @@ declare const stub: {
3579
3695
  } & {
3580
3696
  organization: {
3581
3697
  updateMemberRole: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
3582
- role: better_auth_client_plugins.LiteralString | "org:admin" | "org:member" | "org:reviewer" | better_auth_client_plugins.LiteralString[] | ("org:admin" | "org:member" | "org:reviewer")[];
3698
+ role: better_auth.LiteralString | "org:admin" | "org:member" | "org:reviewer" | better_auth.LiteralString[] | ("org:admin" | "org:member" | "org:reviewer")[];
3583
3699
  memberId: string;
3584
3700
  organizationId?: string | undefined;
3585
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
3586
- role: better_auth_client_plugins.LiteralString | "org:admin" | "org:member" | "org:reviewer" | better_auth_client_plugins.LiteralString[] | ("org:admin" | "org:member" | "org:reviewer")[];
3701
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
3702
+ role: better_auth.LiteralString | "org:admin" | "org:member" | "org:reviewer" | better_auth.LiteralString[] | ("org:admin" | "org:member" | "org:reviewer")[];
3587
3703
  memberId: string;
3588
3704
  organizationId?: string | undefined;
3589
3705
  } & {
@@ -3609,7 +3725,7 @@ declare const stub: {
3609
3725
  organization: {
3610
3726
  leave: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
3611
3727
  organizationId: string;
3612
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
3728
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
3613
3729
  organizationId: string;
3614
3730
  } & {
3615
3731
  fetchOptions?: FetchOptions | undefined;
@@ -3644,12 +3760,12 @@ declare const stub: {
3644
3760
  organization: {
3645
3761
  listUserInvitations: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
3646
3762
  email?: string | undefined;
3647
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
3763
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
3648
3764
  query?: {
3649
3765
  email?: string | undefined;
3650
3766
  } | undefined;
3651
3767
  fetchOptions?: FetchOptions | undefined;
3652
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
3768
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<(Omit<{
3653
3769
  id: string;
3654
3770
  organizationId: string;
3655
3771
  email: string;
@@ -3659,7 +3775,18 @@ declare const stub: {
3659
3775
  expiresAt: Date;
3660
3776
  createdAt: Date;
3661
3777
  teamId?: string | undefined | undefined;
3662
- }[], {
3778
+ } & {
3779
+ organization: {
3780
+ id: string;
3781
+ name: string;
3782
+ slug: string;
3783
+ createdAt: Date;
3784
+ logo?: string | null | undefined | undefined;
3785
+ metadata?: any;
3786
+ };
3787
+ }, "organization"> & {
3788
+ organizationName: string;
3789
+ })[], {
3663
3790
  code?: string | undefined;
3664
3791
  message?: string | undefined;
3665
3792
  }, FetchOptions["throw"] extends true ? true : true>>;
@@ -3676,7 +3803,7 @@ declare const stub: {
3676
3803
  filterOperator?: "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "contains" | undefined;
3677
3804
  organizationId?: string | undefined;
3678
3805
  organizationSlug?: string | undefined;
3679
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
3806
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
3680
3807
  query?: {
3681
3808
  limit?: string | number | undefined;
3682
3809
  offset?: string | number | undefined;
@@ -3723,7 +3850,7 @@ declare const stub: {
3723
3850
  userId?: string | undefined;
3724
3851
  organizationId?: string | undefined;
3725
3852
  organizationSlug?: string | undefined;
3726
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
3853
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
3727
3854
  query?: {
3728
3855
  userId?: string | undefined;
3729
3856
  organizationId?: string | undefined;
@@ -3761,7 +3888,7 @@ declare const stub: {
3761
3888
  permission?: never | undefined;
3762
3889
  }) & {
3763
3890
  organizationId?: string | undefined;
3764
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<(({
3891
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<(({
3765
3892
  permission: {
3766
3893
  access?: string[] | undefined;
3767
3894
  organization?: ("update" | "delete")[] | undefined;
@@ -3798,7 +3925,7 @@ declare const stub: {
3798
3925
  createTeam: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
3799
3926
  name: string;
3800
3927
  organizationId?: string | undefined;
3801
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
3928
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
3802
3929
  name: string;
3803
3930
  organizationId?: string | undefined;
3804
3931
  } & {
@@ -3818,7 +3945,7 @@ declare const stub: {
3818
3945
  organization: {
3819
3946
  listTeams: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
3820
3947
  organizationId?: string | undefined;
3821
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
3948
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
3822
3949
  query?: {
3823
3950
  organizationId?: string | undefined;
3824
3951
  } | undefined;
@@ -3839,7 +3966,7 @@ declare const stub: {
3839
3966
  removeTeam: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
3840
3967
  teamId: string;
3841
3968
  organizationId?: string | undefined;
3842
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
3969
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
3843
3970
  teamId: string;
3844
3971
  organizationId?: string | undefined;
3845
3972
  } & {
@@ -3859,7 +3986,7 @@ declare const stub: {
3859
3986
  name: string;
3860
3987
  organizationId: string;
3861
3988
  }>;
3862
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
3989
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
3863
3990
  teamId: string;
3864
3991
  data: Partial<{
3865
3992
  name: string;
@@ -3882,7 +4009,7 @@ declare const stub: {
3882
4009
  organization: {
3883
4010
  setActiveTeam: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
3884
4011
  teamId?: string | null | undefined;
3885
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
4012
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
3886
4013
  teamId?: string | null | undefined;
3887
4014
  } & {
3888
4015
  fetchOptions?: FetchOptions | undefined;
@@ -3899,7 +4026,7 @@ declare const stub: {
3899
4026
  };
3900
4027
  } & {
3901
4028
  organization: {
3902
- listUserTeams: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
4029
+ listUserTeams: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
3903
4030
  query?: Record<string, any> | undefined;
3904
4031
  fetchOptions?: FetchOptions | undefined;
3905
4032
  }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
@@ -3917,7 +4044,7 @@ declare const stub: {
3917
4044
  organization: {
3918
4045
  listTeamMembers: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
3919
4046
  teamId?: string | undefined;
3920
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
4047
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
3921
4048
  query?: {
3922
4049
  teamId?: string | undefined;
3923
4050
  } | undefined;
@@ -3937,7 +4064,7 @@ declare const stub: {
3937
4064
  addTeamMember: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
3938
4065
  teamId: string;
3939
4066
  userId: unknown;
3940
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
4067
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
3941
4068
  teamId: string;
3942
4069
  userId: unknown;
3943
4070
  } & {
@@ -3957,7 +4084,7 @@ declare const stub: {
3957
4084
  removeTeamMember: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
3958
4085
  teamId: string;
3959
4086
  userId: unknown;
3960
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
4087
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
3961
4088
  teamId: string;
3962
4089
  userId: unknown;
3963
4090
  } & {
@@ -3976,7 +4103,7 @@ declare const stub: {
3976
4103
  metadata: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
3977
4104
  providerId: string;
3978
4105
  format?: "json" | "xml" | undefined;
3979
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
4106
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
3980
4107
  query: {
3981
4108
  providerId: string;
3982
4109
  format?: "json" | "xml" | undefined;
@@ -4004,6 +4131,7 @@ declare const stub: {
4004
4131
  tokenEndpointAuthentication?: "client_secret_post" | "client_secret_basic" | undefined;
4005
4132
  jwksEndpoint?: string | undefined;
4006
4133
  discoveryEndpoint?: string | undefined;
4134
+ skipDiscovery?: boolean | undefined;
4007
4135
  scopes?: string[] | undefined;
4008
4136
  pkce?: boolean | undefined;
4009
4137
  mapping?: {
@@ -4063,7 +4191,7 @@ declare const stub: {
4063
4191
  } | undefined;
4064
4192
  organizationId?: string | undefined;
4065
4193
  overrideUserInfo?: boolean | undefined;
4066
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
4194
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
4067
4195
  providerId: string;
4068
4196
  issuer: string;
4069
4197
  domain: string;
@@ -4076,6 +4204,7 @@ declare const stub: {
4076
4204
  tokenEndpointAuthentication?: "client_secret_post" | "client_secret_basic" | undefined;
4077
4205
  jwksEndpoint?: string | undefined;
4078
4206
  discoveryEndpoint?: string | undefined;
4207
+ skipDiscovery?: boolean | undefined;
4079
4208
  scopes?: string[] | undefined;
4080
4209
  pkce?: boolean | undefined;
4081
4210
  mapping?: {
@@ -4163,8 +4292,8 @@ declare const stub: {
4163
4292
  scopes?: string[] | undefined;
4164
4293
  loginHint?: string | undefined;
4165
4294
  requestSignUp?: boolean | undefined;
4166
- providerType?: "oidc" | "saml" | undefined;
4167
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
4295
+ providerType?: "saml" | "oidc" | undefined;
4296
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
4168
4297
  callbackURL: string;
4169
4298
  email?: string | undefined;
4170
4299
  organizationSlug?: string | undefined;
@@ -4175,7 +4304,7 @@ declare const stub: {
4175
4304
  scopes?: string[] | undefined;
4176
4305
  loginHint?: string | undefined;
4177
4306
  requestSignUp?: boolean | undefined;
4178
- providerType?: "oidc" | "saml" | undefined;
4307
+ providerType?: "saml" | "oidc" | undefined;
4179
4308
  } & {
4180
4309
  fetchOptions?: FetchOptions | undefined;
4181
4310
  }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
@@ -4191,7 +4320,7 @@ declare const stub: {
4191
4320
  enable: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
4192
4321
  password: string;
4193
4322
  issuer?: string | undefined;
4194
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
4323
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
4195
4324
  password: string;
4196
4325
  issuer?: string | undefined;
4197
4326
  } & {
@@ -4208,7 +4337,7 @@ declare const stub: {
4208
4337
  twoFactor: {
4209
4338
  disable: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
4210
4339
  password: string;
4211
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
4340
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
4212
4341
  password: string;
4213
4342
  } & {
4214
4343
  fetchOptions?: FetchOptions | undefined;
@@ -4225,7 +4354,7 @@ declare const stub: {
4225
4354
  code: string;
4226
4355
  disableSession?: boolean | undefined;
4227
4356
  trustDevice?: boolean | undefined;
4228
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
4357
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
4229
4358
  code: string;
4230
4359
  disableSession?: boolean | undefined;
4231
4360
  trustDevice?: boolean | undefined;
@@ -4251,7 +4380,7 @@ declare const stub: {
4251
4380
  twoFactor: {
4252
4381
  generateBackupCodes: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
4253
4382
  password: string;
4254
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
4383
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
4255
4384
  password: string;
4256
4385
  } & {
4257
4386
  fetchOptions?: FetchOptions | undefined;
@@ -4267,7 +4396,7 @@ declare const stub: {
4267
4396
  twoFactor: {
4268
4397
  sendOtp: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
4269
4398
  trustDevice?: boolean | undefined;
4270
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
4399
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
4271
4400
  query?: Record<string, any> | undefined;
4272
4401
  fetchOptions?: FetchOptions | undefined;
4273
4402
  }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
@@ -4282,7 +4411,7 @@ declare const stub: {
4282
4411
  verifyOtp: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
4283
4412
  code: string;
4284
4413
  trustDevice?: boolean | undefined;
4285
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
4414
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
4286
4415
  code: string;
4287
4416
  trustDevice?: boolean | undefined;
4288
4417
  } & {
@@ -4307,7 +4436,7 @@ declare const stub: {
4307
4436
  twoFactor: {
4308
4437
  getTotpUri: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
4309
4438
  password: string;
4310
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
4439
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
4311
4440
  password: string;
4312
4441
  } & {
4313
4442
  fetchOptions?: FetchOptions | undefined;
@@ -4323,7 +4452,7 @@ declare const stub: {
4323
4452
  verifyTotp: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
4324
4453
  code: string;
4325
4454
  trustDevice?: boolean | undefined;
4326
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
4455
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
4327
4456
  code: string;
4328
4457
  trustDevice?: boolean | undefined;
4329
4458
  } & {
@@ -4345,15 +4474,7 @@ declare const stub: {
4345
4474
  }, FetchOptions["throw"] extends true ? true : true>>;
4346
4475
  };
4347
4476
  } & {
4348
- jwks: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
4349
- query?: Record<string, any> | undefined;
4350
- fetchOptions?: FetchOptions | undefined;
4351
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<jose.JSONWebKeySet, {
4352
- code?: string | undefined;
4353
- message?: string | undefined;
4354
- }, FetchOptions["throw"] extends true ? true : true>>;
4355
- } & {
4356
- token: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
4477
+ token: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
4357
4478
  query?: Record<string, any> | undefined;
4358
4479
  fetchOptions?: FetchOptions | undefined;
4359
4480
  }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
@@ -4377,7 +4498,7 @@ declare const stub: {
4377
4498
  rateLimitMax?: number | undefined;
4378
4499
  rateLimitEnabled?: boolean | undefined;
4379
4500
  permissions?: Record<string, string[]> | undefined;
4380
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
4501
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
4381
4502
  name?: string | undefined;
4382
4503
  expiresIn?: number | null | undefined;
4383
4504
  userId?: unknown;
@@ -4423,7 +4544,7 @@ declare const stub: {
4423
4544
  apiKey: {
4424
4545
  get: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
4425
4546
  id: string;
4426
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
4547
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
4427
4548
  query: {
4428
4549
  id: string;
4429
4550
  };
@@ -4472,7 +4593,7 @@ declare const stub: {
4472
4593
  rateLimitTimeWindow?: number | undefined;
4473
4594
  rateLimitMax?: number | undefined;
4474
4595
  permissions?: Record<string, string[]> | null | undefined;
4475
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
4596
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
4476
4597
  keyId: string;
4477
4598
  userId?: unknown;
4478
4599
  name?: string | undefined;
@@ -4520,7 +4641,7 @@ declare const stub: {
4520
4641
  apiKey: {
4521
4642
  delete: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
4522
4643
  keyId: string;
4523
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
4644
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
4524
4645
  keyId: string;
4525
4646
  } & {
4526
4647
  fetchOptions?: FetchOptions | undefined;
@@ -4533,7 +4654,7 @@ declare const stub: {
4533
4654
  };
4534
4655
  } & {
4535
4656
  apiKey: {
4536
- list: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
4657
+ list: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
4537
4658
  query?: Record<string, any> | undefined;
4538
4659
  fetchOptions?: FetchOptions | undefined;
4539
4660
  }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
@@ -4568,10 +4689,10 @@ declare const stub: {
4568
4689
  admin: {
4569
4690
  setRole: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
4570
4691
  userId: string;
4571
- role: "admin" | "user" | ("admin" | "user")[];
4572
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
4692
+ role: "user" | "admin" | ("user" | "admin")[];
4693
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
4573
4694
  userId: string;
4574
- role: "admin" | "user" | ("admin" | "user")[];
4695
+ role: "user" | "admin" | ("user" | "admin")[];
4575
4696
  } & {
4576
4697
  fetchOptions?: FetchOptions | undefined;
4577
4698
  }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
@@ -4585,7 +4706,7 @@ declare const stub: {
4585
4706
  admin: {
4586
4707
  getUser: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
4587
4708
  id: string;
4588
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
4709
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
4589
4710
  query: {
4590
4711
  id: string;
4591
4712
  };
@@ -4609,13 +4730,13 @@ declare const stub: {
4609
4730
  email: string;
4610
4731
  password: string;
4611
4732
  name: string;
4612
- role?: "admin" | "user" | ("admin" | "user")[] | undefined;
4733
+ role?: "user" | "admin" | ("user" | "admin")[] | undefined;
4613
4734
  data?: Record<string, any> | undefined;
4614
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
4735
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
4615
4736
  email: string;
4616
4737
  password: string;
4617
4738
  name: string;
4618
- role?: "admin" | "user" | ("admin" | "user")[] | undefined;
4739
+ role?: "user" | "admin" | ("user" | "admin")[] | undefined;
4619
4740
  data?: Record<string, any> | undefined;
4620
4741
  } & {
4621
4742
  fetchOptions?: FetchOptions | undefined;
@@ -4631,7 +4752,7 @@ declare const stub: {
4631
4752
  updateUser: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
4632
4753
  userId: unknown;
4633
4754
  data: Record<any, any>;
4634
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
4755
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
4635
4756
  userId: unknown;
4636
4757
  data: Record<any, any>;
4637
4758
  } & {
@@ -4654,7 +4775,7 @@ declare const stub: {
4654
4775
  filterField?: string | undefined;
4655
4776
  filterValue?: string | number | boolean | undefined;
4656
4777
  filterOperator?: "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "contains" | undefined;
4657
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
4778
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
4658
4779
  query: {
4659
4780
  searchValue?: string | undefined;
4660
4781
  searchField?: "name" | "email" | undefined;
@@ -4685,7 +4806,7 @@ declare const stub: {
4685
4806
  admin: {
4686
4807
  listUserSessions: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
4687
4808
  userId: unknown;
4688
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
4809
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
4689
4810
  userId: unknown;
4690
4811
  } & {
4691
4812
  fetchOptions?: FetchOptions | undefined;
@@ -4700,7 +4821,7 @@ declare const stub: {
4700
4821
  admin: {
4701
4822
  unbanUser: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
4702
4823
  userId: unknown;
4703
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
4824
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
4704
4825
  userId: unknown;
4705
4826
  } & {
4706
4827
  fetchOptions?: FetchOptions | undefined;
@@ -4725,7 +4846,7 @@ declare const stub: {
4725
4846
  userId: unknown;
4726
4847
  banReason?: string | undefined;
4727
4848
  banExpiresIn?: number | undefined;
4728
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
4849
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
4729
4850
  userId: unknown;
4730
4851
  banReason?: string | undefined;
4731
4852
  banExpiresIn?: number | undefined;
@@ -4750,7 +4871,7 @@ declare const stub: {
4750
4871
  admin: {
4751
4872
  impersonateUser: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
4752
4873
  userId: unknown;
4753
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
4874
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
4754
4875
  userId: unknown;
4755
4876
  } & {
4756
4877
  fetchOptions?: FetchOptions | undefined;
@@ -4765,15 +4886,7 @@ declare const stub: {
4765
4886
  ipAddress?: string | null | undefined;
4766
4887
  userAgent?: string | null | undefined;
4767
4888
  };
4768
- user: {
4769
- id: string;
4770
- createdAt: Date;
4771
- updatedAt: Date;
4772
- email: string;
4773
- emailVerified: boolean;
4774
- name: string;
4775
- image?: string | null | undefined;
4776
- };
4889
+ user: better_auth_plugins.UserWithRole;
4777
4890
  }, {
4778
4891
  code?: string | undefined;
4779
4892
  message?: string | undefined;
@@ -4781,7 +4894,7 @@ declare const stub: {
4781
4894
  };
4782
4895
  } & {
4783
4896
  admin: {
4784
- stopImpersonating: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
4897
+ stopImpersonating: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
4785
4898
  query?: Record<string, any> | undefined;
4786
4899
  fetchOptions?: FetchOptions | undefined;
4787
4900
  }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
@@ -4796,7 +4909,7 @@ declare const stub: {
4796
4909
  admin: {
4797
4910
  revokeUserSession: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
4798
4911
  sessionToken: string;
4799
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
4912
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
4800
4913
  sessionToken: string;
4801
4914
  } & {
4802
4915
  fetchOptions?: FetchOptions | undefined;
@@ -4811,7 +4924,7 @@ declare const stub: {
4811
4924
  admin: {
4812
4925
  revokeUserSessions: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
4813
4926
  userId: unknown;
4814
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
4927
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
4815
4928
  userId: unknown;
4816
4929
  } & {
4817
4930
  fetchOptions?: FetchOptions | undefined;
@@ -4826,7 +4939,7 @@ declare const stub: {
4826
4939
  admin: {
4827
4940
  removeUser: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
4828
4941
  userId: unknown;
4829
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
4942
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
4830
4943
  userId: unknown;
4831
4944
  } & {
4832
4945
  fetchOptions?: FetchOptions | undefined;
@@ -4842,7 +4955,7 @@ declare const stub: {
4842
4955
  setUserPassword: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
4843
4956
  newPassword: string;
4844
4957
  userId: unknown;
4845
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
4958
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
4846
4959
  newPassword: string;
4847
4960
  userId: unknown;
4848
4961
  } & {
@@ -4871,7 +4984,7 @@ declare const stub: {
4871
4984
  }) & {
4872
4985
  userId?: string | undefined;
4873
4986
  role?: "admin" | "user" | undefined;
4874
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<(({
4987
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<(({
4875
4988
  permission: {
4876
4989
  readonly user?: ("update" | "delete" | "create" | "list" | "set-role" | "ban" | "impersonate" | "set-password" | "get")[] | undefined;
4877
4990
  readonly session?: ("delete" | "list" | "revoke")[] | undefined;
@@ -4899,7 +5012,7 @@ declare const stub: {
4899
5012
  } & {
4900
5013
  signIn: {
4901
5014
  social: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
4902
- provider: unknown;
5015
+ 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";
4903
5016
  callbackURL?: string | undefined;
4904
5017
  newUserCallbackURL?: string | undefined;
4905
5018
  errorCallbackURL?: string | undefined;
@@ -4915,8 +5028,8 @@ declare const stub: {
4915
5028
  requestSignUp?: boolean | undefined;
4916
5029
  loginHint?: string | undefined;
4917
5030
  additionalData?: Record<string, any> | undefined;
4918
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
4919
- provider: unknown;
5031
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
5032
+ 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";
4920
5033
  callbackURL?: string | undefined;
4921
5034
  newUserCallbackURL?: string | undefined;
4922
5035
  errorCallbackURL?: string | undefined;
@@ -4935,28 +5048,28 @@ declare const stub: {
4935
5048
  } & {
4936
5049
  fetchOptions?: FetchOptions | undefined;
4937
5050
  }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<NonNullable<{
5051
+ redirect: boolean;
5052
+ url: string;
5053
+ } | {
4938
5054
  redirect: boolean;
4939
5055
  token: string;
4940
5056
  url: undefined;
4941
5057
  user: {
4942
5058
  id: string;
4943
- email: string;
4944
- name: string;
4945
- image: string | null | undefined;
4946
- emailVerified: boolean;
4947
5059
  createdAt: Date;
4948
5060
  updatedAt: Date;
5061
+ email: string;
5062
+ emailVerified: boolean;
5063
+ name: string;
5064
+ image?: string | null | undefined | undefined;
4949
5065
  };
4950
- } | {
4951
- url: string;
4952
- redirect: boolean;
4953
5066
  }>, {
4954
5067
  code?: string | undefined;
4955
5068
  message?: string | undefined;
4956
5069
  }, FetchOptions["throw"] extends true ? true : true>>;
4957
5070
  };
4958
5071
  } & {
4959
- signOut: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
5072
+ signOut: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
4960
5073
  query?: Record<string, any> | undefined;
4961
5074
  fetchOptions?: FetchOptions | undefined;
4962
5075
  }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
@@ -4974,7 +5087,7 @@ declare const stub: {
4974
5087
  image?: string | undefined;
4975
5088
  callbackURL?: string | undefined;
4976
5089
  rememberMe?: boolean | undefined;
4977
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
5090
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
4978
5091
  email: string;
4979
5092
  name: string;
4980
5093
  password: string;
@@ -4987,23 +5100,23 @@ declare const stub: {
4987
5100
  token: null;
4988
5101
  user: {
4989
5102
  id: string;
4990
- email: string;
4991
- name: string;
4992
- image: string | null | undefined;
4993
- emailVerified: boolean;
4994
5103
  createdAt: Date;
4995
5104
  updatedAt: Date;
5105
+ email: string;
5106
+ emailVerified: boolean;
5107
+ name: string;
5108
+ image?: string | null | undefined | undefined;
4996
5109
  };
4997
5110
  } | {
4998
5111
  token: string;
4999
5112
  user: {
5000
5113
  id: string;
5001
- email: string;
5002
- name: string;
5003
- image: string | null | undefined;
5004
- emailVerified: boolean;
5005
5114
  createdAt: Date;
5006
5115
  updatedAt: Date;
5116
+ email: string;
5117
+ emailVerified: boolean;
5118
+ name: string;
5119
+ image?: string | null | undefined | undefined;
5007
5120
  };
5008
5121
  }>, {
5009
5122
  code?: string | undefined;
@@ -5017,7 +5130,7 @@ declare const stub: {
5017
5130
  password: string;
5018
5131
  callbackURL?: string | undefined;
5019
5132
  rememberMe?: boolean | undefined;
5020
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
5133
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
5021
5134
  email: string;
5022
5135
  password: string;
5023
5136
  callbackURL?: string | undefined;
@@ -5027,15 +5140,15 @@ declare const stub: {
5027
5140
  }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
5028
5141
  redirect: boolean;
5029
5142
  token: string;
5030
- url: string | undefined;
5143
+ url?: string | undefined;
5031
5144
  user: {
5032
5145
  id: string;
5033
- email: string;
5034
- name: string;
5035
- image: string | null | undefined;
5036
- emailVerified: boolean;
5037
5146
  createdAt: Date;
5038
5147
  updatedAt: Date;
5148
+ email: string;
5149
+ emailVerified: boolean;
5150
+ name: string;
5151
+ image?: string | null | undefined | undefined;
5039
5152
  };
5040
5153
  }, {
5041
5154
  code?: string | undefined;
@@ -5048,7 +5161,7 @@ declare const stub: {
5048
5161
  token?: string | undefined;
5049
5162
  }> & Record<string, any>, Partial<{
5050
5163
  token?: string | undefined;
5051
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
5164
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
5052
5165
  newPassword: string;
5053
5166
  token?: string | undefined;
5054
5167
  } & {
@@ -5063,7 +5176,7 @@ declare const stub: {
5063
5176
  verifyEmail: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
5064
5177
  token: string;
5065
5178
  callbackURL?: string | undefined;
5066
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
5179
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
5067
5180
  query: {
5068
5181
  token: string;
5069
5182
  callbackURL?: string | undefined;
@@ -5079,7 +5192,7 @@ declare const stub: {
5079
5192
  sendVerificationEmail: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
5080
5193
  email: string;
5081
5194
  callbackURL?: string | undefined;
5082
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
5195
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
5083
5196
  email: string;
5084
5197
  callbackURL?: string | undefined;
5085
5198
  } & {
@@ -5094,7 +5207,7 @@ declare const stub: {
5094
5207
  changeEmail: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
5095
5208
  newEmail: string;
5096
5209
  callbackURL?: string | undefined;
5097
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
5210
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
5098
5211
  newEmail: string;
5099
5212
  callbackURL?: string | undefined;
5100
5213
  } & {
@@ -5110,7 +5223,7 @@ declare const stub: {
5110
5223
  newPassword: string;
5111
5224
  currentPassword: string;
5112
5225
  revokeOtherSessions?: boolean | undefined;
5113
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
5226
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
5114
5227
  newPassword: string;
5115
5228
  currentPassword: string;
5116
5229
  revokeOtherSessions?: boolean | undefined;
@@ -5134,8 +5247,8 @@ declare const stub: {
5134
5247
  } & {
5135
5248
  updateUser: <FetchOptions extends better_auth.ClientFetchOption<Partial<Partial<{}> & {
5136
5249
  name?: string | undefined;
5137
- image?: string | undefined;
5138
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
5250
+ image?: string | undefined | null;
5251
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
5139
5252
  image?: (string | null) | undefined;
5140
5253
  name?: string | undefined;
5141
5254
  fetchOptions?: FetchOptions | undefined;
@@ -5152,7 +5265,7 @@ declare const stub: {
5152
5265
  callbackURL?: string | undefined;
5153
5266
  password?: string | undefined;
5154
5267
  token?: string | undefined;
5155
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
5268
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
5156
5269
  callbackURL?: string | undefined;
5157
5270
  password?: string | undefined;
5158
5271
  token?: string | undefined;
@@ -5169,7 +5282,7 @@ declare const stub: {
5169
5282
  requestPasswordReset: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
5170
5283
  email: string;
5171
5284
  redirectTo?: string | undefined;
5172
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
5285
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
5173
5286
  email: string;
5174
5287
  redirectTo?: string | undefined;
5175
5288
  } & {
@@ -5187,7 +5300,7 @@ declare const stub: {
5187
5300
  callbackURL: string;
5188
5301
  }> & Record<string, any>, {
5189
5302
  token: string;
5190
- }>>(data_0: better_auth_client_plugins.Prettify<{
5303
+ }>>(data_0: better_auth.Prettify<{
5191
5304
  query: {
5192
5305
  callbackURL: string;
5193
5306
  };
@@ -5198,10 +5311,10 @@ declare const stub: {
5198
5311
  }, FetchOptions["throw"] extends true ? true : true>>;
5199
5312
  };
5200
5313
  } & {
5201
- listSessions: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
5314
+ listSessions: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
5202
5315
  query?: Record<string, any> | undefined;
5203
5316
  fetchOptions?: FetchOptions | undefined;
5204
- }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<better_auth_client_plugins.Prettify<{
5317
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<better_auth.Prettify<{
5205
5318
  id: string;
5206
5319
  createdAt: Date;
5207
5320
  updatedAt: Date;
@@ -5217,7 +5330,7 @@ declare const stub: {
5217
5330
  } & {
5218
5331
  revokeSession: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
5219
5332
  token: string;
5220
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
5333
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
5221
5334
  token: string;
5222
5335
  } & {
5223
5336
  fetchOptions?: FetchOptions | undefined;
@@ -5228,7 +5341,7 @@ declare const stub: {
5228
5341
  message?: string | undefined;
5229
5342
  }, FetchOptions["throw"] extends true ? true : true>>;
5230
5343
  } & {
5231
- revokeSessions: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
5344
+ revokeSessions: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
5232
5345
  query?: Record<string, any> | undefined;
5233
5346
  fetchOptions?: FetchOptions | undefined;
5234
5347
  }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
@@ -5238,7 +5351,7 @@ declare const stub: {
5238
5351
  message?: string | undefined;
5239
5352
  }, FetchOptions["throw"] extends true ? true : true>>;
5240
5353
  } & {
5241
- revokeOtherSessions: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
5354
+ revokeOtherSessions: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
5242
5355
  query?: Record<string, any> | undefined;
5243
5356
  fetchOptions?: FetchOptions | undefined;
5244
5357
  }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
@@ -5263,7 +5376,7 @@ declare const stub: {
5263
5376
  errorCallbackURL?: string | undefined;
5264
5377
  disableRedirect?: boolean | undefined;
5265
5378
  additionalData?: Record<string, any> | undefined;
5266
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
5379
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
5267
5380
  provider: unknown;
5268
5381
  callbackURL?: string | undefined;
5269
5382
  idToken?: {
@@ -5288,7 +5401,7 @@ declare const stub: {
5288
5401
  message?: string | undefined;
5289
5402
  }, FetchOptions["throw"] extends true ? true : true>>;
5290
5403
  } & {
5291
- listAccounts: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
5404
+ listAccounts: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
5292
5405
  query?: Record<string, any> | undefined;
5293
5406
  fetchOptions?: FetchOptions | undefined;
5294
5407
  }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch.BetterFetchResponse<{
@@ -5308,7 +5421,7 @@ declare const stub: {
5308
5421
  callback: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
5309
5422
  token: string;
5310
5423
  callbackURL?: string | undefined;
5311
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
5424
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
5312
5425
  query: {
5313
5426
  token: string;
5314
5427
  callbackURL?: string | undefined;
@@ -5326,7 +5439,7 @@ declare const stub: {
5326
5439
  unlinkAccount: <FetchOptions extends better_auth.ClientFetchOption<Partial<{
5327
5440
  providerId: string;
5328
5441
  accountId?: string | undefined;
5329
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
5442
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
5330
5443
  providerId: string;
5331
5444
  accountId?: string | undefined;
5332
5445
  } & {
@@ -5342,7 +5455,7 @@ declare const stub: {
5342
5455
  providerId: string;
5343
5456
  accountId?: string | undefined;
5344
5457
  userId?: string | undefined;
5345
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
5458
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
5346
5459
  providerId: string;
5347
5460
  accountId?: string | undefined;
5348
5461
  userId?: string | undefined;
@@ -5366,7 +5479,7 @@ declare const stub: {
5366
5479
  providerId: string;
5367
5480
  accountId?: string | undefined;
5368
5481
  userId?: string | undefined;
5369
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth_client_plugins.Prettify<{
5482
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth.Prettify<{
5370
5483
  providerId: string;
5371
5484
  accountId?: string | undefined;
5372
5485
  userId?: string | undefined;
@@ -5384,7 +5497,7 @@ declare const stub: {
5384
5497
  } & {
5385
5498
  accountInfo: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
5386
5499
  accountId?: string | undefined;
5387
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
5500
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
5388
5501
  query?: {
5389
5502
  accountId?: string | undefined;
5390
5503
  } | undefined;
@@ -5400,7 +5513,7 @@ declare const stub: {
5400
5513
  getSession: <FetchOptions extends better_auth.ClientFetchOption<never, Partial<{
5401
5514
  disableCookieCache?: unknown;
5402
5515
  disableRefresh?: unknown;
5403
- }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth_client_plugins.Prettify<{
5516
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth.Prettify<{
5404
5517
  query?: {
5405
5518
  disableCookieCache?: unknown;
5406
5519
  disableRefresh?: unknown;
@@ -5548,6 +5661,18 @@ declare const stub: {
5548
5661
  role: R;
5549
5662
  }) => boolean;
5550
5663
  };
5664
+ } & {
5665
+ jwks: (fetchOptions?: any) => Promise<{
5666
+ data: null;
5667
+ error: {
5668
+ message?: string | undefined;
5669
+ status: number;
5670
+ statusText: string;
5671
+ };
5672
+ } | {
5673
+ data: jose.JSONWebKeySet;
5674
+ error: null;
5675
+ }>;
5551
5676
  } & {
5552
5677
  admin: {
5553
5678
  checkRolePermission: <R extends "admin" | "user">(data: ({
@@ -5602,18 +5727,12 @@ declare const stub: {
5602
5727
  isPending: boolean;
5603
5728
  }>;
5604
5729
  $fetch: _better_fetch_fetch.BetterFetch<{
5605
- plugins: (_better_fetch_fetch.BetterFetchPlugin | {
5730
+ plugins: (_better_fetch_fetch.BetterFetchPlugin<Record<string, any>> | {
5606
5731
  id: string;
5607
5732
  name: string;
5608
5733
  hooks: {
5609
5734
  onSuccess(context: _better_fetch_fetch.SuccessContext<any>): void;
5610
5735
  };
5611
- } | {
5612
- id: string;
5613
- name: string;
5614
- hooks: {
5615
- onRequest<T extends Record<string, any>>(context: _better_fetch_fetch.RequestContext<T>): void;
5616
- };
5617
5736
  } | {
5618
5737
  id: string;
5619
5738
  name: string;
@@ -5711,8 +5830,118 @@ declare const stub: {
5711
5830
  };
5712
5831
  };
5713
5832
  $ERROR_CODES: {
5714
- readonly USER_NOT_FOUND: "User not found";
5833
+ readonly YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_ORGANIZATION: "You are not allowed to create a new organization";
5834
+ readonly YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_ORGANIZATIONS: "You have reached the maximum number of organizations";
5835
+ readonly ORGANIZATION_ALREADY_EXISTS: "Organization already exists";
5836
+ readonly ORGANIZATION_SLUG_ALREADY_TAKEN: "Organization slug already taken";
5837
+ readonly ORGANIZATION_NOT_FOUND: "Organization not found";
5838
+ readonly USER_IS_NOT_A_MEMBER_OF_THE_ORGANIZATION: "User is not a member of the organization";
5839
+ readonly YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_ORGANIZATION: "You are not allowed to update this organization";
5840
+ readonly YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_ORGANIZATION: "You are not allowed to delete this organization";
5841
+ readonly NO_ACTIVE_ORGANIZATION: "No active organization";
5842
+ readonly USER_IS_ALREADY_A_MEMBER_OF_THIS_ORGANIZATION: "User is already a member of this organization";
5843
+ readonly MEMBER_NOT_FOUND: "Member not found";
5844
+ readonly ROLE_NOT_FOUND: "Role not found";
5845
+ readonly YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM: "You are not allowed to create a new team";
5846
+ readonly TEAM_ALREADY_EXISTS: "Team already exists";
5847
+ readonly TEAM_NOT_FOUND: "Team not found";
5848
+ readonly YOU_CANNOT_LEAVE_THE_ORGANIZATION_AS_THE_ONLY_OWNER: "You cannot leave the organization as the only owner";
5849
+ readonly YOU_CANNOT_LEAVE_THE_ORGANIZATION_WITHOUT_AN_OWNER: "You cannot leave the organization without an owner";
5850
+ readonly YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_MEMBER: "You are not allowed to delete this member";
5851
+ readonly YOU_ARE_NOT_ALLOWED_TO_INVITE_USERS_TO_THIS_ORGANIZATION: "You are not allowed to invite users to this organization";
5852
+ readonly USER_IS_ALREADY_INVITED_TO_THIS_ORGANIZATION: "User is already invited to this organization";
5853
+ readonly INVITATION_NOT_FOUND: "Invitation not found";
5854
+ readonly YOU_ARE_NOT_THE_RECIPIENT_OF_THE_INVITATION: "You are not the recipient of the invitation";
5855
+ readonly EMAIL_VERIFICATION_REQUIRED_BEFORE_ACCEPTING_OR_REJECTING_INVITATION: "Email verification required before accepting or rejecting invitation";
5856
+ readonly YOU_ARE_NOT_ALLOWED_TO_CANCEL_THIS_INVITATION: "You are not allowed to cancel this invitation";
5857
+ readonly INVITER_IS_NO_LONGER_A_MEMBER_OF_THE_ORGANIZATION: "Inviter is no longer a member of the organization";
5858
+ readonly YOU_ARE_NOT_ALLOWED_TO_INVITE_USER_WITH_THIS_ROLE: "You are not allowed to invite a user with this role";
5859
+ readonly FAILED_TO_RETRIEVE_INVITATION: "Failed to retrieve invitation";
5860
+ readonly YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_TEAMS: "You have reached the maximum number of teams";
5861
+ readonly UNABLE_TO_REMOVE_LAST_TEAM: "Unable to remove last team";
5862
+ readonly YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_MEMBER: "You are not allowed to update this member";
5863
+ readonly ORGANIZATION_MEMBERSHIP_LIMIT_REACHED: "Organization membership limit reached";
5864
+ readonly YOU_ARE_NOT_ALLOWED_TO_CREATE_TEAMS_IN_THIS_ORGANIZATION: "You are not allowed to create teams in this organization";
5865
+ readonly YOU_ARE_NOT_ALLOWED_TO_DELETE_TEAMS_IN_THIS_ORGANIZATION: "You are not allowed to delete teams in this organization";
5866
+ readonly YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_TEAM: "You are not allowed to update this team";
5867
+ readonly YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_TEAM: "You are not allowed to delete this team";
5868
+ readonly INVITATION_LIMIT_REACHED: "Invitation limit reached";
5869
+ readonly TEAM_MEMBER_LIMIT_REACHED: "Team member limit reached";
5870
+ readonly USER_IS_NOT_A_MEMBER_OF_THE_TEAM: "User is not a member of the team";
5871
+ readonly YOU_CAN_NOT_ACCESS_THE_MEMBERS_OF_THIS_TEAM: "You are not allowed to list the members of this team";
5872
+ readonly YOU_DO_NOT_HAVE_AN_ACTIVE_TEAM: "You do not have an active team";
5873
+ readonly YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM_MEMBER: "You are not allowed to create a new member";
5874
+ readonly YOU_ARE_NOT_ALLOWED_TO_REMOVE_A_TEAM_MEMBER: "You are not allowed to remove a team member";
5875
+ readonly YOU_ARE_NOT_ALLOWED_TO_ACCESS_THIS_ORGANIZATION: "You are not allowed to access this organization as an owner";
5876
+ readonly YOU_ARE_NOT_A_MEMBER_OF_THIS_ORGANIZATION: "You are not a member of this organization";
5877
+ readonly MISSING_AC_INSTANCE: "Dynamic Access Control requires a pre-defined ac instance on the server auth plugin. Read server logs for more information";
5878
+ readonly YOU_MUST_BE_IN_AN_ORGANIZATION_TO_CREATE_A_ROLE: "You must be in an organization to create a role";
5879
+ readonly YOU_ARE_NOT_ALLOWED_TO_CREATE_A_ROLE: "You are not allowed to create a role";
5880
+ readonly YOU_ARE_NOT_ALLOWED_TO_UPDATE_A_ROLE: "You are not allowed to update a role";
5881
+ readonly YOU_ARE_NOT_ALLOWED_TO_DELETE_A_ROLE: "You are not allowed to delete a role";
5882
+ readonly YOU_ARE_NOT_ALLOWED_TO_READ_A_ROLE: "You are not allowed to read a role";
5883
+ readonly YOU_ARE_NOT_ALLOWED_TO_LIST_A_ROLE: "You are not allowed to list a role";
5884
+ readonly YOU_ARE_NOT_ALLOWED_TO_GET_A_ROLE: "You are not allowed to get a role";
5885
+ readonly TOO_MANY_ROLES: "This organization has too many roles";
5886
+ readonly INVALID_RESOURCE: "The provided permission includes an invalid resource";
5887
+ readonly ROLE_NAME_IS_ALREADY_TAKEN: "That role name is already taken";
5888
+ readonly CANNOT_DELETE_A_PRE_DEFINED_ROLE: "Cannot delete a pre-defined role";
5715
5889
  readonly FAILED_TO_CREATE_USER: "Failed to create user";
5890
+ readonly USER_ALREADY_EXISTS: "User already exists.";
5891
+ readonly USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL: "User already exists. Use another email.";
5892
+ readonly YOU_CANNOT_BAN_YOURSELF: "You cannot ban yourself";
5893
+ readonly YOU_ARE_NOT_ALLOWED_TO_CHANGE_USERS_ROLE: "You are not allowed to change users role";
5894
+ readonly YOU_ARE_NOT_ALLOWED_TO_CREATE_USERS: "You are not allowed to create users";
5895
+ readonly YOU_ARE_NOT_ALLOWED_TO_LIST_USERS: "You are not allowed to list users";
5896
+ readonly YOU_ARE_NOT_ALLOWED_TO_LIST_USERS_SESSIONS: "You are not allowed to list users sessions";
5897
+ readonly YOU_ARE_NOT_ALLOWED_TO_BAN_USERS: "You are not allowed to ban users";
5898
+ readonly YOU_ARE_NOT_ALLOWED_TO_IMPERSONATE_USERS: "You are not allowed to impersonate users";
5899
+ readonly YOU_ARE_NOT_ALLOWED_TO_REVOKE_USERS_SESSIONS: "You are not allowed to revoke users sessions";
5900
+ readonly YOU_ARE_NOT_ALLOWED_TO_DELETE_USERS: "You are not allowed to delete users";
5901
+ readonly YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PASSWORD: "You are not allowed to set users password";
5902
+ readonly BANNED_USER: "You have been banned from this application";
5903
+ readonly YOU_ARE_NOT_ALLOWED_TO_GET_USER: "You are not allowed to get user";
5904
+ readonly NO_DATA_TO_UPDATE: "No data to update";
5905
+ readonly YOU_ARE_NOT_ALLOWED_TO_UPDATE_USERS: "You are not allowed to update users";
5906
+ readonly YOU_CANNOT_REMOVE_YOURSELF: "You cannot remove yourself";
5907
+ readonly YOU_ARE_NOT_ALLOWED_TO_SET_NON_EXISTENT_VALUE: "You are not allowed to set a non-existent role value";
5908
+ readonly YOU_CANNOT_IMPERSONATE_ADMINS: "You cannot impersonate admins";
5909
+ readonly INVALID_ROLE_TYPE: "Invalid role type";
5910
+ readonly OTP_NOT_ENABLED: "OTP not enabled";
5911
+ readonly OTP_HAS_EXPIRED: "OTP has expired";
5912
+ readonly TOTP_NOT_ENABLED: "TOTP not enabled";
5913
+ readonly TWO_FACTOR_NOT_ENABLED: "Two factor isn't enabled";
5914
+ readonly BACKUP_CODES_NOT_ENABLED: "Backup codes aren't enabled";
5915
+ readonly INVALID_BACKUP_CODE: "Invalid backup code";
5916
+ readonly INVALID_CODE: "Invalid code";
5917
+ readonly TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE: "Too many attempts. Please request a new code.";
5918
+ readonly INVALID_TWO_FACTOR_COOKIE: "Invalid two factor cookie";
5919
+ readonly INVALID_METADATA_TYPE: "metadata must be an object or undefined";
5920
+ readonly REFILL_AMOUNT_AND_INTERVAL_REQUIRED: "refillAmount is required when refillInterval is provided";
5921
+ readonly REFILL_INTERVAL_AND_AMOUNT_REQUIRED: "refillInterval is required when refillAmount is provided";
5922
+ readonly USER_BANNED: "User is banned";
5923
+ readonly UNAUTHORIZED_SESSION: "Unauthorized or invalid session";
5924
+ readonly KEY_NOT_FOUND: "API Key not found";
5925
+ readonly KEY_DISABLED: "API Key is disabled";
5926
+ readonly KEY_EXPIRED: "API Key has expired";
5927
+ readonly USAGE_EXCEEDED: "API Key has reached its usage limit";
5928
+ readonly KEY_NOT_RECOVERABLE: "API Key is not recoverable";
5929
+ readonly EXPIRES_IN_IS_TOO_SMALL: "The expiresIn is smaller than the predefined minimum value.";
5930
+ readonly EXPIRES_IN_IS_TOO_LARGE: "The expiresIn is larger than the predefined maximum value.";
5931
+ readonly INVALID_REMAINING: "The remaining count is either too large or too small.";
5932
+ readonly INVALID_PREFIX_LENGTH: "The prefix length is either too large or too small.";
5933
+ readonly INVALID_NAME_LENGTH: "The name length is either too large or too small.";
5934
+ readonly METADATA_DISABLED: "Metadata is disabled.";
5935
+ readonly RATE_LIMIT_EXCEEDED: "Rate limit exceeded.";
5936
+ readonly NO_VALUES_TO_UPDATE: "No values to update.";
5937
+ readonly KEY_DISABLED_EXPIRATION: "Custom key expiration values are disabled.";
5938
+ readonly INVALID_API_KEY: "Invalid API key.";
5939
+ readonly INVALID_USER_ID_FROM_API_KEY: "The user id from the API key is invalid.";
5940
+ readonly INVALID_API_KEY_GETTER_RETURN_TYPE: "API Key getter returned an invalid key type. Expected string.";
5941
+ readonly SERVER_ONLY_PROPERTY: "The property you're trying to set can only be set from the server auth instance only.";
5942
+ readonly FAILED_TO_UPDATE_API_KEY: "Failed to update API key";
5943
+ readonly NAME_REQUIRED: "API Key name is required.";
5944
+ readonly USER_NOT_FOUND: "User not found";
5716
5945
  readonly FAILED_TO_CREATE_SESSION: "Failed to create session";
5717
5946
  readonly FAILED_TO_UPDATE_USER: "Failed to update user";
5718
5947
  readonly FAILED_TO_GET_SESSION: "Failed to get session";
@@ -5728,8 +5957,6 @@ declare const stub: {
5728
5957
  readonly EMAIL_NOT_VERIFIED: "Email not verified";
5729
5958
  readonly PASSWORD_TOO_SHORT: "Password too short";
5730
5959
  readonly PASSWORD_TOO_LONG: "Password too long";
5731
- readonly USER_ALREADY_EXISTS: "User already exists.";
5732
- readonly USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL: "User already exists. Use another email.";
5733
5960
  readonly EMAIL_CAN_NOT_BE_UPDATED: "Email can not be updated";
5734
5961
  readonly CREDENTIAL_ACCOUNT_NOT_FOUND: "Credential account not found";
5735
5962
  readonly SESSION_EXPIRED: "Session expired. Re-authenticate to perform this action.";
@@ -6069,6 +6296,7 @@ declare class OrganizationService {
6069
6296
  *
6070
6297
  * @param teamId - The team ID
6071
6298
  * @param userId - The user ID to add
6299
+ * @returns The added team member
6072
6300
  */
6073
6301
  addTeamMember(teamId: string, userId: string): Promise<{
6074
6302
  id: string;
@@ -6224,6 +6452,141 @@ declare class SessionService {
6224
6452
  }>;
6225
6453
  }
6226
6454
 
6455
+ type CreateApiKeyPayload = {
6456
+ name?: string;
6457
+ expiresIn?: number;
6458
+ prefix?: string;
6459
+ metadata?: ApiKeyMetadata;
6460
+ };
6461
+ type UpdateApiKeyPayload = {
6462
+ id: string;
6463
+ name?: string;
6464
+ };
6465
+ type ApiKeyMetadata = {
6466
+ user: {
6467
+ id: string;
6468
+ email: string;
6469
+ };
6470
+ workspace: {
6471
+ id: string;
6472
+ title: string;
6473
+ };
6474
+ } & Record<string, unknown>;
6475
+
6476
+ /**
6477
+ * Service for managing API keys
6478
+ *
6479
+ * Provides comprehensive API key management including:
6480
+ * - API key CRUD operations
6481
+ */
6482
+ declare class ApiKeyService {
6483
+ private client;
6484
+ /**
6485
+ * Creates a new ApiKeyService instance.
6486
+ *
6487
+ * @param client - The API client for making API key requests
6488
+ */
6489
+ constructor(client: APIClient);
6490
+ createApiKey(payload: CreateApiKeyPayload): Promise<{
6491
+ key: string;
6492
+ metadata: any;
6493
+ permissions: any;
6494
+ id: string;
6495
+ name: string | null;
6496
+ start: string | null;
6497
+ prefix: string | null;
6498
+ userId: string;
6499
+ refillInterval: number | null;
6500
+ refillAmount: number | null;
6501
+ lastRefillAt: Date | null;
6502
+ enabled: boolean;
6503
+ rateLimitEnabled: boolean;
6504
+ rateLimitTimeWindow: number | null;
6505
+ rateLimitMax: number | null;
6506
+ requestCount: number;
6507
+ remaining: number | null;
6508
+ lastRequest: Date | null;
6509
+ expiresAt: Date | null;
6510
+ createdAt: Date;
6511
+ updatedAt: Date;
6512
+ }>;
6513
+ getApiKey(id: string): Promise<{
6514
+ permissions: {
6515
+ [key: string]: string[];
6516
+ } | null;
6517
+ id: string;
6518
+ name: string | null;
6519
+ start: string | null;
6520
+ prefix: string | null;
6521
+ userId: string;
6522
+ refillInterval: number | null;
6523
+ refillAmount: number | null;
6524
+ lastRefillAt: Date | null;
6525
+ enabled: boolean;
6526
+ rateLimitEnabled: boolean;
6527
+ rateLimitTimeWindow: number | null;
6528
+ rateLimitMax: number | null;
6529
+ requestCount: number;
6530
+ remaining: number | null;
6531
+ lastRequest: Date | null;
6532
+ expiresAt: Date | null;
6533
+ createdAt: Date;
6534
+ updatedAt: Date;
6535
+ metadata: Record<string, any> | null;
6536
+ }>;
6537
+ listApiKeys(): Promise<{
6538
+ permissions: {
6539
+ [key: string]: string[];
6540
+ } | null;
6541
+ id: string;
6542
+ name: string | null;
6543
+ start: string | null;
6544
+ prefix: string | null;
6545
+ userId: string;
6546
+ refillInterval: number | null;
6547
+ refillAmount: number | null;
6548
+ lastRefillAt: Date | null;
6549
+ enabled: boolean;
6550
+ rateLimitEnabled: boolean;
6551
+ rateLimitTimeWindow: number | null;
6552
+ rateLimitMax: number | null;
6553
+ requestCount: number;
6554
+ remaining: number | null;
6555
+ lastRequest: Date | null;
6556
+ expiresAt: Date | null;
6557
+ createdAt: Date;
6558
+ updatedAt: Date;
6559
+ metadata: Record<string, any> | null;
6560
+ }[]>;
6561
+ updateApiKey(payload: UpdateApiKeyPayload): Promise<{
6562
+ permissions: {
6563
+ [key: string]: string[];
6564
+ } | null;
6565
+ id: string;
6566
+ name: string | null;
6567
+ start: string | null;
6568
+ prefix: string | null;
6569
+ userId: string;
6570
+ refillInterval: number | null;
6571
+ refillAmount: number | null;
6572
+ lastRefillAt: Date | null;
6573
+ enabled: boolean;
6574
+ rateLimitEnabled: boolean;
6575
+ rateLimitTimeWindow: number | null;
6576
+ rateLimitMax: number | null;
6577
+ requestCount: number;
6578
+ remaining: number | null;
6579
+ lastRequest: Date | null;
6580
+ expiresAt: Date | null;
6581
+ createdAt: Date;
6582
+ updatedAt: Date;
6583
+ metadata: Record<string, any> | null;
6584
+ }>;
6585
+ deleteApiKey(id: string): Promise<{
6586
+ success: boolean;
6587
+ }>;
6588
+ }
6589
+
6227
6590
  declare class BaseError extends Error {
6228
6591
  code: string;
6229
6592
  constructor(code: string, message: string, options?: ErrorOptions);
@@ -6281,6 +6644,10 @@ declare class AuthClient {
6281
6644
  * Organization management service for multi-tenant operations
6282
6645
  */
6283
6646
  organization: OrganizationService;
6647
+ /**
6648
+ * API key management service for API key operations
6649
+ */
6650
+ apiKey: ApiKeyService;
6284
6651
  /**
6285
6652
  * Creates a new AuthClient instance.
6286
6653
  *
@@ -6344,4 +6711,4 @@ declare function validateToken(token: string, apiUrl: string): Promise<boolean>;
6344
6711
  declare function extractTokenPayload(token: string): JWTTokenPayload;
6345
6712
 
6346
6713
  export { AuthClient, EmailRequired, InvalidCallbackURL, InvalidSocialProvider, Roles, ac, createAPIClient, extractTokenPayload, isTokenExpired, organizationAdditionalFields, rolesAccessControl, userAdditionalFields, validateToken };
6347
- export type { APIClient, CreateTeamPayload, FullOrganization, GetOrganizationOptions, Invitation, InviteUserToOrganizationOptions, JWTTokenPayload, ListMembersOptions, ExtendedMember as Member, ExtendedOrganization as Organization, RemoveUserFromOrganizationOptions, Role, Session, SignInWithEmailAndPasswordOptions, SignInWithSamlOptions, SocialSignInOptions, Team, TeamMember, UpdateMemberRoleOptions, UpdateOrganizationPayload, UpdateTeamPayload, User };
6714
+ export type { APIClient, ApiKeyMetadata, CreateApiKeyPayload, CreateTeamPayload, FullOrganization, GetOrganizationOptions, Invitation, InviteUserToOrganizationOptions, JWTTokenPayload, ListMembersOptions, ExtendedMember as Member, ExtendedOrganization as Organization, RemoveUserFromOrganizationOptions, Role, Session, SignInWithEmailAndPasswordOptions, SignInWithSamlOptions, SocialSignInOptions, Team, TeamMember, UpdateApiKeyPayload, UpdateMemberRoleOptions, UpdateOrganizationPayload, UpdateTeamPayload, User };