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
@@ -1,5 +1,5 @@
1
1
  import { GenericEndpointContext } from "@better-auth/core";
2
- import * as better_call830 from "better-call";
2
+ import * as better_call834 from "better-call";
3
3
 
4
4
  //#region src/api/middlewares/origin-check.d.ts
5
5
 
@@ -7,13 +7,13 @@ import * as better_call830 from "better-call";
7
7
  * A middleware to validate callbackURL and origin against trustedOrigins.
8
8
  * Also handles CSRF protection using Fetch Metadata for first-login scenarios.
9
9
  */
10
- declare const originCheckMiddleware: (inputContext: better_call830.MiddlewareInputContext<better_call830.MiddlewareOptions>) => Promise<void>;
11
- declare const originCheck: (getValue: (ctx: GenericEndpointContext) => string | string[]) => (inputContext: better_call830.MiddlewareInputContext<better_call830.MiddlewareOptions>) => Promise<void>;
10
+ declare const originCheckMiddleware: (inputContext: better_call834.MiddlewareInputContext<better_call834.MiddlewareOptions>) => Promise<void>;
11
+ declare const originCheck: (getValue: (ctx: GenericEndpointContext) => string | string[]) => (inputContext: better_call834.MiddlewareInputContext<better_call834.MiddlewareOptions>) => Promise<void>;
12
12
  /**
13
13
  * Middleware for CSRF protection using Fetch Metadata headers.
14
14
  * This prevents cross-site navigation login attacks while supporting progressive enhancement.
15
15
  */
16
- declare const formCsrfMiddleware: (inputContext: better_call830.MiddlewareInputContext<better_call830.MiddlewareOptions>) => Promise<void>;
16
+ declare const formCsrfMiddleware: (inputContext: better_call834.MiddlewareInputContext<better_call834.MiddlewareOptions>) => Promise<void>;
17
17
  //#endregion
18
18
  export { formCsrfMiddleware, originCheck, originCheckMiddleware };
19
19
  //# sourceMappingURL=origin-check.d.mts.map
@@ -1,11 +1,11 @@
1
1
  import * as _better_auth_core_oauth29 from "@better-auth/core/oauth2";
2
- import * as better_call755 from "better-call";
2
+ import * as better_call776 from "better-call";
3
3
  import * as z from "zod";
4
4
 
5
5
  //#region src/api/routes/account.d.ts
6
- declare const listUserAccounts: better_call755.StrictEndpoint<"/list-accounts", {
6
+ declare const listUserAccounts: better_call776.StrictEndpoint<"/list-accounts", {
7
7
  method: "GET";
8
- use: ((inputContext: better_call755.MiddlewareInputContext<better_call755.MiddlewareOptions>) => Promise<{
8
+ use: ((inputContext: better_call776.MiddlewareInputContext<better_call776.MiddlewareOptions>) => Promise<{
9
9
  session: {
10
10
  session: Record<string, any> & {
11
11
  id: string;
@@ -87,7 +87,7 @@ declare const listUserAccounts: better_call755.StrictEndpoint<"/list-accounts",
87
87
  providerId: string;
88
88
  accountId: string;
89
89
  }[]>;
90
- declare const linkSocialAccount: better_call755.StrictEndpoint<"/link-social", {
90
+ declare const linkSocialAccount: better_call776.StrictEndpoint<"/link-social", {
91
91
  method: "POST";
92
92
  requireHeaders: true;
93
93
  body: z.ZodObject<{
@@ -106,7 +106,7 @@ declare const linkSocialAccount: better_call755.StrictEndpoint<"/link-social", {
106
106
  disableRedirect: z.ZodOptional<z.ZodBoolean>;
107
107
  additionalData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
108
108
  }, z.core.$strip>;
109
- use: ((inputContext: better_call755.MiddlewareInputContext<better_call755.MiddlewareOptions>) => Promise<{
109
+ use: ((inputContext: better_call776.MiddlewareInputContext<better_call776.MiddlewareOptions>) => Promise<{
110
110
  session: {
111
111
  session: Record<string, any> & {
112
112
  id: string;
@@ -165,13 +165,13 @@ declare const linkSocialAccount: better_call755.StrictEndpoint<"/link-social", {
165
165
  url: string;
166
166
  redirect: boolean;
167
167
  }>;
168
- declare const unlinkAccount: better_call755.StrictEndpoint<"/unlink-account", {
168
+ declare const unlinkAccount: better_call776.StrictEndpoint<"/unlink-account", {
169
169
  method: "POST";
170
170
  body: z.ZodObject<{
171
171
  providerId: z.ZodString;
172
172
  accountId: z.ZodOptional<z.ZodString>;
173
173
  }, z.core.$strip>;
174
- use: ((inputContext: better_call755.MiddlewareInputContext<better_call755.MiddlewareOptions>) => Promise<{
174
+ use: ((inputContext: better_call776.MiddlewareInputContext<better_call776.MiddlewareOptions>) => Promise<{
175
175
  session: {
176
176
  session: Record<string, any> & {
177
177
  id: string;
@@ -219,7 +219,7 @@ declare const unlinkAccount: better_call755.StrictEndpoint<"/unlink-account", {
219
219
  }, {
220
220
  status: boolean;
221
221
  }>;
222
- declare const getAccessToken: better_call755.StrictEndpoint<"/get-access-token", {
222
+ declare const getAccessToken: better_call776.StrictEndpoint<"/get-access-token", {
223
223
  method: "POST";
224
224
  body: z.ZodObject<{
225
225
  providerId: z.ZodString;
@@ -267,7 +267,7 @@ declare const getAccessToken: better_call755.StrictEndpoint<"/get-access-token",
267
267
  scopes: string[];
268
268
  idToken: string | undefined;
269
269
  }>;
270
- declare const refreshToken: better_call755.StrictEndpoint<"/refresh-token", {
270
+ declare const refreshToken: better_call776.StrictEndpoint<"/refresh-token", {
271
271
  method: "POST";
272
272
  body: z.ZodObject<{
273
273
  providerId: z.ZodString;
@@ -326,9 +326,9 @@ declare const refreshToken: better_call755.StrictEndpoint<"/refresh-token", {
326
326
  providerId: string;
327
327
  accountId: string;
328
328
  }>;
329
- declare const accountInfo: better_call755.StrictEndpoint<"/account-info", {
329
+ declare const accountInfo: better_call776.StrictEndpoint<"/account-info", {
330
330
  method: "GET";
331
- use: ((inputContext: better_call755.MiddlewareInputContext<better_call755.MiddlewareOptions>) => Promise<{
331
+ use: ((inputContext: better_call776.MiddlewareInputContext<better_call776.MiddlewareOptions>) => Promise<{
332
332
  session: {
333
333
  session: Record<string, any> & {
334
334
  id: string;
@@ -1,8 +1,8 @@
1
- import * as better_call754 from "better-call";
1
+ import * as better_call790 from "better-call";
2
2
  import * as z from "zod";
3
3
 
4
4
  //#region src/api/routes/callback.d.ts
5
- declare const callbackOAuth: better_call754.StrictEndpoint<"/callback/:id", {
5
+ declare const callbackOAuth: better_call790.StrictEndpoint<"/callback/:id", {
6
6
  method: ("GET" | "POST")[];
7
7
  operationId: string;
8
8
  body: z.ZodOptional<z.ZodObject<{
@@ -1,7 +1,7 @@
1
1
  import { User } from "../../types/models.mjs";
2
2
  import "../../types/index.mjs";
3
3
  import { GenericEndpointContext } from "@better-auth/core";
4
- import * as better_call787 from "better-call";
4
+ import * as better_call825 from "better-call";
5
5
  import * as z from "zod";
6
6
 
7
7
  //#region src/api/routes/email-verification.d.ts
@@ -22,7 +22,7 @@ extraPayload?: Record<string, any>): Promise<string>;
22
22
  * A function to send a verification email to the user
23
23
  */
24
24
  declare function sendVerificationEmailFn(ctx: GenericEndpointContext, user: User): Promise<void>;
25
- declare const sendVerificationEmail: better_call787.StrictEndpoint<"/send-verification-email", {
25
+ declare const sendVerificationEmail: better_call825.StrictEndpoint<"/send-verification-email", {
26
26
  method: "POST";
27
27
  operationId: string;
28
28
  body: z.ZodObject<{
@@ -97,14 +97,14 @@ declare const sendVerificationEmail: better_call787.StrictEndpoint<"/send-verifi
97
97
  }, {
98
98
  status: boolean;
99
99
  }>;
100
- declare const verifyEmail: better_call787.StrictEndpoint<"/verify-email", {
100
+ declare const verifyEmail: better_call825.StrictEndpoint<"/verify-email", {
101
101
  method: "GET";
102
102
  operationId: string;
103
103
  query: z.ZodObject<{
104
104
  token: z.ZodString;
105
105
  callbackURL: z.ZodOptional<z.ZodString>;
106
106
  }, z.core.$strip>;
107
- use: ((inputContext: better_call787.MiddlewareInputContext<better_call787.MiddlewareOptions>) => Promise<void>)[];
107
+ use: ((inputContext: better_call825.MiddlewareInputContext<better_call825.MiddlewareOptions>) => Promise<void>)[];
108
108
  metadata: {
109
109
  openapi: {
110
110
  description: string;
@@ -1,7 +1,7 @@
1
- import * as better_call816 from "better-call";
1
+ import * as better_call833 from "better-call";
2
2
 
3
3
  //#region src/api/routes/error.d.ts
4
- declare const error: better_call816.StrictEndpoint<"/error", {
4
+ declare const error: better_call833.StrictEndpoint<"/error", {
5
5
  method: "GET";
6
6
  metadata: {
7
7
  openapi: {
@@ -1,7 +1,7 @@
1
- import * as better_call829 from "better-call";
1
+ import * as better_call832 from "better-call";
2
2
 
3
3
  //#region src/api/routes/ok.d.ts
4
- declare const ok: better_call829.StrictEndpoint<"/ok", {
4
+ declare const ok: better_call832.StrictEndpoint<"/ok", {
5
5
  method: "GET";
6
6
  metadata: {
7
7
  openapi: {
@@ -1,8 +1,8 @@
1
- import * as better_call821 from "better-call";
1
+ import * as better_call812 from "better-call";
2
2
  import * as z from "zod";
3
3
 
4
4
  //#region src/api/routes/password.d.ts
5
- declare const requestPasswordReset: better_call821.StrictEndpoint<"/request-password-reset", {
5
+ declare const requestPasswordReset: better_call812.StrictEndpoint<"/request-password-reset", {
6
6
  method: "POST";
7
7
  body: z.ZodObject<{
8
8
  email: z.ZodEmail;
@@ -38,13 +38,13 @@ declare const requestPasswordReset: better_call821.StrictEndpoint<"/request-pass
38
38
  status: boolean;
39
39
  message: string;
40
40
  }>;
41
- declare const requestPasswordResetCallback: better_call821.StrictEndpoint<"/reset-password/:token", {
41
+ declare const requestPasswordResetCallback: better_call812.StrictEndpoint<"/reset-password/:token", {
42
42
  method: "GET";
43
43
  operationId: string;
44
44
  query: z.ZodObject<{
45
45
  callbackURL: z.ZodString;
46
46
  }, z.core.$strip>;
47
- use: ((inputContext: better_call821.MiddlewareInputContext<better_call821.MiddlewareOptions>) => Promise<void>)[];
47
+ use: ((inputContext: better_call812.MiddlewareInputContext<better_call812.MiddlewareOptions>) => Promise<void>)[];
48
48
  metadata: {
49
49
  openapi: {
50
50
  operationId: string;
@@ -86,7 +86,7 @@ declare const requestPasswordResetCallback: better_call821.StrictEndpoint<"/rese
86
86
  };
87
87
  };
88
88
  }, never>;
89
- declare const resetPassword: better_call821.StrictEndpoint<"/reset-password", {
89
+ declare const resetPassword: better_call812.StrictEndpoint<"/reset-password", {
90
90
  method: "POST";
91
91
  operationId: string;
92
92
  query: z.ZodOptional<z.ZodObject<{
@@ -122,7 +122,7 @@ declare const resetPassword: better_call821.StrictEndpoint<"/reset-password", {
122
122
  }, {
123
123
  status: boolean;
124
124
  }>;
125
- declare const verifyPassword: better_call821.StrictEndpoint<"/verify-password", {
125
+ declare const verifyPassword: better_call812.StrictEndpoint<"/verify-password", {
126
126
  method: "POST";
127
127
  body: z.ZodObject<{
128
128
  password: z.ZodString;
@@ -151,7 +151,7 @@ declare const verifyPassword: better_call821.StrictEndpoint<"/verify-password",
151
151
  };
152
152
  };
153
153
  };
154
- use: ((inputContext: better_call821.MiddlewareInputContext<better_call821.MiddlewareOptions>) => Promise<{
154
+ use: ((inputContext: better_call812.MiddlewareInputContext<better_call812.MiddlewareOptions>) => Promise<{
155
155
  session: {
156
156
  session: Record<string, any> & {
157
157
  id: string;
@@ -1,7 +1,7 @@
1
1
  import { InferUser } from "../../types/models.mjs";
2
2
  import "../../types/index.mjs";
3
3
  import { BetterAuthOptions } from "@better-auth/core";
4
- import * as better_call812 from "better-call";
4
+ import * as better_call820 from "better-call";
5
5
  import * as z from "zod";
6
6
 
7
7
  //#region src/api/routes/sign-in.d.ts
@@ -23,7 +23,7 @@ declare const socialSignInBodySchema: z.ZodObject<{
23
23
  loginHint: z.ZodOptional<z.ZodString>;
24
24
  additionalData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
25
25
  }, z.core.$strip>;
26
- declare const signInSocial: <O extends BetterAuthOptions>() => better_call812.StrictEndpoint<"/sign-in/social", {
26
+ declare const signInSocial: <O extends BetterAuthOptions>() => better_call820.StrictEndpoint<"/sign-in/social", {
27
27
  method: "POST";
28
28
  operationId: string;
29
29
  body: z.ZodObject<{
@@ -98,10 +98,10 @@ declare const signInSocial: <O extends BetterAuthOptions>() => better_call812.St
98
98
  url: undefined;
99
99
  user: InferUser<O>;
100
100
  }>;
101
- declare const signInEmail: <O extends BetterAuthOptions>() => better_call812.StrictEndpoint<"/sign-in/email", {
101
+ declare const signInEmail: <O extends BetterAuthOptions>() => better_call820.StrictEndpoint<"/sign-in/email", {
102
102
  method: "POST";
103
103
  operationId: string;
104
- use: ((inputContext: better_call812.MiddlewareInputContext<better_call812.MiddlewareOptions>) => Promise<void>)[];
104
+ use: ((inputContext: better_call820.MiddlewareInputContext<better_call820.MiddlewareOptions>) => Promise<void>)[];
105
105
  body: z.ZodObject<{
106
106
  email: z.ZodString;
107
107
  password: z.ZodString;
@@ -1,7 +1,7 @@
1
- import * as better_call817 from "better-call";
1
+ import * as better_call824 from "better-call";
2
2
 
3
3
  //#region src/api/routes/sign-out.d.ts
4
- declare const signOut: better_call817.StrictEndpoint<"/sign-out", {
4
+ declare const signOut: better_call824.StrictEndpoint<"/sign-out", {
5
5
  method: "POST";
6
6
  operationId: string;
7
7
  requireHeaders: true;
@@ -1,14 +1,14 @@
1
1
  import { AdditionalUserFieldsInput, InferUser } from "../../types/models.mjs";
2
2
  import "../../types/index.mjs";
3
3
  import { BetterAuthOptions } from "@better-auth/core";
4
- import * as better_call818 from "better-call";
4
+ import * as better_call829 from "better-call";
5
5
  import * as z from "zod";
6
6
 
7
7
  //#region src/api/routes/sign-up.d.ts
8
- declare const signUpEmail: <O extends BetterAuthOptions>() => better_call818.StrictEndpoint<"/sign-up/email", {
8
+ declare const signUpEmail: <O extends BetterAuthOptions>() => better_call829.StrictEndpoint<"/sign-up/email", {
9
9
  method: "POST";
10
10
  operationId: string;
11
- use: ((inputContext: better_call818.MiddlewareInputContext<better_call818.MiddlewareOptions>) => Promise<void>)[];
11
+ use: ((inputContext: better_call829.MiddlewareInputContext<better_call829.MiddlewareOptions>) => Promise<void>)[];
12
12
  body: z.ZodIntersection<z.ZodObject<{
13
13
  name: z.ZodString;
14
14
  email: z.ZodEmail;
@@ -1,15 +1,15 @@
1
1
  import { AdditionalUserFieldsInput } from "../../types/models.mjs";
2
2
  import "../../types/index.mjs";
3
3
  import { BetterAuthOptions } from "@better-auth/core";
4
- import * as better_call769 from "better-call";
4
+ import * as better_call758 from "better-call";
5
5
  import * as z from "zod";
6
6
 
7
7
  //#region src/api/routes/update-user.d.ts
8
- declare const updateUser: <O extends BetterAuthOptions>() => better_call769.StrictEndpoint<"/update-user", {
8
+ declare const updateUser: <O extends BetterAuthOptions>() => better_call758.StrictEndpoint<"/update-user", {
9
9
  method: "POST";
10
10
  operationId: string;
11
11
  body: z.ZodRecord<z.ZodString, z.ZodAny>;
12
- use: ((inputContext: better_call769.MiddlewareInputContext<better_call769.MiddlewareOptions>) => Promise<{
12
+ use: ((inputContext: better_call758.MiddlewareInputContext<better_call758.MiddlewareOptions>) => Promise<{
13
13
  session: {
14
14
  session: Record<string, any> & {
15
15
  id: string;
@@ -85,7 +85,7 @@ declare const updateUser: <O extends BetterAuthOptions>() => better_call769.Stri
85
85
  }, {
86
86
  status: boolean;
87
87
  }>;
88
- declare const changePassword: better_call769.StrictEndpoint<"/change-password", {
88
+ declare const changePassword: better_call758.StrictEndpoint<"/change-password", {
89
89
  method: "POST";
90
90
  operationId: string;
91
91
  body: z.ZodObject<{
@@ -93,7 +93,7 @@ declare const changePassword: better_call769.StrictEndpoint<"/change-password",
93
93
  currentPassword: z.ZodString;
94
94
  revokeOtherSessions: z.ZodOptional<z.ZodBoolean>;
95
95
  }, z.core.$strip>;
96
- use: ((inputContext: better_call769.MiddlewareInputContext<better_call769.MiddlewareOptions>) => Promise<{
96
+ use: ((inputContext: better_call758.MiddlewareInputContext<better_call758.MiddlewareOptions>) => Promise<{
97
97
  session: {
98
98
  session: Record<string, any> & {
99
99
  id: string;
@@ -193,12 +193,12 @@ declare const changePassword: better_call769.StrictEndpoint<"/change-password",
193
193
  image?: string | null | undefined;
194
194
  } & Record<string, any>;
195
195
  }>;
196
- declare const setPassword: better_call769.StrictEndpoint<string, {
196
+ declare const setPassword: better_call758.StrictEndpoint<string, {
197
197
  method: "POST";
198
198
  body: z.ZodObject<{
199
199
  newPassword: z.ZodString;
200
200
  }, z.core.$strip>;
201
- use: ((inputContext: better_call769.MiddlewareInputContext<better_call769.MiddlewareOptions>) => Promise<{
201
+ use: ((inputContext: better_call758.MiddlewareInputContext<better_call758.MiddlewareOptions>) => Promise<{
202
202
  session: {
203
203
  session: Record<string, any> & {
204
204
  id: string;
@@ -224,9 +224,9 @@ declare const setPassword: better_call769.StrictEndpoint<string, {
224
224
  }, {
225
225
  status: boolean;
226
226
  }>;
227
- declare const deleteUser: better_call769.StrictEndpoint<"/delete-user", {
227
+ declare const deleteUser: better_call758.StrictEndpoint<"/delete-user", {
228
228
  method: "POST";
229
- use: ((inputContext: better_call769.MiddlewareInputContext<better_call769.MiddlewareOptions>) => Promise<{
229
+ use: ((inputContext: better_call758.MiddlewareInputContext<better_call758.MiddlewareOptions>) => Promise<{
230
230
  session: {
231
231
  session: Record<string, any> & {
232
232
  id: string;
@@ -311,13 +311,13 @@ declare const deleteUser: better_call769.StrictEndpoint<"/delete-user", {
311
311
  success: boolean;
312
312
  message: string;
313
313
  }>;
314
- declare const deleteUserCallback: better_call769.StrictEndpoint<"/delete-user/callback", {
314
+ declare const deleteUserCallback: better_call758.StrictEndpoint<"/delete-user/callback", {
315
315
  method: "GET";
316
316
  query: z.ZodObject<{
317
317
  token: z.ZodString;
318
318
  callbackURL: z.ZodOptional<z.ZodString>;
319
319
  }, z.core.$strip>;
320
- use: ((inputContext: better_call769.MiddlewareInputContext<better_call769.MiddlewareOptions>) => Promise<void>)[];
320
+ use: ((inputContext: better_call758.MiddlewareInputContext<better_call758.MiddlewareOptions>) => Promise<void>)[];
321
321
  metadata: {
322
322
  openapi: {
323
323
  description: string;
@@ -351,13 +351,13 @@ declare const deleteUserCallback: better_call769.StrictEndpoint<"/delete-user/ca
351
351
  success: boolean;
352
352
  message: string;
353
353
  }>;
354
- declare const changeEmail: better_call769.StrictEndpoint<"/change-email", {
354
+ declare const changeEmail: better_call758.StrictEndpoint<"/change-email", {
355
355
  method: "POST";
356
356
  body: z.ZodObject<{
357
357
  newEmail: z.ZodEmail;
358
358
  callbackURL: z.ZodOptional<z.ZodString>;
359
359
  }, z.core.$strip>;
360
- use: ((inputContext: better_call769.MiddlewareInputContext<better_call769.MiddlewareOptions>) => Promise<{
360
+ use: ((inputContext: better_call758.MiddlewareInputContext<better_call758.MiddlewareOptions>) => Promise<{
361
361
  session: {
362
362
  session: Record<string, any> & {
363
363
  id: string;
@@ -3,8 +3,8 @@ import { InferActions, InferClientAPI, InferErrorCodes, IsSignal, SessionQueryPa
3
3
  import { useStore } from "./lynx-store.mjs";
4
4
  import { BetterAuthClientOptions, BetterAuthClientPlugin } from "@better-auth/core";
5
5
  import { BASE_ERROR_CODES } from "@better-auth/core/error";
6
- import * as nanostores2 from "nanostores";
7
- import * as _better_fetch_fetch63 from "@better-fetch/fetch";
6
+ import * as nanostores0 from "nanostores";
7
+ import * as _better_fetch_fetch31 from "@better-fetch/fetch";
8
8
  import { BetterFetchError } from "@better-fetch/fetch";
9
9
  export * from "nanostores";
10
10
  export * from "@better-fetch/fetch";
@@ -49,21 +49,21 @@ declare function createAuthClient<Option extends BetterAuthClientOptions>(option
49
49
  error: null;
50
50
  } ? S : Res : never>;
51
51
  };
52
- $fetch: _better_fetch_fetch63.BetterFetch<{
53
- plugins: (_better_fetch_fetch63.BetterFetchPlugin<Record<string, any>> | {
52
+ $fetch: _better_fetch_fetch31.BetterFetch<{
53
+ plugins: (_better_fetch_fetch31.BetterFetchPlugin<Record<string, any>> | {
54
54
  id: string;
55
55
  name: string;
56
56
  hooks: {
57
- onSuccess(context: _better_fetch_fetch63.SuccessContext<any>): void;
57
+ onSuccess(context: _better_fetch_fetch31.SuccessContext<any>): void;
58
58
  };
59
59
  } | {
60
60
  id: string;
61
61
  name: string;
62
62
  hooks: {
63
- onSuccess: ((context: _better_fetch_fetch63.SuccessContext<any>) => Promise<void> | void) | undefined;
64
- onError: ((context: _better_fetch_fetch63.ErrorContext) => Promise<void> | void) | undefined;
65
- onRequest: (<T extends Record<string, any>>(context: _better_fetch_fetch63.RequestContext<T>) => Promise<_better_fetch_fetch63.RequestContext | void> | _better_fetch_fetch63.RequestContext | void) | undefined;
66
- onResponse: ((context: _better_fetch_fetch63.ResponseContext) => Promise<Response | void | _better_fetch_fetch63.ResponseContext> | Response | _better_fetch_fetch63.ResponseContext | void) | undefined;
63
+ onSuccess: ((context: _better_fetch_fetch31.SuccessContext<any>) => Promise<void> | void) | undefined;
64
+ onError: ((context: _better_fetch_fetch31.ErrorContext) => Promise<void> | void) | undefined;
65
+ onRequest: (<T extends Record<string, any>>(context: _better_fetch_fetch31.RequestContext<T>) => Promise<_better_fetch_fetch31.RequestContext | void> | _better_fetch_fetch31.RequestContext | void) | undefined;
66
+ onResponse: ((context: _better_fetch_fetch31.ResponseContext) => Promise<Response | void | _better_fetch_fetch31.ResponseContext> | Response | _better_fetch_fetch31.ResponseContext | void) | undefined;
67
67
  };
68
68
  })[];
69
69
  cache?: RequestCache | undefined;
@@ -83,12 +83,12 @@ declare function createAuthClient<Option extends BetterAuthClientOptions>(option
83
83
  referrer?: string | undefined;
84
84
  referrerPolicy?: ReferrerPolicy | undefined;
85
85
  signal?: (AbortSignal | null) | undefined;
86
- onRetry?: ((response: _better_fetch_fetch63.ResponseContext) => Promise<void> | void) | undefined;
86
+ onRetry?: ((response: _better_fetch_fetch31.ResponseContext) => Promise<void> | void) | undefined;
87
87
  hookOptions?: {
88
88
  cloneResponse?: boolean;
89
89
  } | undefined;
90
90
  timeout?: number | undefined;
91
- customFetchImpl: _better_fetch_fetch63.FetchEsque;
91
+ customFetchImpl: _better_fetch_fetch31.FetchEsque;
92
92
  baseURL: string;
93
93
  throw?: boolean | undefined;
94
94
  auth?: ({
@@ -108,17 +108,17 @@ declare function createAuthClient<Option extends BetterAuthClientOptions>(option
108
108
  params?: any;
109
109
  duplex?: "full" | "half" | undefined;
110
110
  jsonParser: (text: string) => Promise<any> | any;
111
- retry?: _better_fetch_fetch63.RetryOptions | undefined;
111
+ retry?: _better_fetch_fetch31.RetryOptions | undefined;
112
112
  retryAttempt?: number | undefined;
113
- output?: (_better_fetch_fetch63.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
114
- errorSchema?: _better_fetch_fetch63.StandardSchemaV1 | undefined;
113
+ output?: (_better_fetch_fetch31.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
114
+ errorSchema?: _better_fetch_fetch31.StandardSchemaV1 | undefined;
115
115
  disableValidation?: boolean | undefined;
116
116
  disableSignal?: boolean | undefined;
117
117
  }, unknown, unknown, {}>;
118
118
  $store: {
119
119
  notify: (signal?: (Omit<string, "$sessionSignal"> | "$sessionSignal") | undefined) => void;
120
120
  listen: (signal: Omit<string, "$sessionSignal"> | "$sessionSignal", listener: (value: boolean, oldValue?: boolean | undefined) => void) => void;
121
- atoms: Record<string, nanostores2.WritableAtom<any>>;
121
+ atoms: Record<string, nanostores0.WritableAtom<any>>;
122
122
  };
123
123
  $ERROR_CODES: PrettifyDeep<InferErrorCodes<Option> & typeof BASE_ERROR_CODES>;
124
124
  };
@@ -3,8 +3,8 @@ import { InferActions, InferClientAPI, InferErrorCodes, IsSignal, SessionQueryPa
3
3
  import { useStore } from "./react-store.mjs";
4
4
  import { BetterAuthClientOptions, BetterAuthClientPlugin } from "@better-auth/core";
5
5
  import { BASE_ERROR_CODES } from "@better-auth/core/error";
6
- import * as nanostores0 from "nanostores";
7
- import * as _better_fetch_fetch0 from "@better-fetch/fetch";
6
+ import * as nanostores1 from "nanostores";
7
+ import * as _better_fetch_fetch47 from "@better-fetch/fetch";
8
8
  import { BetterFetchError } from "@better-fetch/fetch";
9
9
  export * from "nanostores";
10
10
  export * from "@better-fetch/fetch";
@@ -50,21 +50,21 @@ declare function createAuthClient<Option extends BetterAuthClientOptions>(option
50
50
  error: null;
51
51
  } ? S : Res : never>;
52
52
  };
53
- $fetch: _better_fetch_fetch0.BetterFetch<{
54
- plugins: (_better_fetch_fetch0.BetterFetchPlugin<Record<string, any>> | {
53
+ $fetch: _better_fetch_fetch47.BetterFetch<{
54
+ plugins: (_better_fetch_fetch47.BetterFetchPlugin<Record<string, any>> | {
55
55
  id: string;
56
56
  name: string;
57
57
  hooks: {
58
- onSuccess(context: _better_fetch_fetch0.SuccessContext<any>): void;
58
+ onSuccess(context: _better_fetch_fetch47.SuccessContext<any>): void;
59
59
  };
60
60
  } | {
61
61
  id: string;
62
62
  name: string;
63
63
  hooks: {
64
- onSuccess: ((context: _better_fetch_fetch0.SuccessContext<any>) => Promise<void> | void) | undefined;
65
- onError: ((context: _better_fetch_fetch0.ErrorContext) => Promise<void> | void) | undefined;
66
- onRequest: (<T extends Record<string, any>>(context: _better_fetch_fetch0.RequestContext<T>) => Promise<_better_fetch_fetch0.RequestContext | void> | _better_fetch_fetch0.RequestContext | void) | undefined;
67
- onResponse: ((context: _better_fetch_fetch0.ResponseContext) => Promise<Response | void | _better_fetch_fetch0.ResponseContext> | Response | _better_fetch_fetch0.ResponseContext | void) | undefined;
64
+ onSuccess: ((context: _better_fetch_fetch47.SuccessContext<any>) => Promise<void> | void) | undefined;
65
+ onError: ((context: _better_fetch_fetch47.ErrorContext) => Promise<void> | void) | undefined;
66
+ onRequest: (<T extends Record<string, any>>(context: _better_fetch_fetch47.RequestContext<T>) => Promise<_better_fetch_fetch47.RequestContext | void> | _better_fetch_fetch47.RequestContext | void) | undefined;
67
+ onResponse: ((context: _better_fetch_fetch47.ResponseContext) => Promise<Response | void | _better_fetch_fetch47.ResponseContext> | Response | _better_fetch_fetch47.ResponseContext | void) | undefined;
68
68
  };
69
69
  })[];
70
70
  cache?: RequestCache | undefined;
@@ -84,12 +84,12 @@ declare function createAuthClient<Option extends BetterAuthClientOptions>(option
84
84
  referrer?: string | undefined;
85
85
  referrerPolicy?: ReferrerPolicy | undefined;
86
86
  signal?: (AbortSignal | null) | undefined;
87
- onRetry?: ((response: _better_fetch_fetch0.ResponseContext) => Promise<void> | void) | undefined;
87
+ onRetry?: ((response: _better_fetch_fetch47.ResponseContext) => Promise<void> | void) | undefined;
88
88
  hookOptions?: {
89
89
  cloneResponse?: boolean;
90
90
  } | undefined;
91
91
  timeout?: number | undefined;
92
- customFetchImpl: _better_fetch_fetch0.FetchEsque;
92
+ customFetchImpl: _better_fetch_fetch47.FetchEsque;
93
93
  baseURL: string;
94
94
  throw?: boolean | undefined;
95
95
  auth?: ({
@@ -109,17 +109,17 @@ declare function createAuthClient<Option extends BetterAuthClientOptions>(option
109
109
  params?: any;
110
110
  duplex?: "full" | "half" | undefined;
111
111
  jsonParser: (text: string) => Promise<any> | any;
112
- retry?: _better_fetch_fetch0.RetryOptions | undefined;
112
+ retry?: _better_fetch_fetch47.RetryOptions | undefined;
113
113
  retryAttempt?: number | undefined;
114
- output?: (_better_fetch_fetch0.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
115
- errorSchema?: _better_fetch_fetch0.StandardSchemaV1 | undefined;
114
+ output?: (_better_fetch_fetch47.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
115
+ errorSchema?: _better_fetch_fetch47.StandardSchemaV1 | undefined;
116
116
  disableValidation?: boolean | undefined;
117
117
  disableSignal?: boolean | undefined;
118
118
  }, unknown, unknown, {}>;
119
119
  $store: {
120
120
  notify: (signal?: (Omit<string, "$sessionSignal"> | "$sessionSignal") | undefined) => void;
121
121
  listen: (signal: Omit<string, "$sessionSignal"> | "$sessionSignal", listener: (value: boolean, oldValue?: boolean | undefined) => void) => void;
122
- atoms: Record<string, nanostores0.WritableAtom<any>>;
122
+ atoms: Record<string, nanostores1.WritableAtom<any>>;
123
123
  };
124
124
  $ERROR_CODES: PrettifyDeep<InferErrorCodes<Option> & typeof BASE_ERROR_CODES>;
125
125
  };
@@ -2,7 +2,7 @@ import { DeepPartial, Expand, HasRequiredKeys, LiteralNumber, LiteralUnion, Omit
2
2
  import { InferActions, InferClientAPI, InferErrorCodes, IsSignal, SessionQueryParams } from "../types.mjs";
3
3
  import { BetterAuthClientOptions, BetterAuthClientPlugin } from "@better-auth/core";
4
4
  import { BASE_ERROR_CODES } from "@better-auth/core/error";
5
- import * as _better_fetch_fetch47 from "@better-fetch/fetch";
5
+ import * as _better_fetch_fetch15 from "@better-fetch/fetch";
6
6
  import { BetterFetchError } from "@better-fetch/fetch";
7
7
  import { Accessor } from "solid-js";
8
8
  export * from "nanostores";
@@ -49,21 +49,21 @@ declare function createAuthClient<Option extends BetterAuthClientOptions>(option
49
49
  error: null;
50
50
  } ? S : Res extends Record<string, any> ? Res : never : never>;
51
51
  };
52
- $fetch: _better_fetch_fetch47.BetterFetch<{
53
- plugins: (_better_fetch_fetch47.BetterFetchPlugin<Record<string, any>> | {
52
+ $fetch: _better_fetch_fetch15.BetterFetch<{
53
+ plugins: (_better_fetch_fetch15.BetterFetchPlugin<Record<string, any>> | {
54
54
  id: string;
55
55
  name: string;
56
56
  hooks: {
57
- onSuccess(context: _better_fetch_fetch47.SuccessContext<any>): void;
57
+ onSuccess(context: _better_fetch_fetch15.SuccessContext<any>): void;
58
58
  };
59
59
  } | {
60
60
  id: string;
61
61
  name: string;
62
62
  hooks: {
63
- onSuccess: ((context: _better_fetch_fetch47.SuccessContext<any>) => Promise<void> | void) | undefined;
64
- onError: ((context: _better_fetch_fetch47.ErrorContext) => Promise<void> | void) | undefined;
65
- onRequest: (<T extends Record<string, any>>(context: _better_fetch_fetch47.RequestContext<T>) => Promise<_better_fetch_fetch47.RequestContext | void> | _better_fetch_fetch47.RequestContext | void) | undefined;
66
- onResponse: ((context: _better_fetch_fetch47.ResponseContext) => Promise<Response | void | _better_fetch_fetch47.ResponseContext> | Response | _better_fetch_fetch47.ResponseContext | void) | undefined;
63
+ onSuccess: ((context: _better_fetch_fetch15.SuccessContext<any>) => Promise<void> | void) | undefined;
64
+ onError: ((context: _better_fetch_fetch15.ErrorContext) => Promise<void> | void) | undefined;
65
+ onRequest: (<T extends Record<string, any>>(context: _better_fetch_fetch15.RequestContext<T>) => Promise<_better_fetch_fetch15.RequestContext | void> | _better_fetch_fetch15.RequestContext | void) | undefined;
66
+ onResponse: ((context: _better_fetch_fetch15.ResponseContext) => Promise<Response | void | _better_fetch_fetch15.ResponseContext> | Response | _better_fetch_fetch15.ResponseContext | void) | undefined;
67
67
  };
68
68
  })[];
69
69
  cache?: RequestCache | undefined;
@@ -83,12 +83,12 @@ declare function createAuthClient<Option extends BetterAuthClientOptions>(option
83
83
  referrer?: string | undefined;
84
84
  referrerPolicy?: ReferrerPolicy | undefined;
85
85
  signal?: (AbortSignal | null) | undefined;
86
- onRetry?: ((response: _better_fetch_fetch47.ResponseContext) => Promise<void> | void) | undefined;
86
+ onRetry?: ((response: _better_fetch_fetch15.ResponseContext) => Promise<void> | void) | undefined;
87
87
  hookOptions?: {
88
88
  cloneResponse?: boolean;
89
89
  } | undefined;
90
90
  timeout?: number | undefined;
91
- customFetchImpl: _better_fetch_fetch47.FetchEsque;
91
+ customFetchImpl: _better_fetch_fetch15.FetchEsque;
92
92
  baseURL: string;
93
93
  throw?: boolean | undefined;
94
94
  auth?: ({
@@ -108,10 +108,10 @@ declare function createAuthClient<Option extends BetterAuthClientOptions>(option
108
108
  params?: any;
109
109
  duplex?: "full" | "half" | undefined;
110
110
  jsonParser: (text: string) => Promise<any> | any;
111
- retry?: _better_fetch_fetch47.RetryOptions | undefined;
111
+ retry?: _better_fetch_fetch15.RetryOptions | undefined;
112
112
  retryAttempt?: number | undefined;
113
- output?: (_better_fetch_fetch47.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
114
- errorSchema?: _better_fetch_fetch47.StandardSchemaV1 | undefined;
113
+ output?: (_better_fetch_fetch15.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
114
+ errorSchema?: _better_fetch_fetch15.StandardSchemaV1 | undefined;
115
115
  disableValidation?: boolean | undefined;
116
116
  disableSignal?: boolean | undefined;
117
117
  }, unknown, unknown, {}>;