better-auth 1.4.20 → 1.4.22

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.
Files changed (61) hide show
  1. package/dist/adapters/memory-adapter/memory-adapter.d.mts +2 -2
  2. package/dist/api/index.d.mts +99 -99
  3. package/dist/api/routes/account.d.mts +11 -11
  4. package/dist/api/routes/callback.d.mts +2 -2
  5. package/dist/api/routes/email-verification.d.mts +4 -4
  6. package/dist/api/routes/error.d.mts +2 -2
  7. package/dist/api/routes/ok.d.mts +2 -2
  8. package/dist/api/routes/password.d.mts +7 -7
  9. package/dist/api/routes/session.d.mts +14 -14
  10. package/dist/api/routes/sign-in.d.mts +4 -4
  11. package/dist/api/routes/sign-out.d.mts +2 -2
  12. package/dist/api/routes/sign-up.d.mts +3 -3
  13. package/dist/api/routes/update-user.d.mts +13 -13
  14. package/dist/client/lynx/index.d.mts +13 -13
  15. package/dist/client/react/index.d.mts +13 -13
  16. package/dist/client/solid/index.d.mts +13 -13
  17. package/dist/client/svelte/index.d.mts +15 -15
  18. package/dist/client/vanilla.d.mts +15 -15
  19. package/dist/client/vue/index.d.mts +15 -15
  20. package/dist/db/field.d.mts +3 -3
  21. package/dist/integrations/svelte-kit.d.mts +2 -2
  22. package/dist/integrations/tanstack-start-solid.d.mts +4 -4
  23. package/dist/integrations/tanstack-start.d.mts +4 -4
  24. package/dist/plugins/admin/admin.d.mts +3 -3
  25. package/dist/plugins/anonymous/index.d.mts +7 -7
  26. package/dist/plugins/api-key/index.d.mts +36 -36
  27. package/dist/plugins/bearer/index.d.mts +6 -6
  28. package/dist/plugins/captcha/index.d.mts +2 -2
  29. package/dist/plugins/custom-session/index.d.mts +5 -5
  30. package/dist/plugins/device-authorization/index.d.mts +6 -6
  31. package/dist/plugins/email-otp/index.d.mts +14 -14
  32. package/dist/plugins/generic-oauth/index.d.mts +5 -5
  33. package/dist/plugins/haveibeenpwned/index.d.mts +3 -3
  34. package/dist/plugins/jwt/client.d.mts +2 -2
  35. package/dist/plugins/jwt/index.d.mts +9 -9
  36. package/dist/plugins/last-login-method/index.d.mts +4 -4
  37. package/dist/plugins/magic-link/index.d.mts +4 -4
  38. package/dist/plugins/mcp/index.d.mts +10 -10
  39. package/dist/plugins/multi-session/index.d.mts +9 -9
  40. package/dist/plugins/oauth-proxy/index.d.mts +8 -8
  41. package/dist/plugins/oidc-provider/index.d.mts +13 -13
  42. package/dist/plugins/one-tap/client.d.mts +5 -5
  43. package/dist/plugins/one-tap/index.d.mts +2 -2
  44. package/dist/plugins/one-time-token/index.d.mts +5 -5
  45. package/dist/plugins/open-api/index.d.mts +3 -3
  46. package/dist/plugins/organization/adapter.d.mts +24 -24
  47. package/dist/plugins/organization/client.d.mts +9 -9
  48. package/dist/plugins/organization/organization.d.mts +3 -3
  49. package/dist/plugins/organization/routes/crud-access-control.d.mts +22 -22
  50. package/dist/plugins/organization/routes/crud-invites.d.mts +69 -69
  51. package/dist/plugins/organization/routes/crud-members.d.mts +67 -67
  52. package/dist/plugins/organization/routes/crud-org.d.mts +59 -59
  53. package/dist/plugins/organization/routes/crud-team.d.mts +79 -79
  54. package/dist/plugins/phone-number/index.d.mts +9 -9
  55. package/dist/plugins/siwe/index.d.mts +3 -3
  56. package/dist/plugins/two-factor/client.d.mts +2 -2
  57. package/dist/plugins/two-factor/index.d.mts +18 -18
  58. package/dist/plugins/username/index.d.mts +4 -4
  59. package/dist/plugins/username/schema.d.mts +3 -3
  60. package/dist/test-utils/test-instance.d.mts +312 -312
  61. package/package.json +3 -3
@@ -12,10 +12,10 @@ import { OrganizationPlugin } from "./organization.mjs";
12
12
  import "./index.mjs";
13
13
  import "../../client/index.mjs";
14
14
  import { HasPermissionBaseInput } from "./permission.mjs";
15
- import * as _better_auth_core41 from "@better-auth/core";
15
+ import * as _better_auth_core43 from "@better-auth/core";
16
16
  import { DBFieldAttribute } from "@better-auth/core/db";
17
- import * as nanostores5 from "nanostores";
18
- import * as _better_fetch_fetch99 from "@better-fetch/fetch";
17
+ import * as nanostores6 from "nanostores";
18
+ import * as _better_fetch_fetch115 from "@better-fetch/fetch";
19
19
 
20
20
  //#region src/plugins/organization/client.d.ts
21
21
  /**
@@ -86,7 +86,7 @@ declare const organizationClient: <CO extends OrganizationClientOptions>(options
86
86
  } ? true : false;
87
87
  };
88
88
  }>;
89
- getActions: ($fetch: _better_fetch_fetch99.BetterFetch, _$store: _better_auth_core41.ClientStore, co: _better_auth_core41.BetterAuthClientOptions | undefined) => {
89
+ getActions: ($fetch: _better_fetch_fetch115.BetterFetch, _$store: _better_auth_core43.ClientStore, co: _better_auth_core43.BetterAuthClientOptions | undefined) => {
90
90
  $Infer: {
91
91
  ActiveOrganization: CO["teams"] extends {
92
92
  enabled: true;
@@ -178,11 +178,11 @@ declare const organizationClient: <CO extends OrganizationClientOptions>(options
178
178
  }) => boolean;
179
179
  };
180
180
  };
181
- getAtoms: ($fetch: _better_fetch_fetch99.BetterFetch) => {
182
- $listOrg: nanostores5.PreinitializedWritableAtom<boolean> & object;
183
- $activeOrgSignal: nanostores5.PreinitializedWritableAtom<boolean> & object;
184
- $activeMemberSignal: nanostores5.PreinitializedWritableAtom<boolean> & object;
185
- $activeMemberRoleSignal: nanostores5.PreinitializedWritableAtom<boolean> & object;
181
+ getAtoms: ($fetch: _better_fetch_fetch115.BetterFetch) => {
182
+ $listOrg: nanostores6.PreinitializedWritableAtom<boolean> & object;
183
+ $activeOrgSignal: nanostores6.PreinitializedWritableAtom<boolean> & object;
184
+ $activeMemberSignal: nanostores6.PreinitializedWritableAtom<boolean> & object;
185
+ $activeMemberRoleSignal: nanostores6.PreinitializedWritableAtom<boolean> & object;
186
186
  activeOrganization: AuthQueryAtom<Prettify<({
187
187
  id: string;
188
188
  name: string;
@@ -9,7 +9,7 @@ import { acceptInvitation, cancelInvitation, createInvitation, getInvitation, li
9
9
  import { addMember, getActiveMember, getActiveMemberRole, leaveOrganization, listMembers, removeMember, updateMemberRole } from "./routes/crud-members.mjs";
10
10
  import { checkOrganizationSlug, createOrganization, deleteOrganization, getFullOrganization, listOrganizations, setActiveOrganization, updateOrganization } from "./routes/crud-org.mjs";
11
11
  import { addTeamMember, createTeam, listOrganizationTeams, listTeamMembers, listUserTeams, removeTeam, removeTeamMember, setActiveTeam, updateTeam } from "./routes/crud-team.mjs";
12
- import * as _better_auth_core_db35 from "@better-auth/core/db";
12
+ import * as _better_auth_core_db58 from "@better-auth/core/db";
13
13
  import * as better_call742 from "better-call";
14
14
  import * as z from "zod";
15
15
 
@@ -126,11 +126,11 @@ declare const createHasPermission: <O extends OrganizationOptions>(options: O) =
126
126
  }>)[];
127
127
  }>) => Promise<{
128
128
  session: {
129
- session: _better_auth_core_db35.Session & {
129
+ session: _better_auth_core_db58.Session & {
130
130
  activeTeamId?: string | undefined;
131
131
  activeOrganizationId?: string | undefined;
132
132
  };
133
- user: _better_auth_core_db35.User;
133
+ user: _better_auth_core_db58.User;
134
134
  };
135
135
  }>)[];
136
136
  metadata: {
@@ -6,13 +6,13 @@ import { Statements, Subset } from "../../access/types.mjs";
6
6
  import { OrganizationOptions } from "../types.mjs";
7
7
  import { OrganizationRole } from "../schema.mjs";
8
8
  import "../../index.mjs";
9
- import * as _better_auth_core_db60 from "@better-auth/core/db";
10
- import * as better_call840 from "better-call";
9
+ import * as _better_auth_core_db95 from "@better-auth/core/db";
10
+ import * as better_call888 from "better-call";
11
11
  import * as z from "zod";
12
12
 
13
13
  //#region src/plugins/organization/routes/crud-access-control.d.ts
14
14
  type IsExactlyEmptyObject<T> = keyof T extends never ? T extends {} ? {} extends T ? true : false : false : false;
15
- declare const createOrgRole: <O extends OrganizationOptions>(options: O) => better_call840.StrictEndpoint<"/organization/create-role", {
15
+ declare const createOrgRole: <O extends OrganizationOptions>(options: O) => better_call888.StrictEndpoint<"/organization/create-role", {
16
16
  method: "POST";
17
17
  body: z.ZodObject<{
18
18
  organizationId: z.ZodOptional<z.ZodString>;
@@ -36,8 +36,8 @@ declare const createOrgRole: <O extends OrganizationOptions>(options: O) => bett
36
36
  };
37
37
  };
38
38
  requireHeaders: true;
39
- use: ((inputContext: better_call840.MiddlewareInputContext<{
40
- use: ((inputContext: better_call840.MiddlewareInputContext<better_call840.MiddlewareOptions>) => Promise<{
39
+ use: ((inputContext: better_call888.MiddlewareInputContext<{
40
+ use: ((inputContext: better_call888.MiddlewareInputContext<better_call888.MiddlewareOptions>) => Promise<{
41
41
  session: {
42
42
  session: Record<string, any> & {
43
43
  id: string;
@@ -62,7 +62,7 @@ declare const createOrgRole: <O extends OrganizationOptions>(options: O) => bett
62
62
  }>)[];
63
63
  }>) => Promise<{
64
64
  session: {
65
- session: _better_auth_core_db60.Session & {
65
+ session: _better_auth_core_db95.Session & {
66
66
  activeTeamId?: string | undefined;
67
67
  activeOrganizationId?: string | undefined;
68
68
  };
@@ -81,7 +81,7 @@ declare const createOrgRole: <O extends OrganizationOptions>(options: O) => bett
81
81
  } & InferAdditionalFieldsFromPluginOptions<"organizationRole", O, false>;
82
82
  statements: Subset<string, Statements>;
83
83
  }>;
84
- declare const deleteOrgRole: <O extends OrganizationOptions>(options: O) => better_call840.StrictEndpoint<"/organization/delete-role", {
84
+ declare const deleteOrgRole: <O extends OrganizationOptions>(options: O) => better_call888.StrictEndpoint<"/organization/delete-role", {
85
85
  method: "POST";
86
86
  body: z.ZodIntersection<z.ZodObject<{
87
87
  organizationId: z.ZodOptional<z.ZodString>;
@@ -91,8 +91,8 @@ declare const deleteOrgRole: <O extends OrganizationOptions>(options: O) => bett
91
91
  roleId: z.ZodString;
92
92
  }, z.core.$strip>]>>;
93
93
  requireHeaders: true;
94
- use: ((inputContext: better_call840.MiddlewareInputContext<{
95
- use: ((inputContext: better_call840.MiddlewareInputContext<better_call840.MiddlewareOptions>) => Promise<{
94
+ use: ((inputContext: better_call888.MiddlewareInputContext<{
95
+ use: ((inputContext: better_call888.MiddlewareInputContext<better_call888.MiddlewareOptions>) => Promise<{
96
96
  session: {
97
97
  session: Record<string, any> & {
98
98
  id: string;
@@ -117,7 +117,7 @@ declare const deleteOrgRole: <O extends OrganizationOptions>(options: O) => bett
117
117
  }>)[];
118
118
  }>) => Promise<{
119
119
  session: {
120
- session: _better_auth_core_db60.Session & {
120
+ session: _better_auth_core_db95.Session & {
121
121
  activeTeamId?: string | undefined;
122
122
  activeOrganizationId?: string | undefined;
123
123
  };
@@ -136,11 +136,11 @@ declare const deleteOrgRole: <O extends OrganizationOptions>(options: O) => bett
136
136
  }, {
137
137
  success: boolean;
138
138
  }>;
139
- declare const listOrgRoles: <O extends OrganizationOptions>(options: O) => better_call840.StrictEndpoint<"/organization/list-roles", {
139
+ declare const listOrgRoles: <O extends OrganizationOptions>(options: O) => better_call888.StrictEndpoint<"/organization/list-roles", {
140
140
  method: "GET";
141
141
  requireHeaders: true;
142
- use: ((inputContext: better_call840.MiddlewareInputContext<{
143
- use: ((inputContext: better_call840.MiddlewareInputContext<better_call840.MiddlewareOptions>) => Promise<{
142
+ use: ((inputContext: better_call888.MiddlewareInputContext<{
143
+ use: ((inputContext: better_call888.MiddlewareInputContext<better_call888.MiddlewareOptions>) => Promise<{
144
144
  session: {
145
145
  session: Record<string, any> & {
146
146
  id: string;
@@ -165,7 +165,7 @@ declare const listOrgRoles: <O extends OrganizationOptions>(options: O) => bette
165
165
  }>)[];
166
166
  }>) => Promise<{
167
167
  session: {
168
- session: _better_auth_core_db60.Session & {
168
+ session: _better_auth_core_db95.Session & {
169
169
  activeTeamId?: string | undefined;
170
170
  activeOrganizationId?: string | undefined;
171
171
  };
@@ -183,11 +183,11 @@ declare const listOrgRoles: <O extends OrganizationOptions>(options: O) => bette
183
183
  createdAt: Date;
184
184
  updatedAt?: Date | undefined;
185
185
  } & InferAdditionalFieldsFromPluginOptions<"organizationRole", O, false>)[]>;
186
- declare const getOrgRole: <O extends OrganizationOptions>(options: O) => better_call840.StrictEndpoint<"/organization/get-role", {
186
+ declare const getOrgRole: <O extends OrganizationOptions>(options: O) => better_call888.StrictEndpoint<"/organization/get-role", {
187
187
  method: "GET";
188
188
  requireHeaders: true;
189
- use: ((inputContext: better_call840.MiddlewareInputContext<{
190
- use: ((inputContext: better_call840.MiddlewareInputContext<better_call840.MiddlewareOptions>) => Promise<{
189
+ use: ((inputContext: better_call888.MiddlewareInputContext<{
190
+ use: ((inputContext: better_call888.MiddlewareInputContext<better_call888.MiddlewareOptions>) => Promise<{
191
191
  session: {
192
192
  session: Record<string, any> & {
193
193
  id: string;
@@ -212,7 +212,7 @@ declare const getOrgRole: <O extends OrganizationOptions>(options: O) => better_
212
212
  }>)[];
213
213
  }>) => Promise<{
214
214
  session: {
215
- session: _better_auth_core_db60.Session & {
215
+ session: _better_auth_core_db95.Session & {
216
216
  activeTeamId?: string | undefined;
217
217
  activeOrganizationId?: string | undefined;
218
218
  };
@@ -243,7 +243,7 @@ declare const getOrgRole: <O extends OrganizationOptions>(options: O) => better_
243
243
  createdAt: Date;
244
244
  updatedAt?: Date | undefined;
245
245
  } & InferAdditionalFieldsFromPluginOptions<"organizationRole", O, false>>;
246
- declare const updateOrgRole: <O extends OrganizationOptions>(options: O) => better_call840.StrictEndpoint<"/organization/update-role", {
246
+ declare const updateOrgRole: <O extends OrganizationOptions>(options: O) => better_call888.StrictEndpoint<"/organization/update-role", {
247
247
  method: "POST";
248
248
  body: z.ZodIntersection<z.ZodObject<{
249
249
  organizationId: z.ZodOptional<z.ZodString>;
@@ -270,8 +270,8 @@ declare const updateOrgRole: <O extends OrganizationOptions>(options: O) => bett
270
270
  };
271
271
  };
272
272
  requireHeaders: true;
273
- use: ((inputContext: better_call840.MiddlewareInputContext<{
274
- use: ((inputContext: better_call840.MiddlewareInputContext<better_call840.MiddlewareOptions>) => Promise<{
273
+ use: ((inputContext: better_call888.MiddlewareInputContext<{
274
+ use: ((inputContext: better_call888.MiddlewareInputContext<better_call888.MiddlewareOptions>) => Promise<{
275
275
  session: {
276
276
  session: Record<string, any> & {
277
277
  id: string;
@@ -296,7 +296,7 @@ declare const updateOrgRole: <O extends OrganizationOptions>(options: O) => bett
296
296
  }>)[];
297
297
  }>) => Promise<{
298
298
  session: {
299
- session: _better_auth_core_db60.Session & {
299
+ session: _better_auth_core_db95.Session & {
300
300
  activeTeamId?: string | undefined;
301
301
  activeOrganizationId?: string | undefined;
302
302
  };
@@ -6,29 +6,29 @@ import { InferOrganizationRolesFromOption, InvitationStatus } from "../schema.mj
6
6
  import "../../index.mjs";
7
7
  import { defaultRoles } from "../access/statement.mjs";
8
8
  import "../index.mjs";
9
- import * as _better_auth_core45 from "@better-auth/core";
10
- import * as _better_auth_core_db65 from "@better-auth/core/db";
11
- import * as better_call860 from "better-call";
9
+ import * as _better_auth_core54 from "@better-auth/core";
10
+ import * as _better_auth_core_db100 from "@better-auth/core/db";
11
+ import * as better_call908 from "better-call";
12
12
  import * as z from "zod";
13
13
 
14
14
  //#region src/plugins/organization/routes/crud-invites.d.ts
15
- declare const createInvitation: <O extends OrganizationOptions>(option: O) => better_call860.StrictEndpoint<"/organization/invite-member", {
15
+ declare const createInvitation: <O extends OrganizationOptions>(option: O) => better_call908.StrictEndpoint<"/organization/invite-member", {
16
16
  method: "POST";
17
17
  requireHeaders: true;
18
- use: (((inputContext: better_call860.MiddlewareInputContext<better_call860.MiddlewareOptions>) => Promise<{
18
+ use: (((inputContext: better_call908.MiddlewareInputContext<better_call908.MiddlewareOptions>) => Promise<{
19
19
  orgOptions: OrganizationOptions;
20
20
  roles: typeof defaultRoles & {
21
21
  [key: string]: Role<{}>;
22
22
  };
23
- getSession: (context: _better_auth_core45.GenericEndpointContext) => Promise<{
24
- session: _better_auth_core_db65.Session & {
23
+ getSession: (context: _better_auth_core54.GenericEndpointContext) => Promise<{
24
+ session: _better_auth_core_db100.Session & {
25
25
  activeTeamId?: string | undefined;
26
26
  activeOrganizationId?: string | undefined;
27
27
  };
28
- user: _better_auth_core_db65.User;
28
+ user: _better_auth_core_db100.User;
29
29
  }>;
30
- }>) | ((inputContext: better_call860.MiddlewareInputContext<{
31
- use: ((inputContext: better_call860.MiddlewareInputContext<better_call860.MiddlewareOptions>) => Promise<{
30
+ }>) | ((inputContext: better_call908.MiddlewareInputContext<{
31
+ use: ((inputContext: better_call908.MiddlewareInputContext<better_call908.MiddlewareOptions>) => Promise<{
32
32
  session: {
33
33
  session: Record<string, any> & {
34
34
  id: string;
@@ -53,11 +53,11 @@ declare const createInvitation: <O extends OrganizationOptions>(option: O) => be
53
53
  }>)[];
54
54
  }>) => Promise<{
55
55
  session: {
56
- session: _better_auth_core_db65.Session & {
56
+ session: _better_auth_core_db100.Session & {
57
57
  activeTeamId?: string | undefined;
58
58
  activeOrganizationId?: string | undefined;
59
59
  };
60
- user: _better_auth_core_db65.User;
60
+ user: _better_auth_core_db100.User;
61
61
  };
62
62
  }>))[];
63
63
  body: z.ZodObject<{
@@ -168,7 +168,7 @@ declare const createInvitation: <O extends OrganizationOptions>(option: O) => be
168
168
  createdAt: Date;
169
169
  }) & (O["schema"] extends {
170
170
  invitation?: {
171
- additionalFields: infer Field extends Record<string, _better_auth_core_db65.DBFieldAttribute>;
171
+ additionalFields: infer Field extends Record<string, _better_auth_core_db100.DBFieldAttribute>;
172
172
  } | undefined;
173
173
  } ? FieldAttributeToObject<Field> : {}) extends infer T ? { [K in keyof T]: T[K] } : never) | ((O["teams"] extends {
174
174
  enabled: true;
@@ -193,29 +193,29 @@ declare const createInvitation: <O extends OrganizationOptions>(option: O) => be
193
193
  createdAt: Date;
194
194
  }) & (O["schema"] extends {
195
195
  invitation?: {
196
- additionalFields: infer Field extends Record<string, _better_auth_core_db65.DBFieldAttribute>;
196
+ additionalFields: infer Field extends Record<string, _better_auth_core_db100.DBFieldAttribute>;
197
197
  } | undefined;
198
198
  } ? FieldAttributeToObject<RemoveFieldsWithReturnedFalse<Field>> : {}) extends infer T_1 ? { [K_1 in keyof T_1]: T_1[K_1] } : never)>;
199
- declare const acceptInvitation: <O extends OrganizationOptions>(options: O) => better_call860.StrictEndpoint<"/organization/accept-invitation", {
199
+ declare const acceptInvitation: <O extends OrganizationOptions>(options: O) => better_call908.StrictEndpoint<"/organization/accept-invitation", {
200
200
  method: "POST";
201
201
  body: z.ZodObject<{
202
202
  invitationId: z.ZodString;
203
203
  }, z.core.$strip>;
204
204
  requireHeaders: true;
205
- use: (((inputContext: better_call860.MiddlewareInputContext<better_call860.MiddlewareOptions>) => Promise<{
205
+ use: (((inputContext: better_call908.MiddlewareInputContext<better_call908.MiddlewareOptions>) => Promise<{
206
206
  orgOptions: OrganizationOptions;
207
207
  roles: typeof defaultRoles & {
208
208
  [key: string]: Role<{}>;
209
209
  };
210
- getSession: (context: _better_auth_core45.GenericEndpointContext) => Promise<{
211
- session: _better_auth_core_db65.Session & {
210
+ getSession: (context: _better_auth_core54.GenericEndpointContext) => Promise<{
211
+ session: _better_auth_core_db100.Session & {
212
212
  activeTeamId?: string | undefined;
213
213
  activeOrganizationId?: string | undefined;
214
214
  };
215
- user: _better_auth_core_db65.User;
215
+ user: _better_auth_core_db100.User;
216
216
  }>;
217
- }>) | ((inputContext: better_call860.MiddlewareInputContext<{
218
- use: ((inputContext: better_call860.MiddlewareInputContext<better_call860.MiddlewareOptions>) => Promise<{
217
+ }>) | ((inputContext: better_call908.MiddlewareInputContext<{
218
+ use: ((inputContext: better_call908.MiddlewareInputContext<better_call908.MiddlewareOptions>) => Promise<{
219
219
  session: {
220
220
  session: Record<string, any> & {
221
221
  id: string;
@@ -240,11 +240,11 @@ declare const acceptInvitation: <O extends OrganizationOptions>(options: O) => b
240
240
  }>)[];
241
241
  }>) => Promise<{
242
242
  session: {
243
- session: _better_auth_core_db65.Session & {
243
+ session: _better_auth_core_db100.Session & {
244
244
  activeTeamId?: string | undefined;
245
245
  activeOrganizationId?: string | undefined;
246
246
  };
247
- user: _better_auth_core_db65.User;
247
+ user: _better_auth_core_db100.User;
248
248
  };
249
249
  }>))[];
250
250
  metadata: {
@@ -296,7 +296,7 @@ declare const acceptInvitation: <O extends OrganizationOptions>(options: O) => b
296
296
  createdAt: Date;
297
297
  }) & (O["schema"] extends {
298
298
  invitation?: {
299
- additionalFields: infer Field extends Record<string, _better_auth_core_db65.DBFieldAttribute>;
299
+ additionalFields: infer Field extends Record<string, _better_auth_core_db100.DBFieldAttribute>;
300
300
  } | undefined;
301
301
  } ? FieldAttributeToObject<Field> : {}) extends infer T ? { [K in keyof T]: T[K] } : never;
302
302
  member: {
@@ -307,26 +307,26 @@ declare const acceptInvitation: <O extends OrganizationOptions>(options: O) => b
307
307
  createdAt: Date;
308
308
  } & InferAdditionalFieldsFromPluginOptions<"member", O, false>;
309
309
  }>;
310
- declare const rejectInvitation: <O extends OrganizationOptions>(options: O) => better_call860.StrictEndpoint<"/organization/reject-invitation", {
310
+ declare const rejectInvitation: <O extends OrganizationOptions>(options: O) => better_call908.StrictEndpoint<"/organization/reject-invitation", {
311
311
  method: "POST";
312
312
  body: z.ZodObject<{
313
313
  invitationId: z.ZodString;
314
314
  }, z.core.$strip>;
315
315
  requireHeaders: true;
316
- use: (((inputContext: better_call860.MiddlewareInputContext<better_call860.MiddlewareOptions>) => Promise<{
316
+ use: (((inputContext: better_call908.MiddlewareInputContext<better_call908.MiddlewareOptions>) => Promise<{
317
317
  orgOptions: OrganizationOptions;
318
318
  roles: typeof defaultRoles & {
319
319
  [key: string]: Role<{}>;
320
320
  };
321
- getSession: (context: _better_auth_core45.GenericEndpointContext) => Promise<{
322
- session: _better_auth_core_db65.Session & {
321
+ getSession: (context: _better_auth_core54.GenericEndpointContext) => Promise<{
322
+ session: _better_auth_core_db100.Session & {
323
323
  activeTeamId?: string | undefined;
324
324
  activeOrganizationId?: string | undefined;
325
325
  };
326
- user: _better_auth_core_db65.User;
326
+ user: _better_auth_core_db100.User;
327
327
  }>;
328
- }>) | ((inputContext: better_call860.MiddlewareInputContext<{
329
- use: ((inputContext: better_call860.MiddlewareInputContext<better_call860.MiddlewareOptions>) => Promise<{
328
+ }>) | ((inputContext: better_call908.MiddlewareInputContext<{
329
+ use: ((inputContext: better_call908.MiddlewareInputContext<better_call908.MiddlewareOptions>) => Promise<{
330
330
  session: {
331
331
  session: Record<string, any> & {
332
332
  id: string;
@@ -351,11 +351,11 @@ declare const rejectInvitation: <O extends OrganizationOptions>(options: O) => b
351
351
  }>)[];
352
352
  }>) => Promise<{
353
353
  session: {
354
- session: _better_auth_core_db65.Session & {
354
+ session: _better_auth_core_db100.Session & {
355
355
  activeTeamId?: string | undefined;
356
356
  activeOrganizationId?: string | undefined;
357
357
  };
358
- user: _better_auth_core_db65.User;
358
+ user: _better_auth_core_db100.User;
359
359
  };
360
360
  }>))[];
361
361
  metadata: {
@@ -397,26 +397,26 @@ declare const rejectInvitation: <O extends OrganizationOptions>(options: O) => b
397
397
  } | null;
398
398
  member: null;
399
399
  }>;
400
- declare const cancelInvitation: <O extends OrganizationOptions>(options: O) => better_call860.StrictEndpoint<"/organization/cancel-invitation", {
400
+ declare const cancelInvitation: <O extends OrganizationOptions>(options: O) => better_call908.StrictEndpoint<"/organization/cancel-invitation", {
401
401
  method: "POST";
402
402
  body: z.ZodObject<{
403
403
  invitationId: z.ZodString;
404
404
  }, z.core.$strip>;
405
405
  requireHeaders: true;
406
- use: (((inputContext: better_call860.MiddlewareInputContext<better_call860.MiddlewareOptions>) => Promise<{
406
+ use: (((inputContext: better_call908.MiddlewareInputContext<better_call908.MiddlewareOptions>) => Promise<{
407
407
  orgOptions: OrganizationOptions;
408
408
  roles: typeof defaultRoles & {
409
409
  [key: string]: Role<{}>;
410
410
  };
411
- getSession: (context: _better_auth_core45.GenericEndpointContext) => Promise<{
412
- session: _better_auth_core_db65.Session & {
411
+ getSession: (context: _better_auth_core54.GenericEndpointContext) => Promise<{
412
+ session: _better_auth_core_db100.Session & {
413
413
  activeTeamId?: string | undefined;
414
414
  activeOrganizationId?: string | undefined;
415
415
  };
416
- user: _better_auth_core_db65.User;
416
+ user: _better_auth_core_db100.User;
417
417
  }>;
418
- }>) | ((inputContext: better_call860.MiddlewareInputContext<{
419
- use: ((inputContext: better_call860.MiddlewareInputContext<better_call860.MiddlewareOptions>) => Promise<{
418
+ }>) | ((inputContext: better_call908.MiddlewareInputContext<{
419
+ use: ((inputContext: better_call908.MiddlewareInputContext<better_call908.MiddlewareOptions>) => Promise<{
420
420
  session: {
421
421
  session: Record<string, any> & {
422
422
  id: string;
@@ -441,11 +441,11 @@ declare const cancelInvitation: <O extends OrganizationOptions>(options: O) => b
441
441
  }>)[];
442
442
  }>) => Promise<{
443
443
  session: {
444
- session: _better_auth_core_db65.Session & {
444
+ session: _better_auth_core_db100.Session & {
445
445
  activeTeamId?: string | undefined;
446
446
  activeOrganizationId?: string | undefined;
447
447
  };
448
- user: _better_auth_core_db65.User;
448
+ user: _better_auth_core_db100.User;
449
449
  };
450
450
  }>))[];
451
451
  openapi: {
@@ -492,22 +492,22 @@ declare const cancelInvitation: <O extends OrganizationOptions>(options: O) => b
492
492
  createdAt: Date;
493
493
  }) & (O["schema"] extends {
494
494
  invitation?: {
495
- additionalFields: infer Field extends Record<string, _better_auth_core_db65.DBFieldAttribute>;
495
+ additionalFields: infer Field extends Record<string, _better_auth_core_db100.DBFieldAttribute>;
496
496
  } | undefined;
497
497
  } ? FieldAttributeToObject<Field> : {}) extends infer T ? { [K in keyof T]: T[K] } : never) | null>;
498
- declare const getInvitation: <O extends OrganizationOptions>(options: O) => better_call860.StrictEndpoint<"/organization/get-invitation", {
498
+ declare const getInvitation: <O extends OrganizationOptions>(options: O) => better_call908.StrictEndpoint<"/organization/get-invitation", {
499
499
  method: "GET";
500
- use: ((inputContext: better_call860.MiddlewareInputContext<better_call860.MiddlewareOptions>) => Promise<{
500
+ use: ((inputContext: better_call908.MiddlewareInputContext<better_call908.MiddlewareOptions>) => Promise<{
501
501
  orgOptions: OrganizationOptions;
502
502
  roles: typeof defaultRoles & {
503
503
  [key: string]: Role<{}>;
504
504
  };
505
- getSession: (context: _better_auth_core45.GenericEndpointContext) => Promise<{
506
- session: _better_auth_core_db65.Session & {
505
+ getSession: (context: _better_auth_core54.GenericEndpointContext) => Promise<{
506
+ session: _better_auth_core_db100.Session & {
507
507
  activeTeamId?: string | undefined;
508
508
  activeOrganizationId?: string | undefined;
509
509
  };
510
- user: _better_auth_core_db65.User;
510
+ user: _better_auth_core_db100.User;
511
511
  }>;
512
512
  }>)[];
513
513
  requireHeaders: true;
@@ -587,7 +587,7 @@ declare const getInvitation: <O extends OrganizationOptions>(options: O) => bett
587
587
  createdAt: Date;
588
588
  }) & (O["schema"] extends {
589
589
  invitation?: {
590
- additionalFields: infer Field extends Record<string, _better_auth_core_db65.DBFieldAttribute>;
590
+ additionalFields: infer Field extends Record<string, _better_auth_core_db100.DBFieldAttribute>;
591
591
  } | undefined;
592
592
  } ? FieldAttributeToObject<Field> : {}) extends infer T ? { [K in keyof T]: T[K] } : never) & {
593
593
  organizationName: ({
@@ -599,7 +599,7 @@ declare const getInvitation: <O extends OrganizationOptions>(options: O) => bett
599
599
  metadata?: any;
600
600
  } & (O["schema"] extends {
601
601
  organization?: {
602
- additionalFields: infer Field extends Record<string, _better_auth_core_db65.DBFieldAttribute>;
602
+ additionalFields: infer Field extends Record<string, _better_auth_core_db100.DBFieldAttribute>;
603
603
  } | undefined;
604
604
  } ? FieldAttributeToObject<RemoveFieldsWithReturnedFalse<Field>> : {}))["name"];
605
605
  organizationSlug: ({
@@ -611,28 +611,28 @@ declare const getInvitation: <O extends OrganizationOptions>(options: O) => bett
611
611
  metadata?: any;
612
612
  } & (O["schema"] extends {
613
613
  organization?: {
614
- additionalFields: infer Field extends Record<string, _better_auth_core_db65.DBFieldAttribute>;
614
+ additionalFields: infer Field extends Record<string, _better_auth_core_db100.DBFieldAttribute>;
615
615
  } | undefined;
616
616
  } ? FieldAttributeToObject<RemoveFieldsWithReturnedFalse<Field>> : {}))["slug"];
617
617
  inviterEmail: string;
618
618
  }>;
619
- declare const listInvitations: <O extends OrganizationOptions>(options: O) => better_call860.StrictEndpoint<"/organization/list-invitations", {
619
+ declare const listInvitations: <O extends OrganizationOptions>(options: O) => better_call908.StrictEndpoint<"/organization/list-invitations", {
620
620
  method: "GET";
621
621
  requireHeaders: true;
622
- use: (((inputContext: better_call860.MiddlewareInputContext<better_call860.MiddlewareOptions>) => Promise<{
622
+ use: (((inputContext: better_call908.MiddlewareInputContext<better_call908.MiddlewareOptions>) => Promise<{
623
623
  orgOptions: OrganizationOptions;
624
624
  roles: typeof defaultRoles & {
625
625
  [key: string]: Role<{}>;
626
626
  };
627
- getSession: (context: _better_auth_core45.GenericEndpointContext) => Promise<{
628
- session: _better_auth_core_db65.Session & {
627
+ getSession: (context: _better_auth_core54.GenericEndpointContext) => Promise<{
628
+ session: _better_auth_core_db100.Session & {
629
629
  activeTeamId?: string | undefined;
630
630
  activeOrganizationId?: string | undefined;
631
631
  };
632
- user: _better_auth_core_db65.User;
632
+ user: _better_auth_core_db100.User;
633
633
  }>;
634
- }>) | ((inputContext: better_call860.MiddlewareInputContext<{
635
- use: ((inputContext: better_call860.MiddlewareInputContext<better_call860.MiddlewareOptions>) => Promise<{
634
+ }>) | ((inputContext: better_call908.MiddlewareInputContext<{
635
+ use: ((inputContext: better_call908.MiddlewareInputContext<better_call908.MiddlewareOptions>) => Promise<{
636
636
  session: {
637
637
  session: Record<string, any> & {
638
638
  id: string;
@@ -657,11 +657,11 @@ declare const listInvitations: <O extends OrganizationOptions>(options: O) => be
657
657
  }>)[];
658
658
  }>) => Promise<{
659
659
  session: {
660
- session: _better_auth_core_db65.Session & {
660
+ session: _better_auth_core_db100.Session & {
661
661
  activeTeamId?: string | undefined;
662
662
  activeOrganizationId?: string | undefined;
663
663
  };
664
- user: _better_auth_core_db65.User;
664
+ user: _better_auth_core_db100.User;
665
665
  };
666
666
  }>))[];
667
667
  query: z.ZodOptional<z.ZodObject<{
@@ -690,25 +690,25 @@ declare const listInvitations: <O extends OrganizationOptions>(options: O) => be
690
690
  createdAt: Date;
691
691
  }) & (O["schema"] extends {
692
692
  invitation?: {
693
- additionalFields: infer Field extends Record<string, _better_auth_core_db65.DBFieldAttribute>;
693
+ additionalFields: infer Field extends Record<string, _better_auth_core_db100.DBFieldAttribute>;
694
694
  } | undefined;
695
695
  } ? FieldAttributeToObject<Field> : {}) extends infer T ? { [K in keyof T]: T[K] } : never)[]>;
696
696
  /**
697
697
  * List all invitations a user has received
698
698
  */
699
- declare const listUserInvitations: <O extends OrganizationOptions>(options: O) => better_call860.StrictEndpoint<"/organization/list-user-invitations", {
699
+ declare const listUserInvitations: <O extends OrganizationOptions>(options: O) => better_call908.StrictEndpoint<"/organization/list-user-invitations", {
700
700
  method: "GET";
701
- use: ((inputContext: better_call860.MiddlewareInputContext<better_call860.MiddlewareOptions>) => Promise<{
701
+ use: ((inputContext: better_call908.MiddlewareInputContext<better_call908.MiddlewareOptions>) => Promise<{
702
702
  orgOptions: OrganizationOptions;
703
703
  roles: typeof defaultRoles & {
704
704
  [key: string]: Role<{}>;
705
705
  };
706
- getSession: (context: _better_auth_core45.GenericEndpointContext) => Promise<{
707
- session: _better_auth_core_db65.Session & {
706
+ getSession: (context: _better_auth_core54.GenericEndpointContext) => Promise<{
707
+ session: _better_auth_core_db100.Session & {
708
708
  activeTeamId?: string | undefined;
709
709
  activeOrganizationId?: string | undefined;
710
710
  };
711
- user: _better_auth_core_db65.User;
711
+ user: _better_auth_core_db100.User;
712
712
  }>;
713
713
  }>)[];
714
714
  query: z.ZodOptional<z.ZodObject<{
@@ -793,7 +793,7 @@ declare const listUserInvitations: <O extends OrganizationOptions>(options: O) =
793
793
  createdAt: Date;
794
794
  }) & (O["schema"] extends {
795
795
  invitation?: {
796
- additionalFields: infer Field extends Record<string, _better_auth_core_db65.DBFieldAttribute>;
796
+ additionalFields: infer Field extends Record<string, _better_auth_core_db100.DBFieldAttribute>;
797
797
  } | undefined;
798
798
  } ? FieldAttributeToObject<Field> : {}) extends infer T ? { [K in keyof T]: T[K] } : never) & {
799
799
  organization: {
@@ -805,7 +805,7 @@ declare const listUserInvitations: <O extends OrganizationOptions>(options: O) =
805
805
  metadata?: any;
806
806
  } & (O["schema"] extends {
807
807
  organization?: {
808
- additionalFields: infer Field extends Record<string, _better_auth_core_db65.DBFieldAttribute>;
808
+ additionalFields: infer Field extends Record<string, _better_auth_core_db100.DBFieldAttribute>;
809
809
  } | undefined;
810
810
  } ? FieldAttributeToObject<Field> : {}) extends infer T_1 ? { [K_1 in keyof T_1]: T_1[K_1] } : never;
811
811
  }, "organization"> & {
@@ -818,7 +818,7 @@ declare const listUserInvitations: <O extends OrganizationOptions>(options: O) =
818
818
  metadata?: any;
819
819
  } & (O["schema"] extends {
820
820
  organization?: {
821
- additionalFields: infer Field extends Record<string, _better_auth_core_db65.DBFieldAttribute>;
821
+ additionalFields: infer Field extends Record<string, _better_auth_core_db100.DBFieldAttribute>;
822
822
  } | undefined;
823
823
  } ? FieldAttributeToObject<Field> : {}))["name"];
824
824
  })[]>;