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
@@ -1,7 +1,7 @@
1
1
  import { OAuthAccessToken, OIDCMetadata, OIDCOptions } from "../oidc-provider/types.mjs";
2
2
  import "../oidc-provider/index.mjs";
3
3
  import { BetterAuthOptions, GenericEndpointContext } from "@better-auth/core";
4
- import * as better_call282 from "better-call";
4
+ import * as better_call690 from "better-call";
5
5
  import * as z from "zod";
6
6
 
7
7
  //#region src/plugins/mcp/index.d.ts
@@ -24,18 +24,18 @@ declare const mcp: (options: MCPOptions) => {
24
24
  hooks: {
25
25
  after: {
26
26
  matcher(): true;
27
- handler: (inputContext: better_call282.MiddlewareInputContext<better_call282.MiddlewareOptions>) => Promise<void>;
27
+ handler: (inputContext: better_call690.MiddlewareInputContext<better_call690.MiddlewareOptions>) => Promise<void>;
28
28
  }[];
29
29
  };
30
30
  endpoints: {
31
- oAuthConsent: better_call282.StrictEndpoint<"/oauth2/consent", {
31
+ oAuthConsent: better_call690.StrictEndpoint<"/oauth2/consent", {
32
32
  method: "POST";
33
33
  operationId: string;
34
34
  body: z.ZodObject<{
35
35
  accept: z.ZodBoolean;
36
36
  consent_code: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
37
37
  }, z.core.$strip>;
38
- use: ((inputContext: better_call282.MiddlewareInputContext<better_call282.MiddlewareOptions>) => Promise<{
38
+ use: ((inputContext: better_call690.MiddlewareInputContext<better_call690.MiddlewareOptions>) => Promise<{
39
39
  session: {
40
40
  session: Record<string, any> & {
41
41
  id: string;
@@ -107,13 +107,13 @@ declare const mcp: (options: MCPOptions) => {
107
107
  }, {
108
108
  redirectURI: string;
109
109
  }>;
110
- getMcpOAuthConfig: better_call282.StrictEndpoint<"/.well-known/oauth-authorization-server", {
110
+ getMcpOAuthConfig: better_call690.StrictEndpoint<"/.well-known/oauth-authorization-server", {
111
111
  method: "GET";
112
112
  metadata: {
113
113
  readonly scope: "server";
114
114
  };
115
115
  }, OIDCMetadata | null>;
116
- getMCPProtectedResource: better_call282.StrictEndpoint<"/.well-known/oauth-protected-resource", {
116
+ getMCPProtectedResource: better_call690.StrictEndpoint<"/.well-known/oauth-protected-resource", {
117
117
  method: "GET";
118
118
  metadata: {
119
119
  readonly scope: "server";
@@ -126,7 +126,7 @@ declare const mcp: (options: MCPOptions) => {
126
126
  bearer_methods_supported: string[];
127
127
  resource_signing_alg_values_supported: string[];
128
128
  }>;
129
- mcpOAuthAuthorize: better_call282.StrictEndpoint<"/mcp/authorize", {
129
+ mcpOAuthAuthorize: better_call690.StrictEndpoint<"/mcp/authorize", {
130
130
  method: "GET";
131
131
  query: z.ZodRecord<z.ZodString, z.ZodAny>;
132
132
  metadata: {
@@ -149,7 +149,7 @@ declare const mcp: (options: MCPOptions) => {
149
149
  };
150
150
  };
151
151
  }, void>;
152
- mcpOAuthToken: better_call282.StrictEndpoint<"/mcp/token", {
152
+ mcpOAuthToken: better_call690.StrictEndpoint<"/mcp/token", {
153
153
  method: "POST";
154
154
  body: z.ZodRecord<z.ZodAny, z.ZodAny>;
155
155
  metadata: {
@@ -170,7 +170,7 @@ declare const mcp: (options: MCPOptions) => {
170
170
  scope: string;
171
171
  id_token: string | undefined;
172
172
  }>;
173
- registerMcpClient: better_call282.StrictEndpoint<"/mcp/register", {
173
+ registerMcpClient: better_call690.StrictEndpoint<"/mcp/register", {
174
174
  method: "POST";
175
175
  body: z.ZodObject<{
176
176
  redirect_uris: z.ZodArray<z.ZodString>;
@@ -288,7 +288,7 @@ declare const mcp: (options: MCPOptions) => {
288
288
  };
289
289
  };
290
290
  }, Response>;
291
- getMcpSession: better_call282.StrictEndpoint<"/mcp/get-session", {
291
+ getMcpSession: better_call690.StrictEndpoint<"/mcp/get-session", {
292
292
  method: "GET";
293
293
  requireHeaders: true;
294
294
  }, OAuthAccessToken | null>;
@@ -1,5 +1,5 @@
1
- import * as _better_auth_core0 from "@better-auth/core";
2
- import * as better_call1 from "better-call";
1
+ import * as _better_auth_core9 from "@better-auth/core";
2
+ import * as better_call66 from "better-call";
3
3
  import * as z from "zod";
4
4
 
5
5
  //#region src/plugins/multi-session/index.d.ts
@@ -29,7 +29,7 @@ declare const multiSession: (options?: MultiSessionConfig | undefined) => {
29
29
  *
30
30
  * @see [Read our docs to learn more.](https://better-auth.com/docs/plugins/multi-session#api-method-multi-session-list-device-sessions)
31
31
  */
32
- listDeviceSessions: better_call1.StrictEndpoint<"/multi-session/list-device-sessions", {
32
+ listDeviceSessions: better_call66.StrictEndpoint<"/multi-session/list-device-sessions", {
33
33
  method: "GET";
34
34
  requireHeaders: true;
35
35
  }, {
@@ -68,13 +68,13 @@ declare const multiSession: (options?: MultiSessionConfig | undefined) => {
68
68
  *
69
69
  * @see [Read our docs to learn more.](https://better-auth.com/docs/plugins/multi-session#api-method-multi-session-set-active)
70
70
  */
71
- setActiveSession: better_call1.StrictEndpoint<"/multi-session/set-active", {
71
+ setActiveSession: better_call66.StrictEndpoint<"/multi-session/set-active", {
72
72
  method: "POST";
73
73
  body: z.ZodObject<{
74
74
  sessionToken: z.ZodString;
75
75
  }, z.core.$strip>;
76
76
  requireHeaders: true;
77
- use: ((inputContext: better_call1.MiddlewareInputContext<better_call1.MiddlewareOptions>) => Promise<{
77
+ use: ((inputContext: better_call66.MiddlewareInputContext<better_call66.MiddlewareOptions>) => Promise<{
78
78
  session: {
79
79
  session: Record<string, any> & {
80
80
  id: string;
@@ -155,13 +155,13 @@ declare const multiSession: (options?: MultiSessionConfig | undefined) => {
155
155
  *
156
156
  * @see [Read our docs to learn more.](https://better-auth.com/docs/plugins/multi-session#api-method-multi-session-revoke)
157
157
  */
158
- revokeDeviceSession: better_call1.StrictEndpoint<"/multi-session/revoke", {
158
+ revokeDeviceSession: better_call66.StrictEndpoint<"/multi-session/revoke", {
159
159
  method: "POST";
160
160
  body: z.ZodObject<{
161
161
  sessionToken: z.ZodString;
162
162
  }, z.core.$strip>;
163
163
  requireHeaders: true;
164
- use: ((inputContext: better_call1.MiddlewareInputContext<better_call1.MiddlewareOptions>) => Promise<{
164
+ use: ((inputContext: better_call66.MiddlewareInputContext<better_call66.MiddlewareOptions>) => Promise<{
165
165
  session: {
166
166
  session: Record<string, any> & {
167
167
  id: string;
@@ -212,8 +212,8 @@ declare const multiSession: (options?: MultiSessionConfig | undefined) => {
212
212
  };
213
213
  hooks: {
214
214
  after: {
215
- matcher: (context: _better_auth_core0.HookEndpointContext) => boolean;
216
- handler: (inputContext: better_call1.MiddlewareInputContext<better_call1.MiddlewareOptions>) => Promise<void>;
215
+ matcher: (context: _better_auth_core9.HookEndpointContext) => boolean;
216
+ handler: (inputContext: better_call66.MiddlewareInputContext<better_call66.MiddlewareOptions>) => Promise<void>;
217
217
  }[];
218
218
  };
219
219
  options: MultiSessionConfig | undefined;
@@ -1,5 +1,5 @@
1
- import * as _better_auth_core16 from "@better-auth/core";
2
- import * as better_call245 from "better-call";
1
+ import * as _better_auth_core2 from "@better-auth/core";
2
+ import * as better_call15 from "better-call";
3
3
  import * as z from "zod";
4
4
 
5
5
  //#region src/plugins/oauth-proxy/index.d.ts
@@ -34,14 +34,14 @@ declare const oAuthProxy: <O extends OAuthProxyOptions>(opts?: O) => {
34
34
  id: "oauth-proxy";
35
35
  options: NoInfer<O>;
36
36
  endpoints: {
37
- oAuthProxy: better_call245.StrictEndpoint<"/oauth-proxy-callback", {
37
+ oAuthProxy: better_call15.StrictEndpoint<"/oauth-proxy-callback", {
38
38
  method: "GET";
39
39
  operationId: string;
40
40
  query: z.ZodObject<{
41
41
  callbackURL: z.ZodString;
42
42
  cookies: z.ZodString;
43
43
  }, z.core.$strip>;
44
- use: ((inputContext: better_call245.MiddlewareInputContext<better_call245.MiddlewareOptions>) => Promise<void>)[];
44
+ use: ((inputContext: better_call15.MiddlewareInputContext<better_call15.MiddlewareOptions>) => Promise<void>)[];
45
45
  metadata: {
46
46
  openapi: {
47
47
  operationId: string;
@@ -71,12 +71,12 @@ declare const oAuthProxy: <O extends OAuthProxyOptions>(opts?: O) => {
71
71
  };
72
72
  hooks: {
73
73
  before: {
74
- matcher(context: _better_auth_core16.HookEndpointContext): boolean;
75
- handler: (inputContext: better_call245.MiddlewareInputContext<better_call245.MiddlewareOptions>) => Promise<void>;
74
+ matcher(context: _better_auth_core2.HookEndpointContext): boolean;
75
+ handler: (inputContext: better_call15.MiddlewareInputContext<better_call15.MiddlewareOptions>) => Promise<void>;
76
76
  }[];
77
77
  after: {
78
- matcher(context: _better_auth_core16.HookEndpointContext): boolean;
79
- handler: (inputContext: better_call245.MiddlewareInputContext<better_call245.MiddlewareOptions>) => Promise<void>;
78
+ matcher(context: _better_auth_core2.HookEndpointContext): boolean;
79
+ handler: (inputContext: better_call15.MiddlewareInputContext<better_call15.MiddlewareOptions>) => Promise<void>;
80
80
  }[];
81
81
  };
82
82
  };
@@ -4,7 +4,7 @@ import { AuthorizationQuery, Client, CodeVerificationValue, OAuthAccessToken, OI
4
4
  import "../index.mjs";
5
5
  import { GenericEndpointContext } from "@better-auth/core";
6
6
  import * as _better_auth_core_db0 from "@better-auth/core/db";
7
- import * as better_call66 from "better-call";
7
+ import * as better_call51 from "better-call";
8
8
  import { OpenAPIParameter } from "better-call";
9
9
  import * as z from "zod";
10
10
 
@@ -31,21 +31,21 @@ declare const oidcProvider: (options: OIDCOptions) => {
31
31
  hooks: {
32
32
  after: {
33
33
  matcher(): true;
34
- handler: (inputContext: better_call66.MiddlewareInputContext<better_call66.MiddlewareOptions>) => Promise<Response | {
34
+ handler: (inputContext: better_call51.MiddlewareInputContext<better_call51.MiddlewareOptions>) => Promise<Response | {
35
35
  redirect: boolean;
36
36
  url: string;
37
37
  } | undefined>;
38
38
  }[];
39
39
  };
40
40
  endpoints: {
41
- getOpenIdConfig: better_call66.StrictEndpoint<"/.well-known/openid-configuration", {
41
+ getOpenIdConfig: better_call51.StrictEndpoint<"/.well-known/openid-configuration", {
42
42
  method: "GET";
43
43
  operationId: string;
44
44
  metadata: {
45
45
  readonly scope: "server";
46
46
  };
47
47
  }, OIDCMetadata>;
48
- oAuth2authorize: better_call66.StrictEndpoint<"/oauth2/authorize", {
48
+ oAuth2authorize: better_call51.StrictEndpoint<"/oauth2/authorize", {
49
49
  method: "GET";
50
50
  operationId: string;
51
51
  query: z.ZodRecord<z.ZodString, z.ZodAny>;
@@ -72,14 +72,14 @@ declare const oidcProvider: (options: OIDCOptions) => {
72
72
  redirect: boolean;
73
73
  url: string;
74
74
  }>;
75
- oAuthConsent: better_call66.StrictEndpoint<"/oauth2/consent", {
75
+ oAuthConsent: better_call51.StrictEndpoint<"/oauth2/consent", {
76
76
  method: "POST";
77
77
  operationId: string;
78
78
  body: z.ZodObject<{
79
79
  accept: z.ZodBoolean;
80
80
  consent_code: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
81
81
  }, z.core.$strip>;
82
- use: ((inputContext: better_call66.MiddlewareInputContext<better_call66.MiddlewareOptions>) => Promise<{
82
+ use: ((inputContext: better_call51.MiddlewareInputContext<better_call51.MiddlewareOptions>) => Promise<{
83
83
  session: {
84
84
  session: Record<string, any> & {
85
85
  id: string;
@@ -151,7 +151,7 @@ declare const oidcProvider: (options: OIDCOptions) => {
151
151
  }, {
152
152
  redirectURI: string;
153
153
  }>;
154
- oAuth2token: better_call66.StrictEndpoint<"/oauth2/token", {
154
+ oAuth2token: better_call51.StrictEndpoint<"/oauth2/token", {
155
155
  method: "POST";
156
156
  operationId: string;
157
157
  body: z.ZodRecord<z.ZodAny, z.ZodAny>;
@@ -173,7 +173,7 @@ declare const oidcProvider: (options: OIDCOptions) => {
173
173
  scope: string;
174
174
  id_token: string | undefined;
175
175
  }>;
176
- oAuth2userInfo: better_call66.StrictEndpoint<"/oauth2/userinfo", {
176
+ oAuth2userInfo: better_call51.StrictEndpoint<"/oauth2/userinfo", {
177
177
  method: "GET";
178
178
  operationId: string;
179
179
  metadata: {
@@ -265,7 +265,7 @@ declare const oidcProvider: (options: OIDCOptions) => {
265
265
  *
266
266
  * @see [Read our docs to learn more.](https://better-auth.com/docs/plugins/oidc-provider#api-method-oauth2-register)
267
267
  */
268
- registerOAuthApplication: better_call66.StrictEndpoint<"/oauth2/register", {
268
+ registerOAuthApplication: better_call51.StrictEndpoint<"/oauth2/register", {
269
269
  method: "POST";
270
270
  body: z.ZodObject<{
271
271
  redirect_uris: z.ZodArray<z.ZodString>;
@@ -405,9 +405,9 @@ declare const oidcProvider: (options: OIDCOptions) => {
405
405
  client_secret?: string | undefined;
406
406
  client_id: string;
407
407
  }>;
408
- getOAuthClient: better_call66.StrictEndpoint<"/oauth2/client/:id", {
408
+ getOAuthClient: better_call51.StrictEndpoint<"/oauth2/client/:id", {
409
409
  method: "GET";
410
- use: ((inputContext: better_call66.MiddlewareInputContext<better_call66.MiddlewareOptions>) => Promise<{
410
+ use: ((inputContext: better_call51.MiddlewareInputContext<better_call51.MiddlewareOptions>) => Promise<{
411
411
  session: {
412
412
  session: Record<string, any> & {
413
413
  id: string;
@@ -478,7 +478,7 @@ declare const oidcProvider: (options: OIDCOptions) => {
478
478
  *
479
479
  * @see [OpenID Connect RP-Initiated Logout Spec](https://openid.net/specs/openid-connect-rpinitiated-1_0.html)
480
480
  */
481
- endSession: better_call66.StrictEndpoint<"/oauth2/endsession", {
481
+ endSession: better_call51.StrictEndpoint<"/oauth2/endsession", {
482
482
  method: ("GET" | "POST")[];
483
483
  query: z.ZodOptional<z.ZodObject<{
484
484
  id_token_hint: z.ZodOptional<z.ZodString>;
@@ -504,7 +504,7 @@ declare const oidcProvider: (options: OIDCOptions) => {
504
504
  scope: "server";
505
505
  };
506
506
  }, {
507
- status: ("OK" | "CREATED" | "ACCEPTED" | "NO_CONTENT" | "MULTIPLE_CHOICES" | "MOVED_PERMANENTLY" | "FOUND" | "SEE_OTHER" | "NOT_MODIFIED" | "TEMPORARY_REDIRECT" | "BAD_REQUEST" | "UNAUTHORIZED" | "PAYMENT_REQUIRED" | "FORBIDDEN" | "NOT_FOUND" | "METHOD_NOT_ALLOWED" | "NOT_ACCEPTABLE" | "PROXY_AUTHENTICATION_REQUIRED" | "REQUEST_TIMEOUT" | "CONFLICT" | "GONE" | "LENGTH_REQUIRED" | "PRECONDITION_FAILED" | "PAYLOAD_TOO_LARGE" | "URI_TOO_LONG" | "UNSUPPORTED_MEDIA_TYPE" | "RANGE_NOT_SATISFIABLE" | "EXPECTATION_FAILED" | "I'M_A_TEAPOT" | "MISDIRECTED_REQUEST" | "UNPROCESSABLE_ENTITY" | "LOCKED" | "FAILED_DEPENDENCY" | "TOO_EARLY" | "UPGRADE_REQUIRED" | "PRECONDITION_REQUIRED" | "TOO_MANY_REQUESTS" | "REQUEST_HEADER_FIELDS_TOO_LARGE" | "UNAVAILABLE_FOR_LEGAL_REASONS" | "INTERNAL_SERVER_ERROR" | "NOT_IMPLEMENTED" | "BAD_GATEWAY" | "SERVICE_UNAVAILABLE" | "GATEWAY_TIMEOUT" | "HTTP_VERSION_NOT_SUPPORTED" | "VARIANT_ALSO_NEGOTIATES" | "INSUFFICIENT_STORAGE" | "LOOP_DETECTED" | "NOT_EXTENDED" | "NETWORK_AUTHENTICATION_REQUIRED") | better_call66.Status;
507
+ status: ("OK" | "CREATED" | "ACCEPTED" | "NO_CONTENT" | "MULTIPLE_CHOICES" | "MOVED_PERMANENTLY" | "FOUND" | "SEE_OTHER" | "NOT_MODIFIED" | "TEMPORARY_REDIRECT" | "BAD_REQUEST" | "UNAUTHORIZED" | "PAYMENT_REQUIRED" | "FORBIDDEN" | "NOT_FOUND" | "METHOD_NOT_ALLOWED" | "NOT_ACCEPTABLE" | "PROXY_AUTHENTICATION_REQUIRED" | "REQUEST_TIMEOUT" | "CONFLICT" | "GONE" | "LENGTH_REQUIRED" | "PRECONDITION_FAILED" | "PAYLOAD_TOO_LARGE" | "URI_TOO_LONG" | "UNSUPPORTED_MEDIA_TYPE" | "RANGE_NOT_SATISFIABLE" | "EXPECTATION_FAILED" | "I'M_A_TEAPOT" | "MISDIRECTED_REQUEST" | "UNPROCESSABLE_ENTITY" | "LOCKED" | "FAILED_DEPENDENCY" | "TOO_EARLY" | "UPGRADE_REQUIRED" | "PRECONDITION_REQUIRED" | "TOO_MANY_REQUESTS" | "REQUEST_HEADER_FIELDS_TOO_LARGE" | "UNAVAILABLE_FOR_LEGAL_REASONS" | "INTERNAL_SERVER_ERROR" | "NOT_IMPLEMENTED" | "BAD_GATEWAY" | "SERVICE_UNAVAILABLE" | "GATEWAY_TIMEOUT" | "HTTP_VERSION_NOT_SUPPORTED" | "VARIANT_ALSO_NEGOTIATES" | "INSUFFICIENT_STORAGE" | "LOOP_DETECTED" | "NOT_EXTENDED" | "NETWORK_AUTHENTICATION_REQUIRED") | better_call51.Status;
508
508
  body: ({
509
509
  message?: string;
510
510
  code?: string;
@@ -1,6 +1,6 @@
1
- import * as _better_auth_core40 from "@better-auth/core";
1
+ import * as _better_auth_core42 from "@better-auth/core";
2
2
  import { ClientFetchOption } from "@better-auth/core";
3
- import * as _better_fetch_fetch96 from "@better-fetch/fetch";
3
+ import * as _better_fetch_fetch112 from "@better-fetch/fetch";
4
4
 
5
5
  //#region src/plugins/one-tap/client.d.ts
6
6
  declare global {
@@ -161,13 +161,13 @@ declare const oneTapClient: (options: GoogleOneTapOptions) => {
161
161
  id: string;
162
162
  name: string;
163
163
  hooks: {
164
- onResponse(ctx: _better_fetch_fetch96.ResponseContext): Promise<void>;
164
+ onResponse(ctx: _better_fetch_fetch112.ResponseContext): Promise<void>;
165
165
  };
166
166
  }[];
167
- getActions: ($fetch: _better_fetch_fetch96.BetterFetch, _: _better_auth_core40.ClientStore) => {
167
+ getActions: ($fetch: _better_fetch_fetch112.BetterFetch, _: _better_auth_core42.ClientStore) => {
168
168
  oneTap: (opts?: GoogleOneTapActionOptions | undefined, fetchOptions?: ClientFetchOption | undefined) => Promise<void>;
169
169
  };
170
- getAtoms($fetch: _better_fetch_fetch96.BetterFetch): {};
170
+ getAtoms($fetch: _better_fetch_fetch112.BetterFetch): {};
171
171
  };
172
172
  //#endregion
173
173
  export { GoogleOneTapActionOptions, GoogleOneTapOptions, GsiButtonConfiguration, oneTapClient };
@@ -1,4 +1,4 @@
1
- import * as better_call63 from "better-call";
1
+ import * as better_call50 from "better-call";
2
2
  import * as z from "zod";
3
3
 
4
4
  //#region src/plugins/one-tap/index.d.ts
@@ -20,7 +20,7 @@ interface OneTapOptions {
20
20
  declare const oneTap: (options?: OneTapOptions | undefined) => {
21
21
  id: "one-tap";
22
22
  endpoints: {
23
- oneTapCallback: better_call63.StrictEndpoint<"/one-tap/callback", {
23
+ oneTapCallback: better_call50.StrictEndpoint<"/one-tap/callback", {
24
24
  method: "POST";
25
25
  body: z.ZodObject<{
26
26
  idToken: z.ZodString;
@@ -1,7 +1,7 @@
1
1
  import { Session, User } from "../../types/models.mjs";
2
2
  import "../../types/index.mjs";
3
3
  import { GenericEndpointContext } from "@better-auth/core";
4
- import * as better_call252 from "better-call";
4
+ import * as better_call110 from "better-call";
5
5
  import * as z from "zod";
6
6
 
7
7
  //#region src/plugins/one-time-token/index.d.ts
@@ -60,9 +60,9 @@ declare const oneTimeToken: (options?: OneTimeTokenOptions | undefined) => {
60
60
  *
61
61
  * @see [Read our docs to learn more.](https://better-auth.com/docs/plugins/one-time-token#api-method-one-time-token-generate)
62
62
  */
63
- generateOneTimeToken: better_call252.StrictEndpoint<"/one-time-token/generate", {
63
+ generateOneTimeToken: better_call110.StrictEndpoint<"/one-time-token/generate", {
64
64
  method: "GET";
65
- use: ((inputContext: better_call252.MiddlewareInputContext<better_call252.MiddlewareOptions>) => Promise<{
65
+ use: ((inputContext: better_call110.MiddlewareInputContext<better_call110.MiddlewareOptions>) => Promise<{
66
66
  session: {
67
67
  session: Record<string, any> & {
68
68
  id: string;
@@ -103,7 +103,7 @@ declare const oneTimeToken: (options?: OneTimeTokenOptions | undefined) => {
103
103
  *
104
104
  * @see [Read our docs to learn more.](https://better-auth.com/docs/plugins/one-time-token#api-method-one-time-token-verify)
105
105
  */
106
- verifyOneTimeToken: better_call252.StrictEndpoint<"/one-time-token/verify", {
106
+ verifyOneTimeToken: better_call110.StrictEndpoint<"/one-time-token/verify", {
107
107
  method: "POST";
108
108
  body: z.ZodObject<{
109
109
  token: z.ZodString;
@@ -116,7 +116,7 @@ declare const oneTimeToken: (options?: OneTimeTokenOptions | undefined) => {
116
116
  hooks: {
117
117
  after: {
118
118
  matcher: () => true;
119
- handler: (inputContext: better_call252.MiddlewareInputContext<better_call252.MiddlewareOptions>) => Promise<void>;
119
+ handler: (inputContext: better_call110.MiddlewareInputContext<better_call110.MiddlewareOptions>) => Promise<void>;
120
120
  }[];
121
121
  };
122
122
  options: OneTimeTokenOptions | undefined;
@@ -1,6 +1,6 @@
1
1
  import { FieldSchema, OpenAPIModelSchema, Path, generator } from "./generator.mjs";
2
2
  import { LiteralString } from "@better-auth/core";
3
- import * as better_call64 from "better-call";
3
+ import * as better_call0 from "better-call";
4
4
 
5
5
  //#region src/plugins/open-api/index.d.ts
6
6
  type ScalarTheme = "alternate" | "default" | "moon" | "purple" | "solarized" | "bluePlanet" | "saturn" | "kepler" | "mars" | "deepSpace" | "laserwave" | "none";
@@ -36,7 +36,7 @@ interface OpenAPIOptions {
36
36
  declare const openAPI: <O extends OpenAPIOptions>(options?: O | undefined) => {
37
37
  id: "open-api";
38
38
  endpoints: {
39
- generateOpenAPISchema: better_call64.StrictEndpoint<"/open-api/generate-schema", {
39
+ generateOpenAPISchema: better_call0.StrictEndpoint<"/open-api/generate-schema", {
40
40
  method: "GET";
41
41
  }, {
42
42
  openapi: string;
@@ -76,7 +76,7 @@ declare const openAPI: <O extends OpenAPIOptions>(options?: O | undefined) => {
76
76
  }[];
77
77
  paths: Record<string, Path>;
78
78
  }>;
79
- openAPIReference: better_call64.StrictEndpoint<"/reference", {
79
+ openAPIReference: better_call0.StrictEndpoint<"/reference", {
80
80
  method: "GET";
81
81
  metadata: {
82
82
  readonly scope: "server";
@@ -5,7 +5,7 @@ import "../../db/index.mjs";
5
5
  import { OrganizationOptions } from "./types.mjs";
6
6
  import { InferInvitation, InferMember, InferOrganization, InferOrganizationRolesFromOption, InferTeam, InvitationStatus, MemberInput, OrganizationInput, TeamInput, TeamMember } from "./schema.mjs";
7
7
  import { AuthContext, GenericEndpointContext } from "@better-auth/core";
8
- import * as _better_auth_core_db37 from "@better-auth/core/db";
8
+ import * as _better_auth_core_db35 from "@better-auth/core/db";
9
9
 
10
10
  //#region src/plugins/organization/adapter.d.ts
11
11
  declare const getOrgAdapter: <O extends OrganizationOptions>(context: AuthContext, options?: O | undefined) => {
@@ -45,7 +45,7 @@ declare const getOrgAdapter: <O extends OrganizationOptions>(context: AuthContex
45
45
  };
46
46
  }) & (O["schema"] extends {
47
47
  member?: {
48
- additionalFields: infer Field extends Record<string, _better_auth_core_db37.DBFieldAttribute>;
48
+ additionalFields: infer Field extends Record<string, _better_auth_core_db35.DBFieldAttribute>;
49
49
  } | undefined;
50
50
  } ? FieldAttributeToObject<Field> : {}) extends infer T ? { [K in keyof T]: T[K] } : never) & {
51
51
  user: {
@@ -96,7 +96,7 @@ declare const getOrgAdapter: <O extends OrganizationOptions>(context: AuthContex
96
96
  };
97
97
  }) & (O["schema"] extends {
98
98
  member?: {
99
- additionalFields: infer Field extends Record<string, _better_auth_core_db37.DBFieldAttribute>;
99
+ additionalFields: infer Field extends Record<string, _better_auth_core_db35.DBFieldAttribute>;
100
100
  } | undefined;
101
101
  } ? FieldAttributeToObject<Field> : {}) extends infer T ? { [K in keyof T]: T[K] } : never) & {
102
102
  user: {
@@ -140,7 +140,7 @@ declare const getOrgAdapter: <O extends OrganizationOptions>(context: AuthContex
140
140
  };
141
141
  }) & (O["schema"] extends {
142
142
  member?: {
143
- additionalFields: infer Field extends Record<string, _better_auth_core_db37.DBFieldAttribute>;
143
+ additionalFields: infer Field extends Record<string, _better_auth_core_db35.DBFieldAttribute>;
144
144
  } | undefined;
145
145
  } ? FieldAttributeToObject<Field> : {}) extends infer T ? { [K in keyof T]: T[K] } : never) & {
146
146
  user: User$1;
@@ -181,7 +181,7 @@ declare const getOrgAdapter: <O extends OrganizationOptions>(context: AuthContex
181
181
  };
182
182
  }) & (O["schema"] extends {
183
183
  member?: {
184
- additionalFields: infer Field extends Record<string, _better_auth_core_db37.DBFieldAttribute>;
184
+ additionalFields: infer Field extends Record<string, _better_auth_core_db35.DBFieldAttribute>;
185
185
  } | undefined;
186
186
  } ? FieldAttributeToObject<Field> : {}) extends infer T ? { [K in keyof T]: T[K] } : never) & {
187
187
  user: {
@@ -227,7 +227,7 @@ declare const getOrgAdapter: <O extends OrganizationOptions>(context: AuthContex
227
227
  };
228
228
  }) & (O["schema"] extends {
229
229
  member?: {
230
- additionalFields: infer Field extends Record<string, _better_auth_core_db37.DBFieldAttribute>;
230
+ additionalFields: infer Field extends Record<string, _better_auth_core_db35.DBFieldAttribute>;
231
231
  } | undefined;
232
232
  } ? FieldAttributeToObject<Field> : {}) extends infer T ? { [K in keyof T]: T[K] } : never) | null>;
233
233
  deleteMember: ({
@@ -287,7 +287,7 @@ declare const getOrgAdapter: <O extends OrganizationOptions>(context: AuthContex
287
287
  };
288
288
  }) & (O["schema"] extends {
289
289
  member?: {
290
- additionalFields: infer Field extends Record<string, _better_auth_core_db37.DBFieldAttribute>;
290
+ additionalFields: infer Field extends Record<string, _better_auth_core_db35.DBFieldAttribute>;
291
291
  } | undefined;
292
292
  } ? FieldAttributeToObject<Field> : {}) extends infer T ? { [K in keyof T]: T[K] } : never) | null>;
293
293
  /**
@@ -312,7 +312,7 @@ declare const getOrgAdapter: <O extends OrganizationOptions>(context: AuthContex
312
312
  metadata?: any;
313
313
  } & (O["schema"] extends {
314
314
  organization?: {
315
- additionalFields: infer Field extends Record<string, _better_auth_core_db37.DBFieldAttribute>;
315
+ additionalFields: infer Field extends Record<string, _better_auth_core_db35.DBFieldAttribute>;
316
316
  } | undefined;
317
317
  } ? FieldAttributeToObject<Field> : {}) extends infer T ? { [K in keyof T]: T[K] } : never) & {
318
318
  invitation: InferInvitation<O>[];
@@ -342,7 +342,7 @@ declare const getOrgAdapter: <O extends OrganizationOptions>(context: AuthContex
342
342
  createdAt: Date;
343
343
  }) & (O["schema"] extends {
344
344
  invitation?: {
345
- additionalFields: infer Field extends Record<string, _better_auth_core_db37.DBFieldAttribute>;
345
+ additionalFields: infer Field extends Record<string, _better_auth_core_db35.DBFieldAttribute>;
346
346
  } | undefined;
347
347
  } ? FieldAttributeToObject<RemoveFieldsWithReturnedFalse<Field>> : {}) extends infer T_1 ? { [K_1 in keyof T_1]: T_1[K_1] } : never)[];
348
348
  members: (((O["teams"] extends {
@@ -374,7 +374,7 @@ declare const getOrgAdapter: <O extends OrganizationOptions>(context: AuthContex
374
374
  };
375
375
  }) & (O["schema"] extends {
376
376
  member?: {
377
- additionalFields: infer Field extends Record<string, _better_auth_core_db37.DBFieldAttribute>;
377
+ additionalFields: infer Field extends Record<string, _better_auth_core_db35.DBFieldAttribute>;
378
378
  } | undefined;
379
379
  } ? FieldAttributeToObject<RemoveFieldsWithReturnedFalse<Field>> : {}) extends infer T_2 ? { [K_2 in keyof T_2]: T_2[K_2] } : never) & {
380
380
  user: {
@@ -392,7 +392,7 @@ declare const getOrgAdapter: <O extends OrganizationOptions>(context: AuthContex
392
392
  updatedAt?: Date | undefined;
393
393
  } & (O["schema"] extends {
394
394
  team?: {
395
- additionalFields: infer Field extends Record<string, _better_auth_core_db37.DBFieldAttribute>;
395
+ additionalFields: infer Field extends Record<string, _better_auth_core_db35.DBFieldAttribute>;
396
396
  } | undefined;
397
397
  } ? FieldAttributeToObject<RemoveFieldsWithReturnedFalse<Field>> : {}) extends infer T_3 ? { [K_3 in keyof T_3]: T_3[K_3] } : never)[] | undefined;
398
398
  }) | null>;
@@ -405,7 +405,7 @@ declare const getOrgAdapter: <O extends OrganizationOptions>(context: AuthContex
405
405
  updatedAt?: Date | undefined;
406
406
  } & (O["schema"] extends {
407
407
  team?: {
408
- additionalFields: infer Field extends Record<string, _better_auth_core_db37.DBFieldAttribute>;
408
+ additionalFields: infer Field extends Record<string, _better_auth_core_db35.DBFieldAttribute>;
409
409
  } | undefined;
410
410
  } ? FieldAttributeToObject<Field> : {}) extends infer T ? { [K in keyof T]: T[K] } : never>;
411
411
  findTeamById: <IncludeMembers extends boolean>({
@@ -431,7 +431,7 @@ declare const getOrgAdapter: <O extends OrganizationOptions>(context: AuthContex
431
431
  updatedAt?: Date | undefined;
432
432
  } & (O["schema"] extends {
433
433
  team?: {
434
- additionalFields: infer Field extends Record<string, _better_auth_core_db37.DBFieldAttribute>;
434
+ additionalFields: infer Field extends Record<string, _better_auth_core_db35.DBFieldAttribute>;
435
435
  } | undefined;
436
436
  } ? FieldAttributeToObject<Field> : {}) extends infer T ? { [K in keyof T]: T[K] } : never) & InferAdditionalFieldsFromPluginOptions<"team", O>) | null>;
437
437
  deleteTeam: (teamId: string) => Promise<void>;
@@ -443,7 +443,7 @@ declare const getOrgAdapter: <O extends OrganizationOptions>(context: AuthContex
443
443
  updatedAt?: Date | undefined;
444
444
  } & (O["schema"] extends {
445
445
  team?: {
446
- additionalFields: infer Field extends Record<string, _better_auth_core_db37.DBFieldAttribute>;
446
+ additionalFields: infer Field extends Record<string, _better_auth_core_db35.DBFieldAttribute>;
447
447
  } | undefined;
448
448
  } ? FieldAttributeToObject<Field> : {}) extends infer T ? { [K in keyof T]: T[K] } : never)[]>;
449
449
  createTeamInvitation: ({
@@ -483,7 +483,7 @@ declare const getOrgAdapter: <O extends OrganizationOptions>(context: AuthContex
483
483
  createdAt: Date;
484
484
  }) & (O["schema"] extends {
485
485
  invitation?: {
486
- additionalFields: infer Field extends Record<string, _better_auth_core_db37.DBFieldAttribute>;
486
+ additionalFields: infer Field extends Record<string, _better_auth_core_db35.DBFieldAttribute>;
487
487
  } | undefined;
488
488
  } ? FieldAttributeToObject<RemoveFieldsWithReturnedFalse<Field>> : {}) extends infer T ? { [K in keyof T]: T[K] } : never>;
489
489
  setActiveTeam: (sessionToken: string, teamId: string | null, ctx: GenericEndpointContext) => Promise<{
@@ -564,7 +564,7 @@ declare const getOrgAdapter: <O extends OrganizationOptions>(context: AuthContex
564
564
  createdAt: Date;
565
565
  }) & (O["schema"] extends {
566
566
  invitation?: {
567
- additionalFields: infer Field extends Record<string, _better_auth_core_db37.DBFieldAttribute>;
567
+ additionalFields: infer Field extends Record<string, _better_auth_core_db35.DBFieldAttribute>;
568
568
  } | undefined;
569
569
  } ? FieldAttributeToObject<Field> : {}) extends infer T ? { [K in keyof T]: T[K] } : never)[]>;
570
570
  listUserInvitations: (email: string) => Promise<(Omit<((O["teams"] extends {
@@ -590,7 +590,7 @@ declare const getOrgAdapter: <O extends OrganizationOptions>(context: AuthContex
590
590
  createdAt: Date;
591
591
  }) & (O["schema"] extends {
592
592
  invitation?: {
593
- additionalFields: infer Field extends Record<string, _better_auth_core_db37.DBFieldAttribute>;
593
+ additionalFields: infer Field extends Record<string, _better_auth_core_db35.DBFieldAttribute>;
594
594
  } | undefined;
595
595
  } ? FieldAttributeToObject<Field> : {}) extends infer T ? { [K in keyof T]: T[K] } : never) & {
596
596
  organization: InferOrganization<O, false>;
@@ -604,7 +604,7 @@ declare const getOrgAdapter: <O extends OrganizationOptions>(context: AuthContex
604
604
  metadata?: any;
605
605
  } & (O["schema"] extends {
606
606
  organization?: {
607
- additionalFields: infer Field extends Record<string, _better_auth_core_db37.DBFieldAttribute>;
607
+ additionalFields: infer Field extends Record<string, _better_auth_core_db35.DBFieldAttribute>;
608
608
  } | undefined;
609
609
  } ? FieldAttributeToObject<Field> : {}))["name"];
610
610
  })[]>;
@@ -642,7 +642,7 @@ declare const getOrgAdapter: <O extends OrganizationOptions>(context: AuthContex
642
642
  createdAt: Date;
643
643
  }) & (O["schema"] extends {
644
644
  invitation?: {
645
- additionalFields: infer Field extends Record<string, _better_auth_core_db37.DBFieldAttribute>;
645
+ additionalFields: infer Field extends Record<string, _better_auth_core_db35.DBFieldAttribute>;
646
646
  } | undefined;
647
647
  } ? FieldAttributeToObject<Field> : {}) extends infer T ? { [K in keyof T]: T[K] } : never>;
648
648
  findInvitationById: (id: string) => Promise<((O["teams"] extends {
@@ -668,7 +668,7 @@ declare const getOrgAdapter: <O extends OrganizationOptions>(context: AuthContex
668
668
  createdAt: Date;
669
669
  }) & (O["schema"] extends {
670
670
  invitation?: {
671
- additionalFields: infer Field extends Record<string, _better_auth_core_db37.DBFieldAttribute>;
671
+ additionalFields: infer Field extends Record<string, _better_auth_core_db35.DBFieldAttribute>;
672
672
  } | undefined;
673
673
  } ? FieldAttributeToObject<Field> : {}) extends infer T ? { [K in keyof T]: T[K] } : never) | null>;
674
674
  findPendingInvitation: (data: {
@@ -697,7 +697,7 @@ declare const getOrgAdapter: <O extends OrganizationOptions>(context: AuthContex
697
697
  createdAt: Date;
698
698
  }) & (O["schema"] extends {
699
699
  invitation?: {
700
- additionalFields: infer Field extends Record<string, _better_auth_core_db37.DBFieldAttribute>;
700
+ additionalFields: infer Field extends Record<string, _better_auth_core_db35.DBFieldAttribute>;
701
701
  } | undefined;
702
702
  } ? FieldAttributeToObject<Field> : {}) extends infer T ? { [K in keyof T]: T[K] } : never)[]>;
703
703
  findPendingInvitations: (data: {
@@ -725,7 +725,7 @@ declare const getOrgAdapter: <O extends OrganizationOptions>(context: AuthContex
725
725
  createdAt: Date;
726
726
  }) & (O["schema"] extends {
727
727
  invitation?: {
728
- additionalFields: infer Field extends Record<string, _better_auth_core_db37.DBFieldAttribute>;
728
+ additionalFields: infer Field extends Record<string, _better_auth_core_db35.DBFieldAttribute>;
729
729
  } | undefined;
730
730
  } ? FieldAttributeToObject<Field> : {}) extends infer T ? { [K in keyof T]: T[K] } : never)[]>;
731
731
  listInvitations: (data: {
@@ -753,7 +753,7 @@ declare const getOrgAdapter: <O extends OrganizationOptions>(context: AuthContex
753
753
  createdAt: Date;
754
754
  }) & (O["schema"] extends {
755
755
  invitation?: {
756
- additionalFields: infer Field extends Record<string, _better_auth_core_db37.DBFieldAttribute>;
756
+ additionalFields: infer Field extends Record<string, _better_auth_core_db35.DBFieldAttribute>;
757
757
  } | undefined;
758
758
  } ? FieldAttributeToObject<Field> : {}) extends infer T ? { [K in keyof T]: T[K] } : never)[]>;
759
759
  updateInvitation: (data: {
@@ -782,7 +782,7 @@ declare const getOrgAdapter: <O extends OrganizationOptions>(context: AuthContex
782
782
  createdAt: Date;
783
783
  }) & (O["schema"] extends {
784
784
  invitation?: {
785
- additionalFields: infer Field extends Record<string, _better_auth_core_db37.DBFieldAttribute>;
785
+ additionalFields: infer Field extends Record<string, _better_auth_core_db35.DBFieldAttribute>;
786
786
  } | undefined;
787
787
  } ? FieldAttributeToObject<Field> : {}) extends infer T ? { [K in keyof T]: T[K] } : never) | null>;
788
788
  };