better-auth 1.4.8-beta.1 → 1.4.8-beta.2

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 (95) hide show
  1. package/dist/api/index.d.mts +393 -393
  2. package/dist/api/middlewares/origin-check.d.mts +3 -3
  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/reset-password.d.mts +5 -5
  9. package/dist/api/routes/session.d.mts +14 -14
  10. package/dist/api/routes/sign-in.d.mts +3 -3
  11. package/dist/api/routes/sign-out.d.mts +2 -2
  12. package/dist/api/routes/sign-up.d.mts +2 -2
  13. package/dist/api/routes/update-user.d.mts +13 -13
  14. package/dist/client/lynx/index.d.mts +15 -15
  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 +13 -13
  18. package/dist/client/vue/index.d.mts +15 -15
  19. package/dist/db/field.d.mts +6 -6
  20. package/dist/integrations/next-js.d.mts +4 -4
  21. package/dist/integrations/svelte-kit.d.mts +2 -2
  22. package/dist/integrations/tanstack-start.d.mts +4 -4
  23. package/dist/plugins/anonymous/index.d.mts +6 -5
  24. package/dist/plugins/anonymous/index.mjs +1 -0
  25. package/dist/plugins/anonymous/index.mjs.map +1 -1
  26. package/dist/plugins/api-key/index.d.mts +18 -18
  27. package/dist/plugins/bearer/index.d.mts +8 -7
  28. package/dist/plugins/bearer/index.mjs +2 -1
  29. package/dist/plugins/bearer/index.mjs.map +1 -1
  30. package/dist/plugins/captcha/index.d.mts +3 -2
  31. package/dist/plugins/captcha/index.mjs +2 -1
  32. package/dist/plugins/captcha/index.mjs.map +1 -1
  33. package/dist/plugins/custom-session/index.d.mts +6 -5
  34. package/dist/plugins/custom-session/index.mjs +2 -1
  35. package/dist/plugins/custom-session/index.mjs.map +1 -1
  36. package/dist/plugins/device-authorization/index.d.mts +35 -8
  37. package/dist/plugins/device-authorization/index.mjs +2 -1
  38. package/dist/plugins/device-authorization/index.mjs.map +1 -1
  39. package/dist/plugins/email-otp/index.d.mts +49 -48
  40. package/dist/plugins/email-otp/index.mjs +2 -1
  41. package/dist/plugins/email-otp/index.mjs.map +1 -1
  42. package/dist/plugins/generic-oauth/index.d.mts +1 -0
  43. package/dist/plugins/generic-oauth/index.mjs +1 -0
  44. package/dist/plugins/generic-oauth/index.mjs.map +1 -1
  45. package/dist/plugins/haveibeenpwned/index.d.mts +4 -3
  46. package/dist/plugins/haveibeenpwned/index.mjs +1 -0
  47. package/dist/plugins/haveibeenpwned/index.mjs.map +1 -1
  48. package/dist/plugins/index.d.mts +4 -3
  49. package/dist/plugins/jwt/index.d.mts +9 -9
  50. package/dist/plugins/last-login-method/index.d.mts +3 -2
  51. package/dist/plugins/last-login-method/index.mjs +2 -1
  52. package/dist/plugins/last-login-method/index.mjs.map +1 -1
  53. package/dist/plugins/magic-link/index.d.mts +5 -4
  54. package/dist/plugins/magic-link/index.mjs +2 -1
  55. package/dist/plugins/magic-link/index.mjs.map +1 -1
  56. package/dist/plugins/mcp/index.d.mts +11 -10
  57. package/dist/plugins/mcp/index.mjs +2 -1
  58. package/dist/plugins/mcp/index.mjs.map +1 -1
  59. package/dist/plugins/multi-session/index.d.mts +10 -9
  60. package/dist/plugins/multi-session/index.mjs +1 -0
  61. package/dist/plugins/multi-session/index.mjs.map +1 -1
  62. package/dist/plugins/oauth-proxy/index.d.mts +8 -8
  63. package/dist/plugins/oidc-provider/index.d.mts +13 -13
  64. package/dist/plugins/one-tap/index.d.mts +4 -3
  65. package/dist/plugins/one-tap/index.mjs +2 -1
  66. package/dist/plugins/one-tap/index.mjs.map +1 -1
  67. package/dist/plugins/one-time-token/index.d.mts +6 -5
  68. package/dist/plugins/one-time-token/index.mjs +2 -1
  69. package/dist/plugins/one-time-token/index.mjs.map +1 -1
  70. package/dist/plugins/open-api/index.d.mts +4 -3
  71. package/dist/plugins/open-api/index.mjs +2 -1
  72. package/dist/plugins/open-api/index.mjs.map +1 -1
  73. package/dist/plugins/organization/organization.d.mts +4 -4
  74. package/dist/plugins/organization/organization.mjs.map +1 -1
  75. package/dist/plugins/organization/routes/crud-access-control.d.mts +22 -22
  76. package/dist/plugins/organization/routes/crud-invites.d.mts +58 -58
  77. package/dist/plugins/organization/routes/crud-members.d.mts +62 -62
  78. package/dist/plugins/organization/routes/crud-org.d.mts +51 -51
  79. package/dist/plugins/organization/routes/crud-team.d.mts +76 -76
  80. package/dist/plugins/phone-number/index.d.mts +10 -9
  81. package/dist/plugins/phone-number/index.mjs +1 -0
  82. package/dist/plugins/phone-number/index.mjs.map +1 -1
  83. package/dist/plugins/siwe/index.d.mts +4 -3
  84. package/dist/plugins/siwe/index.mjs +2 -1
  85. package/dist/plugins/siwe/index.mjs.map +1 -1
  86. package/dist/plugins/two-factor/backup-codes/index.d.mts +5 -5
  87. package/dist/plugins/two-factor/index.d.mts +18 -18
  88. package/dist/plugins/two-factor/otp/index.d.mts +3 -3
  89. package/dist/plugins/two-factor/totp/index.d.mts +5 -5
  90. package/dist/plugins/username/index.d.mts +10 -9
  91. package/dist/plugins/username/index.mjs +1 -0
  92. package/dist/plugins/username/index.mjs.map +1 -1
  93. package/dist/test-utils/test-instance.d.mts +271 -271
  94. package/dist/utils/time.d.mts +29 -1
  95. package/package.json +7 -7
@@ -6,14 +6,14 @@ import { defaultRoles } from "../access/statement.mjs";
6
6
  import { OrganizationOptions } from "../types.mjs";
7
7
  import { InferOrganizationRolesFromOption } from "../schema.mjs";
8
8
  import "../index.mjs";
9
- import * as _better_auth_core33 from "@better-auth/core";
9
+ import * as _better_auth_core56 from "@better-auth/core";
10
10
  import { LiteralString } from "@better-auth/core";
11
- import * as _better_auth_core_db34 from "@better-auth/core/db";
11
+ import * as _better_auth_core_db115 from "@better-auth/core/db";
12
12
  import * as z from "zod";
13
- import * as better_call768 from "better-call";
13
+ import * as better_call904 from "better-call";
14
14
 
15
15
  //#region src/plugins/organization/routes/crud-members.d.ts
16
- declare const addMember: <O extends OrganizationOptions>(option: O) => better_call768.StrictEndpoint<string, {
16
+ declare const addMember: <O extends OrganizationOptions>(option: O) => better_call904.StrictEndpoint<string, {
17
17
  method: "POST";
18
18
  body: z.ZodObject<{
19
19
  userId: z.ZodCoercedString<unknown>;
@@ -21,17 +21,17 @@ declare const addMember: <O extends OrganizationOptions>(option: O) => better_ca
21
21
  organizationId: z.ZodOptional<z.ZodString>;
22
22
  teamId: z.ZodOptional<z.ZodString>;
23
23
  }, z.core.$strip>;
24
- use: ((inputContext: better_call768.MiddlewareInputContext<better_call768.MiddlewareOptions>) => Promise<{
24
+ use: ((inputContext: better_call904.MiddlewareInputContext<better_call904.MiddlewareOptions>) => Promise<{
25
25
  orgOptions: OrganizationOptions;
26
26
  roles: typeof defaultRoles & {
27
27
  [key: string]: Role<{}>;
28
28
  };
29
- getSession: (context: _better_auth_core33.GenericEndpointContext) => Promise<{
30
- session: _better_auth_core_db34.Session & {
29
+ getSession: (context: _better_auth_core56.GenericEndpointContext) => Promise<{
30
+ session: _better_auth_core_db115.Session & {
31
31
  activeTeamId?: string | undefined;
32
32
  activeOrganizationId?: string | undefined;
33
33
  };
34
- user: _better_auth_core_db34.User;
34
+ user: _better_auth_core_db115.User;
35
35
  }>;
36
36
  }>)[];
37
37
  metadata: {
@@ -60,27 +60,27 @@ declare const addMember: <O extends OrganizationOptions>(option: O) => better_ca
60
60
  role: string;
61
61
  createdAt: Date;
62
62
  } & InferAdditionalFieldsFromPluginOptions<"member", O, false>) | null>;
63
- declare const removeMember: <O extends OrganizationOptions>(options: O) => better_call768.StrictEndpoint<"/organization/remove-member", {
63
+ declare const removeMember: <O extends OrganizationOptions>(options: O) => better_call904.StrictEndpoint<"/organization/remove-member", {
64
64
  method: "POST";
65
65
  body: z.ZodObject<{
66
66
  memberIdOrEmail: z.ZodString;
67
67
  organizationId: z.ZodOptional<z.ZodString>;
68
68
  }, z.core.$strip>;
69
69
  requireHeaders: true;
70
- use: (((inputContext: better_call768.MiddlewareInputContext<better_call768.MiddlewareOptions>) => Promise<{
70
+ use: (((inputContext: better_call904.MiddlewareInputContext<better_call904.MiddlewareOptions>) => Promise<{
71
71
  orgOptions: OrganizationOptions;
72
72
  roles: typeof defaultRoles & {
73
73
  [key: string]: Role<{}>;
74
74
  };
75
- getSession: (context: _better_auth_core33.GenericEndpointContext) => Promise<{
76
- session: _better_auth_core_db34.Session & {
75
+ getSession: (context: _better_auth_core56.GenericEndpointContext) => Promise<{
76
+ session: _better_auth_core_db115.Session & {
77
77
  activeTeamId?: string | undefined;
78
78
  activeOrganizationId?: string | undefined;
79
79
  };
80
- user: _better_auth_core_db34.User;
80
+ user: _better_auth_core_db115.User;
81
81
  }>;
82
- }>) | ((inputContext: better_call768.MiddlewareInputContext<{
83
- use: ((inputContext: better_call768.MiddlewareInputContext<better_call768.MiddlewareOptions>) => Promise<{
82
+ }>) | ((inputContext: better_call904.MiddlewareInputContext<{
83
+ use: ((inputContext: better_call904.MiddlewareInputContext<better_call904.MiddlewareOptions>) => Promise<{
84
84
  session: {
85
85
  session: Record<string, any> & {
86
86
  id: string;
@@ -105,11 +105,11 @@ declare const removeMember: <O extends OrganizationOptions>(options: O) => bette
105
105
  }>)[];
106
106
  }>) => Promise<{
107
107
  session: {
108
- session: _better_auth_core_db34.Session & {
108
+ session: _better_auth_core_db115.Session & {
109
109
  activeTeamId?: string | undefined;
110
110
  activeOrganizationId?: string | undefined;
111
111
  };
112
- user: _better_auth_core_db34.User;
112
+ user: _better_auth_core_db115.User;
113
113
  };
114
114
  }>))[];
115
115
  metadata: {
@@ -180,27 +180,27 @@ declare const removeMember: <O extends OrganizationOptions>(options: O) => bette
180
180
  };
181
181
  }) & InferAdditionalFieldsFromPluginOptions<"member", O, false> extends infer T ? { [K in keyof T]: T[K] } : never;
182
182
  } | null>;
183
- declare const updateMemberRole: <O extends OrganizationOptions>(option: O) => better_call768.StrictEndpoint<"/organization/update-member-role", {
183
+ declare const updateMemberRole: <O extends OrganizationOptions>(option: O) => better_call904.StrictEndpoint<"/organization/update-member-role", {
184
184
  method: "POST";
185
185
  body: z.ZodObject<{
186
186
  role: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
187
187
  memberId: z.ZodString;
188
188
  organizationId: z.ZodOptional<z.ZodString>;
189
189
  }, z.core.$strip>;
190
- use: (((inputContext: better_call768.MiddlewareInputContext<better_call768.MiddlewareOptions>) => Promise<{
190
+ use: (((inputContext: better_call904.MiddlewareInputContext<better_call904.MiddlewareOptions>) => Promise<{
191
191
  orgOptions: OrganizationOptions;
192
192
  roles: typeof defaultRoles & {
193
193
  [key: string]: Role<{}>;
194
194
  };
195
- getSession: (context: _better_auth_core33.GenericEndpointContext) => Promise<{
196
- session: _better_auth_core_db34.Session & {
195
+ getSession: (context: _better_auth_core56.GenericEndpointContext) => Promise<{
196
+ session: _better_auth_core_db115.Session & {
197
197
  activeTeamId?: string | undefined;
198
198
  activeOrganizationId?: string | undefined;
199
199
  };
200
- user: _better_auth_core_db34.User;
200
+ user: _better_auth_core_db115.User;
201
201
  }>;
202
- }>) | ((inputContext: better_call768.MiddlewareInputContext<{
203
- use: ((inputContext: better_call768.MiddlewareInputContext<better_call768.MiddlewareOptions>) => Promise<{
202
+ }>) | ((inputContext: better_call904.MiddlewareInputContext<{
203
+ use: ((inputContext: better_call904.MiddlewareInputContext<better_call904.MiddlewareOptions>) => Promise<{
204
204
  session: {
205
205
  session: Record<string, any> & {
206
206
  id: string;
@@ -225,11 +225,11 @@ declare const updateMemberRole: <O extends OrganizationOptions>(option: O) => be
225
225
  }>)[];
226
226
  }>) => Promise<{
227
227
  session: {
228
- session: _better_auth_core_db34.Session & {
228
+ session: _better_auth_core_db115.Session & {
229
229
  activeTeamId?: string | undefined;
230
230
  activeOrganizationId?: string | undefined;
231
231
  };
232
- user: _better_auth_core_db34.User;
232
+ user: _better_auth_core_db115.User;
233
233
  };
234
234
  }>))[];
235
235
  requireHeaders: true;
@@ -295,22 +295,22 @@ declare const updateMemberRole: <O extends OrganizationOptions>(option: O) => be
295
295
  image?: string | undefined;
296
296
  };
297
297
  }>;
298
- declare const getActiveMember: <O extends OrganizationOptions>(options: O) => better_call768.StrictEndpoint<"/organization/get-active-member", {
298
+ declare const getActiveMember: <O extends OrganizationOptions>(options: O) => better_call904.StrictEndpoint<"/organization/get-active-member", {
299
299
  method: "GET";
300
- use: (((inputContext: better_call768.MiddlewareInputContext<better_call768.MiddlewareOptions>) => Promise<{
300
+ use: (((inputContext: better_call904.MiddlewareInputContext<better_call904.MiddlewareOptions>) => Promise<{
301
301
  orgOptions: OrganizationOptions;
302
302
  roles: typeof defaultRoles & {
303
303
  [key: string]: Role<{}>;
304
304
  };
305
- getSession: (context: _better_auth_core33.GenericEndpointContext) => Promise<{
306
- session: _better_auth_core_db34.Session & {
305
+ getSession: (context: _better_auth_core56.GenericEndpointContext) => Promise<{
306
+ session: _better_auth_core_db115.Session & {
307
307
  activeTeamId?: string | undefined;
308
308
  activeOrganizationId?: string | undefined;
309
309
  };
310
- user: _better_auth_core_db34.User;
310
+ user: _better_auth_core_db115.User;
311
311
  }>;
312
- }>) | ((inputContext: better_call768.MiddlewareInputContext<{
313
- use: ((inputContext: better_call768.MiddlewareInputContext<better_call768.MiddlewareOptions>) => Promise<{
312
+ }>) | ((inputContext: better_call904.MiddlewareInputContext<{
313
+ use: ((inputContext: better_call904.MiddlewareInputContext<better_call904.MiddlewareOptions>) => Promise<{
314
314
  session: {
315
315
  session: Record<string, any> & {
316
316
  id: string;
@@ -335,11 +335,11 @@ declare const getActiveMember: <O extends OrganizationOptions>(options: O) => be
335
335
  }>)[];
336
336
  }>) => Promise<{
337
337
  session: {
338
- session: _better_auth_core_db34.Session & {
338
+ session: _better_auth_core_db115.Session & {
339
339
  activeTeamId?: string | undefined;
340
340
  activeOrganizationId?: string | undefined;
341
341
  };
342
- user: _better_auth_core_db34.User;
342
+ user: _better_auth_core_db115.User;
343
343
  };
344
344
  }>))[];
345
345
  requireHeaders: true;
@@ -403,7 +403,7 @@ declare const getActiveMember: <O extends OrganizationOptions>(options: O) => be
403
403
  image?: string | undefined;
404
404
  };
405
405
  }) & InferAdditionalFieldsFromPluginOptions<"member", O, false> extends infer T ? { [K in keyof T]: T[K] } : never) & {
406
- user: _better_auth_core_db34.User;
406
+ user: _better_auth_core_db115.User;
407
407
  }, "user"> & {
408
408
  user: {
409
409
  id: string;
@@ -412,13 +412,13 @@ declare const getActiveMember: <O extends OrganizationOptions>(options: O) => be
412
412
  image: string | undefined;
413
413
  };
414
414
  }) | null>;
415
- declare const leaveOrganization: <O extends OrganizationOptions>(options: O) => better_call768.StrictEndpoint<"/organization/leave", {
415
+ declare const leaveOrganization: <O extends OrganizationOptions>(options: O) => better_call904.StrictEndpoint<"/organization/leave", {
416
416
  method: "POST";
417
417
  body: z.ZodObject<{
418
418
  organizationId: z.ZodString;
419
419
  }, z.core.$strip>;
420
420
  requireHeaders: true;
421
- use: (((inputContext: better_call768.MiddlewareInputContext<better_call768.MiddlewareOptions>) => Promise<{
421
+ use: (((inputContext: better_call904.MiddlewareInputContext<better_call904.MiddlewareOptions>) => Promise<{
422
422
  session: {
423
423
  session: Record<string, any> & {
424
424
  id: string;
@@ -440,17 +440,17 @@ declare const leaveOrganization: <O extends OrganizationOptions>(options: O) =>
440
440
  image?: string | null | undefined;
441
441
  };
442
442
  };
443
- }>) | ((inputContext: better_call768.MiddlewareInputContext<better_call768.MiddlewareOptions>) => Promise<{
443
+ }>) | ((inputContext: better_call904.MiddlewareInputContext<better_call904.MiddlewareOptions>) => Promise<{
444
444
  orgOptions: OrganizationOptions;
445
445
  roles: typeof defaultRoles & {
446
446
  [key: string]: Role<{}>;
447
447
  };
448
- getSession: (context: _better_auth_core33.GenericEndpointContext) => Promise<{
449
- session: _better_auth_core_db34.Session & {
448
+ getSession: (context: _better_auth_core56.GenericEndpointContext) => Promise<{
449
+ session: _better_auth_core_db115.Session & {
450
450
  activeTeamId?: string | undefined;
451
451
  activeOrganizationId?: string | undefined;
452
452
  };
453
- user: _better_auth_core_db34.User;
453
+ user: _better_auth_core_db115.User;
454
454
  }>;
455
455
  }>))[];
456
456
  }, Omit<((O["teams"] extends {
@@ -481,7 +481,7 @@ declare const leaveOrganization: <O extends OrganizationOptions>(options: O) =>
481
481
  image?: string | undefined;
482
482
  };
483
483
  }) & InferAdditionalFieldsFromPluginOptions<"member", O, false> extends infer T ? { [K in keyof T]: T[K] } : never) & {
484
- user: _better_auth_core_db34.User;
484
+ user: _better_auth_core_db115.User;
485
485
  }, "user"> & {
486
486
  user: {
487
487
  id: string;
@@ -490,7 +490,7 @@ declare const leaveOrganization: <O extends OrganizationOptions>(options: O) =>
490
490
  image: string | undefined;
491
491
  };
492
492
  }>;
493
- declare const listMembers: <O extends OrganizationOptions>(options: O) => better_call768.StrictEndpoint<"/organization/list-members", {
493
+ declare const listMembers: <O extends OrganizationOptions>(options: O) => better_call904.StrictEndpoint<"/organization/list-members", {
494
494
  method: "GET";
495
495
  query: z.ZodOptional<z.ZodObject<{
496
496
  limit: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
@@ -515,20 +515,20 @@ declare const listMembers: <O extends OrganizationOptions>(options: O) => better
515
515
  organizationSlug: z.ZodOptional<z.ZodString>;
516
516
  }, z.core.$strip>>;
517
517
  requireHeaders: true;
518
- use: (((inputContext: better_call768.MiddlewareInputContext<better_call768.MiddlewareOptions>) => Promise<{
518
+ use: (((inputContext: better_call904.MiddlewareInputContext<better_call904.MiddlewareOptions>) => Promise<{
519
519
  orgOptions: OrganizationOptions;
520
520
  roles: typeof defaultRoles & {
521
521
  [key: string]: Role<{}>;
522
522
  };
523
- getSession: (context: _better_auth_core33.GenericEndpointContext) => Promise<{
524
- session: _better_auth_core_db34.Session & {
523
+ getSession: (context: _better_auth_core56.GenericEndpointContext) => Promise<{
524
+ session: _better_auth_core_db115.Session & {
525
525
  activeTeamId?: string | undefined;
526
526
  activeOrganizationId?: string | undefined;
527
527
  };
528
- user: _better_auth_core_db34.User;
528
+ user: _better_auth_core_db115.User;
529
529
  }>;
530
- }>) | ((inputContext: better_call768.MiddlewareInputContext<{
531
- use: ((inputContext: better_call768.MiddlewareInputContext<better_call768.MiddlewareOptions>) => Promise<{
530
+ }>) | ((inputContext: better_call904.MiddlewareInputContext<{
531
+ use: ((inputContext: better_call904.MiddlewareInputContext<better_call904.MiddlewareOptions>) => Promise<{
532
532
  session: {
533
533
  session: Record<string, any> & {
534
534
  id: string;
@@ -553,11 +553,11 @@ declare const listMembers: <O extends OrganizationOptions>(options: O) => better
553
553
  }>)[];
554
554
  }>) => Promise<{
555
555
  session: {
556
- session: _better_auth_core_db34.Session & {
556
+ session: _better_auth_core_db115.Session & {
557
557
  activeTeamId?: string | undefined;
558
558
  activeOrganizationId?: string | undefined;
559
559
  };
560
- user: _better_auth_core_db34.User;
560
+ user: _better_auth_core_db115.User;
561
561
  };
562
562
  }>))[];
563
563
  }, {
@@ -598,7 +598,7 @@ declare const listMembers: <O extends OrganizationOptions>(options: O) => better
598
598
  })[];
599
599
  total: number;
600
600
  }>;
601
- declare const getActiveMemberRole: <O extends OrganizationOptions>(options: O) => better_call768.StrictEndpoint<"/organization/get-active-member-role", {
601
+ declare const getActiveMemberRole: <O extends OrganizationOptions>(options: O) => better_call904.StrictEndpoint<"/organization/get-active-member-role", {
602
602
  method: "GET";
603
603
  query: z.ZodOptional<z.ZodObject<{
604
604
  userId: z.ZodOptional<z.ZodString>;
@@ -606,20 +606,20 @@ declare const getActiveMemberRole: <O extends OrganizationOptions>(options: O) =
606
606
  organizationSlug: z.ZodOptional<z.ZodString>;
607
607
  }, z.core.$strip>>;
608
608
  requireHeaders: true;
609
- use: (((inputContext: better_call768.MiddlewareInputContext<better_call768.MiddlewareOptions>) => Promise<{
609
+ use: (((inputContext: better_call904.MiddlewareInputContext<better_call904.MiddlewareOptions>) => Promise<{
610
610
  orgOptions: OrganizationOptions;
611
611
  roles: typeof defaultRoles & {
612
612
  [key: string]: Role<{}>;
613
613
  };
614
- getSession: (context: _better_auth_core33.GenericEndpointContext) => Promise<{
615
- session: _better_auth_core_db34.Session & {
614
+ getSession: (context: _better_auth_core56.GenericEndpointContext) => Promise<{
615
+ session: _better_auth_core_db115.Session & {
616
616
  activeTeamId?: string | undefined;
617
617
  activeOrganizationId?: string | undefined;
618
618
  };
619
- user: _better_auth_core_db34.User;
619
+ user: _better_auth_core_db115.User;
620
620
  }>;
621
- }>) | ((inputContext: better_call768.MiddlewareInputContext<{
622
- use: ((inputContext: better_call768.MiddlewareInputContext<better_call768.MiddlewareOptions>) => Promise<{
621
+ }>) | ((inputContext: better_call904.MiddlewareInputContext<{
622
+ use: ((inputContext: better_call904.MiddlewareInputContext<better_call904.MiddlewareOptions>) => Promise<{
623
623
  session: {
624
624
  session: Record<string, any> & {
625
625
  id: string;
@@ -644,11 +644,11 @@ declare const getActiveMemberRole: <O extends OrganizationOptions>(options: O) =
644
644
  }>)[];
645
645
  }>) => Promise<{
646
646
  session: {
647
- session: _better_auth_core_db34.Session & {
647
+ session: _better_auth_core_db115.Session & {
648
648
  activeTeamId?: string | undefined;
649
649
  activeOrganizationId?: string | undefined;
650
650
  };
651
- user: _better_auth_core_db34.User;
651
+ user: _better_auth_core_db115.User;
652
652
  };
653
653
  }>))[];
654
654
  }, {
@@ -680,7 +680,7 @@ declare const getActiveMemberRole: <O extends OrganizationOptions>(options: O) =
680
680
  image?: string | undefined;
681
681
  };
682
682
  }) & InferAdditionalFieldsFromPluginOptions<"member", O, false> extends infer T ? { [K in keyof T]: T[K] } : never) & {
683
- user: _better_auth_core_db34.User;
683
+ user: _better_auth_core_db115.User;
684
684
  })["role"];
685
685
  }>;
686
686
  //#endregion
@@ -6,13 +6,13 @@ import { defaultRoles } from "../access/statement.mjs";
6
6
  import { OrganizationOptions } from "../types.mjs";
7
7
  import { InferInvitation, InferMember, InferTeam } from "../schema.mjs";
8
8
  import "../index.mjs";
9
- import * as _better_auth_core47 from "@better-auth/core";
10
- import * as _better_auth_core_db90 from "@better-auth/core/db";
9
+ import * as _better_auth_core42 from "@better-auth/core";
10
+ import * as _better_auth_core_db71 from "@better-auth/core/db";
11
11
  import * as z from "zod";
12
- import * as better_call862 from "better-call";
12
+ import * as better_call836 from "better-call";
13
13
 
14
14
  //#region src/plugins/organization/routes/crud-org.d.ts
15
- declare const createOrganization: <O extends OrganizationOptions>(options?: O | undefined) => better_call862.StrictEndpoint<"/organization/create", {
15
+ declare const createOrganization: <O extends OrganizationOptions>(options?: O | undefined) => better_call836.StrictEndpoint<"/organization/create", {
16
16
  method: "POST";
17
17
  body: z.ZodObject<{
18
18
  name: z.ZodString;
@@ -22,17 +22,17 @@ declare const createOrganization: <O extends OrganizationOptions>(options?: O |
22
22
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
23
23
  keepCurrentActiveOrganization: z.ZodOptional<z.ZodBoolean>;
24
24
  }, z.core.$strip>;
25
- use: ((inputContext: better_call862.MiddlewareInputContext<better_call862.MiddlewareOptions>) => Promise<{
25
+ use: ((inputContext: better_call836.MiddlewareInputContext<better_call836.MiddlewareOptions>) => Promise<{
26
26
  orgOptions: OrganizationOptions;
27
27
  roles: typeof defaultRoles & {
28
28
  [key: string]: Role<{}>;
29
29
  };
30
- getSession: (context: _better_auth_core47.GenericEndpointContext) => Promise<{
31
- session: _better_auth_core_db90.Session & {
30
+ getSession: (context: _better_auth_core42.GenericEndpointContext) => Promise<{
31
+ session: _better_auth_core_db71.Session & {
32
32
  activeTeamId?: string | undefined;
33
33
  activeOrganizationId?: string | undefined;
34
34
  };
35
- user: _better_auth_core_db90.User;
35
+ user: _better_auth_core_db71.User;
36
36
  }>;
37
37
  }>)[];
38
38
  metadata: {
@@ -81,12 +81,12 @@ declare const createOrganization: <O extends OrganizationOptions>(options?: O |
81
81
  createdAt: Date;
82
82
  } & InferAdditionalFieldsFromPluginOptions<"member", O, false>) | undefined)[];
83
83
  }) | null>;
84
- declare const checkOrganizationSlug: <O extends OrganizationOptions>(options: O) => better_call862.StrictEndpoint<"/organization/check-slug", {
84
+ declare const checkOrganizationSlug: <O extends OrganizationOptions>(options: O) => better_call836.StrictEndpoint<"/organization/check-slug", {
85
85
  method: "POST";
86
86
  body: z.ZodObject<{
87
87
  slug: z.ZodString;
88
88
  }, z.core.$strip>;
89
- use: (((inputContext: better_call862.MiddlewareInputContext<better_call862.MiddlewareOptions>) => Promise<{
89
+ use: (((inputContext: better_call836.MiddlewareInputContext<better_call836.MiddlewareOptions>) => Promise<{
90
90
  session: {
91
91
  session: Record<string, any> & {
92
92
  id: string;
@@ -108,23 +108,23 @@ declare const checkOrganizationSlug: <O extends OrganizationOptions>(options: O)
108
108
  image?: string | null | undefined;
109
109
  };
110
110
  } | null;
111
- }>) | ((inputContext: better_call862.MiddlewareInputContext<better_call862.MiddlewareOptions>) => Promise<{
111
+ }>) | ((inputContext: better_call836.MiddlewareInputContext<better_call836.MiddlewareOptions>) => Promise<{
112
112
  orgOptions: OrganizationOptions;
113
113
  roles: typeof defaultRoles & {
114
114
  [key: string]: Role<{}>;
115
115
  };
116
- getSession: (context: _better_auth_core47.GenericEndpointContext) => Promise<{
117
- session: _better_auth_core_db90.Session & {
116
+ getSession: (context: _better_auth_core42.GenericEndpointContext) => Promise<{
117
+ session: _better_auth_core_db71.Session & {
118
118
  activeTeamId?: string | undefined;
119
119
  activeOrganizationId?: string | undefined;
120
120
  };
121
- user: _better_auth_core_db90.User;
121
+ user: _better_auth_core_db71.User;
122
122
  }>;
123
123
  }>))[];
124
124
  }, {
125
125
  status: boolean;
126
126
  }>;
127
- declare const updateOrganization: <O extends OrganizationOptions>(options?: O | undefined) => better_call862.StrictEndpoint<"/organization/update", {
127
+ declare const updateOrganization: <O extends OrganizationOptions>(options?: O | undefined) => better_call836.StrictEndpoint<"/organization/update", {
128
128
  method: "POST";
129
129
  body: z.ZodObject<{
130
130
  data: z.ZodObject<{
@@ -136,17 +136,17 @@ declare const updateOrganization: <O extends OrganizationOptions>(options?: O |
136
136
  organizationId: z.ZodOptional<z.ZodString>;
137
137
  }, z.core.$strip>;
138
138
  requireHeaders: true;
139
- use: ((inputContext: better_call862.MiddlewareInputContext<better_call862.MiddlewareOptions>) => Promise<{
139
+ use: ((inputContext: better_call836.MiddlewareInputContext<better_call836.MiddlewareOptions>) => Promise<{
140
140
  orgOptions: OrganizationOptions;
141
141
  roles: typeof defaultRoles & {
142
142
  [key: string]: Role<{}>;
143
143
  };
144
- getSession: (context: _better_auth_core47.GenericEndpointContext) => Promise<{
145
- session: _better_auth_core_db90.Session & {
144
+ getSession: (context: _better_auth_core42.GenericEndpointContext) => Promise<{
145
+ session: _better_auth_core_db71.Session & {
146
146
  activeTeamId?: string | undefined;
147
147
  activeOrganizationId?: string | undefined;
148
148
  };
149
- user: _better_auth_core_db90.User;
149
+ user: _better_auth_core_db71.User;
150
150
  }>;
151
151
  }>)[];
152
152
  metadata: {
@@ -189,23 +189,23 @@ declare const updateOrganization: <O extends OrganizationOptions>(options?: O |
189
189
  } & InferAdditionalFieldsFromPluginOptions<"organization", O, false> extends infer T ? { [K in keyof T]: T[K] } : never) & {
190
190
  metadata: Record<string, any> | undefined;
191
191
  }) | null>;
192
- declare const deleteOrganization: <O extends OrganizationOptions>(options: O) => better_call862.StrictEndpoint<"/organization/delete", {
192
+ declare const deleteOrganization: <O extends OrganizationOptions>(options: O) => better_call836.StrictEndpoint<"/organization/delete", {
193
193
  method: "POST";
194
194
  body: z.ZodObject<{
195
195
  organizationId: z.ZodString;
196
196
  }, z.core.$strip>;
197
197
  requireHeaders: true;
198
- use: ((inputContext: better_call862.MiddlewareInputContext<better_call862.MiddlewareOptions>) => Promise<{
198
+ use: ((inputContext: better_call836.MiddlewareInputContext<better_call836.MiddlewareOptions>) => Promise<{
199
199
  orgOptions: OrganizationOptions;
200
200
  roles: typeof defaultRoles & {
201
201
  [key: string]: Role<{}>;
202
202
  };
203
- getSession: (context: _better_auth_core47.GenericEndpointContext) => Promise<{
204
- session: _better_auth_core_db90.Session & {
203
+ getSession: (context: _better_auth_core42.GenericEndpointContext) => Promise<{
204
+ session: _better_auth_core_db71.Session & {
205
205
  activeTeamId?: string | undefined;
206
206
  activeOrganizationId?: string | undefined;
207
207
  };
208
- user: _better_auth_core_db90.User;
208
+ user: _better_auth_core_db71.User;
209
209
  }>;
210
210
  }>)[];
211
211
  metadata: {
@@ -234,7 +234,7 @@ declare const deleteOrganization: <O extends OrganizationOptions>(options: O) =>
234
234
  logo?: string | null | undefined;
235
235
  metadata?: any;
236
236
  } & InferAdditionalFieldsFromPluginOptions<"organization", O, false> extends infer T ? { [K in keyof T]: T[K] } : never) | null>;
237
- declare const getFullOrganization: <O extends OrganizationOptions>(options: O) => better_call862.StrictEndpoint<"/organization/get-full-organization", {
237
+ declare const getFullOrganization: <O extends OrganizationOptions>(options: O) => better_call836.StrictEndpoint<"/organization/get-full-organization", {
238
238
  method: "GET";
239
239
  query: z.ZodOptional<z.ZodObject<{
240
240
  organizationId: z.ZodOptional<z.ZodString>;
@@ -242,20 +242,20 @@ declare const getFullOrganization: <O extends OrganizationOptions>(options: O) =
242
242
  membersLimit: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>]>>;
243
243
  }, z.core.$strip>>;
244
244
  requireHeaders: true;
245
- use: (((inputContext: better_call862.MiddlewareInputContext<better_call862.MiddlewareOptions>) => Promise<{
245
+ use: (((inputContext: better_call836.MiddlewareInputContext<better_call836.MiddlewareOptions>) => Promise<{
246
246
  orgOptions: OrganizationOptions;
247
247
  roles: typeof defaultRoles & {
248
248
  [key: string]: Role<{}>;
249
249
  };
250
- getSession: (context: _better_auth_core47.GenericEndpointContext) => Promise<{
251
- session: _better_auth_core_db90.Session & {
250
+ getSession: (context: _better_auth_core42.GenericEndpointContext) => Promise<{
251
+ session: _better_auth_core_db71.Session & {
252
252
  activeTeamId?: string | undefined;
253
253
  activeOrganizationId?: string | undefined;
254
254
  };
255
- user: _better_auth_core_db90.User;
255
+ user: _better_auth_core_db71.User;
256
256
  }>;
257
- }>) | ((inputContext: better_call862.MiddlewareInputContext<{
258
- use: ((inputContext: better_call862.MiddlewareInputContext<better_call862.MiddlewareOptions>) => Promise<{
257
+ }>) | ((inputContext: better_call836.MiddlewareInputContext<{
258
+ use: ((inputContext: better_call836.MiddlewareInputContext<better_call836.MiddlewareOptions>) => Promise<{
259
259
  session: {
260
260
  session: Record<string, any> & {
261
261
  id: string;
@@ -280,11 +280,11 @@ declare const getFullOrganization: <O extends OrganizationOptions>(options: O) =
280
280
  }>)[];
281
281
  }>) => Promise<{
282
282
  session: {
283
- session: _better_auth_core_db90.Session & {
283
+ session: _better_auth_core_db71.Session & {
284
284
  activeTeamId?: string | undefined;
285
285
  activeOrganizationId?: string | undefined;
286
286
  };
287
- user: _better_auth_core_db90.User;
287
+ user: _better_auth_core_db71.User;
288
288
  };
289
289
  }>))[];
290
290
  metadata: {
@@ -331,26 +331,26 @@ declare const getFullOrganization: <O extends OrganizationOptions>(options: O) =
331
331
  logo?: string | null | undefined;
332
332
  metadata?: any;
333
333
  } & InferAdditionalFieldsFromPluginOptions<"organization", O, false> extends infer T_1 ? { [K in keyof T_1]: T_1[K] } : never)) | null>;
334
- declare const setActiveOrganization: <O extends OrganizationOptions>(options: O) => better_call862.StrictEndpoint<"/organization/set-active", {
334
+ declare const setActiveOrganization: <O extends OrganizationOptions>(options: O) => better_call836.StrictEndpoint<"/organization/set-active", {
335
335
  method: "POST";
336
336
  body: z.ZodObject<{
337
337
  organizationId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
338
338
  organizationSlug: z.ZodOptional<z.ZodString>;
339
339
  }, z.core.$strip>;
340
- use: (((inputContext: better_call862.MiddlewareInputContext<better_call862.MiddlewareOptions>) => Promise<{
340
+ use: (((inputContext: better_call836.MiddlewareInputContext<better_call836.MiddlewareOptions>) => Promise<{
341
341
  orgOptions: OrganizationOptions;
342
342
  roles: typeof defaultRoles & {
343
343
  [key: string]: Role<{}>;
344
344
  };
345
- getSession: (context: _better_auth_core47.GenericEndpointContext) => Promise<{
346
- session: _better_auth_core_db90.Session & {
345
+ getSession: (context: _better_auth_core42.GenericEndpointContext) => Promise<{
346
+ session: _better_auth_core_db71.Session & {
347
347
  activeTeamId?: string | undefined;
348
348
  activeOrganizationId?: string | undefined;
349
349
  };
350
- user: _better_auth_core_db90.User;
350
+ user: _better_auth_core_db71.User;
351
351
  }>;
352
- }>) | ((inputContext: better_call862.MiddlewareInputContext<{
353
- use: ((inputContext: better_call862.MiddlewareInputContext<better_call862.MiddlewareOptions>) => Promise<{
352
+ }>) | ((inputContext: better_call836.MiddlewareInputContext<{
353
+ use: ((inputContext: better_call836.MiddlewareInputContext<better_call836.MiddlewareOptions>) => Promise<{
354
354
  session: {
355
355
  session: Record<string, any> & {
356
356
  id: string;
@@ -375,11 +375,11 @@ declare const setActiveOrganization: <O extends OrganizationOptions>(options: O)
375
375
  }>)[];
376
376
  }>) => Promise<{
377
377
  session: {
378
- session: _better_auth_core_db90.Session & {
378
+ session: _better_auth_core_db71.Session & {
379
379
  activeTeamId?: string | undefined;
380
380
  activeOrganizationId?: string | undefined;
381
381
  };
382
- user: _better_auth_core_db90.User;
382
+ user: _better_auth_core_db71.User;
383
383
  };
384
384
  }>))[];
385
385
  requireHeaders: true;
@@ -427,22 +427,22 @@ declare const setActiveOrganization: <O extends OrganizationOptions>(options: O)
427
427
  logo?: string | null | undefined;
428
428
  metadata?: any;
429
429
  } & InferAdditionalFieldsFromPluginOptions<"organization", O, false> extends infer T_1 ? { [K in keyof T_1]: T_1[K] } : never)) | null>;
430
- declare const listOrganizations: <O extends OrganizationOptions>(options: O) => better_call862.StrictEndpoint<"/organization/list", {
430
+ declare const listOrganizations: <O extends OrganizationOptions>(options: O) => better_call836.StrictEndpoint<"/organization/list", {
431
431
  method: "GET";
432
- use: (((inputContext: better_call862.MiddlewareInputContext<better_call862.MiddlewareOptions>) => Promise<{
432
+ use: (((inputContext: better_call836.MiddlewareInputContext<better_call836.MiddlewareOptions>) => Promise<{
433
433
  orgOptions: OrganizationOptions;
434
434
  roles: typeof defaultRoles & {
435
435
  [key: string]: Role<{}>;
436
436
  };
437
- getSession: (context: _better_auth_core47.GenericEndpointContext) => Promise<{
438
- session: _better_auth_core_db90.Session & {
437
+ getSession: (context: _better_auth_core42.GenericEndpointContext) => Promise<{
438
+ session: _better_auth_core_db71.Session & {
439
439
  activeTeamId?: string | undefined;
440
440
  activeOrganizationId?: string | undefined;
441
441
  };
442
- user: _better_auth_core_db90.User;
442
+ user: _better_auth_core_db71.User;
443
443
  }>;
444
- }>) | ((inputContext: better_call862.MiddlewareInputContext<{
445
- use: ((inputContext: better_call862.MiddlewareInputContext<better_call862.MiddlewareOptions>) => Promise<{
444
+ }>) | ((inputContext: better_call836.MiddlewareInputContext<{
445
+ use: ((inputContext: better_call836.MiddlewareInputContext<better_call836.MiddlewareOptions>) => Promise<{
446
446
  session: {
447
447
  session: Record<string, any> & {
448
448
  id: string;
@@ -467,11 +467,11 @@ declare const listOrganizations: <O extends OrganizationOptions>(options: O) =>
467
467
  }>)[];
468
468
  }>) => Promise<{
469
469
  session: {
470
- session: _better_auth_core_db90.Session & {
470
+ session: _better_auth_core_db71.Session & {
471
471
  activeTeamId?: string | undefined;
472
472
  activeOrganizationId?: string | undefined;
473
473
  };
474
- user: _better_auth_core_db90.User;
474
+ user: _better_auth_core_db71.User;
475
475
  };
476
476
  }>))[];
477
477
  requireHeaders: true;