better-auth 1.4.12-beta.1 → 1.4.12-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/index.d.mts +407 -407
- package/dist/api/middlewares/origin-check.d.mts +4 -4
- package/dist/api/routes/account.d.mts +11 -11
- package/dist/api/routes/callback.d.mts +2 -2
- package/dist/api/routes/email-verification.d.mts +4 -4
- package/dist/api/routes/error.d.mts +2 -2
- package/dist/api/routes/ok.d.mts +2 -2
- package/dist/api/routes/password.d.mts +7 -7
- package/dist/api/routes/session.d.mts +14 -14
- package/dist/api/routes/sign-in.d.mts +4 -4
- package/dist/api/routes/sign-out.d.mts +2 -2
- package/dist/api/routes/sign-up.d.mts +3 -3
- package/dist/api/routes/update-user.d.mts +13 -13
- package/dist/client/lynx/index.d.mts +15 -15
- package/dist/client/react/index.d.mts +13 -13
- package/dist/client/solid/index.d.mts +4 -1
- package/dist/client/solid/index.mjs.map +1 -1
- package/dist/client/svelte/index.d.mts +19 -16
- package/dist/client/svelte/index.mjs.map +1 -1
- package/dist/client/vanilla.d.mts +18 -14
- package/dist/client/vanilla.mjs.map +1 -1
- package/dist/client/vue/index.d.mts +19 -16
- package/dist/client/vue/index.mjs.map +1 -1
- package/dist/db/field.d.mts +6 -6
- package/dist/db/internal-adapter.mjs +16 -18
- package/dist/db/internal-adapter.mjs.map +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/integrations/next-js.d.mts +4 -4
- package/dist/integrations/svelte-kit.d.mts +2 -2
- package/dist/integrations/tanstack-start.d.mts +4 -4
- package/dist/plugins/admin/admin.d.mts +116 -116
- package/dist/plugins/anonymous/client.d.mts +1 -0
- package/dist/plugins/anonymous/client.mjs +4 -1
- package/dist/plugins/anonymous/client.mjs.map +1 -1
- package/dist/plugins/anonymous/index.d.mts +7 -7
- package/dist/plugins/api-key/index.d.mts +80 -80
- package/dist/plugins/bearer/index.d.mts +6 -6
- package/dist/plugins/captcha/index.d.mts +2 -2
- package/dist/plugins/custom-session/index.d.mts +5 -5
- package/dist/plugins/device-authorization/index.d.mts +6 -6
- package/dist/plugins/email-otp/index.d.mts +48 -48
- package/dist/plugins/generic-oauth/index.d.mts +31 -31
- package/dist/plugins/haveibeenpwned/index.d.mts +3 -3
- package/dist/plugins/jwt/client.d.mts +2 -2
- package/dist/plugins/jwt/index.d.mts +9 -9
- package/dist/plugins/last-login-method/index.d.mts +4 -4
- package/dist/plugins/magic-link/index.d.mts +4 -4
- package/dist/plugins/mcp/index.d.mts +10 -10
- package/dist/plugins/multi-session/index.d.mts +9 -9
- package/dist/plugins/oauth-proxy/index.d.mts +8 -8
- package/dist/plugins/oidc-provider/index.d.mts +13 -13
- package/dist/plugins/one-tap/client.d.mts +5 -5
- package/dist/plugins/one-tap/index.d.mts +2 -2
- package/dist/plugins/one-time-token/index.d.mts +5 -5
- package/dist/plugins/open-api/index.d.mts +3 -3
- package/dist/plugins/organization/client.d.mts +2 -2
- package/dist/plugins/organization/organization.d.mts +7 -7
- package/dist/plugins/organization/routes/crud-access-control.d.mts +22 -22
- package/dist/plugins/organization/routes/crud-invites.d.mts +58 -58
- package/dist/plugins/organization/routes/crud-members.d.mts +62 -62
- package/dist/plugins/organization/routes/crud-org.d.mts +51 -51
- package/dist/plugins/phone-number/index.d.mts +33 -33
- package/dist/plugins/siwe/index.d.mts +3 -3
- package/dist/plugins/two-factor/backup-codes/index.d.mts +5 -5
- package/dist/plugins/two-factor/client.d.mts +2 -2
- package/dist/plugins/two-factor/index.d.mts +18 -18
- package/dist/plugins/two-factor/otp/index.d.mts +3 -3
- package/dist/plugins/two-factor/totp/index.d.mts +5 -5
- package/dist/plugins/username/index.d.mts +9 -9
- package/dist/plugins/username/schema.d.mts +3 -3
- package/dist/test-utils/test-instance.d.mts +1251 -1247
- package/dist/types/api.d.mts +5 -6
- package/dist/types/index.d.mts +2 -2
- package/package.json +3 -3
package/dist/api/index.d.mts
CHANGED
|
@@ -24,17 +24,17 @@ import "./routes/index.mjs";
|
|
|
24
24
|
import { AuthContext, Awaitable, BetterAuthOptions, BetterAuthPlugin } from "@better-auth/core";
|
|
25
25
|
import { InternalLogger } from "@better-auth/core/env";
|
|
26
26
|
import * as _better_auth_core_oauth20 from "@better-auth/core/oauth2";
|
|
27
|
-
import * as
|
|
28
|
-
import * as
|
|
27
|
+
import * as zod0 from "zod";
|
|
28
|
+
import * as better_call4 from "better-call";
|
|
29
29
|
import { APIError } from "better-call";
|
|
30
30
|
import { AuthEndpoint, AuthMiddleware, createAuthEndpoint, createAuthMiddleware, optionsMiddleware } from "@better-auth/core/api";
|
|
31
|
-
import * as
|
|
31
|
+
import * as zod_v4_core0 from "zod/v4/core";
|
|
32
32
|
|
|
33
33
|
//#region src/api/index.d.ts
|
|
34
34
|
declare function checkEndpointConflicts(options: BetterAuthOptions, logger: InternalLogger): void;
|
|
35
35
|
declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<AuthContext>, options: Option): {
|
|
36
36
|
api: {
|
|
37
|
-
readonly ok:
|
|
37
|
+
readonly ok: better_call4.StrictEndpoint<"/ok", {
|
|
38
38
|
method: "GET";
|
|
39
39
|
metadata: {
|
|
40
40
|
openapi: {
|
|
@@ -64,7 +64,7 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
64
64
|
}, {
|
|
65
65
|
ok: boolean;
|
|
66
66
|
}>;
|
|
67
|
-
readonly error:
|
|
67
|
+
readonly error: better_call4.StrictEndpoint<"/error", {
|
|
68
68
|
method: "GET";
|
|
69
69
|
metadata: {
|
|
70
70
|
openapi: {
|
|
@@ -86,47 +86,47 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
86
86
|
scope: "server";
|
|
87
87
|
};
|
|
88
88
|
}, Response>;
|
|
89
|
-
readonly signInSocial:
|
|
89
|
+
readonly signInSocial: better_call4.StrictEndpoint<"/sign-in/social", {
|
|
90
90
|
method: "POST";
|
|
91
91
|
operationId: string;
|
|
92
|
-
body:
|
|
93
|
-
callbackURL:
|
|
94
|
-
newUserCallbackURL:
|
|
95
|
-
errorCallbackURL:
|
|
96
|
-
provider:
|
|
97
|
-
disableRedirect:
|
|
98
|
-
idToken:
|
|
99
|
-
token:
|
|
100
|
-
nonce:
|
|
101
|
-
accessToken:
|
|
102
|
-
refreshToken:
|
|
103
|
-
expiresAt:
|
|
104
|
-
},
|
|
105
|
-
scopes:
|
|
106
|
-
requestSignUp:
|
|
107
|
-
loginHint:
|
|
108
|
-
additionalData:
|
|
109
|
-
},
|
|
92
|
+
body: zod0.ZodObject<{
|
|
93
|
+
callbackURL: zod0.ZodOptional<zod0.ZodString>;
|
|
94
|
+
newUserCallbackURL: zod0.ZodOptional<zod0.ZodString>;
|
|
95
|
+
errorCallbackURL: zod0.ZodOptional<zod0.ZodString>;
|
|
96
|
+
provider: zod0.ZodType<"github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "vercel" | (string & {}), unknown, zod_v4_core0.$ZodTypeInternals<"github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "vercel" | (string & {}), unknown>>;
|
|
97
|
+
disableRedirect: zod0.ZodOptional<zod0.ZodBoolean>;
|
|
98
|
+
idToken: zod0.ZodOptional<zod0.ZodObject<{
|
|
99
|
+
token: zod0.ZodString;
|
|
100
|
+
nonce: zod0.ZodOptional<zod0.ZodString>;
|
|
101
|
+
accessToken: zod0.ZodOptional<zod0.ZodString>;
|
|
102
|
+
refreshToken: zod0.ZodOptional<zod0.ZodString>;
|
|
103
|
+
expiresAt: zod0.ZodOptional<zod0.ZodNumber>;
|
|
104
|
+
}, zod_v4_core0.$strip>>;
|
|
105
|
+
scopes: zod0.ZodOptional<zod0.ZodArray<zod0.ZodString>>;
|
|
106
|
+
requestSignUp: zod0.ZodOptional<zod0.ZodBoolean>;
|
|
107
|
+
loginHint: zod0.ZodOptional<zod0.ZodString>;
|
|
108
|
+
additionalData: zod0.ZodOptional<zod0.ZodRecord<zod0.ZodString, zod0.ZodAny>>;
|
|
109
|
+
}, zod_v4_core0.$strip>;
|
|
110
110
|
metadata: {
|
|
111
111
|
$Infer: {
|
|
112
|
-
body:
|
|
113
|
-
callbackURL:
|
|
114
|
-
newUserCallbackURL:
|
|
115
|
-
errorCallbackURL:
|
|
116
|
-
provider:
|
|
117
|
-
disableRedirect:
|
|
118
|
-
idToken:
|
|
119
|
-
token:
|
|
120
|
-
nonce:
|
|
121
|
-
accessToken:
|
|
122
|
-
refreshToken:
|
|
123
|
-
expiresAt:
|
|
124
|
-
},
|
|
125
|
-
scopes:
|
|
126
|
-
requestSignUp:
|
|
127
|
-
loginHint:
|
|
128
|
-
additionalData:
|
|
129
|
-
},
|
|
112
|
+
body: zod0.infer<zod0.ZodObject<{
|
|
113
|
+
callbackURL: zod0.ZodOptional<zod0.ZodString>;
|
|
114
|
+
newUserCallbackURL: zod0.ZodOptional<zod0.ZodString>;
|
|
115
|
+
errorCallbackURL: zod0.ZodOptional<zod0.ZodString>;
|
|
116
|
+
provider: zod0.ZodType<"github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "vercel" | (string & {}), unknown, zod_v4_core0.$ZodTypeInternals<"github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "vercel" | (string & {}), unknown>>;
|
|
117
|
+
disableRedirect: zod0.ZodOptional<zod0.ZodBoolean>;
|
|
118
|
+
idToken: zod0.ZodOptional<zod0.ZodObject<{
|
|
119
|
+
token: zod0.ZodString;
|
|
120
|
+
nonce: zod0.ZodOptional<zod0.ZodString>;
|
|
121
|
+
accessToken: zod0.ZodOptional<zod0.ZodString>;
|
|
122
|
+
refreshToken: zod0.ZodOptional<zod0.ZodString>;
|
|
123
|
+
expiresAt: zod0.ZodOptional<zod0.ZodNumber>;
|
|
124
|
+
}, zod_v4_core0.$strip>>;
|
|
125
|
+
scopes: zod0.ZodOptional<zod0.ZodArray<zod0.ZodString>>;
|
|
126
|
+
requestSignUp: zod0.ZodOptional<zod0.ZodBoolean>;
|
|
127
|
+
loginHint: zod0.ZodOptional<zod0.ZodString>;
|
|
128
|
+
additionalData: zod0.ZodOptional<zod0.ZodRecord<zod0.ZodString, zod0.ZodAny>>;
|
|
129
|
+
}, zod_v4_core0.$strip>>;
|
|
130
130
|
returned: {
|
|
131
131
|
redirect: boolean;
|
|
132
132
|
token?: string | undefined;
|
|
@@ -194,37 +194,37 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
194
194
|
image?: string | null | undefined;
|
|
195
195
|
} & (Option extends BetterAuthOptions ? AdditionalUserFieldsOutput<Option> : Option extends Auth ? AdditionalUserFieldsOutput<Option["options"]> : {})>>;
|
|
196
196
|
}>;
|
|
197
|
-
readonly callbackOAuth:
|
|
197
|
+
readonly callbackOAuth: better_call4.StrictEndpoint<"/callback/:id", {
|
|
198
198
|
method: ("GET" | "POST")[];
|
|
199
199
|
operationId: string;
|
|
200
|
-
body:
|
|
201
|
-
code:
|
|
202
|
-
error:
|
|
203
|
-
device_id:
|
|
204
|
-
error_description:
|
|
205
|
-
state:
|
|
206
|
-
user:
|
|
207
|
-
},
|
|
208
|
-
query:
|
|
209
|
-
code:
|
|
210
|
-
error:
|
|
211
|
-
device_id:
|
|
212
|
-
error_description:
|
|
213
|
-
state:
|
|
214
|
-
user:
|
|
215
|
-
},
|
|
200
|
+
body: zod0.ZodOptional<zod0.ZodObject<{
|
|
201
|
+
code: zod0.ZodOptional<zod0.ZodString>;
|
|
202
|
+
error: zod0.ZodOptional<zod0.ZodString>;
|
|
203
|
+
device_id: zod0.ZodOptional<zod0.ZodString>;
|
|
204
|
+
error_description: zod0.ZodOptional<zod0.ZodString>;
|
|
205
|
+
state: zod0.ZodOptional<zod0.ZodString>;
|
|
206
|
+
user: zod0.ZodOptional<zod0.ZodString>;
|
|
207
|
+
}, zod_v4_core0.$strip>>;
|
|
208
|
+
query: zod0.ZodOptional<zod0.ZodObject<{
|
|
209
|
+
code: zod0.ZodOptional<zod0.ZodString>;
|
|
210
|
+
error: zod0.ZodOptional<zod0.ZodString>;
|
|
211
|
+
device_id: zod0.ZodOptional<zod0.ZodString>;
|
|
212
|
+
error_description: zod0.ZodOptional<zod0.ZodString>;
|
|
213
|
+
state: zod0.ZodOptional<zod0.ZodString>;
|
|
214
|
+
user: zod0.ZodOptional<zod0.ZodString>;
|
|
215
|
+
}, zod_v4_core0.$strip>>;
|
|
216
216
|
metadata: {
|
|
217
217
|
allowedMediaTypes: string[];
|
|
218
218
|
scope: "server";
|
|
219
219
|
};
|
|
220
220
|
}, void>;
|
|
221
|
-
readonly getSession:
|
|
221
|
+
readonly getSession: better_call4.StrictEndpoint<"/get-session", {
|
|
222
222
|
method: "GET";
|
|
223
223
|
operationId: string;
|
|
224
|
-
query:
|
|
225
|
-
disableCookieCache:
|
|
226
|
-
disableRefresh:
|
|
227
|
-
},
|
|
224
|
+
query: zod0.ZodOptional<zod0.ZodObject<{
|
|
225
|
+
disableCookieCache: zod0.ZodOptional<zod0.ZodCoercedBoolean<unknown>>;
|
|
226
|
+
disableRefresh: zod0.ZodOptional<zod0.ZodCoercedBoolean<unknown>>;
|
|
227
|
+
}, zod_v4_core0.$strip>>;
|
|
228
228
|
requireHeaders: true;
|
|
229
229
|
metadata: {
|
|
230
230
|
openapi: {
|
|
@@ -275,7 +275,7 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
275
275
|
image?: string | null | undefined;
|
|
276
276
|
} & (Option extends BetterAuthOptions ? AdditionalUserFieldsOutput<Option> : Option extends Auth ? AdditionalUserFieldsOutput<Option["options"]> : {})>>;
|
|
277
277
|
} | null>;
|
|
278
|
-
readonly signOut:
|
|
278
|
+
readonly signOut: better_call4.StrictEndpoint<"/sign-out", {
|
|
279
279
|
method: "POST";
|
|
280
280
|
operationId: string;
|
|
281
281
|
requireHeaders: true;
|
|
@@ -305,18 +305,18 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
305
305
|
}, {
|
|
306
306
|
success: boolean;
|
|
307
307
|
}>;
|
|
308
|
-
readonly signUpEmail:
|
|
308
|
+
readonly signUpEmail: better_call4.StrictEndpoint<"/sign-up/email", {
|
|
309
309
|
method: "POST";
|
|
310
310
|
operationId: string;
|
|
311
|
-
use: ((inputContext:
|
|
312
|
-
body:
|
|
313
|
-
name:
|
|
314
|
-
email:
|
|
315
|
-
password:
|
|
316
|
-
image:
|
|
317
|
-
callbackURL:
|
|
318
|
-
rememberMe:
|
|
319
|
-
},
|
|
311
|
+
use: ((inputContext: better_call4.MiddlewareInputContext<better_call4.MiddlewareOptions>) => Promise<void>)[];
|
|
312
|
+
body: zod0.ZodIntersection<zod0.ZodObject<{
|
|
313
|
+
name: zod0.ZodString;
|
|
314
|
+
email: zod0.ZodEmail;
|
|
315
|
+
password: zod0.ZodString;
|
|
316
|
+
image: zod0.ZodOptional<zod0.ZodString>;
|
|
317
|
+
callbackURL: zod0.ZodOptional<zod0.ZodString>;
|
|
318
|
+
rememberMe: zod0.ZodOptional<zod0.ZodBoolean>;
|
|
319
|
+
}, zod_v4_core0.$strip>, zod0.ZodRecord<zod0.ZodString, zod0.ZodAny>>;
|
|
320
320
|
metadata: {
|
|
321
321
|
allowedMediaTypes: string[];
|
|
322
322
|
$Infer: {
|
|
@@ -479,16 +479,16 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
479
479
|
image?: string | null | undefined;
|
|
480
480
|
} & (Option extends BetterAuthOptions ? AdditionalUserFieldsOutput<Option> : Option extends Auth ? AdditionalUserFieldsOutput<Option["options"]> : {})>>;
|
|
481
481
|
}>;
|
|
482
|
-
readonly signInEmail:
|
|
482
|
+
readonly signInEmail: better_call4.StrictEndpoint<"/sign-in/email", {
|
|
483
483
|
method: "POST";
|
|
484
484
|
operationId: string;
|
|
485
|
-
use: ((inputContext:
|
|
486
|
-
body:
|
|
487
|
-
email:
|
|
488
|
-
password:
|
|
489
|
-
callbackURL:
|
|
490
|
-
rememberMe:
|
|
491
|
-
},
|
|
485
|
+
use: ((inputContext: better_call4.MiddlewareInputContext<better_call4.MiddlewareOptions>) => Promise<void>)[];
|
|
486
|
+
body: zod0.ZodObject<{
|
|
487
|
+
email: zod0.ZodString;
|
|
488
|
+
password: zod0.ZodString;
|
|
489
|
+
callbackURL: zod0.ZodOptional<zod0.ZodString>;
|
|
490
|
+
rememberMe: zod0.ZodOptional<zod0.ZodDefault<zod0.ZodBoolean>>;
|
|
491
|
+
}, zod_v4_core0.$strip>;
|
|
492
492
|
metadata: {
|
|
493
493
|
allowedMediaTypes: string[];
|
|
494
494
|
$Infer: {
|
|
@@ -564,16 +564,16 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
564
564
|
image?: string | null | undefined;
|
|
565
565
|
} & (Option extends BetterAuthOptions ? AdditionalUserFieldsOutput<Option> : Option extends Auth ? AdditionalUserFieldsOutput<Option["options"]> : {})>>;
|
|
566
566
|
}>;
|
|
567
|
-
readonly resetPassword:
|
|
567
|
+
readonly resetPassword: better_call4.StrictEndpoint<"/reset-password", {
|
|
568
568
|
method: "POST";
|
|
569
569
|
operationId: string;
|
|
570
|
-
query:
|
|
571
|
-
token:
|
|
572
|
-
},
|
|
573
|
-
body:
|
|
574
|
-
newPassword:
|
|
575
|
-
token:
|
|
576
|
-
},
|
|
570
|
+
query: zod0.ZodOptional<zod0.ZodObject<{
|
|
571
|
+
token: zod0.ZodOptional<zod0.ZodString>;
|
|
572
|
+
}, zod_v4_core0.$strip>>;
|
|
573
|
+
body: zod0.ZodObject<{
|
|
574
|
+
newPassword: zod0.ZodString;
|
|
575
|
+
token: zod0.ZodOptional<zod0.ZodString>;
|
|
576
|
+
}, zod_v4_core0.$strip>;
|
|
577
577
|
metadata: {
|
|
578
578
|
openapi: {
|
|
579
579
|
operationId: string;
|
|
@@ -600,11 +600,11 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
600
600
|
}, {
|
|
601
601
|
status: boolean;
|
|
602
602
|
}>;
|
|
603
|
-
readonly verifyPassword:
|
|
603
|
+
readonly verifyPassword: better_call4.StrictEndpoint<"/verify-password", {
|
|
604
604
|
method: "POST";
|
|
605
|
-
body:
|
|
606
|
-
password:
|
|
607
|
-
},
|
|
605
|
+
body: zod0.ZodObject<{
|
|
606
|
+
password: zod0.ZodString;
|
|
607
|
+
}, zod_v4_core0.$strip>;
|
|
608
608
|
metadata: {
|
|
609
609
|
scope: "server";
|
|
610
610
|
openapi: {
|
|
@@ -629,7 +629,7 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
629
629
|
};
|
|
630
630
|
};
|
|
631
631
|
};
|
|
632
|
-
use: ((inputContext:
|
|
632
|
+
use: ((inputContext: better_call4.MiddlewareInputContext<better_call4.MiddlewareOptions>) => Promise<{
|
|
633
633
|
session: {
|
|
634
634
|
session: Record<string, any> & {
|
|
635
635
|
id: string;
|
|
@@ -655,14 +655,14 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
655
655
|
}, {
|
|
656
656
|
status: boolean;
|
|
657
657
|
}>;
|
|
658
|
-
readonly verifyEmail:
|
|
658
|
+
readonly verifyEmail: better_call4.StrictEndpoint<"/verify-email", {
|
|
659
659
|
method: "GET";
|
|
660
660
|
operationId: string;
|
|
661
|
-
query:
|
|
662
|
-
token:
|
|
663
|
-
callbackURL:
|
|
664
|
-
},
|
|
665
|
-
use: ((inputContext:
|
|
661
|
+
query: zod0.ZodObject<{
|
|
662
|
+
token: zod0.ZodString;
|
|
663
|
+
callbackURL: zod0.ZodOptional<zod0.ZodString>;
|
|
664
|
+
}, zod_v4_core0.$strip>;
|
|
665
|
+
use: ((inputContext: better_call4.MiddlewareInputContext<better_call4.MiddlewareOptions>) => Promise<void>)[];
|
|
666
666
|
metadata: {
|
|
667
667
|
openapi: {
|
|
668
668
|
description: string;
|
|
@@ -711,13 +711,13 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
711
711
|
}, void | {
|
|
712
712
|
status: boolean;
|
|
713
713
|
}>;
|
|
714
|
-
readonly sendVerificationEmail:
|
|
714
|
+
readonly sendVerificationEmail: better_call4.StrictEndpoint<"/send-verification-email", {
|
|
715
715
|
method: "POST";
|
|
716
716
|
operationId: string;
|
|
717
|
-
body:
|
|
718
|
-
email:
|
|
719
|
-
callbackURL:
|
|
720
|
-
},
|
|
717
|
+
body: zod0.ZodObject<{
|
|
718
|
+
email: zod0.ZodEmail;
|
|
719
|
+
callbackURL: zod0.ZodOptional<zod0.ZodString>;
|
|
720
|
+
}, zod_v4_core0.$strip>;
|
|
721
721
|
metadata: {
|
|
722
722
|
openapi: {
|
|
723
723
|
operationId: string;
|
|
@@ -786,13 +786,13 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
786
786
|
}, {
|
|
787
787
|
status: boolean;
|
|
788
788
|
}>;
|
|
789
|
-
readonly changeEmail:
|
|
789
|
+
readonly changeEmail: better_call4.StrictEndpoint<"/change-email", {
|
|
790
790
|
method: "POST";
|
|
791
|
-
body:
|
|
792
|
-
newEmail:
|
|
793
|
-
callbackURL:
|
|
794
|
-
},
|
|
795
|
-
use: ((inputContext:
|
|
791
|
+
body: zod0.ZodObject<{
|
|
792
|
+
newEmail: zod0.ZodEmail;
|
|
793
|
+
callbackURL: zod0.ZodOptional<zod0.ZodString>;
|
|
794
|
+
}, zod_v4_core0.$strip>;
|
|
795
|
+
use: ((inputContext: better_call4.MiddlewareInputContext<better_call4.MiddlewareOptions>) => Promise<{
|
|
796
796
|
session: {
|
|
797
797
|
session: Record<string, any> & {
|
|
798
798
|
id: string;
|
|
@@ -867,15 +867,15 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
867
867
|
}, {
|
|
868
868
|
status: boolean;
|
|
869
869
|
}>;
|
|
870
|
-
readonly changePassword:
|
|
870
|
+
readonly changePassword: better_call4.StrictEndpoint<"/change-password", {
|
|
871
871
|
method: "POST";
|
|
872
872
|
operationId: string;
|
|
873
|
-
body:
|
|
874
|
-
newPassword:
|
|
875
|
-
currentPassword:
|
|
876
|
-
revokeOtherSessions:
|
|
877
|
-
},
|
|
878
|
-
use: ((inputContext:
|
|
873
|
+
body: zod0.ZodObject<{
|
|
874
|
+
newPassword: zod0.ZodString;
|
|
875
|
+
currentPassword: zod0.ZodString;
|
|
876
|
+
revokeOtherSessions: zod0.ZodOptional<zod0.ZodBoolean>;
|
|
877
|
+
}, zod_v4_core0.$strip>;
|
|
878
|
+
use: ((inputContext: better_call4.MiddlewareInputContext<better_call4.MiddlewareOptions>) => Promise<{
|
|
879
879
|
session: {
|
|
880
880
|
session: Record<string, any> & {
|
|
881
881
|
id: string;
|
|
@@ -975,12 +975,12 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
975
975
|
updatedAt: Date;
|
|
976
976
|
};
|
|
977
977
|
}>;
|
|
978
|
-
readonly setPassword:
|
|
978
|
+
readonly setPassword: better_call4.StrictEndpoint<string, {
|
|
979
979
|
method: "POST";
|
|
980
|
-
body:
|
|
981
|
-
newPassword:
|
|
982
|
-
},
|
|
983
|
-
use: ((inputContext:
|
|
980
|
+
body: zod0.ZodObject<{
|
|
981
|
+
newPassword: zod0.ZodString;
|
|
982
|
+
}, zod_v4_core0.$strip>;
|
|
983
|
+
use: ((inputContext: better_call4.MiddlewareInputContext<better_call4.MiddlewareOptions>) => Promise<{
|
|
984
984
|
session: {
|
|
985
985
|
session: Record<string, any> & {
|
|
986
986
|
id: string;
|
|
@@ -1006,11 +1006,11 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1006
1006
|
}, {
|
|
1007
1007
|
status: boolean;
|
|
1008
1008
|
}>;
|
|
1009
|
-
readonly updateUser:
|
|
1009
|
+
readonly updateUser: better_call4.StrictEndpoint<"/update-user", {
|
|
1010
1010
|
method: "POST";
|
|
1011
1011
|
operationId: string;
|
|
1012
|
-
body:
|
|
1013
|
-
use: ((inputContext:
|
|
1012
|
+
body: zod0.ZodRecord<zod0.ZodString, zod0.ZodAny>;
|
|
1013
|
+
use: ((inputContext: better_call4.MiddlewareInputContext<better_call4.MiddlewareOptions>) => Promise<{
|
|
1014
1014
|
session: {
|
|
1015
1015
|
session: Record<string, any> & {
|
|
1016
1016
|
id: string;
|
|
@@ -1086,9 +1086,9 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1086
1086
|
}, {
|
|
1087
1087
|
status: boolean;
|
|
1088
1088
|
}>;
|
|
1089
|
-
readonly deleteUser:
|
|
1089
|
+
readonly deleteUser: better_call4.StrictEndpoint<"/delete-user", {
|
|
1090
1090
|
method: "POST";
|
|
1091
|
-
use: ((inputContext:
|
|
1091
|
+
use: ((inputContext: better_call4.MiddlewareInputContext<better_call4.MiddlewareOptions>) => Promise<{
|
|
1092
1092
|
session: {
|
|
1093
1093
|
session: Record<string, any> & {
|
|
1094
1094
|
id: string;
|
|
@@ -1111,11 +1111,11 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1111
1111
|
};
|
|
1112
1112
|
};
|
|
1113
1113
|
}>)[];
|
|
1114
|
-
body:
|
|
1115
|
-
callbackURL:
|
|
1116
|
-
password:
|
|
1117
|
-
token:
|
|
1118
|
-
},
|
|
1114
|
+
body: zod0.ZodObject<{
|
|
1115
|
+
callbackURL: zod0.ZodOptional<zod0.ZodString>;
|
|
1116
|
+
password: zod0.ZodOptional<zod0.ZodString>;
|
|
1117
|
+
token: zod0.ZodOptional<zod0.ZodString>;
|
|
1118
|
+
}, zod_v4_core0.$strip>;
|
|
1119
1119
|
metadata: {
|
|
1120
1120
|
openapi: {
|
|
1121
1121
|
operationId: string;
|
|
@@ -1173,12 +1173,12 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1173
1173
|
success: boolean;
|
|
1174
1174
|
message: string;
|
|
1175
1175
|
}>;
|
|
1176
|
-
readonly requestPasswordReset:
|
|
1176
|
+
readonly requestPasswordReset: better_call4.StrictEndpoint<"/request-password-reset", {
|
|
1177
1177
|
method: "POST";
|
|
1178
|
-
body:
|
|
1179
|
-
email:
|
|
1180
|
-
redirectTo:
|
|
1181
|
-
},
|
|
1178
|
+
body: zod0.ZodObject<{
|
|
1179
|
+
email: zod0.ZodEmail;
|
|
1180
|
+
redirectTo: zod0.ZodOptional<zod0.ZodString>;
|
|
1181
|
+
}, zod_v4_core0.$strip>;
|
|
1182
1182
|
metadata: {
|
|
1183
1183
|
openapi: {
|
|
1184
1184
|
operationId: string;
|
|
@@ -1209,13 +1209,13 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1209
1209
|
status: boolean;
|
|
1210
1210
|
message: string;
|
|
1211
1211
|
}>;
|
|
1212
|
-
readonly requestPasswordResetCallback:
|
|
1212
|
+
readonly requestPasswordResetCallback: better_call4.StrictEndpoint<"/reset-password/:token", {
|
|
1213
1213
|
method: "GET";
|
|
1214
1214
|
operationId: string;
|
|
1215
|
-
query:
|
|
1216
|
-
callbackURL:
|
|
1217
|
-
},
|
|
1218
|
-
use: ((inputContext:
|
|
1215
|
+
query: zod0.ZodObject<{
|
|
1216
|
+
callbackURL: zod0.ZodString;
|
|
1217
|
+
}, zod_v4_core0.$strip>;
|
|
1218
|
+
use: ((inputContext: better_call4.MiddlewareInputContext<better_call4.MiddlewareOptions>) => Promise<void>)[];
|
|
1219
1219
|
metadata: {
|
|
1220
1220
|
openapi: {
|
|
1221
1221
|
operationId: string;
|
|
@@ -1257,10 +1257,10 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1257
1257
|
};
|
|
1258
1258
|
};
|
|
1259
1259
|
}, never>;
|
|
1260
|
-
readonly listSessions:
|
|
1260
|
+
readonly listSessions: better_call4.StrictEndpoint<"/list-sessions", {
|
|
1261
1261
|
method: "GET";
|
|
1262
1262
|
operationId: string;
|
|
1263
|
-
use: ((inputContext:
|
|
1263
|
+
use: ((inputContext: better_call4.MiddlewareInputContext<better_call4.MiddlewareOptions>) => Promise<{
|
|
1264
1264
|
session: {
|
|
1265
1265
|
session: Record<string, any> & {
|
|
1266
1266
|
id: string;
|
|
@@ -1315,12 +1315,12 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1315
1315
|
ipAddress?: string | null | undefined;
|
|
1316
1316
|
userAgent?: string | null | undefined;
|
|
1317
1317
|
} & (Option extends BetterAuthOptions ? AdditionalSessionFieldsOutput<Option> : Option extends Auth ? AdditionalSessionFieldsOutput<Option["options"]> : {})>>>[]>;
|
|
1318
|
-
readonly revokeSession:
|
|
1318
|
+
readonly revokeSession: better_call4.StrictEndpoint<"/revoke-session", {
|
|
1319
1319
|
method: "POST";
|
|
1320
|
-
body:
|
|
1321
|
-
token:
|
|
1322
|
-
},
|
|
1323
|
-
use: ((inputContext:
|
|
1320
|
+
body: zod0.ZodObject<{
|
|
1321
|
+
token: zod0.ZodString;
|
|
1322
|
+
}, zod_v4_core0.$strip>;
|
|
1323
|
+
use: ((inputContext: better_call4.MiddlewareInputContext<better_call4.MiddlewareOptions>) => Promise<{
|
|
1324
1324
|
session: {
|
|
1325
1325
|
session: Record<string, any> & {
|
|
1326
1326
|
id: string;
|
|
@@ -1387,9 +1387,9 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1387
1387
|
}, {
|
|
1388
1388
|
status: boolean;
|
|
1389
1389
|
}>;
|
|
1390
|
-
readonly revokeSessions:
|
|
1390
|
+
readonly revokeSessions: better_call4.StrictEndpoint<"/revoke-sessions", {
|
|
1391
1391
|
method: "POST";
|
|
1392
|
-
use: ((inputContext:
|
|
1392
|
+
use: ((inputContext: better_call4.MiddlewareInputContext<better_call4.MiddlewareOptions>) => Promise<{
|
|
1393
1393
|
session: {
|
|
1394
1394
|
session: Record<string, any> & {
|
|
1395
1395
|
id: string;
|
|
@@ -1440,10 +1440,10 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1440
1440
|
}, {
|
|
1441
1441
|
status: boolean;
|
|
1442
1442
|
}>;
|
|
1443
|
-
readonly revokeOtherSessions:
|
|
1443
|
+
readonly revokeOtherSessions: better_call4.StrictEndpoint<"/revoke-other-sessions", {
|
|
1444
1444
|
method: "POST";
|
|
1445
1445
|
requireHeaders: true;
|
|
1446
|
-
use: ((inputContext:
|
|
1446
|
+
use: ((inputContext: better_call4.MiddlewareInputContext<better_call4.MiddlewareOptions>) => Promise<{
|
|
1447
1447
|
session: {
|
|
1448
1448
|
session: Record<string, any> & {
|
|
1449
1449
|
id: string;
|
|
@@ -1493,26 +1493,26 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1493
1493
|
}, {
|
|
1494
1494
|
status: boolean;
|
|
1495
1495
|
}>;
|
|
1496
|
-
readonly linkSocialAccount:
|
|
1496
|
+
readonly linkSocialAccount: better_call4.StrictEndpoint<"/link-social", {
|
|
1497
1497
|
method: "POST";
|
|
1498
1498
|
requireHeaders: true;
|
|
1499
|
-
body:
|
|
1500
|
-
callbackURL:
|
|
1501
|
-
provider:
|
|
1502
|
-
idToken:
|
|
1503
|
-
token:
|
|
1504
|
-
nonce:
|
|
1505
|
-
accessToken:
|
|
1506
|
-
refreshToken:
|
|
1507
|
-
scopes:
|
|
1508
|
-
},
|
|
1509
|
-
requestSignUp:
|
|
1510
|
-
scopes:
|
|
1511
|
-
errorCallbackURL:
|
|
1512
|
-
disableRedirect:
|
|
1513
|
-
additionalData:
|
|
1514
|
-
},
|
|
1515
|
-
use: ((inputContext:
|
|
1499
|
+
body: zod0.ZodObject<{
|
|
1500
|
+
callbackURL: zod0.ZodOptional<zod0.ZodString>;
|
|
1501
|
+
provider: zod0.ZodType<"github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "vercel" | (string & {}), unknown, zod_v4_core0.$ZodTypeInternals<"github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "vercel" | (string & {}), unknown>>;
|
|
1502
|
+
idToken: zod0.ZodOptional<zod0.ZodObject<{
|
|
1503
|
+
token: zod0.ZodString;
|
|
1504
|
+
nonce: zod0.ZodOptional<zod0.ZodString>;
|
|
1505
|
+
accessToken: zod0.ZodOptional<zod0.ZodString>;
|
|
1506
|
+
refreshToken: zod0.ZodOptional<zod0.ZodString>;
|
|
1507
|
+
scopes: zod0.ZodOptional<zod0.ZodArray<zod0.ZodString>>;
|
|
1508
|
+
}, zod_v4_core0.$strip>>;
|
|
1509
|
+
requestSignUp: zod0.ZodOptional<zod0.ZodBoolean>;
|
|
1510
|
+
scopes: zod0.ZodOptional<zod0.ZodArray<zod0.ZodString>>;
|
|
1511
|
+
errorCallbackURL: zod0.ZodOptional<zod0.ZodString>;
|
|
1512
|
+
disableRedirect: zod0.ZodOptional<zod0.ZodBoolean>;
|
|
1513
|
+
additionalData: zod0.ZodOptional<zod0.ZodRecord<zod0.ZodString, zod0.ZodAny>>;
|
|
1514
|
+
}, zod_v4_core0.$strip>;
|
|
1515
|
+
use: ((inputContext: better_call4.MiddlewareInputContext<better_call4.MiddlewareOptions>) => Promise<{
|
|
1516
1516
|
session: {
|
|
1517
1517
|
session: Record<string, any> & {
|
|
1518
1518
|
id: string;
|
|
@@ -1571,9 +1571,9 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1571
1571
|
url: string;
|
|
1572
1572
|
redirect: boolean;
|
|
1573
1573
|
}>;
|
|
1574
|
-
readonly listUserAccounts:
|
|
1574
|
+
readonly listUserAccounts: better_call4.StrictEndpoint<"/list-accounts", {
|
|
1575
1575
|
method: "GET";
|
|
1576
|
-
use: ((inputContext:
|
|
1576
|
+
use: ((inputContext: better_call4.MiddlewareInputContext<better_call4.MiddlewareOptions>) => Promise<{
|
|
1577
1577
|
session: {
|
|
1578
1578
|
session: Record<string, any> & {
|
|
1579
1579
|
id: string;
|
|
@@ -1655,13 +1655,13 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1655
1655
|
userId: string;
|
|
1656
1656
|
scopes: string[];
|
|
1657
1657
|
}[]>;
|
|
1658
|
-
readonly deleteUserCallback:
|
|
1658
|
+
readonly deleteUserCallback: better_call4.StrictEndpoint<"/delete-user/callback", {
|
|
1659
1659
|
method: "GET";
|
|
1660
|
-
query:
|
|
1661
|
-
token:
|
|
1662
|
-
callbackURL:
|
|
1663
|
-
},
|
|
1664
|
-
use: ((inputContext:
|
|
1660
|
+
query: zod0.ZodObject<{
|
|
1661
|
+
token: zod0.ZodString;
|
|
1662
|
+
callbackURL: zod0.ZodOptional<zod0.ZodString>;
|
|
1663
|
+
}, zod_v4_core0.$strip>;
|
|
1664
|
+
use: ((inputContext: better_call4.MiddlewareInputContext<better_call4.MiddlewareOptions>) => Promise<void>)[];
|
|
1665
1665
|
metadata: {
|
|
1666
1666
|
openapi: {
|
|
1667
1667
|
description: string;
|
|
@@ -1695,13 +1695,13 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1695
1695
|
success: boolean;
|
|
1696
1696
|
message: string;
|
|
1697
1697
|
}>;
|
|
1698
|
-
readonly unlinkAccount:
|
|
1698
|
+
readonly unlinkAccount: better_call4.StrictEndpoint<"/unlink-account", {
|
|
1699
1699
|
method: "POST";
|
|
1700
|
-
body:
|
|
1701
|
-
providerId:
|
|
1702
|
-
accountId:
|
|
1703
|
-
},
|
|
1704
|
-
use: ((inputContext:
|
|
1700
|
+
body: zod0.ZodObject<{
|
|
1701
|
+
providerId: zod0.ZodString;
|
|
1702
|
+
accountId: zod0.ZodOptional<zod0.ZodString>;
|
|
1703
|
+
}, zod_v4_core0.$strip>;
|
|
1704
|
+
use: ((inputContext: better_call4.MiddlewareInputContext<better_call4.MiddlewareOptions>) => Promise<{
|
|
1705
1705
|
session: {
|
|
1706
1706
|
session: Record<string, any> & {
|
|
1707
1707
|
id: string;
|
|
@@ -1749,13 +1749,13 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1749
1749
|
}, {
|
|
1750
1750
|
status: boolean;
|
|
1751
1751
|
}>;
|
|
1752
|
-
readonly refreshToken:
|
|
1752
|
+
readonly refreshToken: better_call4.StrictEndpoint<"/refresh-token", {
|
|
1753
1753
|
method: "POST";
|
|
1754
|
-
body:
|
|
1755
|
-
providerId:
|
|
1756
|
-
accountId:
|
|
1757
|
-
userId:
|
|
1758
|
-
},
|
|
1754
|
+
body: zod0.ZodObject<{
|
|
1755
|
+
providerId: zod0.ZodString;
|
|
1756
|
+
accountId: zod0.ZodOptional<zod0.ZodString>;
|
|
1757
|
+
userId: zod0.ZodOptional<zod0.ZodString>;
|
|
1758
|
+
}, zod_v4_core0.$strip>;
|
|
1759
1759
|
metadata: {
|
|
1760
1760
|
openapi: {
|
|
1761
1761
|
description: string;
|
|
@@ -1808,13 +1808,13 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1808
1808
|
providerId: string;
|
|
1809
1809
|
accountId: string;
|
|
1810
1810
|
}>;
|
|
1811
|
-
readonly getAccessToken:
|
|
1811
|
+
readonly getAccessToken: better_call4.StrictEndpoint<"/get-access-token", {
|
|
1812
1812
|
method: "POST";
|
|
1813
|
-
body:
|
|
1814
|
-
providerId:
|
|
1815
|
-
accountId:
|
|
1816
|
-
userId:
|
|
1817
|
-
},
|
|
1813
|
+
body: zod0.ZodObject<{
|
|
1814
|
+
providerId: zod0.ZodString;
|
|
1815
|
+
accountId: zod0.ZodOptional<zod0.ZodString>;
|
|
1816
|
+
userId: zod0.ZodOptional<zod0.ZodString>;
|
|
1817
|
+
}, zod_v4_core0.$strip>;
|
|
1818
1818
|
metadata: {
|
|
1819
1819
|
openapi: {
|
|
1820
1820
|
description: string;
|
|
@@ -1863,9 +1863,9 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1863
1863
|
scopes: string[];
|
|
1864
1864
|
idToken: string | undefined;
|
|
1865
1865
|
}>;
|
|
1866
|
-
readonly accountInfo:
|
|
1866
|
+
readonly accountInfo: better_call4.StrictEndpoint<"/account-info", {
|
|
1867
1867
|
method: "GET";
|
|
1868
|
-
use: ((inputContext:
|
|
1868
|
+
use: ((inputContext: better_call4.MiddlewareInputContext<better_call4.MiddlewareOptions>) => Promise<{
|
|
1869
1869
|
session: {
|
|
1870
1870
|
session: Record<string, any> & {
|
|
1871
1871
|
id: string;
|
|
@@ -1935,9 +1935,9 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1935
1935
|
};
|
|
1936
1936
|
};
|
|
1937
1937
|
};
|
|
1938
|
-
query:
|
|
1939
|
-
accountId:
|
|
1940
|
-
},
|
|
1938
|
+
query: zod0.ZodOptional<zod0.ZodObject<{
|
|
1939
|
+
accountId: zod0.ZodOptional<zod0.ZodString>;
|
|
1940
|
+
}, zod_v4_core0.$strip>>;
|
|
1941
1941
|
}, {
|
|
1942
1942
|
user: _better_auth_core_oauth20.OAuth2UserInfo;
|
|
1943
1943
|
data: Record<string, any>;
|
|
@@ -1953,7 +1953,7 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1953
1953
|
declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, options: Option) => {
|
|
1954
1954
|
handler: (request: Request) => Promise<Response>;
|
|
1955
1955
|
endpoints: {
|
|
1956
|
-
readonly ok:
|
|
1956
|
+
readonly ok: better_call4.StrictEndpoint<"/ok", {
|
|
1957
1957
|
method: "GET";
|
|
1958
1958
|
metadata: {
|
|
1959
1959
|
openapi: {
|
|
@@ -1983,7 +1983,7 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
1983
1983
|
}, {
|
|
1984
1984
|
ok: boolean;
|
|
1985
1985
|
}>;
|
|
1986
|
-
readonly error:
|
|
1986
|
+
readonly error: better_call4.StrictEndpoint<"/error", {
|
|
1987
1987
|
method: "GET";
|
|
1988
1988
|
metadata: {
|
|
1989
1989
|
openapi: {
|
|
@@ -2005,47 +2005,47 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2005
2005
|
scope: "server";
|
|
2006
2006
|
};
|
|
2007
2007
|
}, Response>;
|
|
2008
|
-
readonly signInSocial:
|
|
2008
|
+
readonly signInSocial: better_call4.StrictEndpoint<"/sign-in/social", {
|
|
2009
2009
|
method: "POST";
|
|
2010
2010
|
operationId: string;
|
|
2011
|
-
body:
|
|
2012
|
-
callbackURL:
|
|
2013
|
-
newUserCallbackURL:
|
|
2014
|
-
errorCallbackURL:
|
|
2015
|
-
provider:
|
|
2016
|
-
disableRedirect:
|
|
2017
|
-
idToken:
|
|
2018
|
-
token:
|
|
2019
|
-
nonce:
|
|
2020
|
-
accessToken:
|
|
2021
|
-
refreshToken:
|
|
2022
|
-
expiresAt:
|
|
2023
|
-
},
|
|
2024
|
-
scopes:
|
|
2025
|
-
requestSignUp:
|
|
2026
|
-
loginHint:
|
|
2027
|
-
additionalData:
|
|
2028
|
-
},
|
|
2011
|
+
body: zod0.ZodObject<{
|
|
2012
|
+
callbackURL: zod0.ZodOptional<zod0.ZodString>;
|
|
2013
|
+
newUserCallbackURL: zod0.ZodOptional<zod0.ZodString>;
|
|
2014
|
+
errorCallbackURL: zod0.ZodOptional<zod0.ZodString>;
|
|
2015
|
+
provider: zod0.ZodType<"github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "vercel" | (string & {}), unknown, zod_v4_core0.$ZodTypeInternals<"github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "vercel" | (string & {}), unknown>>;
|
|
2016
|
+
disableRedirect: zod0.ZodOptional<zod0.ZodBoolean>;
|
|
2017
|
+
idToken: zod0.ZodOptional<zod0.ZodObject<{
|
|
2018
|
+
token: zod0.ZodString;
|
|
2019
|
+
nonce: zod0.ZodOptional<zod0.ZodString>;
|
|
2020
|
+
accessToken: zod0.ZodOptional<zod0.ZodString>;
|
|
2021
|
+
refreshToken: zod0.ZodOptional<zod0.ZodString>;
|
|
2022
|
+
expiresAt: zod0.ZodOptional<zod0.ZodNumber>;
|
|
2023
|
+
}, zod_v4_core0.$strip>>;
|
|
2024
|
+
scopes: zod0.ZodOptional<zod0.ZodArray<zod0.ZodString>>;
|
|
2025
|
+
requestSignUp: zod0.ZodOptional<zod0.ZodBoolean>;
|
|
2026
|
+
loginHint: zod0.ZodOptional<zod0.ZodString>;
|
|
2027
|
+
additionalData: zod0.ZodOptional<zod0.ZodRecord<zod0.ZodString, zod0.ZodAny>>;
|
|
2028
|
+
}, zod_v4_core0.$strip>;
|
|
2029
2029
|
metadata: {
|
|
2030
2030
|
$Infer: {
|
|
2031
|
-
body:
|
|
2032
|
-
callbackURL:
|
|
2033
|
-
newUserCallbackURL:
|
|
2034
|
-
errorCallbackURL:
|
|
2035
|
-
provider:
|
|
2036
|
-
disableRedirect:
|
|
2037
|
-
idToken:
|
|
2038
|
-
token:
|
|
2039
|
-
nonce:
|
|
2040
|
-
accessToken:
|
|
2041
|
-
refreshToken:
|
|
2042
|
-
expiresAt:
|
|
2043
|
-
},
|
|
2044
|
-
scopes:
|
|
2045
|
-
requestSignUp:
|
|
2046
|
-
loginHint:
|
|
2047
|
-
additionalData:
|
|
2048
|
-
},
|
|
2031
|
+
body: zod0.infer<zod0.ZodObject<{
|
|
2032
|
+
callbackURL: zod0.ZodOptional<zod0.ZodString>;
|
|
2033
|
+
newUserCallbackURL: zod0.ZodOptional<zod0.ZodString>;
|
|
2034
|
+
errorCallbackURL: zod0.ZodOptional<zod0.ZodString>;
|
|
2035
|
+
provider: zod0.ZodType<"github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "vercel" | (string & {}), unknown, zod_v4_core0.$ZodTypeInternals<"github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "vercel" | (string & {}), unknown>>;
|
|
2036
|
+
disableRedirect: zod0.ZodOptional<zod0.ZodBoolean>;
|
|
2037
|
+
idToken: zod0.ZodOptional<zod0.ZodObject<{
|
|
2038
|
+
token: zod0.ZodString;
|
|
2039
|
+
nonce: zod0.ZodOptional<zod0.ZodString>;
|
|
2040
|
+
accessToken: zod0.ZodOptional<zod0.ZodString>;
|
|
2041
|
+
refreshToken: zod0.ZodOptional<zod0.ZodString>;
|
|
2042
|
+
expiresAt: zod0.ZodOptional<zod0.ZodNumber>;
|
|
2043
|
+
}, zod_v4_core0.$strip>>;
|
|
2044
|
+
scopes: zod0.ZodOptional<zod0.ZodArray<zod0.ZodString>>;
|
|
2045
|
+
requestSignUp: zod0.ZodOptional<zod0.ZodBoolean>;
|
|
2046
|
+
loginHint: zod0.ZodOptional<zod0.ZodString>;
|
|
2047
|
+
additionalData: zod0.ZodOptional<zod0.ZodRecord<zod0.ZodString, zod0.ZodAny>>;
|
|
2048
|
+
}, zod_v4_core0.$strip>>;
|
|
2049
2049
|
returned: {
|
|
2050
2050
|
redirect: boolean;
|
|
2051
2051
|
token?: string | undefined;
|
|
@@ -2113,37 +2113,37 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2113
2113
|
image?: string | null | undefined;
|
|
2114
2114
|
} & (Option extends BetterAuthOptions ? AdditionalUserFieldsOutput<Option> : Option extends Auth ? AdditionalUserFieldsOutput<Option["options"]> : {})>>;
|
|
2115
2115
|
}>;
|
|
2116
|
-
readonly callbackOAuth:
|
|
2116
|
+
readonly callbackOAuth: better_call4.StrictEndpoint<"/callback/:id", {
|
|
2117
2117
|
method: ("GET" | "POST")[];
|
|
2118
2118
|
operationId: string;
|
|
2119
|
-
body:
|
|
2120
|
-
code:
|
|
2121
|
-
error:
|
|
2122
|
-
device_id:
|
|
2123
|
-
error_description:
|
|
2124
|
-
state:
|
|
2125
|
-
user:
|
|
2126
|
-
},
|
|
2127
|
-
query:
|
|
2128
|
-
code:
|
|
2129
|
-
error:
|
|
2130
|
-
device_id:
|
|
2131
|
-
error_description:
|
|
2132
|
-
state:
|
|
2133
|
-
user:
|
|
2134
|
-
},
|
|
2119
|
+
body: zod0.ZodOptional<zod0.ZodObject<{
|
|
2120
|
+
code: zod0.ZodOptional<zod0.ZodString>;
|
|
2121
|
+
error: zod0.ZodOptional<zod0.ZodString>;
|
|
2122
|
+
device_id: zod0.ZodOptional<zod0.ZodString>;
|
|
2123
|
+
error_description: zod0.ZodOptional<zod0.ZodString>;
|
|
2124
|
+
state: zod0.ZodOptional<zod0.ZodString>;
|
|
2125
|
+
user: zod0.ZodOptional<zod0.ZodString>;
|
|
2126
|
+
}, zod_v4_core0.$strip>>;
|
|
2127
|
+
query: zod0.ZodOptional<zod0.ZodObject<{
|
|
2128
|
+
code: zod0.ZodOptional<zod0.ZodString>;
|
|
2129
|
+
error: zod0.ZodOptional<zod0.ZodString>;
|
|
2130
|
+
device_id: zod0.ZodOptional<zod0.ZodString>;
|
|
2131
|
+
error_description: zod0.ZodOptional<zod0.ZodString>;
|
|
2132
|
+
state: zod0.ZodOptional<zod0.ZodString>;
|
|
2133
|
+
user: zod0.ZodOptional<zod0.ZodString>;
|
|
2134
|
+
}, zod_v4_core0.$strip>>;
|
|
2135
2135
|
metadata: {
|
|
2136
2136
|
allowedMediaTypes: string[];
|
|
2137
2137
|
scope: "server";
|
|
2138
2138
|
};
|
|
2139
2139
|
}, void>;
|
|
2140
|
-
readonly getSession:
|
|
2140
|
+
readonly getSession: better_call4.StrictEndpoint<"/get-session", {
|
|
2141
2141
|
method: "GET";
|
|
2142
2142
|
operationId: string;
|
|
2143
|
-
query:
|
|
2144
|
-
disableCookieCache:
|
|
2145
|
-
disableRefresh:
|
|
2146
|
-
},
|
|
2143
|
+
query: zod0.ZodOptional<zod0.ZodObject<{
|
|
2144
|
+
disableCookieCache: zod0.ZodOptional<zod0.ZodCoercedBoolean<unknown>>;
|
|
2145
|
+
disableRefresh: zod0.ZodOptional<zod0.ZodCoercedBoolean<unknown>>;
|
|
2146
|
+
}, zod_v4_core0.$strip>>;
|
|
2147
2147
|
requireHeaders: true;
|
|
2148
2148
|
metadata: {
|
|
2149
2149
|
openapi: {
|
|
@@ -2194,7 +2194,7 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2194
2194
|
image?: string | null | undefined;
|
|
2195
2195
|
} & (Option extends BetterAuthOptions ? AdditionalUserFieldsOutput<Option> : Option extends Auth ? AdditionalUserFieldsOutput<Option["options"]> : {})>>;
|
|
2196
2196
|
} | null>;
|
|
2197
|
-
readonly signOut:
|
|
2197
|
+
readonly signOut: better_call4.StrictEndpoint<"/sign-out", {
|
|
2198
2198
|
method: "POST";
|
|
2199
2199
|
operationId: string;
|
|
2200
2200
|
requireHeaders: true;
|
|
@@ -2224,18 +2224,18 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2224
2224
|
}, {
|
|
2225
2225
|
success: boolean;
|
|
2226
2226
|
}>;
|
|
2227
|
-
readonly signUpEmail:
|
|
2227
|
+
readonly signUpEmail: better_call4.StrictEndpoint<"/sign-up/email", {
|
|
2228
2228
|
method: "POST";
|
|
2229
2229
|
operationId: string;
|
|
2230
|
-
use: ((inputContext:
|
|
2231
|
-
body:
|
|
2232
|
-
name:
|
|
2233
|
-
email:
|
|
2234
|
-
password:
|
|
2235
|
-
image:
|
|
2236
|
-
callbackURL:
|
|
2237
|
-
rememberMe:
|
|
2238
|
-
},
|
|
2230
|
+
use: ((inputContext: better_call4.MiddlewareInputContext<better_call4.MiddlewareOptions>) => Promise<void>)[];
|
|
2231
|
+
body: zod0.ZodIntersection<zod0.ZodObject<{
|
|
2232
|
+
name: zod0.ZodString;
|
|
2233
|
+
email: zod0.ZodEmail;
|
|
2234
|
+
password: zod0.ZodString;
|
|
2235
|
+
image: zod0.ZodOptional<zod0.ZodString>;
|
|
2236
|
+
callbackURL: zod0.ZodOptional<zod0.ZodString>;
|
|
2237
|
+
rememberMe: zod0.ZodOptional<zod0.ZodBoolean>;
|
|
2238
|
+
}, zod_v4_core0.$strip>, zod0.ZodRecord<zod0.ZodString, zod0.ZodAny>>;
|
|
2239
2239
|
metadata: {
|
|
2240
2240
|
allowedMediaTypes: string[];
|
|
2241
2241
|
$Infer: {
|
|
@@ -2398,16 +2398,16 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2398
2398
|
image?: string | null | undefined;
|
|
2399
2399
|
} & (Option extends BetterAuthOptions ? AdditionalUserFieldsOutput<Option> : Option extends Auth ? AdditionalUserFieldsOutput<Option["options"]> : {})>>;
|
|
2400
2400
|
}>;
|
|
2401
|
-
readonly signInEmail:
|
|
2401
|
+
readonly signInEmail: better_call4.StrictEndpoint<"/sign-in/email", {
|
|
2402
2402
|
method: "POST";
|
|
2403
2403
|
operationId: string;
|
|
2404
|
-
use: ((inputContext:
|
|
2405
|
-
body:
|
|
2406
|
-
email:
|
|
2407
|
-
password:
|
|
2408
|
-
callbackURL:
|
|
2409
|
-
rememberMe:
|
|
2410
|
-
},
|
|
2404
|
+
use: ((inputContext: better_call4.MiddlewareInputContext<better_call4.MiddlewareOptions>) => Promise<void>)[];
|
|
2405
|
+
body: zod0.ZodObject<{
|
|
2406
|
+
email: zod0.ZodString;
|
|
2407
|
+
password: zod0.ZodString;
|
|
2408
|
+
callbackURL: zod0.ZodOptional<zod0.ZodString>;
|
|
2409
|
+
rememberMe: zod0.ZodOptional<zod0.ZodDefault<zod0.ZodBoolean>>;
|
|
2410
|
+
}, zod_v4_core0.$strip>;
|
|
2411
2411
|
metadata: {
|
|
2412
2412
|
allowedMediaTypes: string[];
|
|
2413
2413
|
$Infer: {
|
|
@@ -2483,16 +2483,16 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2483
2483
|
image?: string | null | undefined;
|
|
2484
2484
|
} & (Option extends BetterAuthOptions ? AdditionalUserFieldsOutput<Option> : Option extends Auth ? AdditionalUserFieldsOutput<Option["options"]> : {})>>;
|
|
2485
2485
|
}>;
|
|
2486
|
-
readonly resetPassword:
|
|
2486
|
+
readonly resetPassword: better_call4.StrictEndpoint<"/reset-password", {
|
|
2487
2487
|
method: "POST";
|
|
2488
2488
|
operationId: string;
|
|
2489
|
-
query:
|
|
2490
|
-
token:
|
|
2491
|
-
},
|
|
2492
|
-
body:
|
|
2493
|
-
newPassword:
|
|
2494
|
-
token:
|
|
2495
|
-
},
|
|
2489
|
+
query: zod0.ZodOptional<zod0.ZodObject<{
|
|
2490
|
+
token: zod0.ZodOptional<zod0.ZodString>;
|
|
2491
|
+
}, zod_v4_core0.$strip>>;
|
|
2492
|
+
body: zod0.ZodObject<{
|
|
2493
|
+
newPassword: zod0.ZodString;
|
|
2494
|
+
token: zod0.ZodOptional<zod0.ZodString>;
|
|
2495
|
+
}, zod_v4_core0.$strip>;
|
|
2496
2496
|
metadata: {
|
|
2497
2497
|
openapi: {
|
|
2498
2498
|
operationId: string;
|
|
@@ -2519,11 +2519,11 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2519
2519
|
}, {
|
|
2520
2520
|
status: boolean;
|
|
2521
2521
|
}>;
|
|
2522
|
-
readonly verifyPassword:
|
|
2522
|
+
readonly verifyPassword: better_call4.StrictEndpoint<"/verify-password", {
|
|
2523
2523
|
method: "POST";
|
|
2524
|
-
body:
|
|
2525
|
-
password:
|
|
2526
|
-
},
|
|
2524
|
+
body: zod0.ZodObject<{
|
|
2525
|
+
password: zod0.ZodString;
|
|
2526
|
+
}, zod_v4_core0.$strip>;
|
|
2527
2527
|
metadata: {
|
|
2528
2528
|
scope: "server";
|
|
2529
2529
|
openapi: {
|
|
@@ -2548,7 +2548,7 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2548
2548
|
};
|
|
2549
2549
|
};
|
|
2550
2550
|
};
|
|
2551
|
-
use: ((inputContext:
|
|
2551
|
+
use: ((inputContext: better_call4.MiddlewareInputContext<better_call4.MiddlewareOptions>) => Promise<{
|
|
2552
2552
|
session: {
|
|
2553
2553
|
session: Record<string, any> & {
|
|
2554
2554
|
id: string;
|
|
@@ -2574,14 +2574,14 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2574
2574
|
}, {
|
|
2575
2575
|
status: boolean;
|
|
2576
2576
|
}>;
|
|
2577
|
-
readonly verifyEmail:
|
|
2577
|
+
readonly verifyEmail: better_call4.StrictEndpoint<"/verify-email", {
|
|
2578
2578
|
method: "GET";
|
|
2579
2579
|
operationId: string;
|
|
2580
|
-
query:
|
|
2581
|
-
token:
|
|
2582
|
-
callbackURL:
|
|
2583
|
-
},
|
|
2584
|
-
use: ((inputContext:
|
|
2580
|
+
query: zod0.ZodObject<{
|
|
2581
|
+
token: zod0.ZodString;
|
|
2582
|
+
callbackURL: zod0.ZodOptional<zod0.ZodString>;
|
|
2583
|
+
}, zod_v4_core0.$strip>;
|
|
2584
|
+
use: ((inputContext: better_call4.MiddlewareInputContext<better_call4.MiddlewareOptions>) => Promise<void>)[];
|
|
2585
2585
|
metadata: {
|
|
2586
2586
|
openapi: {
|
|
2587
2587
|
description: string;
|
|
@@ -2630,13 +2630,13 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2630
2630
|
}, void | {
|
|
2631
2631
|
status: boolean;
|
|
2632
2632
|
}>;
|
|
2633
|
-
readonly sendVerificationEmail:
|
|
2633
|
+
readonly sendVerificationEmail: better_call4.StrictEndpoint<"/send-verification-email", {
|
|
2634
2634
|
method: "POST";
|
|
2635
2635
|
operationId: string;
|
|
2636
|
-
body:
|
|
2637
|
-
email:
|
|
2638
|
-
callbackURL:
|
|
2639
|
-
},
|
|
2636
|
+
body: zod0.ZodObject<{
|
|
2637
|
+
email: zod0.ZodEmail;
|
|
2638
|
+
callbackURL: zod0.ZodOptional<zod0.ZodString>;
|
|
2639
|
+
}, zod_v4_core0.$strip>;
|
|
2640
2640
|
metadata: {
|
|
2641
2641
|
openapi: {
|
|
2642
2642
|
operationId: string;
|
|
@@ -2705,13 +2705,13 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2705
2705
|
}, {
|
|
2706
2706
|
status: boolean;
|
|
2707
2707
|
}>;
|
|
2708
|
-
readonly changeEmail:
|
|
2708
|
+
readonly changeEmail: better_call4.StrictEndpoint<"/change-email", {
|
|
2709
2709
|
method: "POST";
|
|
2710
|
-
body:
|
|
2711
|
-
newEmail:
|
|
2712
|
-
callbackURL:
|
|
2713
|
-
},
|
|
2714
|
-
use: ((inputContext:
|
|
2710
|
+
body: zod0.ZodObject<{
|
|
2711
|
+
newEmail: zod0.ZodEmail;
|
|
2712
|
+
callbackURL: zod0.ZodOptional<zod0.ZodString>;
|
|
2713
|
+
}, zod_v4_core0.$strip>;
|
|
2714
|
+
use: ((inputContext: better_call4.MiddlewareInputContext<better_call4.MiddlewareOptions>) => Promise<{
|
|
2715
2715
|
session: {
|
|
2716
2716
|
session: Record<string, any> & {
|
|
2717
2717
|
id: string;
|
|
@@ -2786,15 +2786,15 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2786
2786
|
}, {
|
|
2787
2787
|
status: boolean;
|
|
2788
2788
|
}>;
|
|
2789
|
-
readonly changePassword:
|
|
2789
|
+
readonly changePassword: better_call4.StrictEndpoint<"/change-password", {
|
|
2790
2790
|
method: "POST";
|
|
2791
2791
|
operationId: string;
|
|
2792
|
-
body:
|
|
2793
|
-
newPassword:
|
|
2794
|
-
currentPassword:
|
|
2795
|
-
revokeOtherSessions:
|
|
2796
|
-
},
|
|
2797
|
-
use: ((inputContext:
|
|
2792
|
+
body: zod0.ZodObject<{
|
|
2793
|
+
newPassword: zod0.ZodString;
|
|
2794
|
+
currentPassword: zod0.ZodString;
|
|
2795
|
+
revokeOtherSessions: zod0.ZodOptional<zod0.ZodBoolean>;
|
|
2796
|
+
}, zod_v4_core0.$strip>;
|
|
2797
|
+
use: ((inputContext: better_call4.MiddlewareInputContext<better_call4.MiddlewareOptions>) => Promise<{
|
|
2798
2798
|
session: {
|
|
2799
2799
|
session: Record<string, any> & {
|
|
2800
2800
|
id: string;
|
|
@@ -2894,12 +2894,12 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2894
2894
|
updatedAt: Date;
|
|
2895
2895
|
};
|
|
2896
2896
|
}>;
|
|
2897
|
-
readonly setPassword:
|
|
2897
|
+
readonly setPassword: better_call4.StrictEndpoint<string, {
|
|
2898
2898
|
method: "POST";
|
|
2899
|
-
body:
|
|
2900
|
-
newPassword:
|
|
2901
|
-
},
|
|
2902
|
-
use: ((inputContext:
|
|
2899
|
+
body: zod0.ZodObject<{
|
|
2900
|
+
newPassword: zod0.ZodString;
|
|
2901
|
+
}, zod_v4_core0.$strip>;
|
|
2902
|
+
use: ((inputContext: better_call4.MiddlewareInputContext<better_call4.MiddlewareOptions>) => Promise<{
|
|
2903
2903
|
session: {
|
|
2904
2904
|
session: Record<string, any> & {
|
|
2905
2905
|
id: string;
|
|
@@ -2925,11 +2925,11 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2925
2925
|
}, {
|
|
2926
2926
|
status: boolean;
|
|
2927
2927
|
}>;
|
|
2928
|
-
readonly updateUser:
|
|
2928
|
+
readonly updateUser: better_call4.StrictEndpoint<"/update-user", {
|
|
2929
2929
|
method: "POST";
|
|
2930
2930
|
operationId: string;
|
|
2931
|
-
body:
|
|
2932
|
-
use: ((inputContext:
|
|
2931
|
+
body: zod0.ZodRecord<zod0.ZodString, zod0.ZodAny>;
|
|
2932
|
+
use: ((inputContext: better_call4.MiddlewareInputContext<better_call4.MiddlewareOptions>) => Promise<{
|
|
2933
2933
|
session: {
|
|
2934
2934
|
session: Record<string, any> & {
|
|
2935
2935
|
id: string;
|
|
@@ -3005,9 +3005,9 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3005
3005
|
}, {
|
|
3006
3006
|
status: boolean;
|
|
3007
3007
|
}>;
|
|
3008
|
-
readonly deleteUser:
|
|
3008
|
+
readonly deleteUser: better_call4.StrictEndpoint<"/delete-user", {
|
|
3009
3009
|
method: "POST";
|
|
3010
|
-
use: ((inputContext:
|
|
3010
|
+
use: ((inputContext: better_call4.MiddlewareInputContext<better_call4.MiddlewareOptions>) => Promise<{
|
|
3011
3011
|
session: {
|
|
3012
3012
|
session: Record<string, any> & {
|
|
3013
3013
|
id: string;
|
|
@@ -3030,11 +3030,11 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3030
3030
|
};
|
|
3031
3031
|
};
|
|
3032
3032
|
}>)[];
|
|
3033
|
-
body:
|
|
3034
|
-
callbackURL:
|
|
3035
|
-
password:
|
|
3036
|
-
token:
|
|
3037
|
-
},
|
|
3033
|
+
body: zod0.ZodObject<{
|
|
3034
|
+
callbackURL: zod0.ZodOptional<zod0.ZodString>;
|
|
3035
|
+
password: zod0.ZodOptional<zod0.ZodString>;
|
|
3036
|
+
token: zod0.ZodOptional<zod0.ZodString>;
|
|
3037
|
+
}, zod_v4_core0.$strip>;
|
|
3038
3038
|
metadata: {
|
|
3039
3039
|
openapi: {
|
|
3040
3040
|
operationId: string;
|
|
@@ -3092,12 +3092,12 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3092
3092
|
success: boolean;
|
|
3093
3093
|
message: string;
|
|
3094
3094
|
}>;
|
|
3095
|
-
readonly requestPasswordReset:
|
|
3095
|
+
readonly requestPasswordReset: better_call4.StrictEndpoint<"/request-password-reset", {
|
|
3096
3096
|
method: "POST";
|
|
3097
|
-
body:
|
|
3098
|
-
email:
|
|
3099
|
-
redirectTo:
|
|
3100
|
-
},
|
|
3097
|
+
body: zod0.ZodObject<{
|
|
3098
|
+
email: zod0.ZodEmail;
|
|
3099
|
+
redirectTo: zod0.ZodOptional<zod0.ZodString>;
|
|
3100
|
+
}, zod_v4_core0.$strip>;
|
|
3101
3101
|
metadata: {
|
|
3102
3102
|
openapi: {
|
|
3103
3103
|
operationId: string;
|
|
@@ -3128,13 +3128,13 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3128
3128
|
status: boolean;
|
|
3129
3129
|
message: string;
|
|
3130
3130
|
}>;
|
|
3131
|
-
readonly requestPasswordResetCallback:
|
|
3131
|
+
readonly requestPasswordResetCallback: better_call4.StrictEndpoint<"/reset-password/:token", {
|
|
3132
3132
|
method: "GET";
|
|
3133
3133
|
operationId: string;
|
|
3134
|
-
query:
|
|
3135
|
-
callbackURL:
|
|
3136
|
-
},
|
|
3137
|
-
use: ((inputContext:
|
|
3134
|
+
query: zod0.ZodObject<{
|
|
3135
|
+
callbackURL: zod0.ZodString;
|
|
3136
|
+
}, zod_v4_core0.$strip>;
|
|
3137
|
+
use: ((inputContext: better_call4.MiddlewareInputContext<better_call4.MiddlewareOptions>) => Promise<void>)[];
|
|
3138
3138
|
metadata: {
|
|
3139
3139
|
openapi: {
|
|
3140
3140
|
operationId: string;
|
|
@@ -3176,10 +3176,10 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3176
3176
|
};
|
|
3177
3177
|
};
|
|
3178
3178
|
}, never>;
|
|
3179
|
-
readonly listSessions:
|
|
3179
|
+
readonly listSessions: better_call4.StrictEndpoint<"/list-sessions", {
|
|
3180
3180
|
method: "GET";
|
|
3181
3181
|
operationId: string;
|
|
3182
|
-
use: ((inputContext:
|
|
3182
|
+
use: ((inputContext: better_call4.MiddlewareInputContext<better_call4.MiddlewareOptions>) => Promise<{
|
|
3183
3183
|
session: {
|
|
3184
3184
|
session: Record<string, any> & {
|
|
3185
3185
|
id: string;
|
|
@@ -3234,12 +3234,12 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3234
3234
|
ipAddress?: string | null | undefined;
|
|
3235
3235
|
userAgent?: string | null | undefined;
|
|
3236
3236
|
} & (Option extends BetterAuthOptions ? AdditionalSessionFieldsOutput<Option> : Option extends Auth ? AdditionalSessionFieldsOutput<Option["options"]> : {})>>>[]>;
|
|
3237
|
-
readonly revokeSession:
|
|
3237
|
+
readonly revokeSession: better_call4.StrictEndpoint<"/revoke-session", {
|
|
3238
3238
|
method: "POST";
|
|
3239
|
-
body:
|
|
3240
|
-
token:
|
|
3241
|
-
},
|
|
3242
|
-
use: ((inputContext:
|
|
3239
|
+
body: zod0.ZodObject<{
|
|
3240
|
+
token: zod0.ZodString;
|
|
3241
|
+
}, zod_v4_core0.$strip>;
|
|
3242
|
+
use: ((inputContext: better_call4.MiddlewareInputContext<better_call4.MiddlewareOptions>) => Promise<{
|
|
3243
3243
|
session: {
|
|
3244
3244
|
session: Record<string, any> & {
|
|
3245
3245
|
id: string;
|
|
@@ -3306,9 +3306,9 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3306
3306
|
}, {
|
|
3307
3307
|
status: boolean;
|
|
3308
3308
|
}>;
|
|
3309
|
-
readonly revokeSessions:
|
|
3309
|
+
readonly revokeSessions: better_call4.StrictEndpoint<"/revoke-sessions", {
|
|
3310
3310
|
method: "POST";
|
|
3311
|
-
use: ((inputContext:
|
|
3311
|
+
use: ((inputContext: better_call4.MiddlewareInputContext<better_call4.MiddlewareOptions>) => Promise<{
|
|
3312
3312
|
session: {
|
|
3313
3313
|
session: Record<string, any> & {
|
|
3314
3314
|
id: string;
|
|
@@ -3359,10 +3359,10 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3359
3359
|
}, {
|
|
3360
3360
|
status: boolean;
|
|
3361
3361
|
}>;
|
|
3362
|
-
readonly revokeOtherSessions:
|
|
3362
|
+
readonly revokeOtherSessions: better_call4.StrictEndpoint<"/revoke-other-sessions", {
|
|
3363
3363
|
method: "POST";
|
|
3364
3364
|
requireHeaders: true;
|
|
3365
|
-
use: ((inputContext:
|
|
3365
|
+
use: ((inputContext: better_call4.MiddlewareInputContext<better_call4.MiddlewareOptions>) => Promise<{
|
|
3366
3366
|
session: {
|
|
3367
3367
|
session: Record<string, any> & {
|
|
3368
3368
|
id: string;
|
|
@@ -3412,26 +3412,26 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3412
3412
|
}, {
|
|
3413
3413
|
status: boolean;
|
|
3414
3414
|
}>;
|
|
3415
|
-
readonly linkSocialAccount:
|
|
3415
|
+
readonly linkSocialAccount: better_call4.StrictEndpoint<"/link-social", {
|
|
3416
3416
|
method: "POST";
|
|
3417
3417
|
requireHeaders: true;
|
|
3418
|
-
body:
|
|
3419
|
-
callbackURL:
|
|
3420
|
-
provider:
|
|
3421
|
-
idToken:
|
|
3422
|
-
token:
|
|
3423
|
-
nonce:
|
|
3424
|
-
accessToken:
|
|
3425
|
-
refreshToken:
|
|
3426
|
-
scopes:
|
|
3427
|
-
},
|
|
3428
|
-
requestSignUp:
|
|
3429
|
-
scopes:
|
|
3430
|
-
errorCallbackURL:
|
|
3431
|
-
disableRedirect:
|
|
3432
|
-
additionalData:
|
|
3433
|
-
},
|
|
3434
|
-
use: ((inputContext:
|
|
3418
|
+
body: zod0.ZodObject<{
|
|
3419
|
+
callbackURL: zod0.ZodOptional<zod0.ZodString>;
|
|
3420
|
+
provider: zod0.ZodType<"github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "vercel" | (string & {}), unknown, zod_v4_core0.$ZodTypeInternals<"github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "vercel" | (string & {}), unknown>>;
|
|
3421
|
+
idToken: zod0.ZodOptional<zod0.ZodObject<{
|
|
3422
|
+
token: zod0.ZodString;
|
|
3423
|
+
nonce: zod0.ZodOptional<zod0.ZodString>;
|
|
3424
|
+
accessToken: zod0.ZodOptional<zod0.ZodString>;
|
|
3425
|
+
refreshToken: zod0.ZodOptional<zod0.ZodString>;
|
|
3426
|
+
scopes: zod0.ZodOptional<zod0.ZodArray<zod0.ZodString>>;
|
|
3427
|
+
}, zod_v4_core0.$strip>>;
|
|
3428
|
+
requestSignUp: zod0.ZodOptional<zod0.ZodBoolean>;
|
|
3429
|
+
scopes: zod0.ZodOptional<zod0.ZodArray<zod0.ZodString>>;
|
|
3430
|
+
errorCallbackURL: zod0.ZodOptional<zod0.ZodString>;
|
|
3431
|
+
disableRedirect: zod0.ZodOptional<zod0.ZodBoolean>;
|
|
3432
|
+
additionalData: zod0.ZodOptional<zod0.ZodRecord<zod0.ZodString, zod0.ZodAny>>;
|
|
3433
|
+
}, zod_v4_core0.$strip>;
|
|
3434
|
+
use: ((inputContext: better_call4.MiddlewareInputContext<better_call4.MiddlewareOptions>) => Promise<{
|
|
3435
3435
|
session: {
|
|
3436
3436
|
session: Record<string, any> & {
|
|
3437
3437
|
id: string;
|
|
@@ -3490,9 +3490,9 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3490
3490
|
url: string;
|
|
3491
3491
|
redirect: boolean;
|
|
3492
3492
|
}>;
|
|
3493
|
-
readonly listUserAccounts:
|
|
3493
|
+
readonly listUserAccounts: better_call4.StrictEndpoint<"/list-accounts", {
|
|
3494
3494
|
method: "GET";
|
|
3495
|
-
use: ((inputContext:
|
|
3495
|
+
use: ((inputContext: better_call4.MiddlewareInputContext<better_call4.MiddlewareOptions>) => Promise<{
|
|
3496
3496
|
session: {
|
|
3497
3497
|
session: Record<string, any> & {
|
|
3498
3498
|
id: string;
|
|
@@ -3574,13 +3574,13 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3574
3574
|
userId: string;
|
|
3575
3575
|
scopes: string[];
|
|
3576
3576
|
}[]>;
|
|
3577
|
-
readonly deleteUserCallback:
|
|
3577
|
+
readonly deleteUserCallback: better_call4.StrictEndpoint<"/delete-user/callback", {
|
|
3578
3578
|
method: "GET";
|
|
3579
|
-
query:
|
|
3580
|
-
token:
|
|
3581
|
-
callbackURL:
|
|
3582
|
-
},
|
|
3583
|
-
use: ((inputContext:
|
|
3579
|
+
query: zod0.ZodObject<{
|
|
3580
|
+
token: zod0.ZodString;
|
|
3581
|
+
callbackURL: zod0.ZodOptional<zod0.ZodString>;
|
|
3582
|
+
}, zod_v4_core0.$strip>;
|
|
3583
|
+
use: ((inputContext: better_call4.MiddlewareInputContext<better_call4.MiddlewareOptions>) => Promise<void>)[];
|
|
3584
3584
|
metadata: {
|
|
3585
3585
|
openapi: {
|
|
3586
3586
|
description: string;
|
|
@@ -3614,13 +3614,13 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3614
3614
|
success: boolean;
|
|
3615
3615
|
message: string;
|
|
3616
3616
|
}>;
|
|
3617
|
-
readonly unlinkAccount:
|
|
3617
|
+
readonly unlinkAccount: better_call4.StrictEndpoint<"/unlink-account", {
|
|
3618
3618
|
method: "POST";
|
|
3619
|
-
body:
|
|
3620
|
-
providerId:
|
|
3621
|
-
accountId:
|
|
3622
|
-
},
|
|
3623
|
-
use: ((inputContext:
|
|
3619
|
+
body: zod0.ZodObject<{
|
|
3620
|
+
providerId: zod0.ZodString;
|
|
3621
|
+
accountId: zod0.ZodOptional<zod0.ZodString>;
|
|
3622
|
+
}, zod_v4_core0.$strip>;
|
|
3623
|
+
use: ((inputContext: better_call4.MiddlewareInputContext<better_call4.MiddlewareOptions>) => Promise<{
|
|
3624
3624
|
session: {
|
|
3625
3625
|
session: Record<string, any> & {
|
|
3626
3626
|
id: string;
|
|
@@ -3668,13 +3668,13 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3668
3668
|
}, {
|
|
3669
3669
|
status: boolean;
|
|
3670
3670
|
}>;
|
|
3671
|
-
readonly refreshToken:
|
|
3671
|
+
readonly refreshToken: better_call4.StrictEndpoint<"/refresh-token", {
|
|
3672
3672
|
method: "POST";
|
|
3673
|
-
body:
|
|
3674
|
-
providerId:
|
|
3675
|
-
accountId:
|
|
3676
|
-
userId:
|
|
3677
|
-
},
|
|
3673
|
+
body: zod0.ZodObject<{
|
|
3674
|
+
providerId: zod0.ZodString;
|
|
3675
|
+
accountId: zod0.ZodOptional<zod0.ZodString>;
|
|
3676
|
+
userId: zod0.ZodOptional<zod0.ZodString>;
|
|
3677
|
+
}, zod_v4_core0.$strip>;
|
|
3678
3678
|
metadata: {
|
|
3679
3679
|
openapi: {
|
|
3680
3680
|
description: string;
|
|
@@ -3727,13 +3727,13 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3727
3727
|
providerId: string;
|
|
3728
3728
|
accountId: string;
|
|
3729
3729
|
}>;
|
|
3730
|
-
readonly getAccessToken:
|
|
3730
|
+
readonly getAccessToken: better_call4.StrictEndpoint<"/get-access-token", {
|
|
3731
3731
|
method: "POST";
|
|
3732
|
-
body:
|
|
3733
|
-
providerId:
|
|
3734
|
-
accountId:
|
|
3735
|
-
userId:
|
|
3736
|
-
},
|
|
3732
|
+
body: zod0.ZodObject<{
|
|
3733
|
+
providerId: zod0.ZodString;
|
|
3734
|
+
accountId: zod0.ZodOptional<zod0.ZodString>;
|
|
3735
|
+
userId: zod0.ZodOptional<zod0.ZodString>;
|
|
3736
|
+
}, zod_v4_core0.$strip>;
|
|
3737
3737
|
metadata: {
|
|
3738
3738
|
openapi: {
|
|
3739
3739
|
description: string;
|
|
@@ -3782,9 +3782,9 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3782
3782
|
scopes: string[];
|
|
3783
3783
|
idToken: string | undefined;
|
|
3784
3784
|
}>;
|
|
3785
|
-
readonly accountInfo:
|
|
3785
|
+
readonly accountInfo: better_call4.StrictEndpoint<"/account-info", {
|
|
3786
3786
|
method: "GET";
|
|
3787
|
-
use: ((inputContext:
|
|
3787
|
+
use: ((inputContext: better_call4.MiddlewareInputContext<better_call4.MiddlewareOptions>) => Promise<{
|
|
3788
3788
|
session: {
|
|
3789
3789
|
session: Record<string, any> & {
|
|
3790
3790
|
id: string;
|
|
@@ -3854,9 +3854,9 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3854
3854
|
};
|
|
3855
3855
|
};
|
|
3856
3856
|
};
|
|
3857
|
-
query:
|
|
3858
|
-
accountId:
|
|
3859
|
-
},
|
|
3857
|
+
query: zod0.ZodOptional<zod0.ZodObject<{
|
|
3858
|
+
accountId: zod0.ZodOptional<zod0.ZodString>;
|
|
3859
|
+
}, zod_v4_core0.$strip>>;
|
|
3860
3860
|
}, {
|
|
3861
3861
|
user: _better_auth_core_oauth20.OAuth2UserInfo;
|
|
3862
3862
|
data: Record<string, any>;
|