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,11 +1,11 @@
1
1
  import * as _better_auth_core_oauth29 from "@better-auth/core/oauth2";
2
- import * as better_call758 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_call758.StrictEndpoint<"/list-accounts", {
6
+ declare const listUserAccounts: better_call776.StrictEndpoint<"/list-accounts", {
7
7
  method: "GET";
8
- use: ((inputContext: better_call758.MiddlewareInputContext<better_call758.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_call758.StrictEndpoint<"/list-accounts",
87
87
  providerId: string;
88
88
  accountId: string;
89
89
  }[]>;
90
- declare const linkSocialAccount: better_call758.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_call758.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_call758.MiddlewareInputContext<better_call758.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_call758.StrictEndpoint<"/link-social", {
165
165
  url: string;
166
166
  redirect: boolean;
167
167
  }>;
168
- declare const unlinkAccount: better_call758.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_call758.MiddlewareInputContext<better_call758.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_call758.StrictEndpoint<"/unlink-account", {
219
219
  }, {
220
220
  status: boolean;
221
221
  }>;
222
- declare const getAccessToken: better_call758.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_call758.StrictEndpoint<"/get-access-token",
267
267
  scopes: string[];
268
268
  idToken: string | undefined;
269
269
  }>;
270
- declare const refreshToken: better_call758.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_call758.StrictEndpoint<"/refresh-token", {
326
326
  providerId: string;
327
327
  accountId: string;
328
328
  }>;
329
- declare const accountInfo: better_call758.StrictEndpoint<"/account-info", {
329
+ declare const accountInfo: better_call776.StrictEndpoint<"/account-info", {
330
330
  method: "GET";
331
- use: ((inputContext: better_call758.MiddlewareInputContext<better_call758.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_call776 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_call776.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_call772 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_call772.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_call772.StrictEndpoint<"/send-verifi
97
97
  }, {
98
98
  status: boolean;
99
99
  }>;
100
- declare const verifyEmail: better_call772.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_call772.MiddlewareInputContext<better_call772.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_call778 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_call778.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_call777 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_call777.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_call826 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_call826.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_call826.StrictEndpoint<"/request-pass
38
38
  status: boolean;
39
39
  message: string;
40
40
  }>;
41
- declare const requestPasswordResetCallback: better_call826.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_call826.MiddlewareInputContext<better_call826.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_call826.StrictEndpoint<"/rese
86
86
  };
87
87
  };
88
88
  }, never>;
89
- declare const resetPassword: better_call826.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_call826.StrictEndpoint<"/reset-password", {
122
122
  }, {
123
123
  status: boolean;
124
124
  }>;
125
- declare const verifyPassword: better_call826.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_call826.StrictEndpoint<"/verify-password",
151
151
  };
152
152
  };
153
153
  };
154
- use: ((inputContext: better_call826.MiddlewareInputContext<better_call826.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;
@@ -2,11 +2,11 @@ import { Prettify as Prettify$1 } from "../../types/helper.mjs";
2
2
  import { InferSession, InferUser, Session, User } from "../../types/models.mjs";
3
3
  import "../../types/index.mjs";
4
4
  import { BetterAuthOptions, GenericEndpointContext } from "@better-auth/core";
5
- import * as better_call779 from "better-call";
5
+ import * as better_call791 from "better-call";
6
6
  import * as z from "zod";
7
7
 
8
8
  //#region src/api/routes/session.d.ts
9
- declare const getSession: <Option extends BetterAuthOptions>() => better_call779.StrictEndpoint<"/get-session", {
9
+ declare const getSession: <Option extends BetterAuthOptions>() => better_call791.StrictEndpoint<"/get-session", {
10
10
  method: "GET";
11
11
  operationId: string;
12
12
  query: z.ZodOptional<z.ZodObject<{
@@ -56,7 +56,7 @@ declare const getSessionFromCtx: <U extends Record<string, any> = Record<string,
56
56
  /**
57
57
  * The middleware forces the endpoint to require a valid session.
58
58
  */
59
- declare const sessionMiddleware: (inputContext: better_call779.MiddlewareInputContext<better_call779.MiddlewareOptions>) => Promise<{
59
+ declare const sessionMiddleware: (inputContext: better_call791.MiddlewareInputContext<better_call791.MiddlewareOptions>) => Promise<{
60
60
  session: {
61
61
  session: Record<string, any> & {
62
62
  id: string;
@@ -84,7 +84,7 @@ declare const sessionMiddleware: (inputContext: better_call779.MiddlewareInputCo
84
84
  * This should be used for sensitive operations like password changes, account deletion, etc.
85
85
  * to ensure that revoked sessions cannot be used even if they're still cached in cookies.
86
86
  */
87
- declare const sensitiveSessionMiddleware: (inputContext: better_call779.MiddlewareInputContext<better_call779.MiddlewareOptions>) => Promise<{
87
+ declare const sensitiveSessionMiddleware: (inputContext: better_call791.MiddlewareInputContext<better_call791.MiddlewareOptions>) => Promise<{
88
88
  session: {
89
89
  session: Record<string, any> & {
90
90
  id: string;
@@ -111,7 +111,7 @@ declare const sensitiveSessionMiddleware: (inputContext: better_call779.Middlewa
111
111
  * This middleware allows you to call the endpoint on the client if session is valid.
112
112
  * However, if called on the server, no session is required.
113
113
  */
114
- declare const requestOnlySessionMiddleware: (inputContext: better_call779.MiddlewareInputContext<better_call779.MiddlewareOptions>) => Promise<{
114
+ declare const requestOnlySessionMiddleware: (inputContext: better_call791.MiddlewareInputContext<better_call791.MiddlewareOptions>) => Promise<{
115
115
  session: {
116
116
  session: Record<string, any> & {
117
117
  id: string;
@@ -141,7 +141,7 @@ declare const requestOnlySessionMiddleware: (inputContext: better_call779.Middle
141
141
  * Session freshness check will be skipped if the session config's freshAge
142
142
  * is set to 0
143
143
  */
144
- declare const freshSessionMiddleware: (inputContext: better_call779.MiddlewareInputContext<better_call779.MiddlewareOptions>) => Promise<{
144
+ declare const freshSessionMiddleware: (inputContext: better_call791.MiddlewareInputContext<better_call791.MiddlewareOptions>) => Promise<{
145
145
  session: {
146
146
  session: Record<string, any> & {
147
147
  id: string;
@@ -167,10 +167,10 @@ declare const freshSessionMiddleware: (inputContext: better_call779.MiddlewareIn
167
167
  /**
168
168
  * user active sessions list
169
169
  */
170
- declare const listSessions: <Option extends BetterAuthOptions>() => better_call779.StrictEndpoint<"/list-sessions", {
170
+ declare const listSessions: <Option extends BetterAuthOptions>() => better_call791.StrictEndpoint<"/list-sessions", {
171
171
  method: "GET";
172
172
  operationId: string;
173
- use: ((inputContext: better_call779.MiddlewareInputContext<better_call779.MiddlewareOptions>) => Promise<{
173
+ use: ((inputContext: better_call791.MiddlewareInputContext<better_call791.MiddlewareOptions>) => Promise<{
174
174
  session: {
175
175
  session: Record<string, any> & {
176
176
  id: string;
@@ -219,12 +219,12 @@ declare const listSessions: <Option extends BetterAuthOptions>() => better_call7
219
219
  /**
220
220
  * revoke a single session
221
221
  */
222
- declare const revokeSession: better_call779.StrictEndpoint<"/revoke-session", {
222
+ declare const revokeSession: better_call791.StrictEndpoint<"/revoke-session", {
223
223
  method: "POST";
224
224
  body: z.ZodObject<{
225
225
  token: z.ZodString;
226
226
  }, z.core.$strip>;
227
- use: ((inputContext: better_call779.MiddlewareInputContext<better_call779.MiddlewareOptions>) => Promise<{
227
+ use: ((inputContext: better_call791.MiddlewareInputContext<better_call791.MiddlewareOptions>) => Promise<{
228
228
  session: {
229
229
  session: Record<string, any> & {
230
230
  id: string;
@@ -294,9 +294,9 @@ declare const revokeSession: better_call779.StrictEndpoint<"/revoke-session", {
294
294
  /**
295
295
  * revoke all user sessions
296
296
  */
297
- declare const revokeSessions: better_call779.StrictEndpoint<"/revoke-sessions", {
297
+ declare const revokeSessions: better_call791.StrictEndpoint<"/revoke-sessions", {
298
298
  method: "POST";
299
- use: ((inputContext: better_call779.MiddlewareInputContext<better_call779.MiddlewareOptions>) => Promise<{
299
+ use: ((inputContext: better_call791.MiddlewareInputContext<better_call791.MiddlewareOptions>) => Promise<{
300
300
  session: {
301
301
  session: Record<string, any> & {
302
302
  id: string;
@@ -347,10 +347,10 @@ declare const revokeSessions: better_call779.StrictEndpoint<"/revoke-sessions",
347
347
  }, {
348
348
  status: boolean;
349
349
  }>;
350
- declare const revokeOtherSessions: better_call779.StrictEndpoint<"/revoke-other-sessions", {
350
+ declare const revokeOtherSessions: better_call791.StrictEndpoint<"/revoke-other-sessions", {
351
351
  method: "POST";
352
352
  requireHeaders: true;
353
- use: ((inputContext: better_call779.MiddlewareInputContext<better_call779.MiddlewareOptions>) => Promise<{
353
+ use: ((inputContext: better_call791.MiddlewareInputContext<better_call791.MiddlewareOptions>) => Promise<{
354
354
  session: {
355
355
  session: Record<string, any> & {
356
356
  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_call822 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_call822.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_call822.St
98
98
  url: undefined;
99
99
  user: InferUser<O>;
100
100
  }>;
101
- declare const signInEmail: <O extends BetterAuthOptions>() => better_call822.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_call822.MiddlewareInputContext<better_call822.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_call818 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_call818.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_call819 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_call819.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_call819.MiddlewareInputContext<better_call819.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_call800 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_call800.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_call800.MiddlewareInputContext<better_call800.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_call800.Stri
85
85
  }, {
86
86
  status: boolean;
87
87
  }>;
88
- declare const changePassword: better_call800.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_call800.StrictEndpoint<"/change-password",
93
93
  currentPassword: z.ZodString;
94
94
  revokeOtherSessions: z.ZodOptional<z.ZodBoolean>;
95
95
  }, z.core.$strip>;
96
- use: ((inputContext: better_call800.MiddlewareInputContext<better_call800.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_call800.StrictEndpoint<"/change-password",
193
193
  image?: string | null | undefined;
194
194
  } & Record<string, any>;
195
195
  }>;
196
- declare const setPassword: better_call800.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_call800.MiddlewareInputContext<better_call800.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_call800.StrictEndpoint<string, {
224
224
  }, {
225
225
  status: boolean;
226
226
  }>;
227
- declare const deleteUser: better_call800.StrictEndpoint<"/delete-user", {
227
+ declare const deleteUser: better_call758.StrictEndpoint<"/delete-user", {
228
228
  method: "POST";
229
- use: ((inputContext: better_call800.MiddlewareInputContext<better_call800.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_call800.StrictEndpoint<"/delete-user", {
311
311
  success: boolean;
312
312
  message: string;
313
313
  }>;
314
- declare const deleteUserCallback: better_call800.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_call800.MiddlewareInputContext<better_call800.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_call800.StrictEndpoint<"/delete-user/ca
351
351
  success: boolean;
352
352
  message: string;
353
353
  }>;
354
- declare const changeEmail: better_call800.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_call800.MiddlewareInputContext<better_call800.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;
@@ -4,7 +4,7 @@ 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
6
  import * as nanostores0 from "nanostores";
7
- import * as _better_fetch_fetch0 from "@better-fetch/fetch";
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_fetch0.BetterFetch<{
53
- plugins: (_better_fetch_fetch0.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_fetch0.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_fetch0.SuccessContext<any>) => Promise<void> | void) | undefined;
64
- onError: ((context: _better_fetch_fetch0.ErrorContext) => Promise<void> | void) | undefined;
65
- onRequest: (<T extends Record<string, any>>(context: _better_fetch_fetch0.RequestContext<T>) => Promise<_better_fetch_fetch0.RequestContext | void> | _better_fetch_fetch0.RequestContext | void) | undefined;
66
- onResponse: ((context: _better_fetch_fetch0.ResponseContext) => Promise<Response | void | _better_fetch_fetch0.ResponseContext> | Response | _better_fetch_fetch0.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_fetch0.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_fetch0.FetchEsque;
91
+ customFetchImpl: _better_fetch_fetch31.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_fetch0.RetryOptions | undefined;
111
+ retry?: _better_fetch_fetch31.RetryOptions | undefined;
112
112
  retryAttempt?: number | undefined;
113
- output?: (_better_fetch_fetch0.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
114
- errorSchema?: _better_fetch_fetch0.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, {}>;
@@ -4,7 +4,7 @@ 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
6
  import * as nanostores1 from "nanostores";
7
- import * as _better_fetch_fetch31 from "@better-fetch/fetch";
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_fetch31.BetterFetch<{
54
- plugins: (_better_fetch_fetch31.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_fetch31.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_fetch31.SuccessContext<any>) => Promise<void> | void) | undefined;
65
- onError: ((context: _better_fetch_fetch31.ErrorContext) => Promise<void> | void) | undefined;
66
- onRequest: (<T extends Record<string, any>>(context: _better_fetch_fetch31.RequestContext<T>) => Promise<_better_fetch_fetch31.RequestContext | void> | _better_fetch_fetch31.RequestContext | void) | undefined;
67
- onResponse: ((context: _better_fetch_fetch31.ResponseContext) => Promise<Response | void | _better_fetch_fetch31.ResponseContext> | Response | _better_fetch_fetch31.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_fetch31.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_fetch31.FetchEsque;
92
+ customFetchImpl: _better_fetch_fetch47.FetchEsque;
93
93
  baseURL: string;
94
94
  throw?: boolean | undefined;
95
95
  auth?: ({
@@ -109,10 +109,10 @@ 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_fetch31.RetryOptions | undefined;
112
+ retry?: _better_fetch_fetch47.RetryOptions | undefined;
113
113
  retryAttempt?: number | undefined;
114
- output?: (_better_fetch_fetch31.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
115
- errorSchema?: _better_fetch_fetch31.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, {}>;