better-auth 1.4.21 → 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 (63) hide show
  1. package/dist/api/index.d.mts +407 -407
  2. package/dist/api/middlewares/origin-check.d.mts +4 -4
  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/sign-in.d.mts +4 -4
  10. package/dist/api/routes/sign-out.d.mts +2 -2
  11. package/dist/api/routes/sign-up.d.mts +3 -3
  12. package/dist/api/routes/update-user.d.mts +13 -13
  13. package/dist/client/lynx/index.d.mts +15 -15
  14. package/dist/client/react/index.d.mts +15 -15
  15. package/dist/client/solid/index.d.mts +13 -13
  16. package/dist/client/svelte/index.d.mts +13 -13
  17. package/dist/client/vanilla.d.mts +15 -15
  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-solid.d.mts +4 -4
  23. package/dist/integrations/tanstack-start.d.mts +4 -4
  24. package/dist/plugins/admin/admin.d.mts +114 -114
  25. package/dist/plugins/anonymous/index.d.mts +5 -5
  26. package/dist/plugins/api-key/index.d.mts +79 -79
  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 +52 -52
  32. package/dist/plugins/generic-oauth/index.d.mts +32 -32
  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 +7 -7
  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 +4 -4
  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 +8 -8
  48. package/dist/plugins/organization/organization.d.mts +7 -7
  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 +33 -33
  55. package/dist/plugins/siwe/index.d.mts +3 -3
  56. package/dist/plugins/two-factor/backup-codes/index.d.mts +5 -5
  57. package/dist/plugins/two-factor/index.d.mts +16 -16
  58. package/dist/plugins/two-factor/otp/index.d.mts +3 -3
  59. package/dist/plugins/two-factor/totp/index.d.mts +5 -5
  60. package/dist/plugins/username/index.d.mts +9 -9
  61. package/dist/plugins/username/schema.d.mts +3 -3
  62. package/dist/test-utils/test-instance.d.mts +1225 -1225
  63. package/package.json +3 -3
@@ -7,9 +7,9 @@ import { teamSchema } from "../schema.mjs";
7
7
  import "../../index.mjs";
8
8
  import { defaultRoles } from "../access/statement.mjs";
9
9
  import "../access/index.mjs";
10
- import * as _better_auth_core66 from "@better-auth/core";
11
- import * as _better_auth_core_db160 from "@better-auth/core/db";
12
- import * as better_call966 from "better-call";
10
+ import * as _better_auth_core45 from "@better-auth/core";
11
+ import * as _better_auth_core_db60 from "@better-auth/core/db";
12
+ import * as better_call840 from "better-call";
13
13
  import * as z from "zod";
14
14
 
15
15
  //#region src/plugins/organization/routes/crud-team.d.ts
@@ -17,23 +17,23 @@ declare const teamBaseSchema: z.ZodObject<{
17
17
  name: z.ZodString;
18
18
  organizationId: z.ZodOptional<z.ZodString>;
19
19
  }, z.core.$strip>;
20
- declare const createTeam: <O extends OrganizationOptions>(options: O) => better_call966.StrictEndpoint<"/organization/create-team", {
20
+ declare const createTeam: <O extends OrganizationOptions>(options: O) => better_call840.StrictEndpoint<"/organization/create-team", {
21
21
  method: "POST";
22
22
  body: z.ZodObject<{
23
23
  name: z.ZodString;
24
24
  organizationId: z.ZodOptional<z.ZodString>;
25
25
  }, z.core.$strip>;
26
- use: ((inputContext: better_call966.MiddlewareInputContext<better_call966.MiddlewareOptions>) => Promise<{
26
+ use: ((inputContext: better_call840.MiddlewareInputContext<better_call840.MiddlewareOptions>) => Promise<{
27
27
  orgOptions: OrganizationOptions;
28
28
  roles: typeof defaultRoles & {
29
29
  [key: string]: Role<{}>;
30
30
  };
31
- getSession: (context: _better_auth_core66.GenericEndpointContext) => Promise<{
32
- session: _better_auth_core_db160.Session & {
31
+ getSession: (context: _better_auth_core45.GenericEndpointContext) => Promise<{
32
+ session: _better_auth_core_db60.Session & {
33
33
  activeTeamId?: string | undefined;
34
34
  activeOrganizationId?: string | undefined;
35
35
  };
36
- user: _better_auth_core_db160.User;
36
+ user: _better_auth_core_db60.User;
37
37
  }>;
38
38
  }>)[];
39
39
  metadata: {
@@ -89,26 +89,26 @@ declare const createTeam: <O extends OrganizationOptions>(options: O) => better_
89
89
  updatedAt?: Date | undefined;
90
90
  } & (O["schema"] extends {
91
91
  team?: {
92
- additionalFields: infer Field extends Record<string, _better_auth_core_db160.DBFieldAttribute>;
92
+ additionalFields: infer Field extends Record<string, _better_auth_core_db60.DBFieldAttribute>;
93
93
  } | undefined;
94
94
  } ? FieldAttributeToObject<Field> : {}) extends infer T ? { [K in keyof T]: T[K] } : never>;
95
- declare const removeTeam: <O extends OrganizationOptions>(options: O) => better_call966.StrictEndpoint<"/organization/remove-team", {
95
+ declare const removeTeam: <O extends OrganizationOptions>(options: O) => better_call840.StrictEndpoint<"/organization/remove-team", {
96
96
  method: "POST";
97
97
  body: z.ZodObject<{
98
98
  teamId: z.ZodString;
99
99
  organizationId: z.ZodOptional<z.ZodString>;
100
100
  }, z.core.$strip>;
101
- use: ((inputContext: better_call966.MiddlewareInputContext<better_call966.MiddlewareOptions>) => Promise<{
101
+ use: ((inputContext: better_call840.MiddlewareInputContext<better_call840.MiddlewareOptions>) => Promise<{
102
102
  orgOptions: OrganizationOptions;
103
103
  roles: typeof defaultRoles & {
104
104
  [key: string]: Role<{}>;
105
105
  };
106
- getSession: (context: _better_auth_core66.GenericEndpointContext) => Promise<{
107
- session: _better_auth_core_db160.Session & {
106
+ getSession: (context: _better_auth_core45.GenericEndpointContext) => Promise<{
107
+ session: _better_auth_core_db60.Session & {
108
108
  activeTeamId?: string | undefined;
109
109
  activeOrganizationId?: string | undefined;
110
110
  };
111
- user: _better_auth_core_db160.User;
111
+ user: _better_auth_core_db60.User;
112
112
  }>;
113
113
  }>)[];
114
114
  metadata: {
@@ -139,7 +139,7 @@ declare const removeTeam: <O extends OrganizationOptions>(options: O) => better_
139
139
  }, {
140
140
  message: string;
141
141
  } | null>;
142
- declare const updateTeam: <O extends OrganizationOptions>(options: O) => better_call966.StrictEndpoint<"/organization/update-team", {
142
+ declare const updateTeam: <O extends OrganizationOptions>(options: O) => better_call840.StrictEndpoint<"/organization/update-team", {
143
143
  method: "POST";
144
144
  body: z.ZodObject<{
145
145
  teamId: z.ZodString;
@@ -152,20 +152,20 @@ declare const updateTeam: <O extends OrganizationOptions>(options: O) => better_
152
152
  }, z.core.$strip>;
153
153
  }, z.core.$strip>;
154
154
  requireHeaders: true;
155
- use: (((inputContext: better_call966.MiddlewareInputContext<better_call966.MiddlewareOptions>) => Promise<{
155
+ use: (((inputContext: better_call840.MiddlewareInputContext<better_call840.MiddlewareOptions>) => Promise<{
156
156
  orgOptions: OrganizationOptions;
157
157
  roles: typeof defaultRoles & {
158
158
  [key: string]: Role<{}>;
159
159
  };
160
- getSession: (context: _better_auth_core66.GenericEndpointContext) => Promise<{
161
- session: _better_auth_core_db160.Session & {
160
+ getSession: (context: _better_auth_core45.GenericEndpointContext) => Promise<{
161
+ session: _better_auth_core_db60.Session & {
162
162
  activeTeamId?: string | undefined;
163
163
  activeOrganizationId?: string | undefined;
164
164
  };
165
- user: _better_auth_core_db160.User;
165
+ user: _better_auth_core_db60.User;
166
166
  }>;
167
- }>) | ((inputContext: better_call966.MiddlewareInputContext<{
168
- use: ((inputContext: better_call966.MiddlewareInputContext<better_call966.MiddlewareOptions>) => Promise<{
167
+ }>) | ((inputContext: better_call840.MiddlewareInputContext<{
168
+ use: ((inputContext: better_call840.MiddlewareInputContext<better_call840.MiddlewareOptions>) => Promise<{
169
169
  session: {
170
170
  session: Record<string, any> & {
171
171
  id: string;
@@ -190,11 +190,11 @@ declare const updateTeam: <O extends OrganizationOptions>(options: O) => better_
190
190
  }>)[];
191
191
  }>) => Promise<{
192
192
  session: {
193
- session: _better_auth_core_db160.Session & {
193
+ session: _better_auth_core_db60.Session & {
194
194
  activeTeamId?: string | undefined;
195
195
  activeOrganizationId?: string | undefined;
196
196
  };
197
- user: _better_auth_core_db160.User;
197
+ user: _better_auth_core_db60.User;
198
198
  };
199
199
  }>))[];
200
200
  metadata: {
@@ -253,10 +253,10 @@ declare const updateTeam: <O extends OrganizationOptions>(options: O) => better_
253
253
  updatedAt?: Date | undefined;
254
254
  } & (O["schema"] extends {
255
255
  team?: {
256
- additionalFields: infer Field extends Record<string, _better_auth_core_db160.DBFieldAttribute>;
256
+ additionalFields: infer Field extends Record<string, _better_auth_core_db60.DBFieldAttribute>;
257
257
  } | undefined;
258
258
  } ? FieldAttributeToObject<Field> : {}) extends infer T ? { [K in keyof T]: T[K] } : never) & InferAdditionalFieldsFromPluginOptions<"team", O, true>) | null>;
259
- declare const listOrganizationTeams: <O extends OrganizationOptions>(options: O) => better_call966.StrictEndpoint<"/organization/list-teams", {
259
+ declare const listOrganizationTeams: <O extends OrganizationOptions>(options: O) => better_call840.StrictEndpoint<"/organization/list-teams", {
260
260
  method: "GET";
261
261
  query: z.ZodOptional<z.ZodObject<{
262
262
  organizationId: z.ZodOptional<z.ZodString>;
@@ -308,20 +308,20 @@ declare const listOrganizationTeams: <O extends OrganizationOptions>(options: O)
308
308
  };
309
309
  };
310
310
  requireHeaders: true;
311
- use: (((inputContext: better_call966.MiddlewareInputContext<better_call966.MiddlewareOptions>) => Promise<{
311
+ use: (((inputContext: better_call840.MiddlewareInputContext<better_call840.MiddlewareOptions>) => Promise<{
312
312
  orgOptions: OrganizationOptions;
313
313
  roles: typeof defaultRoles & {
314
314
  [key: string]: Role<{}>;
315
315
  };
316
- getSession: (context: _better_auth_core66.GenericEndpointContext) => Promise<{
317
- session: _better_auth_core_db160.Session & {
316
+ getSession: (context: _better_auth_core45.GenericEndpointContext) => Promise<{
317
+ session: _better_auth_core_db60.Session & {
318
318
  activeTeamId?: string | undefined;
319
319
  activeOrganizationId?: string | undefined;
320
320
  };
321
- user: _better_auth_core_db160.User;
321
+ user: _better_auth_core_db60.User;
322
322
  }>;
323
- }>) | ((inputContext: better_call966.MiddlewareInputContext<{
324
- use: ((inputContext: better_call966.MiddlewareInputContext<better_call966.MiddlewareOptions>) => Promise<{
323
+ }>) | ((inputContext: better_call840.MiddlewareInputContext<{
324
+ use: ((inputContext: better_call840.MiddlewareInputContext<better_call840.MiddlewareOptions>) => Promise<{
325
325
  session: {
326
326
  session: Record<string, any> & {
327
327
  id: string;
@@ -346,11 +346,11 @@ declare const listOrganizationTeams: <O extends OrganizationOptions>(options: O)
346
346
  }>)[];
347
347
  }>) => Promise<{
348
348
  session: {
349
- session: _better_auth_core_db160.Session & {
349
+ session: _better_auth_core_db60.Session & {
350
350
  activeTeamId?: string | undefined;
351
351
  activeOrganizationId?: string | undefined;
352
352
  };
353
- user: _better_auth_core_db160.User;
353
+ user: _better_auth_core_db60.User;
354
354
  };
355
355
  }>))[];
356
356
  }, ({
@@ -361,29 +361,29 @@ declare const listOrganizationTeams: <O extends OrganizationOptions>(options: O)
361
361
  updatedAt?: Date | undefined;
362
362
  } & (O["schema"] extends {
363
363
  team?: {
364
- additionalFields: infer Field extends Record<string, _better_auth_core_db160.DBFieldAttribute>;
364
+ additionalFields: infer Field extends Record<string, _better_auth_core_db60.DBFieldAttribute>;
365
365
  } | undefined;
366
366
  } ? FieldAttributeToObject<Field> : {}) extends infer T ? { [K in keyof T]: T[K] } : never)[]>;
367
- declare const setActiveTeam: <O extends OrganizationOptions>(options: O) => better_call966.StrictEndpoint<"/organization/set-active-team", {
367
+ declare const setActiveTeam: <O extends OrganizationOptions>(options: O) => better_call840.StrictEndpoint<"/organization/set-active-team", {
368
368
  method: "POST";
369
369
  body: z.ZodObject<{
370
370
  teamId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
371
371
  }, z.core.$strip>;
372
372
  requireHeaders: true;
373
- use: (((inputContext: better_call966.MiddlewareInputContext<better_call966.MiddlewareOptions>) => Promise<{
373
+ use: (((inputContext: better_call840.MiddlewareInputContext<better_call840.MiddlewareOptions>) => Promise<{
374
374
  orgOptions: OrganizationOptions;
375
375
  roles: typeof defaultRoles & {
376
376
  [key: string]: Role<{}>;
377
377
  };
378
- getSession: (context: _better_auth_core66.GenericEndpointContext) => Promise<{
379
- session: _better_auth_core_db160.Session & {
378
+ getSession: (context: _better_auth_core45.GenericEndpointContext) => Promise<{
379
+ session: _better_auth_core_db60.Session & {
380
380
  activeTeamId?: string | undefined;
381
381
  activeOrganizationId?: string | undefined;
382
382
  };
383
- user: _better_auth_core_db160.User;
383
+ user: _better_auth_core_db60.User;
384
384
  }>;
385
- }>) | ((inputContext: better_call966.MiddlewareInputContext<{
386
- use: ((inputContext: better_call966.MiddlewareInputContext<better_call966.MiddlewareOptions>) => Promise<{
385
+ }>) | ((inputContext: better_call840.MiddlewareInputContext<{
386
+ use: ((inputContext: better_call840.MiddlewareInputContext<better_call840.MiddlewareOptions>) => Promise<{
387
387
  session: {
388
388
  session: Record<string, any> & {
389
389
  id: string;
@@ -408,11 +408,11 @@ declare const setActiveTeam: <O extends OrganizationOptions>(options: O) => bett
408
408
  }>)[];
409
409
  }>) => Promise<{
410
410
  session: {
411
- session: _better_auth_core_db160.Session & {
411
+ session: _better_auth_core_db60.Session & {
412
412
  activeTeamId?: string | undefined;
413
413
  activeOrganizationId?: string | undefined;
414
414
  };
415
- user: _better_auth_core_db160.User;
415
+ user: _better_auth_core_db60.User;
416
416
  };
417
417
  }>))[];
418
418
  metadata: {
@@ -441,7 +441,7 @@ declare const setActiveTeam: <O extends OrganizationOptions>(options: O) => bett
441
441
  createdAt: Date;
442
442
  updatedAt?: Date | undefined;
443
443
  } | null>;
444
- declare const listUserTeams: <O extends OrganizationOptions>(options: O) => better_call966.StrictEndpoint<"/organization/list-user-teams", {
444
+ declare const listUserTeams: <O extends OrganizationOptions>(options: O) => better_call840.StrictEndpoint<"/organization/list-user-teams", {
445
445
  method: "GET";
446
446
  metadata: {
447
447
  openapi: {
@@ -467,20 +467,20 @@ declare const listUserTeams: <O extends OrganizationOptions>(options: O) => bett
467
467
  };
468
468
  };
469
469
  requireHeaders: true;
470
- use: (((inputContext: better_call966.MiddlewareInputContext<better_call966.MiddlewareOptions>) => Promise<{
470
+ use: (((inputContext: better_call840.MiddlewareInputContext<better_call840.MiddlewareOptions>) => Promise<{
471
471
  orgOptions: OrganizationOptions;
472
472
  roles: typeof defaultRoles & {
473
473
  [key: string]: Role<{}>;
474
474
  };
475
- getSession: (context: _better_auth_core66.GenericEndpointContext) => Promise<{
476
- session: _better_auth_core_db160.Session & {
475
+ getSession: (context: _better_auth_core45.GenericEndpointContext) => Promise<{
476
+ session: _better_auth_core_db60.Session & {
477
477
  activeTeamId?: string | undefined;
478
478
  activeOrganizationId?: string | undefined;
479
479
  };
480
- user: _better_auth_core_db160.User;
480
+ user: _better_auth_core_db60.User;
481
481
  }>;
482
- }>) | ((inputContext: better_call966.MiddlewareInputContext<{
483
- use: ((inputContext: better_call966.MiddlewareInputContext<better_call966.MiddlewareOptions>) => Promise<{
482
+ }>) | ((inputContext: better_call840.MiddlewareInputContext<{
483
+ use: ((inputContext: better_call840.MiddlewareInputContext<better_call840.MiddlewareOptions>) => Promise<{
484
484
  session: {
485
485
  session: Record<string, any> & {
486
486
  id: string;
@@ -505,11 +505,11 @@ declare const listUserTeams: <O extends OrganizationOptions>(options: O) => bett
505
505
  }>)[];
506
506
  }>) => Promise<{
507
507
  session: {
508
- session: _better_auth_core_db160.Session & {
508
+ session: _better_auth_core_db60.Session & {
509
509
  activeTeamId?: string | undefined;
510
510
  activeOrganizationId?: string | undefined;
511
511
  };
512
- user: _better_auth_core_db160.User;
512
+ user: _better_auth_core_db60.User;
513
513
  };
514
514
  }>))[];
515
515
  }, {
@@ -519,7 +519,7 @@ declare const listUserTeams: <O extends OrganizationOptions>(options: O) => bett
519
519
  createdAt: Date;
520
520
  updatedAt?: Date | undefined;
521
521
  }[]>;
522
- declare const listTeamMembers: <O extends OrganizationOptions>(options: O) => better_call966.StrictEndpoint<"/organization/list-team-members", {
522
+ declare const listTeamMembers: <O extends OrganizationOptions>(options: O) => better_call840.StrictEndpoint<"/organization/list-team-members", {
523
523
  method: "GET";
524
524
  query: z.ZodOptional<z.ZodObject<{
525
525
  teamId: z.ZodOptional<z.ZodString>;
@@ -567,20 +567,20 @@ declare const listTeamMembers: <O extends OrganizationOptions>(options: O) => be
567
567
  };
568
568
  };
569
569
  requireHeaders: true;
570
- use: (((inputContext: better_call966.MiddlewareInputContext<better_call966.MiddlewareOptions>) => Promise<{
570
+ use: (((inputContext: better_call840.MiddlewareInputContext<better_call840.MiddlewareOptions>) => Promise<{
571
571
  orgOptions: OrganizationOptions;
572
572
  roles: typeof defaultRoles & {
573
573
  [key: string]: Role<{}>;
574
574
  };
575
- getSession: (context: _better_auth_core66.GenericEndpointContext) => Promise<{
576
- session: _better_auth_core_db160.Session & {
575
+ getSession: (context: _better_auth_core45.GenericEndpointContext) => Promise<{
576
+ session: _better_auth_core_db60.Session & {
577
577
  activeTeamId?: string | undefined;
578
578
  activeOrganizationId?: string | undefined;
579
579
  };
580
- user: _better_auth_core_db160.User;
580
+ user: _better_auth_core_db60.User;
581
581
  }>;
582
- }>) | ((inputContext: better_call966.MiddlewareInputContext<{
583
- use: ((inputContext: better_call966.MiddlewareInputContext<better_call966.MiddlewareOptions>) => Promise<{
582
+ }>) | ((inputContext: better_call840.MiddlewareInputContext<{
583
+ use: ((inputContext: better_call840.MiddlewareInputContext<better_call840.MiddlewareOptions>) => Promise<{
584
584
  session: {
585
585
  session: Record<string, any> & {
586
586
  id: string;
@@ -605,11 +605,11 @@ declare const listTeamMembers: <O extends OrganizationOptions>(options: O) => be
605
605
  }>)[];
606
606
  }>) => Promise<{
607
607
  session: {
608
- session: _better_auth_core_db160.Session & {
608
+ session: _better_auth_core_db60.Session & {
609
609
  activeTeamId?: string | undefined;
610
610
  activeOrganizationId?: string | undefined;
611
611
  };
612
- user: _better_auth_core_db160.User;
612
+ user: _better_auth_core_db60.User;
613
613
  };
614
614
  }>))[];
615
615
  }, {
@@ -618,7 +618,7 @@ declare const listTeamMembers: <O extends OrganizationOptions>(options: O) => be
618
618
  userId: string;
619
619
  createdAt: Date;
620
620
  }[]>;
621
- declare const addTeamMember: <O extends OrganizationOptions>(options: O) => better_call966.StrictEndpoint<"/organization/add-team-member", {
621
+ declare const addTeamMember: <O extends OrganizationOptions>(options: O) => better_call840.StrictEndpoint<"/organization/add-team-member", {
622
622
  method: "POST";
623
623
  body: z.ZodObject<{
624
624
  teamId: z.ZodString;
@@ -663,20 +663,20 @@ declare const addTeamMember: <O extends OrganizationOptions>(options: O) => bett
663
663
  };
664
664
  };
665
665
  requireHeaders: true;
666
- use: (((inputContext: better_call966.MiddlewareInputContext<better_call966.MiddlewareOptions>) => Promise<{
666
+ use: (((inputContext: better_call840.MiddlewareInputContext<better_call840.MiddlewareOptions>) => Promise<{
667
667
  orgOptions: OrganizationOptions;
668
668
  roles: typeof defaultRoles & {
669
669
  [key: string]: Role<{}>;
670
670
  };
671
- getSession: (context: _better_auth_core66.GenericEndpointContext) => Promise<{
672
- session: _better_auth_core_db160.Session & {
671
+ getSession: (context: _better_auth_core45.GenericEndpointContext) => Promise<{
672
+ session: _better_auth_core_db60.Session & {
673
673
  activeTeamId?: string | undefined;
674
674
  activeOrganizationId?: string | undefined;
675
675
  };
676
- user: _better_auth_core_db160.User;
676
+ user: _better_auth_core_db60.User;
677
677
  }>;
678
- }>) | ((inputContext: better_call966.MiddlewareInputContext<{
679
- use: ((inputContext: better_call966.MiddlewareInputContext<better_call966.MiddlewareOptions>) => Promise<{
678
+ }>) | ((inputContext: better_call840.MiddlewareInputContext<{
679
+ use: ((inputContext: better_call840.MiddlewareInputContext<better_call840.MiddlewareOptions>) => Promise<{
680
680
  session: {
681
681
  session: Record<string, any> & {
682
682
  id: string;
@@ -701,11 +701,11 @@ declare const addTeamMember: <O extends OrganizationOptions>(options: O) => bett
701
701
  }>)[];
702
702
  }>) => Promise<{
703
703
  session: {
704
- session: _better_auth_core_db160.Session & {
704
+ session: _better_auth_core_db60.Session & {
705
705
  activeTeamId?: string | undefined;
706
706
  activeOrganizationId?: string | undefined;
707
707
  };
708
- user: _better_auth_core_db160.User;
708
+ user: _better_auth_core_db60.User;
709
709
  };
710
710
  }>))[];
711
711
  }, {
@@ -714,7 +714,7 @@ declare const addTeamMember: <O extends OrganizationOptions>(options: O) => bett
714
714
  userId: string;
715
715
  createdAt: Date;
716
716
  }>;
717
- declare const removeTeamMember: <O extends OrganizationOptions>(options: O) => better_call966.StrictEndpoint<"/organization/remove-team-member", {
717
+ declare const removeTeamMember: <O extends OrganizationOptions>(options: O) => better_call840.StrictEndpoint<"/organization/remove-team-member", {
718
718
  method: "POST";
719
719
  body: z.ZodObject<{
720
720
  teamId: z.ZodString;
@@ -746,20 +746,20 @@ declare const removeTeamMember: <O extends OrganizationOptions>(options: O) => b
746
746
  };
747
747
  };
748
748
  requireHeaders: true;
749
- use: (((inputContext: better_call966.MiddlewareInputContext<better_call966.MiddlewareOptions>) => Promise<{
749
+ use: (((inputContext: better_call840.MiddlewareInputContext<better_call840.MiddlewareOptions>) => Promise<{
750
750
  orgOptions: OrganizationOptions;
751
751
  roles: typeof defaultRoles & {
752
752
  [key: string]: Role<{}>;
753
753
  };
754
- getSession: (context: _better_auth_core66.GenericEndpointContext) => Promise<{
755
- session: _better_auth_core_db160.Session & {
754
+ getSession: (context: _better_auth_core45.GenericEndpointContext) => Promise<{
755
+ session: _better_auth_core_db60.Session & {
756
756
  activeTeamId?: string | undefined;
757
757
  activeOrganizationId?: string | undefined;
758
758
  };
759
- user: _better_auth_core_db160.User;
759
+ user: _better_auth_core_db60.User;
760
760
  }>;
761
- }>) | ((inputContext: better_call966.MiddlewareInputContext<{
762
- use: ((inputContext: better_call966.MiddlewareInputContext<better_call966.MiddlewareOptions>) => Promise<{
761
+ }>) | ((inputContext: better_call840.MiddlewareInputContext<{
762
+ use: ((inputContext: better_call840.MiddlewareInputContext<better_call840.MiddlewareOptions>) => Promise<{
763
763
  session: {
764
764
  session: Record<string, any> & {
765
765
  id: string;
@@ -784,11 +784,11 @@ declare const removeTeamMember: <O extends OrganizationOptions>(options: O) => b
784
784
  }>)[];
785
785
  }>) => Promise<{
786
786
  session: {
787
- session: _better_auth_core_db160.Session & {
787
+ session: _better_auth_core_db60.Session & {
788
788
  activeTeamId?: string | undefined;
789
789
  activeOrganizationId?: string | undefined;
790
790
  };
791
- user: _better_auth_core_db160.User;
791
+ user: _better_auth_core_db60.User;
792
792
  };
793
793
  }>))[];
794
794
  }, {
@@ -1,26 +1,26 @@
1
1
  import { PhoneNumberOptions, UserWithPhoneNumber } from "./types.mjs";
2
- import * as _better_auth_core12 from "@better-auth/core";
3
- import * as better_call236 from "better-call";
4
- import * as zod506 from "zod";
5
- import * as zod_v4_core73 from "zod/v4/core";
2
+ import * as _better_auth_core10 from "@better-auth/core";
3
+ import * as better_call79 from "better-call";
4
+ import * as zod64 from "zod";
5
+ import * as zod_v4_core11 from "zod/v4/core";
6
6
 
7
7
  //#region src/plugins/phone-number/index.d.ts
8
8
  declare const phoneNumber: (options?: PhoneNumberOptions | undefined) => {
9
9
  id: "phone-number";
10
10
  hooks: {
11
11
  before: {
12
- matcher: (ctx: _better_auth_core12.HookEndpointContext) => boolean;
13
- handler: (inputContext: better_call236.MiddlewareInputContext<better_call236.MiddlewareOptions>) => Promise<never>;
12
+ matcher: (ctx: _better_auth_core10.HookEndpointContext) => boolean;
13
+ handler: (inputContext: better_call79.MiddlewareInputContext<better_call79.MiddlewareOptions>) => Promise<never>;
14
14
  }[];
15
15
  };
16
16
  endpoints: {
17
- signInPhoneNumber: better_call236.StrictEndpoint<"/sign-in/phone-number", {
17
+ signInPhoneNumber: better_call79.StrictEndpoint<"/sign-in/phone-number", {
18
18
  method: "POST";
19
- body: zod506.ZodObject<{
20
- phoneNumber: zod506.ZodString;
21
- password: zod506.ZodString;
22
- rememberMe: zod506.ZodOptional<zod506.ZodBoolean>;
23
- }, zod_v4_core73.$strip>;
19
+ body: zod64.ZodObject<{
20
+ phoneNumber: zod64.ZodString;
21
+ password: zod64.ZodString;
22
+ rememberMe: zod64.ZodOptional<zod64.ZodBoolean>;
23
+ }, zod_v4_core11.$strip>;
24
24
  metadata: {
25
25
  openapi: {
26
26
  summary: string;
@@ -54,11 +54,11 @@ declare const phoneNumber: (options?: PhoneNumberOptions | undefined) => {
54
54
  token: string;
55
55
  user: UserWithPhoneNumber;
56
56
  }>;
57
- sendPhoneNumberOTP: better_call236.StrictEndpoint<"/phone-number/send-otp", {
57
+ sendPhoneNumberOTP: better_call79.StrictEndpoint<"/phone-number/send-otp", {
58
58
  method: "POST";
59
- body: zod506.ZodObject<{
60
- phoneNumber: zod506.ZodString;
61
- }, zod_v4_core73.$strip>;
59
+ body: zod64.ZodObject<{
60
+ phoneNumber: zod64.ZodString;
61
+ }, zod_v4_core11.$strip>;
62
62
  metadata: {
63
63
  openapi: {
64
64
  summary: string;
@@ -85,14 +85,14 @@ declare const phoneNumber: (options?: PhoneNumberOptions | undefined) => {
85
85
  }, {
86
86
  message: string;
87
87
  }>;
88
- verifyPhoneNumber: better_call236.StrictEndpoint<"/phone-number/verify", {
88
+ verifyPhoneNumber: better_call79.StrictEndpoint<"/phone-number/verify", {
89
89
  method: "POST";
90
- body: zod506.ZodIntersection<zod506.ZodObject<{
91
- phoneNumber: zod506.ZodString;
92
- code: zod506.ZodString;
93
- disableSession: zod506.ZodOptional<zod506.ZodBoolean>;
94
- updatePhoneNumber: zod506.ZodOptional<zod506.ZodBoolean>;
95
- }, zod_v4_core73.$strip>, zod506.ZodRecord<zod506.ZodString, zod506.ZodAny>>;
90
+ body: zod64.ZodIntersection<zod64.ZodObject<{
91
+ phoneNumber: zod64.ZodString;
92
+ code: zod64.ZodString;
93
+ disableSession: zod64.ZodOptional<zod64.ZodBoolean>;
94
+ updatePhoneNumber: zod64.ZodOptional<zod64.ZodBoolean>;
95
+ }, zod_v4_core11.$strip>, zod64.ZodRecord<zod64.ZodString, zod64.ZodAny>>;
96
96
  metadata: {
97
97
  openapi: {
98
98
  summary: string;
@@ -196,11 +196,11 @@ declare const phoneNumber: (options?: PhoneNumberOptions | undefined) => {
196
196
  token: null;
197
197
  user: UserWithPhoneNumber;
198
198
  }>;
199
- requestPasswordResetPhoneNumber: better_call236.StrictEndpoint<"/phone-number/request-password-reset", {
199
+ requestPasswordResetPhoneNumber: better_call79.StrictEndpoint<"/phone-number/request-password-reset", {
200
200
  method: "POST";
201
- body: zod506.ZodObject<{
202
- phoneNumber: zod506.ZodString;
203
- }, zod_v4_core73.$strip>;
201
+ body: zod64.ZodObject<{
202
+ phoneNumber: zod64.ZodString;
203
+ }, zod_v4_core11.$strip>;
204
204
  metadata: {
205
205
  openapi: {
206
206
  description: string;
@@ -229,13 +229,13 @@ declare const phoneNumber: (options?: PhoneNumberOptions | undefined) => {
229
229
  }, {
230
230
  status: boolean;
231
231
  }>;
232
- resetPasswordPhoneNumber: better_call236.StrictEndpoint<"/phone-number/reset-password", {
232
+ resetPasswordPhoneNumber: better_call79.StrictEndpoint<"/phone-number/reset-password", {
233
233
  method: "POST";
234
- body: zod506.ZodObject<{
235
- otp: zod506.ZodString;
236
- phoneNumber: zod506.ZodString;
237
- newPassword: zod506.ZodString;
238
- }, zod_v4_core73.$strip>;
234
+ body: zod64.ZodObject<{
235
+ otp: zod64.ZodString;
236
+ phoneNumber: zod64.ZodString;
237
+ newPassword: zod64.ZodString;
238
+ }, zod_v4_core11.$strip>;
239
239
  metadata: {
240
240
  openapi: {
241
241
  description: string;
@@ -2,7 +2,7 @@ import { InferOptionSchema } from "../../types/plugins.mjs";
2
2
  import "../../types/index.mjs";
3
3
  import { schema } from "./schema.mjs";
4
4
  import { ENSLookupArgs, ENSLookupResult, SIWEVerifyMessageArgs } from "./types.mjs";
5
- import * as better_call254 from "better-call";
5
+ import * as better_call116 from "better-call";
6
6
  import * as z from "zod";
7
7
 
8
8
  //#region src/plugins/siwe/index.d.ts
@@ -49,7 +49,7 @@ declare const siwe: (options: SIWEPluginOptions) => {
49
49
  };
50
50
  };
51
51
  endpoints: {
52
- getSiweNonce: better_call254.StrictEndpoint<"/siwe/nonce", {
52
+ getSiweNonce: better_call116.StrictEndpoint<"/siwe/nonce", {
53
53
  method: "POST";
54
54
  body: z.ZodObject<{
55
55
  walletAddress: z.ZodString;
@@ -58,7 +58,7 @@ declare const siwe: (options: SIWEPluginOptions) => {
58
58
  }, {
59
59
  nonce: string;
60
60
  }>;
61
- verifySiweMessage: better_call254.StrictEndpoint<"/siwe/verify", {
61
+ verifySiweMessage: better_call116.StrictEndpoint<"/siwe/verify", {
62
62
  method: "POST";
63
63
  body: z.ZodObject<{
64
64
  message: z.ZodString;
@@ -1,5 +1,5 @@
1
1
  import { UserWithTwoFactor } from "../types.mjs";
2
- import * as better_call747 from "better-call";
2
+ import * as better_call753 from "better-call";
3
3
  import * as z from "zod";
4
4
 
5
5
  //#region src/plugins/two-factor/backup-codes/index.d.ts
@@ -61,7 +61,7 @@ declare const backupCode2fa: (opts: BackupCodeOptions) => {
61
61
  *
62
62
  * @see [Read our docs to learn more.](https://better-auth.com/docs/plugins/2fa#api-method-two-factor-verify-backup-code)
63
63
  */
64
- verifyBackupCode: better_call747.StrictEndpoint<"/two-factor/verify-backup-code", {
64
+ verifyBackupCode: better_call753.StrictEndpoint<"/two-factor/verify-backup-code", {
65
65
  method: "POST";
66
66
  body: z.ZodObject<{
67
67
  code: z.ZodString;
@@ -187,12 +187,12 @@ declare const backupCode2fa: (opts: BackupCodeOptions) => {
187
187
  *
188
188
  * @see [Read our docs to learn more.](https://better-auth.com/docs/plugins/2fa#api-method-two-factor-generate-backup-codes)
189
189
  */
190
- generateBackupCodes: better_call747.StrictEndpoint<"/two-factor/generate-backup-codes", {
190
+ generateBackupCodes: better_call753.StrictEndpoint<"/two-factor/generate-backup-codes", {
191
191
  method: "POST";
192
192
  body: z.ZodObject<{
193
193
  password: z.ZodString;
194
194
  }, z.core.$strip>;
195
- use: ((inputContext: better_call747.MiddlewareInputContext<better_call747.MiddlewareOptions>) => Promise<{
195
+ use: ((inputContext: better_call753.MiddlewareInputContext<better_call753.MiddlewareOptions>) => Promise<{
196
196
  session: {
197
197
  session: Record<string, any> & {
198
198
  id: string;
@@ -263,7 +263,7 @@ declare const backupCode2fa: (opts: BackupCodeOptions) => {
263
263
  *
264
264
  * @see [Read our docs to learn more.](https://better-auth.com/docs/plugins/2fa#api-method-two-factor-view-backup-codes)
265
265
  */
266
- viewBackupCodes: better_call747.StrictEndpoint<string, {
266
+ viewBackupCodes: better_call753.StrictEndpoint<string, {
267
267
  method: "POST";
268
268
  body: z.ZodObject<{
269
269
  userId: z.ZodCoercedString<unknown>;