better-auth 1.6.22 → 1.6.24
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/adapters/index.d.mts +1 -6
- package/dist/api/dispatch.d.mts +0 -1
- package/dist/api/index.d.mts +476 -478
- package/dist/api/middlewares/authorization.d.mts +12 -8
- package/dist/api/middlewares/authorization.mjs +2 -1
- package/dist/api/middlewares/index.d.mts +2 -1
- package/dist/api/middlewares/origin-check.d.mts +3 -5
- package/dist/api/routes/account.d.mts +10 -13
- package/dist/api/routes/account.mjs +35 -7
- package/dist/api/routes/callback.d.mts +1 -3
- package/dist/api/routes/callback.mjs +4 -0
- package/dist/api/routes/email-verification.d.mts +4 -8
- package/dist/api/routes/email-verification.mjs +15 -2
- package/dist/api/routes/error.d.mts +1 -3
- package/dist/api/routes/index.d.mts +2 -1
- package/dist/api/routes/ok.d.mts +1 -3
- package/dist/api/routes/password.d.mts +7 -9
- package/dist/api/routes/password.mjs +14 -1
- package/dist/api/routes/session.d.mts +22 -24
- package/dist/api/routes/session.mjs +5 -1
- package/dist/api/routes/sign-in.d.mts +3 -5
- package/dist/api/routes/sign-in.mjs +84 -2
- package/dist/api/routes/sign-out.d.mts +1 -3
- package/dist/api/routes/sign-up.d.mts +3 -4
- package/dist/api/routes/sign-up.mjs +3 -2
- package/dist/api/routes/update-session.d.mts +3 -4
- package/dist/api/routes/update-user.d.mts +13 -14
- package/dist/api/routes/update-user.mjs +26 -1
- package/dist/auth/full.d.mts +1 -1
- package/dist/auth/minimal.d.mts +1 -1
- package/dist/client/config.d.mts +12 -14
- package/dist/client/config.mjs +2 -2
- package/dist/client/equality.d.mts +0 -1
- package/dist/client/index.d.mts +6 -5
- package/dist/client/lynx/index.d.mts +4 -5
- package/dist/client/lynx/lynx-store.d.mts +1 -2
- package/dist/client/parser.d.mts +7 -3
- package/dist/client/path-to-object.d.mts +3 -4
- package/dist/client/plugins/index.d.mts +2 -1
- package/dist/client/plugins/infer-plugin.d.mts +0 -1
- package/dist/client/query.d.mts +0 -1
- package/dist/client/query.mjs +38 -20
- package/dist/client/react/index.d.mts +4 -5
- package/dist/client/react/react-store.d.mts +1 -2
- package/dist/client/session-refresh.d.mts +0 -1
- package/dist/client/solid/index.d.mts +5 -6
- package/dist/client/svelte/index.d.mts +5 -6
- package/dist/client/types.d.mts +2 -2
- package/dist/client/vanilla.d.mts +2 -3
- package/dist/client/vue/index.d.mts +5 -6
- package/dist/context/create-context.mjs +3 -3
- package/dist/context/helpers.mjs +2 -2
- package/dist/cookies/cookie-utils.d.mts +1 -1
- package/dist/cookies/index.d.mts +6 -7
- package/dist/cookies/index.mjs +4 -0
- package/dist/cookies/session-store.d.mts +1 -0
- package/dist/cookies/session-store.mjs +6 -1
- package/dist/crypto/index.d.mts +2 -9
- package/dist/crypto/jwt.d.mts +0 -1
- package/dist/crypto/password.d.mts +1 -5
- package/dist/db/adapter-base.d.mts +0 -1
- package/dist/db/adapter-kysely.d.mts +0 -1
- package/dist/db/field-converter.d.mts +0 -1
- package/dist/db/field.d.mts +9 -10
- package/dist/db/get-migration.d.mts +0 -1
- package/dist/db/get-migration.mjs +8 -4
- package/dist/db/get-schema.d.mts +0 -1
- package/dist/db/internal-adapter.d.mts +0 -1
- package/dist/db/internal-adapter.mjs +61 -1
- package/dist/db/revoke-unproven-account-access.d.mts +0 -1
- package/dist/db/schema.d.mts +2 -2
- package/dist/db/to-zod.d.mts +3 -7
- package/dist/db/with-hooks.d.mts +0 -1
- package/dist/index.d.mts +4 -3
- package/dist/integrations/next-js.d.mts +4 -7
- package/dist/integrations/node.d.mts +2 -3
- package/dist/integrations/svelte-kit.d.mts +2 -9
- package/dist/integrations/tanstack-start-solid.d.mts +2 -5
- package/dist/integrations/tanstack-start.d.mts +2 -5
- package/dist/oauth2/link-account.d.mts +1 -1
- package/dist/oauth2/state.d.mts +0 -1
- package/dist/oauth2/utils.d.mts +0 -1
- package/dist/package.mjs +1 -1
- package/dist/plugins/access/access.d.mts +0 -1
- package/dist/plugins/access/types.d.mts +4 -5
- package/dist/plugins/additional-fields/client.d.mts +0 -1
- package/dist/plugins/admin/access/statement.d.mts +1 -0
- package/dist/plugins/admin/admin.d.mts +120 -125
- package/dist/plugins/admin/client.d.mts +30 -30
- package/dist/plugins/admin/client.mjs +1 -1
- package/dist/plugins/admin/error-codes.d.mts +23 -25
- package/dist/plugins/admin/index.d.mts +1 -1
- package/dist/plugins/admin/routes.mjs +9 -0
- package/dist/plugins/admin/schema.d.mts +1 -1
- package/dist/plugins/admin/types.d.mts +3 -2
- package/dist/plugins/anonymous/client.d.mts +9 -11
- package/dist/plugins/anonymous/client.mjs +1 -1
- package/dist/plugins/anonymous/error-codes.d.mts +8 -10
- package/dist/plugins/anonymous/index.d.mts +14 -18
- package/dist/plugins/anonymous/types.d.mts +1 -1
- package/dist/plugins/bearer/index.d.mts +4 -7
- package/dist/plugins/captcha/index.d.mts +5 -8
- package/dist/plugins/captcha/types.d.mts +0 -1
- package/dist/plugins/custom-session/client.d.mts +0 -1
- package/dist/plugins/custom-session/index.d.mts +7 -12
- package/dist/plugins/device-authorization/client.d.mts +0 -1
- package/dist/plugins/device-authorization/index.d.mts +19 -22
- package/dist/plugins/email-otp/client.d.mts +4 -6
- package/dist/plugins/email-otp/client.mjs +1 -1
- package/dist/plugins/email-otp/error-codes.d.mts +3 -5
- package/dist/plugins/email-otp/index.d.mts +67 -73
- package/dist/plugins/email-otp/routes.mjs +2 -0
- package/dist/plugins/email-otp/types.d.mts +0 -1
- package/dist/plugins/generic-oauth/client.d.mts +11 -11
- package/dist/plugins/generic-oauth/client.mjs +1 -1
- package/dist/plugins/generic-oauth/error-codes.d.mts +8 -10
- package/dist/plugins/generic-oauth/index.d.mts +41 -44
- package/dist/plugins/generic-oauth/index.mjs +2 -1
- package/dist/plugins/generic-oauth/providers/auth0.d.mts +0 -1
- package/dist/plugins/generic-oauth/providers/gumroad.d.mts +0 -1
- package/dist/plugins/generic-oauth/providers/hubspot.d.mts +0 -1
- package/dist/plugins/generic-oauth/providers/index.d.mts +3 -1
- package/dist/plugins/generic-oauth/providers/keycloak.d.mts +0 -1
- package/dist/plugins/generic-oauth/providers/line.d.mts +0 -1
- package/dist/plugins/generic-oauth/providers/microsoft-entra-id.d.mts +0 -1
- package/dist/plugins/generic-oauth/providers/okta.d.mts +0 -1
- package/dist/plugins/generic-oauth/providers/patreon.d.mts +0 -1
- package/dist/plugins/generic-oauth/providers/slack.d.mts +0 -1
- package/dist/plugins/generic-oauth/providers/yandex.d.mts +28 -0
- package/dist/plugins/generic-oauth/providers/yandex.mjs +60 -0
- package/dist/plugins/generic-oauth/routes.mjs +14 -0
- package/dist/plugins/generic-oauth/types.d.mts +1 -2
- package/dist/plugins/haveibeenpwned/index.d.mts +3 -6
- package/dist/plugins/index.d.mts +5 -1
- package/dist/plugins/index.mjs +2 -1
- package/dist/plugins/jwt/client.d.mts +2 -4
- package/dist/plugins/jwt/index.d.mts +8 -11
- package/dist/plugins/jwt/sign.d.mts +2 -2
- package/dist/plugins/jwt/types.d.mts +1 -1
- package/dist/plugins/jwt/utils.d.mts +2 -4
- package/dist/plugins/jwt/verify.d.mts +0 -1
- package/dist/plugins/last-login-method/client.mjs +13 -0
- package/dist/plugins/last-login-method/index.d.mts +11 -5
- package/dist/plugins/last-login-method/index.mjs +8 -0
- package/dist/plugins/magic-link/client.d.mts +0 -1
- package/dist/plugins/magic-link/index.d.mts +4 -5
- package/dist/plugins/magic-link/index.mjs +32 -1
- package/dist/plugins/mcp/authorize.mjs +12 -0
- package/dist/plugins/mcp/client/adapters.d.mts +0 -1
- package/dist/plugins/mcp/client/index.d.mts +2 -0
- package/dist/plugins/mcp/client/index.mjs +36 -11
- package/dist/plugins/mcp/index.d.mts +10 -11
- package/dist/plugins/multi-session/client.d.mts +2 -4
- package/dist/plugins/multi-session/client.mjs +1 -1
- package/dist/plugins/multi-session/error-codes.d.mts +1 -3
- package/dist/plugins/multi-session/index.d.mts +7 -11
- package/dist/plugins/multi-session/index.mjs +45 -0
- package/dist/plugins/oauth-popup/client.d.mts +6 -12
- package/dist/plugins/oauth-popup/client.mjs +5 -3
- package/dist/plugins/oauth-popup/error-codes.d.mts +4 -6
- package/dist/plugins/oauth-popup/index.d.mts +8 -12
- package/dist/plugins/oauth-popup/index.mjs +1 -1
- package/dist/plugins/oauth-popup/types.d.mts +1 -2
- package/dist/plugins/oauth-proxy/index.d.mts +6 -9
- package/dist/plugins/oauth-proxy/index.mjs +2 -2
- package/dist/plugins/oidc-provider/authorize.mjs +9 -0
- package/dist/plugins/oidc-provider/client.d.mts +1 -2
- package/dist/plugins/oidc-provider/index.d.mts +15 -17
- package/dist/plugins/oidc-provider/index.mjs +26 -2
- package/dist/plugins/oidc-provider/schema.d.mts +0 -1
- package/dist/plugins/oidc-provider/schema.mjs +37 -0
- package/dist/plugins/oidc-provider/types.d.mts +1 -1
- package/dist/plugins/one-tap/client.d.mts +3 -6
- package/dist/plugins/one-tap/client.mjs +3 -0
- package/dist/plugins/one-tap/index.d.mts +1 -3
- package/dist/plugins/one-tap/index.mjs +5 -0
- package/dist/plugins/one-time-token/client.d.mts +1 -2
- package/dist/plugins/one-time-token/index.d.mts +5 -6
- package/dist/plugins/one-time-token/index.mjs +30 -0
- package/dist/plugins/open-api/generator.d.mts +0 -1
- package/dist/plugins/open-api/generator.mjs +81 -5
- package/dist/plugins/open-api/index.d.mts +3 -5
- package/dist/plugins/organization/access/statement.d.mts +1 -0
- package/dist/plugins/organization/adapter.d.mts +56 -82
- package/dist/plugins/organization/adapter.mjs +17 -3
- package/dist/plugins/organization/client.d.mts +106 -105
- package/dist/plugins/organization/client.mjs +7 -4
- package/dist/plugins/organization/error-codes.d.mts +59 -61
- package/dist/plugins/organization/has-permission.d.mts +0 -1
- package/dist/plugins/organization/has-permission.mjs +1 -1
- package/dist/plugins/organization/index.d.mts +1 -1
- package/dist/plugins/organization/organization.d.mts +7 -7
- package/dist/plugins/organization/organization.mjs +434 -1
- package/dist/plugins/organization/permission.d.mts +2 -2
- package/dist/plugins/organization/routes/crud-access-control.d.mts +17 -17
- package/dist/plugins/organization/routes/crud-invites.d.mts +53 -54
- package/dist/plugins/organization/routes/crud-invites.mjs +1 -1
- package/dist/plugins/organization/routes/crud-members.d.mts +44 -46
- package/dist/plugins/organization/routes/crud-members.mjs +4 -1
- package/dist/plugins/organization/routes/crud-org.d.mts +47 -48
- package/dist/plugins/organization/routes/crud-org.mjs +2 -2
- package/dist/plugins/organization/routes/crud-team.d.mts +50 -51
- package/dist/plugins/organization/schema.d.mts +4 -4
- package/dist/plugins/organization/schema.mjs +1 -1
- package/dist/plugins/organization/types.d.mts +16 -16
- package/dist/plugins/phone-number/client.d.mts +13 -15
- package/dist/plugins/phone-number/client.mjs +1 -1
- package/dist/plugins/phone-number/error-codes.d.mts +12 -14
- package/dist/plugins/phone-number/index.d.mts +41 -47
- package/dist/plugins/phone-number/routes.mjs +15 -0
- package/dist/plugins/phone-number/types.d.mts +1 -1
- package/dist/plugins/siwe/client.d.mts +0 -1
- package/dist/plugins/siwe/index.d.mts +4 -5
- package/dist/plugins/test-utils/index.d.mts +2 -4
- package/dist/plugins/test-utils/types.d.mts +1 -0
- package/dist/plugins/two-factor/backup-codes/index.d.mts +4 -6
- package/dist/plugins/two-factor/backup-codes/index.mjs +52 -1
- package/dist/plugins/two-factor/client.d.mts +12 -15
- package/dist/plugins/two-factor/client.mjs +1 -1
- package/dist/plugins/two-factor/error-code.d.mts +10 -12
- package/dist/plugins/two-factor/index.d.mts +27 -31
- package/dist/plugins/two-factor/index.mjs +30 -0
- package/dist/plugins/two-factor/otp/index.d.mts +2 -4
- package/dist/plugins/two-factor/otp/index.mjs +42 -1
- package/dist/plugins/two-factor/totp/index.d.mts +4 -6
- package/dist/plugins/two-factor/totp/index.mjs +47 -0
- package/dist/plugins/two-factor/types.d.mts +1 -1
- package/dist/plugins/username/client.d.mts +9 -11
- package/dist/plugins/username/client.mjs +1 -1
- package/dist/plugins/username/error-codes.d.mts +8 -10
- package/dist/plugins/username/index.d.mts +17 -22
- package/dist/plugins/username/schema.d.mts +3 -5
- package/dist/state.d.mts +0 -1
- package/dist/state.mjs +4 -0
- package/dist/test-utils/test-instance.d.mts +5 -3
- package/dist/test-utils/test-instance.mjs +4 -1
- package/dist/types/adapter.d.mts +1 -1
- package/dist/types/api.d.mts +1 -2
- package/dist/types/auth.d.mts +0 -1
- package/dist/types/helper.d.mts +5 -5
- package/dist/types/index.d.mts +2 -2
- package/dist/types/models.d.mts +0 -1
- package/dist/types/plugins.d.mts +2 -3
- package/dist/utils/index.d.mts +2 -1
- package/dist/utils/request.mjs +23 -0
- package/dist/utils/url.d.mts +0 -1
- package/package.json +10 -10
package/dist/api/index.d.mts
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import { OverrideMerge, Prettify
|
|
1
|
+
import { OverrideMerge, Prettify, UnionToIntersection } from "../types/helper.mjs";
|
|
2
2
|
import { AdditionalSessionFieldsInput, AdditionalUserFieldsInput } from "../types/models.mjs";
|
|
3
|
+
import "../types/index.mjs";
|
|
4
|
+
import "../index.mjs";
|
|
3
5
|
import { isAPIError } from "../utils/is-api-error.mjs";
|
|
4
6
|
import { DispatchContext, dispatchAuthEndpoint } from "./dispatch.mjs";
|
|
5
7
|
import { requireOrgRole, requireResourceOwnership } from "./middlewares/authorization.mjs";
|
|
6
8
|
import { formCsrfMiddleware, originCheck, originCheckMiddleware } from "./middlewares/origin-check.mjs";
|
|
9
|
+
import "./middlewares/index.mjs";
|
|
7
10
|
import { accountInfo, getAccessToken, linkSocialAccount, listUserAccounts, refreshToken, unlinkAccount } from "./routes/account.mjs";
|
|
8
11
|
import { callbackOAuth } from "./routes/callback.mjs";
|
|
9
12
|
import { createEmailVerificationToken, sendVerificationEmail, sendVerificationEmailFn, verifyEmail } from "./routes/email-verification.mjs";
|
|
@@ -16,24 +19,19 @@ import { signOut } from "./routes/sign-out.mjs";
|
|
|
16
19
|
import { signUpEmail } from "./routes/sign-up.mjs";
|
|
17
20
|
import { updateSession } from "./routes/update-session.mjs";
|
|
18
21
|
import { changeEmail, changePassword, deleteUser, deleteUserCallback, setPassword, updateUser } from "./routes/update-user.mjs";
|
|
22
|
+
import "./routes/index.mjs";
|
|
19
23
|
import { getOAuthState } from "./state/oauth.mjs";
|
|
20
24
|
import { getShouldSkipSessionRefresh, setShouldSkipSessionRefresh } from "./state/should-session-refresh.mjs";
|
|
21
25
|
import { AuthContext, Awaitable, BetterAuthOptions, BetterAuthPlugin } from "@better-auth/core";
|
|
22
|
-
import * as _better_auth_core_db0 from "@better-auth/core/db";
|
|
23
26
|
import { InternalLogger } from "@better-auth/core/env";
|
|
24
27
|
import { APIError } from "@better-auth/core/error";
|
|
25
|
-
import * as _better_auth_core_oauth20 from "@better-auth/core/oauth2";
|
|
26
28
|
import { getIp } from "@better-auth/core/utils/ip";
|
|
27
|
-
import * as better_call0 from "better-call";
|
|
28
29
|
import { AuthEndpoint, AuthMiddleware, createAuthEndpoint, createAuthMiddleware, optionsMiddleware } from "@better-auth/core/api";
|
|
29
|
-
import * as zod from "zod";
|
|
30
|
-
import * as zod_v4_core0 from "zod/v4/core";
|
|
31
|
-
|
|
32
30
|
//#region src/api/index.d.ts
|
|
33
31
|
declare function checkEndpointConflicts(options: BetterAuthOptions, logger: InternalLogger): void;
|
|
34
32
|
declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<AuthContext>, options: Option): {
|
|
35
33
|
api: OverrideMerge<{
|
|
36
|
-
readonly ok:
|
|
34
|
+
readonly ok: import("better-call").StrictEndpoint<"/ok", {
|
|
37
35
|
method: "GET";
|
|
38
36
|
metadata: {
|
|
39
37
|
openapi: {
|
|
@@ -63,7 +61,7 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
63
61
|
}, {
|
|
64
62
|
ok: boolean;
|
|
65
63
|
}>;
|
|
66
|
-
readonly error:
|
|
64
|
+
readonly error: import("better-call").StrictEndpoint<"/error", {
|
|
67
65
|
method: "GET";
|
|
68
66
|
metadata: {
|
|
69
67
|
openapi: {
|
|
@@ -85,61 +83,61 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
85
83
|
scope: "server";
|
|
86
84
|
};
|
|
87
85
|
}, Response>;
|
|
88
|
-
readonly signInSocial:
|
|
86
|
+
readonly signInSocial: import("better-call").StrictEndpoint<"/sign-in/social", {
|
|
89
87
|
method: "POST";
|
|
90
88
|
operationId: string;
|
|
91
|
-
body: zod.ZodObject<{
|
|
92
|
-
callbackURL: zod.ZodOptional<zod.ZodString>;
|
|
93
|
-
newUserCallbackURL: zod.ZodOptional<zod.ZodString>;
|
|
94
|
-
errorCallbackURL: zod.ZodOptional<zod.ZodString>;
|
|
95
|
-
provider: zod.ZodType<(string & {}) | "linear" | "huggingface" | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown,
|
|
96
|
-
disableRedirect: zod.ZodOptional<zod.ZodBoolean>;
|
|
97
|
-
idToken: zod.ZodOptional<zod.ZodObject<{
|
|
98
|
-
token: zod.ZodString;
|
|
99
|
-
nonce: zod.ZodOptional<zod.ZodString>;
|
|
100
|
-
accessToken: zod.ZodOptional<zod.ZodString>;
|
|
101
|
-
refreshToken: zod.ZodOptional<zod.ZodString>;
|
|
102
|
-
expiresAt: zod.ZodOptional<zod.ZodNumber>;
|
|
103
|
-
user: zod.ZodOptional<zod.ZodObject<{
|
|
104
|
-
name: zod.ZodOptional<zod.ZodObject<{
|
|
105
|
-
firstName: zod.ZodOptional<zod.ZodString>;
|
|
106
|
-
lastName: zod.ZodOptional<zod.ZodString>;
|
|
107
|
-
},
|
|
108
|
-
email: zod.ZodOptional<zod.ZodString>;
|
|
109
|
-
},
|
|
110
|
-
},
|
|
111
|
-
scopes: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
|
|
112
|
-
requestSignUp: zod.ZodOptional<zod.ZodBoolean>;
|
|
113
|
-
loginHint: zod.ZodOptional<zod.ZodString>;
|
|
114
|
-
additionalData: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodAny>>;
|
|
115
|
-
},
|
|
89
|
+
body: import("zod").ZodObject<{
|
|
90
|
+
callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
91
|
+
newUserCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
92
|
+
errorCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
93
|
+
provider: import("zod").ZodType<(string & {}) | "linear" | "huggingface" | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown, import("zod/v4/core").$ZodTypeInternals<(string & {}) | "linear" | "huggingface" | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown>>;
|
|
94
|
+
disableRedirect: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
95
|
+
idToken: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
96
|
+
token: import("zod").ZodString;
|
|
97
|
+
nonce: import("zod").ZodOptional<import("zod").ZodString>;
|
|
98
|
+
accessToken: import("zod").ZodOptional<import("zod").ZodString>;
|
|
99
|
+
refreshToken: import("zod").ZodOptional<import("zod").ZodString>;
|
|
100
|
+
expiresAt: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
101
|
+
user: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
102
|
+
name: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
103
|
+
firstName: import("zod").ZodOptional<import("zod").ZodString>;
|
|
104
|
+
lastName: import("zod").ZodOptional<import("zod").ZodString>;
|
|
105
|
+
}, import("zod/v4/core").$strip>>;
|
|
106
|
+
email: import("zod").ZodOptional<import("zod").ZodString>;
|
|
107
|
+
}, import("zod/v4/core").$strip>>;
|
|
108
|
+
}, import("zod/v4/core").$strip>>;
|
|
109
|
+
scopes: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
110
|
+
requestSignUp: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
111
|
+
loginHint: import("zod").ZodOptional<import("zod").ZodString>;
|
|
112
|
+
additionalData: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
|
|
113
|
+
}, import("zod/v4/core").$strip>;
|
|
116
114
|
metadata: {
|
|
117
115
|
$Infer: {
|
|
118
|
-
body: zod.infer<zod.ZodObject<{
|
|
119
|
-
callbackURL: zod.ZodOptional<zod.ZodString>;
|
|
120
|
-
newUserCallbackURL: zod.ZodOptional<zod.ZodString>;
|
|
121
|
-
errorCallbackURL: zod.ZodOptional<zod.ZodString>;
|
|
122
|
-
provider: zod.ZodType<(string & {}) | "linear" | "huggingface" | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown,
|
|
123
|
-
disableRedirect: zod.ZodOptional<zod.ZodBoolean>;
|
|
124
|
-
idToken: zod.ZodOptional<zod.ZodObject<{
|
|
125
|
-
token: zod.ZodString;
|
|
126
|
-
nonce: zod.ZodOptional<zod.ZodString>;
|
|
127
|
-
accessToken: zod.ZodOptional<zod.ZodString>;
|
|
128
|
-
refreshToken: zod.ZodOptional<zod.ZodString>;
|
|
129
|
-
expiresAt: zod.ZodOptional<zod.ZodNumber>;
|
|
130
|
-
user: zod.ZodOptional<zod.ZodObject<{
|
|
131
|
-
name: zod.ZodOptional<zod.ZodObject<{
|
|
132
|
-
firstName: zod.ZodOptional<zod.ZodString>;
|
|
133
|
-
lastName: zod.ZodOptional<zod.ZodString>;
|
|
134
|
-
},
|
|
135
|
-
email: zod.ZodOptional<zod.ZodString>;
|
|
136
|
-
},
|
|
137
|
-
},
|
|
138
|
-
scopes: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
|
|
139
|
-
requestSignUp: zod.ZodOptional<zod.ZodBoolean>;
|
|
140
|
-
loginHint: zod.ZodOptional<zod.ZodString>;
|
|
141
|
-
additionalData: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodAny>>;
|
|
142
|
-
},
|
|
116
|
+
body: import("zod").infer<import("zod").ZodObject<{
|
|
117
|
+
callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
118
|
+
newUserCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
119
|
+
errorCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
120
|
+
provider: import("zod").ZodType<(string & {}) | "linear" | "huggingface" | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown, import("zod/v4/core").$ZodTypeInternals<(string & {}) | "linear" | "huggingface" | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown>>;
|
|
121
|
+
disableRedirect: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
122
|
+
idToken: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
123
|
+
token: import("zod").ZodString;
|
|
124
|
+
nonce: import("zod").ZodOptional<import("zod").ZodString>;
|
|
125
|
+
accessToken: import("zod").ZodOptional<import("zod").ZodString>;
|
|
126
|
+
refreshToken: import("zod").ZodOptional<import("zod").ZodString>;
|
|
127
|
+
expiresAt: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
128
|
+
user: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
129
|
+
name: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
130
|
+
firstName: import("zod").ZodOptional<import("zod").ZodString>;
|
|
131
|
+
lastName: import("zod").ZodOptional<import("zod").ZodString>;
|
|
132
|
+
}, import("zod/v4/core").$strip>>;
|
|
133
|
+
email: import("zod").ZodOptional<import("zod").ZodString>;
|
|
134
|
+
}, import("zod/v4/core").$strip>>;
|
|
135
|
+
}, import("zod/v4/core").$strip>>;
|
|
136
|
+
scopes: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
137
|
+
requestSignUp: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
138
|
+
loginHint: import("zod").ZodOptional<import("zod").ZodString>;
|
|
139
|
+
additionalData: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
|
|
140
|
+
}, import("zod/v4/core").$strip>>;
|
|
143
141
|
returned: {
|
|
144
142
|
redirect: boolean;
|
|
145
143
|
token?: string | undefined;
|
|
@@ -152,7 +150,7 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
152
150
|
emailVerified: boolean;
|
|
153
151
|
name: string;
|
|
154
152
|
image?: string | null | undefined;
|
|
155
|
-
} &
|
|
153
|
+
} & import("@better-auth/core/db").InferDBFieldsFromOptions<Option["user"]> & import("@better-auth/core/db").InferDBFieldsFromPlugins<"user", Option["plugins"]> extends (infer T) ? { [K in keyof T]: T[K]; } : never) | undefined;
|
|
156
154
|
};
|
|
157
155
|
};
|
|
158
156
|
openapi: {
|
|
@@ -204,39 +202,39 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
204
202
|
emailVerified: boolean;
|
|
205
203
|
name: string;
|
|
206
204
|
image?: string | null | undefined;
|
|
207
|
-
} &
|
|
205
|
+
} & import("@better-auth/core/db").InferDBFieldsFromOptions<Option["user"]> & import("@better-auth/core/db").InferDBFieldsFromPlugins<"user", Option["plugins"]> extends (infer T_1) ? { [K in keyof T_1]: T_1[K]; } : never;
|
|
208
206
|
}>;
|
|
209
|
-
readonly callbackOAuth:
|
|
207
|
+
readonly callbackOAuth: import("better-call").StrictEndpoint<"/callback/:id", {
|
|
210
208
|
method: ("GET" | "POST")[];
|
|
211
209
|
operationId: string;
|
|
212
|
-
body: zod.ZodOptional<zod.ZodObject<{
|
|
213
|
-
code: zod.ZodOptional<zod.ZodString>;
|
|
214
|
-
error: zod.ZodOptional<zod.ZodString>;
|
|
215
|
-
device_id: zod.ZodOptional<zod.ZodString>;
|
|
216
|
-
error_description: zod.ZodOptional<zod.ZodString>;
|
|
217
|
-
state: zod.ZodOptional<zod.ZodString>;
|
|
218
|
-
user: zod.ZodOptional<zod.ZodString>;
|
|
219
|
-
},
|
|
220
|
-
query: zod.ZodOptional<zod.ZodObject<{
|
|
221
|
-
code: zod.ZodOptional<zod.ZodString>;
|
|
222
|
-
error: zod.ZodOptional<zod.ZodString>;
|
|
223
|
-
device_id: zod.ZodOptional<zod.ZodString>;
|
|
224
|
-
error_description: zod.ZodOptional<zod.ZodString>;
|
|
225
|
-
state: zod.ZodOptional<zod.ZodString>;
|
|
226
|
-
user: zod.ZodOptional<zod.ZodString>;
|
|
227
|
-
},
|
|
210
|
+
body: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
211
|
+
code: import("zod").ZodOptional<import("zod").ZodString>;
|
|
212
|
+
error: import("zod").ZodOptional<import("zod").ZodString>;
|
|
213
|
+
device_id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
214
|
+
error_description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
215
|
+
state: import("zod").ZodOptional<import("zod").ZodString>;
|
|
216
|
+
user: import("zod").ZodOptional<import("zod").ZodString>;
|
|
217
|
+
}, import("zod/v4/core").$strip>>;
|
|
218
|
+
query: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
219
|
+
code: import("zod").ZodOptional<import("zod").ZodString>;
|
|
220
|
+
error: import("zod").ZodOptional<import("zod").ZodString>;
|
|
221
|
+
device_id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
222
|
+
error_description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
223
|
+
state: import("zod").ZodOptional<import("zod").ZodString>;
|
|
224
|
+
user: import("zod").ZodOptional<import("zod").ZodString>;
|
|
225
|
+
}, import("zod/v4/core").$strip>>;
|
|
228
226
|
metadata: {
|
|
229
227
|
allowedMediaTypes: string[];
|
|
230
228
|
scope: "server";
|
|
231
229
|
};
|
|
232
230
|
}, never>;
|
|
233
|
-
readonly getSession:
|
|
231
|
+
readonly getSession: import("better-call").StrictEndpoint<"/get-session", {
|
|
234
232
|
method: ("GET" | "POST")[];
|
|
235
233
|
operationId: string;
|
|
236
|
-
query: zod.ZodOptional<zod.ZodObject<{
|
|
237
|
-
disableCookieCache: zod.ZodOptional<zod.ZodCoercedBoolean<unknown>>;
|
|
238
|
-
disableRefresh: zod.ZodOptional<zod.ZodCoercedBoolean<unknown>>;
|
|
239
|
-
},
|
|
234
|
+
query: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
235
|
+
disableCookieCache: import("zod").ZodOptional<import("zod").ZodCoercedBoolean<unknown>>;
|
|
236
|
+
disableRefresh: import("zod").ZodOptional<import("zod").ZodCoercedBoolean<unknown>>;
|
|
237
|
+
}, import("zod/v4/core").$strip>>;
|
|
240
238
|
requireHeaders: true;
|
|
241
239
|
metadata: {
|
|
242
240
|
openapi: {
|
|
@@ -275,7 +273,7 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
275
273
|
token: string;
|
|
276
274
|
ipAddress?: string | null | undefined;
|
|
277
275
|
userAgent?: string | null | undefined;
|
|
278
|
-
} &
|
|
276
|
+
} & import("@better-auth/core/db").InferDBFieldsFromOptions<Option["session"]> & import("@better-auth/core/db").InferDBFieldsFromPlugins<"session", Option["plugins"]> extends (infer T_2) ? { [K_1 in keyof T_2]: T_2[K_1]; } : never;
|
|
279
277
|
user: {
|
|
280
278
|
id: string;
|
|
281
279
|
createdAt: Date;
|
|
@@ -284,9 +282,9 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
284
282
|
emailVerified: boolean;
|
|
285
283
|
name: string;
|
|
286
284
|
image?: string | null | undefined;
|
|
287
|
-
} &
|
|
285
|
+
} & import("@better-auth/core/db").InferDBFieldsFromOptions<Option["user"]> & import("@better-auth/core/db").InferDBFieldsFromPlugins<"user", Option["plugins"]> extends (infer T_3) ? { [K in keyof T_3]: T_3[K]; } : never;
|
|
288
286
|
} | null>;
|
|
289
|
-
readonly signOut:
|
|
287
|
+
readonly signOut: import("better-call").StrictEndpoint<"/sign-out", {
|
|
290
288
|
method: "POST";
|
|
291
289
|
operationId: string;
|
|
292
290
|
requireHeaders: true;
|
|
@@ -316,18 +314,18 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
316
314
|
}, {
|
|
317
315
|
success: boolean;
|
|
318
316
|
}>;
|
|
319
|
-
readonly signUpEmail:
|
|
317
|
+
readonly signUpEmail: import("better-call").StrictEndpoint<"/sign-up/email", {
|
|
320
318
|
method: "POST";
|
|
321
319
|
operationId: string;
|
|
322
|
-
use: ((inputContext:
|
|
323
|
-
body: zod.ZodIntersection<zod.ZodObject<{
|
|
324
|
-
name: zod.ZodString;
|
|
325
|
-
email: zod.ZodEmail;
|
|
326
|
-
password: zod.ZodString;
|
|
327
|
-
image: zod.ZodOptional<zod.ZodString>;
|
|
328
|
-
callbackURL: zod.ZodOptional<zod.ZodString>;
|
|
329
|
-
rememberMe: zod.ZodOptional<zod.ZodBoolean>;
|
|
330
|
-
},
|
|
320
|
+
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>)[];
|
|
321
|
+
body: import("zod").ZodIntersection<import("zod").ZodObject<{
|
|
322
|
+
name: import("zod").ZodString;
|
|
323
|
+
email: import("zod").ZodEmail;
|
|
324
|
+
password: import("zod").ZodString;
|
|
325
|
+
image: import("zod").ZodOptional<import("zod").ZodString>;
|
|
326
|
+
callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
327
|
+
rememberMe: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
328
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
|
|
331
329
|
cloneRequest: true;
|
|
332
330
|
metadata: {
|
|
333
331
|
allowedMediaTypes: string[];
|
|
@@ -339,7 +337,7 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
339
337
|
image?: string | undefined;
|
|
340
338
|
callbackURL?: string | undefined;
|
|
341
339
|
rememberMe?: boolean | undefined;
|
|
342
|
-
} &
|
|
340
|
+
} & import("@better-auth/core/db").InferDBFieldsFromPluginsInput<"user", Option["plugins"]> & import("@better-auth/core/db").InferDBFieldsFromOptionsInput<Option["user"]>;
|
|
343
341
|
returned: {
|
|
344
342
|
token: string | null;
|
|
345
343
|
user: {
|
|
@@ -350,7 +348,7 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
350
348
|
emailVerified: boolean;
|
|
351
349
|
name: string;
|
|
352
350
|
image?: string | null | undefined;
|
|
353
|
-
} &
|
|
351
|
+
} & import("@better-auth/core/db").InferDBFieldsFromOptions<Option["user"]> & import("@better-auth/core/db").InferDBFieldsFromPlugins<"user", Option["plugins"]> extends (infer T_4) ? { [K in keyof T_4]: T_4[K]; } : never;
|
|
354
352
|
};
|
|
355
353
|
};
|
|
356
354
|
openapi: {
|
|
@@ -478,7 +476,7 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
478
476
|
emailVerified: boolean;
|
|
479
477
|
name: string;
|
|
480
478
|
image?: string | null | undefined;
|
|
481
|
-
} &
|
|
479
|
+
} & import("@better-auth/core/db").InferDBFieldsFromOptions<Option["user"]> & import("@better-auth/core/db").InferDBFieldsFromPlugins<"user", Option["plugins"]> extends (infer T_5) ? { [K in keyof T_5]: T_5[K]; } : never;
|
|
482
480
|
} | {
|
|
483
481
|
token: string;
|
|
484
482
|
user: {
|
|
@@ -489,19 +487,19 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
489
487
|
emailVerified: boolean;
|
|
490
488
|
name: string;
|
|
491
489
|
image?: string | null | undefined;
|
|
492
|
-
} &
|
|
490
|
+
} & import("@better-auth/core/db").InferDBFieldsFromOptions<Option["user"]> & import("@better-auth/core/db").InferDBFieldsFromPlugins<"user", Option["plugins"]> extends (infer T_6) ? { [K in keyof T_6]: T_6[K]; } : never;
|
|
493
491
|
}>;
|
|
494
|
-
readonly signInEmail:
|
|
492
|
+
readonly signInEmail: import("better-call").StrictEndpoint<"/sign-in/email", {
|
|
495
493
|
method: "POST";
|
|
496
494
|
operationId: string;
|
|
497
|
-
use: ((inputContext:
|
|
495
|
+
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>)[];
|
|
498
496
|
cloneRequest: true;
|
|
499
|
-
body: zod.ZodObject<{
|
|
500
|
-
email: zod.ZodString;
|
|
501
|
-
password: zod.ZodString;
|
|
502
|
-
callbackURL: zod.ZodOptional<zod.ZodString>;
|
|
503
|
-
rememberMe: zod.ZodOptional<zod.ZodDefault<zod.ZodBoolean>>;
|
|
504
|
-
},
|
|
497
|
+
body: import("zod").ZodObject<{
|
|
498
|
+
email: import("zod").ZodString;
|
|
499
|
+
password: import("zod").ZodString;
|
|
500
|
+
callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
501
|
+
rememberMe: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodBoolean>>;
|
|
502
|
+
}, import("zod/v4/core").$strip>;
|
|
505
503
|
metadata: {
|
|
506
504
|
allowedMediaTypes: string[];
|
|
507
505
|
$Infer: {
|
|
@@ -523,7 +521,7 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
523
521
|
emailVerified: boolean;
|
|
524
522
|
name: string;
|
|
525
523
|
image?: string | null | undefined;
|
|
526
|
-
} &
|
|
524
|
+
} & import("@better-auth/core/db").InferDBFieldsFromOptions<Option["user"]> & import("@better-auth/core/db").InferDBFieldsFromPlugins<"user", Option["plugins"]> extends (infer T_7) ? { [K in keyof T_7]: T_7[K]; } : never;
|
|
527
525
|
};
|
|
528
526
|
};
|
|
529
527
|
openapi: {
|
|
@@ -575,18 +573,18 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
575
573
|
emailVerified: boolean;
|
|
576
574
|
name: string;
|
|
577
575
|
image?: string | null | undefined;
|
|
578
|
-
} &
|
|
576
|
+
} & import("@better-auth/core/db").InferDBFieldsFromOptions<Option["user"]> & import("@better-auth/core/db").InferDBFieldsFromPlugins<"user", Option["plugins"]> extends (infer T_8) ? { [K in keyof T_8]: T_8[K]; } : never;
|
|
579
577
|
}>;
|
|
580
|
-
readonly resetPassword:
|
|
578
|
+
readonly resetPassword: import("better-call").StrictEndpoint<"/reset-password", {
|
|
581
579
|
method: "POST";
|
|
582
580
|
operationId: string;
|
|
583
|
-
query: zod.ZodOptional<zod.ZodObject<{
|
|
584
|
-
token: zod.ZodOptional<zod.ZodString>;
|
|
585
|
-
},
|
|
586
|
-
body: zod.ZodObject<{
|
|
587
|
-
newPassword: zod.ZodString;
|
|
588
|
-
token: zod.ZodOptional<zod.ZodString>;
|
|
589
|
-
},
|
|
581
|
+
query: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
582
|
+
token: import("zod").ZodOptional<import("zod").ZodString>;
|
|
583
|
+
}, import("zod/v4/core").$strip>>;
|
|
584
|
+
body: import("zod").ZodObject<{
|
|
585
|
+
newPassword: import("zod").ZodString;
|
|
586
|
+
token: import("zod").ZodOptional<import("zod").ZodString>;
|
|
587
|
+
}, import("zod/v4/core").$strip>;
|
|
590
588
|
metadata: {
|
|
591
589
|
openapi: {
|
|
592
590
|
operationId: string;
|
|
@@ -613,11 +611,11 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
613
611
|
}, {
|
|
614
612
|
status: boolean;
|
|
615
613
|
}>;
|
|
616
|
-
readonly verifyPassword:
|
|
614
|
+
readonly verifyPassword: import("better-call").StrictEndpoint<"/verify-password", {
|
|
617
615
|
method: "POST";
|
|
618
|
-
body: zod.ZodObject<{
|
|
619
|
-
password: zod.ZodString;
|
|
620
|
-
},
|
|
616
|
+
body: import("zod").ZodObject<{
|
|
617
|
+
password: import("zod").ZodString;
|
|
618
|
+
}, import("zod/v4/core").$strip>;
|
|
621
619
|
metadata: {
|
|
622
620
|
scope: "server";
|
|
623
621
|
openapi: {
|
|
@@ -642,7 +640,7 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
642
640
|
};
|
|
643
641
|
};
|
|
644
642
|
};
|
|
645
|
-
use: ((inputContext:
|
|
643
|
+
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
646
644
|
session: {
|
|
647
645
|
session: Record<string, any> & {
|
|
648
646
|
id: string;
|
|
@@ -668,14 +666,14 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
668
666
|
}, {
|
|
669
667
|
status: boolean;
|
|
670
668
|
}>;
|
|
671
|
-
readonly verifyEmail:
|
|
669
|
+
readonly verifyEmail: import("better-call").StrictEndpoint<"/verify-email", {
|
|
672
670
|
method: "GET";
|
|
673
671
|
operationId: string;
|
|
674
|
-
query: zod.ZodObject<{
|
|
675
|
-
token: zod.ZodString;
|
|
676
|
-
callbackURL: zod.ZodOptional<zod.ZodString>;
|
|
677
|
-
},
|
|
678
|
-
use: ((inputContext:
|
|
672
|
+
query: import("zod").ZodObject<{
|
|
673
|
+
token: import("zod").ZodString;
|
|
674
|
+
callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
675
|
+
}, import("zod/v4/core").$strip>;
|
|
676
|
+
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>)[];
|
|
679
677
|
metadata: {
|
|
680
678
|
openapi: {
|
|
681
679
|
description: string;
|
|
@@ -724,14 +722,14 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
724
722
|
}, void | {
|
|
725
723
|
status: boolean;
|
|
726
724
|
}>;
|
|
727
|
-
readonly sendVerificationEmail:
|
|
725
|
+
readonly sendVerificationEmail: import("better-call").StrictEndpoint<"/send-verification-email", {
|
|
728
726
|
method: "POST";
|
|
729
727
|
operationId: string;
|
|
730
728
|
cloneRequest: true;
|
|
731
|
-
body: zod.ZodObject<{
|
|
732
|
-
email: zod.ZodEmail;
|
|
733
|
-
callbackURL: zod.ZodOptional<zod.ZodString>;
|
|
734
|
-
},
|
|
729
|
+
body: import("zod").ZodObject<{
|
|
730
|
+
email: import("zod").ZodEmail;
|
|
731
|
+
callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
732
|
+
}, import("zod/v4/core").$strip>;
|
|
735
733
|
metadata: {
|
|
736
734
|
openapi: {
|
|
737
735
|
operationId: string;
|
|
@@ -800,13 +798,13 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
800
798
|
}, {
|
|
801
799
|
status: boolean;
|
|
802
800
|
}>;
|
|
803
|
-
readonly changeEmail:
|
|
801
|
+
readonly changeEmail: import("better-call").StrictEndpoint<"/change-email", {
|
|
804
802
|
method: "POST";
|
|
805
|
-
body: zod.ZodObject<{
|
|
806
|
-
newEmail: zod.ZodEmail;
|
|
807
|
-
callbackURL: zod.ZodOptional<zod.ZodString>;
|
|
808
|
-
},
|
|
809
|
-
use: ((inputContext:
|
|
803
|
+
body: import("zod").ZodObject<{
|
|
804
|
+
newEmail: import("zod").ZodEmail;
|
|
805
|
+
callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
806
|
+
}, import("zod/v4/core").$strip>;
|
|
807
|
+
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
810
808
|
session: {
|
|
811
809
|
session: Record<string, any> & {
|
|
812
810
|
id: string;
|
|
@@ -866,15 +864,15 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
866
864
|
}, {
|
|
867
865
|
status: boolean;
|
|
868
866
|
}>;
|
|
869
|
-
readonly changePassword:
|
|
867
|
+
readonly changePassword: import("better-call").StrictEndpoint<"/change-password", {
|
|
870
868
|
method: "POST";
|
|
871
869
|
operationId: string;
|
|
872
|
-
body: zod.ZodObject<{
|
|
873
|
-
newPassword: zod.ZodString;
|
|
874
|
-
currentPassword: zod.ZodString;
|
|
875
|
-
revokeOtherSessions: zod.ZodOptional<zod.ZodBoolean>;
|
|
876
|
-
},
|
|
877
|
-
use: ((inputContext:
|
|
870
|
+
body: import("zod").ZodObject<{
|
|
871
|
+
newPassword: import("zod").ZodString;
|
|
872
|
+
currentPassword: import("zod").ZodString;
|
|
873
|
+
revokeOtherSessions: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
874
|
+
}, import("zod/v4/core").$strip>;
|
|
875
|
+
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
878
876
|
session: {
|
|
879
877
|
session: Record<string, any> & {
|
|
880
878
|
id: string;
|
|
@@ -982,12 +980,12 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
982
980
|
image?: string | null | undefined;
|
|
983
981
|
};
|
|
984
982
|
}>;
|
|
985
|
-
readonly setPassword:
|
|
983
|
+
readonly setPassword: import("better-call").StrictEndpoint<string, {
|
|
986
984
|
method: "POST";
|
|
987
|
-
body: zod.ZodObject<{
|
|
988
|
-
newPassword: zod.ZodString;
|
|
989
|
-
},
|
|
990
|
-
use: ((inputContext:
|
|
985
|
+
body: import("zod").ZodObject<{
|
|
986
|
+
newPassword: import("zod").ZodString;
|
|
987
|
+
}, import("zod/v4/core").$strip>;
|
|
988
|
+
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
991
989
|
session: {
|
|
992
990
|
session: Record<string, any> & {
|
|
993
991
|
id: string;
|
|
@@ -1013,11 +1011,11 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1013
1011
|
}, {
|
|
1014
1012
|
status: boolean;
|
|
1015
1013
|
}>;
|
|
1016
|
-
readonly updateSession:
|
|
1014
|
+
readonly updateSession: import("better-call").StrictEndpoint<"/update-session", {
|
|
1017
1015
|
method: "POST";
|
|
1018
1016
|
operationId: string;
|
|
1019
|
-
body: zod.ZodRecord<zod.ZodString, zod.ZodAny>;
|
|
1020
|
-
use: ((inputContext:
|
|
1017
|
+
body: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>;
|
|
1018
|
+
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
1021
1019
|
session: {
|
|
1022
1020
|
session: Record<string, any> & {
|
|
1023
1021
|
id: string;
|
|
@@ -1079,11 +1077,11 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1079
1077
|
userAgent?: string | null | undefined;
|
|
1080
1078
|
};
|
|
1081
1079
|
}>;
|
|
1082
|
-
readonly updateUser:
|
|
1080
|
+
readonly updateUser: import("better-call").StrictEndpoint<"/update-user", {
|
|
1083
1081
|
method: "POST";
|
|
1084
1082
|
operationId: string;
|
|
1085
|
-
body: zod.ZodRecord<zod.ZodString, zod.ZodAny>;
|
|
1086
|
-
use: ((inputContext:
|
|
1083
|
+
body: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>;
|
|
1084
|
+
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
1087
1085
|
session: {
|
|
1088
1086
|
session: Record<string, any> & {
|
|
1089
1087
|
id: string;
|
|
@@ -1159,9 +1157,9 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1159
1157
|
}, {
|
|
1160
1158
|
status: boolean;
|
|
1161
1159
|
}>;
|
|
1162
|
-
readonly deleteUser:
|
|
1160
|
+
readonly deleteUser: import("better-call").StrictEndpoint<"/delete-user", {
|
|
1163
1161
|
method: "POST";
|
|
1164
|
-
use: ((inputContext:
|
|
1162
|
+
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
1165
1163
|
session: {
|
|
1166
1164
|
session: Record<string, any> & {
|
|
1167
1165
|
id: string;
|
|
@@ -1184,11 +1182,11 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1184
1182
|
};
|
|
1185
1183
|
};
|
|
1186
1184
|
}>)[];
|
|
1187
|
-
body: zod.ZodObject<{
|
|
1188
|
-
callbackURL: zod.ZodOptional<zod.ZodString>;
|
|
1189
|
-
password: zod.ZodOptional<zod.ZodString>;
|
|
1190
|
-
token: zod.ZodOptional<zod.ZodString>;
|
|
1191
|
-
},
|
|
1185
|
+
body: import("zod").ZodObject<{
|
|
1186
|
+
callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1187
|
+
password: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1188
|
+
token: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1189
|
+
}, import("zod/v4/core").$strip>;
|
|
1192
1190
|
metadata: {
|
|
1193
1191
|
openapi: {
|
|
1194
1192
|
operationId: string;
|
|
@@ -1246,12 +1244,12 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1246
1244
|
success: boolean;
|
|
1247
1245
|
message: string;
|
|
1248
1246
|
}>;
|
|
1249
|
-
readonly requestPasswordReset:
|
|
1247
|
+
readonly requestPasswordReset: import("better-call").StrictEndpoint<"/request-password-reset", {
|
|
1250
1248
|
method: "POST";
|
|
1251
|
-
body: zod.ZodObject<{
|
|
1252
|
-
email: zod.ZodEmail;
|
|
1253
|
-
redirectTo: zod.ZodOptional<zod.ZodString>;
|
|
1254
|
-
},
|
|
1249
|
+
body: import("zod").ZodObject<{
|
|
1250
|
+
email: import("zod").ZodEmail;
|
|
1251
|
+
redirectTo: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1252
|
+
}, import("zod/v4/core").$strip>;
|
|
1255
1253
|
metadata: {
|
|
1256
1254
|
openapi: {
|
|
1257
1255
|
operationId: string;
|
|
@@ -1278,18 +1276,18 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1278
1276
|
};
|
|
1279
1277
|
};
|
|
1280
1278
|
};
|
|
1281
|
-
use: ((inputContext:
|
|
1279
|
+
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>)[];
|
|
1282
1280
|
}, {
|
|
1283
1281
|
status: boolean;
|
|
1284
1282
|
message: string;
|
|
1285
1283
|
}>;
|
|
1286
|
-
readonly requestPasswordResetCallback:
|
|
1284
|
+
readonly requestPasswordResetCallback: import("better-call").StrictEndpoint<"/reset-password/:token", {
|
|
1287
1285
|
method: "GET";
|
|
1288
1286
|
operationId: string;
|
|
1289
|
-
query: zod.ZodObject<{
|
|
1290
|
-
callbackURL: zod.ZodString;
|
|
1291
|
-
},
|
|
1292
|
-
use: ((inputContext:
|
|
1287
|
+
query: import("zod").ZodObject<{
|
|
1288
|
+
callbackURL: import("zod").ZodString;
|
|
1289
|
+
}, import("zod/v4/core").$strip>;
|
|
1290
|
+
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>)[];
|
|
1293
1291
|
metadata: {
|
|
1294
1292
|
openapi: {
|
|
1295
1293
|
operationId: string;
|
|
@@ -1331,10 +1329,10 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1331
1329
|
};
|
|
1332
1330
|
};
|
|
1333
1331
|
}, never>;
|
|
1334
|
-
readonly listSessions:
|
|
1332
|
+
readonly listSessions: import("better-call").StrictEndpoint<"/list-sessions", {
|
|
1335
1333
|
method: "GET";
|
|
1336
1334
|
operationId: string;
|
|
1337
|
-
use: ((inputContext:
|
|
1335
|
+
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
1338
1336
|
session: {
|
|
1339
1337
|
session: Record<string, any> & {
|
|
1340
1338
|
id: string;
|
|
@@ -1379,7 +1377,7 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1379
1377
|
};
|
|
1380
1378
|
};
|
|
1381
1379
|
};
|
|
1382
|
-
}, Prettify
|
|
1380
|
+
}, Prettify<{
|
|
1383
1381
|
id: string;
|
|
1384
1382
|
createdAt: Date;
|
|
1385
1383
|
updatedAt: Date;
|
|
@@ -1388,13 +1386,13 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1388
1386
|
token: string;
|
|
1389
1387
|
ipAddress?: string | null | undefined;
|
|
1390
1388
|
userAgent?: string | null | undefined;
|
|
1391
|
-
} &
|
|
1392
|
-
readonly revokeSession:
|
|
1389
|
+
} & import("@better-auth/core/db").InferDBFieldsFromOptions<Option["session"]> & import("@better-auth/core/db").InferDBFieldsFromPlugins<"session", Option["plugins"]> extends (infer T_9) ? { [K_1 in keyof T_9]: T_9[K_1]; } : never>[]>;
|
|
1390
|
+
readonly revokeSession: import("better-call").StrictEndpoint<"/revoke-session", {
|
|
1393
1391
|
method: "POST";
|
|
1394
|
-
body: zod.ZodObject<{
|
|
1395
|
-
token: zod.ZodString;
|
|
1396
|
-
},
|
|
1397
|
-
use: ((inputContext:
|
|
1392
|
+
body: import("zod").ZodObject<{
|
|
1393
|
+
token: import("zod").ZodString;
|
|
1394
|
+
}, import("zod/v4/core").$strip>;
|
|
1395
|
+
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
1398
1396
|
session: {
|
|
1399
1397
|
session: Record<string, any> & {
|
|
1400
1398
|
id: string;
|
|
@@ -1461,9 +1459,9 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1461
1459
|
}, {
|
|
1462
1460
|
status: boolean;
|
|
1463
1461
|
}>;
|
|
1464
|
-
readonly revokeSessions:
|
|
1462
|
+
readonly revokeSessions: import("better-call").StrictEndpoint<"/revoke-sessions", {
|
|
1465
1463
|
method: "POST";
|
|
1466
|
-
use: ((inputContext:
|
|
1464
|
+
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
1467
1465
|
session: {
|
|
1468
1466
|
session: Record<string, any> & {
|
|
1469
1467
|
id: string;
|
|
@@ -1514,10 +1512,10 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1514
1512
|
}, {
|
|
1515
1513
|
status: boolean;
|
|
1516
1514
|
}>;
|
|
1517
|
-
readonly revokeOtherSessions:
|
|
1515
|
+
readonly revokeOtherSessions: import("better-call").StrictEndpoint<"/revoke-other-sessions", {
|
|
1518
1516
|
method: "POST";
|
|
1519
1517
|
requireHeaders: true;
|
|
1520
|
-
use: ((inputContext:
|
|
1518
|
+
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
1521
1519
|
session: {
|
|
1522
1520
|
session: Record<string, any> & {
|
|
1523
1521
|
id: string;
|
|
@@ -1567,26 +1565,26 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1567
1565
|
}, {
|
|
1568
1566
|
status: boolean;
|
|
1569
1567
|
}>;
|
|
1570
|
-
readonly linkSocialAccount:
|
|
1568
|
+
readonly linkSocialAccount: import("better-call").StrictEndpoint<"/link-social", {
|
|
1571
1569
|
method: "POST";
|
|
1572
1570
|
requireHeaders: true;
|
|
1573
|
-
body: zod.ZodObject<{
|
|
1574
|
-
callbackURL: zod.ZodOptional<zod.ZodString>;
|
|
1575
|
-
provider: zod.ZodType<(string & {}) | "linear" | "huggingface" | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown,
|
|
1576
|
-
idToken: zod.ZodOptional<zod.ZodObject<{
|
|
1577
|
-
token: zod.ZodString;
|
|
1578
|
-
nonce: zod.ZodOptional<zod.ZodString>;
|
|
1579
|
-
accessToken: zod.ZodOptional<zod.ZodString>;
|
|
1580
|
-
refreshToken: zod.ZodOptional<zod.ZodString>;
|
|
1581
|
-
scopes: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
|
|
1582
|
-
},
|
|
1583
|
-
requestSignUp: zod.ZodOptional<zod.ZodBoolean>;
|
|
1584
|
-
scopes: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
|
|
1585
|
-
errorCallbackURL: zod.ZodOptional<zod.ZodString>;
|
|
1586
|
-
disableRedirect: zod.ZodOptional<zod.ZodBoolean>;
|
|
1587
|
-
additionalData: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodAny>>;
|
|
1588
|
-
},
|
|
1589
|
-
use: ((inputContext:
|
|
1571
|
+
body: import("zod").ZodObject<{
|
|
1572
|
+
callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1573
|
+
provider: import("zod").ZodType<(string & {}) | "linear" | "huggingface" | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown, import("zod/v4/core").$ZodTypeInternals<(string & {}) | "linear" | "huggingface" | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown>>;
|
|
1574
|
+
idToken: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
1575
|
+
token: import("zod").ZodString;
|
|
1576
|
+
nonce: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1577
|
+
accessToken: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1578
|
+
refreshToken: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1579
|
+
scopes: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
1580
|
+
}, import("zod/v4/core").$strip>>;
|
|
1581
|
+
requestSignUp: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
1582
|
+
scopes: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
1583
|
+
errorCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1584
|
+
disableRedirect: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
1585
|
+
additionalData: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
|
|
1586
|
+
}, import("zod/v4/core").$strip>;
|
|
1587
|
+
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
1590
1588
|
session: {
|
|
1591
1589
|
session: Record<string, any> & {
|
|
1592
1590
|
id: string;
|
|
@@ -1645,9 +1643,9 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1645
1643
|
url: string;
|
|
1646
1644
|
redirect: boolean;
|
|
1647
1645
|
}>;
|
|
1648
|
-
readonly listUserAccounts:
|
|
1646
|
+
readonly listUserAccounts: import("better-call").StrictEndpoint<"/list-accounts", {
|
|
1649
1647
|
method: "GET";
|
|
1650
|
-
use: ((inputContext:
|
|
1648
|
+
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
1651
1649
|
session: {
|
|
1652
1650
|
session: Record<string, any> & {
|
|
1653
1651
|
id: string;
|
|
@@ -1729,13 +1727,13 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1729
1727
|
providerId: string;
|
|
1730
1728
|
accountId: string;
|
|
1731
1729
|
}[]>;
|
|
1732
|
-
readonly deleteUserCallback:
|
|
1730
|
+
readonly deleteUserCallback: import("better-call").StrictEndpoint<"/delete-user/callback", {
|
|
1733
1731
|
method: "GET";
|
|
1734
|
-
query: zod.ZodObject<{
|
|
1735
|
-
token: zod.ZodString;
|
|
1736
|
-
callbackURL: zod.ZodOptional<zod.ZodString>;
|
|
1737
|
-
},
|
|
1738
|
-
use: ((inputContext:
|
|
1732
|
+
query: import("zod").ZodObject<{
|
|
1733
|
+
token: import("zod").ZodString;
|
|
1734
|
+
callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1735
|
+
}, import("zod/v4/core").$strip>;
|
|
1736
|
+
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>)[];
|
|
1739
1737
|
metadata: {
|
|
1740
1738
|
openapi: {
|
|
1741
1739
|
description: string;
|
|
@@ -1769,13 +1767,13 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1769
1767
|
success: boolean;
|
|
1770
1768
|
message: string;
|
|
1771
1769
|
}>;
|
|
1772
|
-
readonly unlinkAccount:
|
|
1770
|
+
readonly unlinkAccount: import("better-call").StrictEndpoint<"/unlink-account", {
|
|
1773
1771
|
method: "POST";
|
|
1774
|
-
body: zod.ZodObject<{
|
|
1775
|
-
providerId: zod.ZodString;
|
|
1776
|
-
accountId: zod.ZodOptional<zod.ZodString>;
|
|
1777
|
-
},
|
|
1778
|
-
use: ((inputContext:
|
|
1772
|
+
body: import("zod").ZodObject<{
|
|
1773
|
+
providerId: import("zod").ZodString;
|
|
1774
|
+
accountId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1775
|
+
}, import("zod/v4/core").$strip>;
|
|
1776
|
+
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
1779
1777
|
session: {
|
|
1780
1778
|
session: Record<string, any> & {
|
|
1781
1779
|
id: string;
|
|
@@ -1823,13 +1821,13 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1823
1821
|
}, {
|
|
1824
1822
|
status: boolean;
|
|
1825
1823
|
}>;
|
|
1826
|
-
readonly refreshToken:
|
|
1824
|
+
readonly refreshToken: import("better-call").StrictEndpoint<"/refresh-token", {
|
|
1827
1825
|
method: "POST";
|
|
1828
|
-
body: zod.ZodObject<{
|
|
1829
|
-
providerId: zod.ZodString;
|
|
1830
|
-
accountId: zod.ZodOptional<zod.ZodString>;
|
|
1831
|
-
userId: zod.ZodOptional<zod.ZodString>;
|
|
1832
|
-
},
|
|
1826
|
+
body: import("zod").ZodObject<{
|
|
1827
|
+
providerId: import("zod").ZodString;
|
|
1828
|
+
accountId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1829
|
+
userId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1830
|
+
}, import("zod/v4/core").$strip>;
|
|
1833
1831
|
metadata: {
|
|
1834
1832
|
openapi: {
|
|
1835
1833
|
description: string;
|
|
@@ -1882,13 +1880,13 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1882
1880
|
providerId: string;
|
|
1883
1881
|
accountId: string;
|
|
1884
1882
|
}>;
|
|
1885
|
-
readonly getAccessToken:
|
|
1883
|
+
readonly getAccessToken: import("better-call").StrictEndpoint<"/get-access-token", {
|
|
1886
1884
|
method: "POST";
|
|
1887
|
-
body: zod.ZodObject<{
|
|
1888
|
-
providerId: zod.ZodString;
|
|
1889
|
-
accountId: zod.ZodOptional<zod.ZodString>;
|
|
1890
|
-
userId: zod.ZodOptional<zod.ZodString>;
|
|
1891
|
-
},
|
|
1885
|
+
body: import("zod").ZodObject<{
|
|
1886
|
+
providerId: import("zod").ZodString;
|
|
1887
|
+
accountId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1888
|
+
userId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1889
|
+
}, import("zod/v4/core").$strip>;
|
|
1892
1890
|
metadata: {
|
|
1893
1891
|
openapi: {
|
|
1894
1892
|
description: string;
|
|
@@ -1930,7 +1928,7 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1930
1928
|
scopes: string[];
|
|
1931
1929
|
idToken: string | undefined;
|
|
1932
1930
|
}>;
|
|
1933
|
-
readonly accountInfo:
|
|
1931
|
+
readonly accountInfo: import("better-call").StrictEndpoint<"/account-info", {
|
|
1934
1932
|
method: "GET";
|
|
1935
1933
|
metadata: {
|
|
1936
1934
|
openapi: {
|
|
@@ -1979,13 +1977,13 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1979
1977
|
};
|
|
1980
1978
|
};
|
|
1981
1979
|
};
|
|
1982
|
-
query: zod.ZodOptional<zod.ZodObject<{
|
|
1983
|
-
accountId: zod.ZodOptional<zod.ZodString>;
|
|
1984
|
-
providerId: zod.ZodOptional<zod.ZodString>;
|
|
1985
|
-
userId: zod.ZodOptional<zod.ZodString>;
|
|
1986
|
-
},
|
|
1980
|
+
query: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
1981
|
+
accountId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1982
|
+
providerId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1983
|
+
userId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1984
|
+
}, import("zod/v4/core").$strip>>;
|
|
1987
1985
|
}, {
|
|
1988
|
-
user:
|
|
1986
|
+
user: import("@better-auth/core/oauth2").OAuth2UserInfo;
|
|
1989
1987
|
data: Record<string, any>;
|
|
1990
1988
|
} | null>;
|
|
1991
1989
|
}, UnionToIntersection<Option["plugins"] extends (infer T_10)[] ? T_10 extends BetterAuthPlugin ? T_10 extends {
|
|
@@ -2000,10 +1998,10 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2000
1998
|
handler: (request: Request) => Promise<Response>;
|
|
2001
1999
|
endpoints: UnionToIntersection<Option["plugins"] extends (infer T)[] ? T extends BetterAuthPlugin ? T extends {
|
|
2002
2000
|
endpoints: infer E;
|
|
2003
|
-
} ? E : {} : {} : {}> extends infer T_1 ? T_1 extends UnionToIntersection<Option["plugins"] extends (infer T)[] ? T extends BetterAuthPlugin ? T extends {
|
|
2001
|
+
} ? E : {} : {} : {}> extends (infer T_1) ? T_1 extends UnionToIntersection<Option["plugins"] extends (infer T)[] ? T extends BetterAuthPlugin ? T extends {
|
|
2004
2002
|
endpoints: infer E;
|
|
2005
|
-
} ? E : {} : {} : {}> ? T_1 extends unknown ? Prettify
|
|
2006
|
-
readonly ok:
|
|
2003
|
+
} ? E : {} : {} : {}> ? T_1 extends unknown ? Prettify<({
|
|
2004
|
+
readonly ok: import("better-call").StrictEndpoint<"/ok", {
|
|
2007
2005
|
method: "GET";
|
|
2008
2006
|
metadata: {
|
|
2009
2007
|
openapi: {
|
|
@@ -2033,7 +2031,7 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2033
2031
|
}, {
|
|
2034
2032
|
ok: boolean;
|
|
2035
2033
|
}>;
|
|
2036
|
-
readonly error:
|
|
2034
|
+
readonly error: import("better-call").StrictEndpoint<"/error", {
|
|
2037
2035
|
method: "GET";
|
|
2038
2036
|
metadata: {
|
|
2039
2037
|
openapi: {
|
|
@@ -2055,61 +2053,61 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2055
2053
|
scope: "server";
|
|
2056
2054
|
};
|
|
2057
2055
|
}, Response>;
|
|
2058
|
-
readonly signInSocial:
|
|
2056
|
+
readonly signInSocial: import("better-call").StrictEndpoint<"/sign-in/social", {
|
|
2059
2057
|
method: "POST";
|
|
2060
2058
|
operationId: string;
|
|
2061
|
-
body: zod.ZodObject<{
|
|
2062
|
-
callbackURL: zod.ZodOptional<zod.ZodString>;
|
|
2063
|
-
newUserCallbackURL: zod.ZodOptional<zod.ZodString>;
|
|
2064
|
-
errorCallbackURL: zod.ZodOptional<zod.ZodString>;
|
|
2065
|
-
provider: zod.ZodType<(string & {}) | "linear" | "huggingface" | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown,
|
|
2066
|
-
disableRedirect: zod.ZodOptional<zod.ZodBoolean>;
|
|
2067
|
-
idToken: zod.ZodOptional<zod.ZodObject<{
|
|
2068
|
-
token: zod.ZodString;
|
|
2069
|
-
nonce: zod.ZodOptional<zod.ZodString>;
|
|
2070
|
-
accessToken: zod.ZodOptional<zod.ZodString>;
|
|
2071
|
-
refreshToken: zod.ZodOptional<zod.ZodString>;
|
|
2072
|
-
expiresAt: zod.ZodOptional<zod.ZodNumber>;
|
|
2073
|
-
user: zod.ZodOptional<zod.ZodObject<{
|
|
2074
|
-
name: zod.ZodOptional<zod.ZodObject<{
|
|
2075
|
-
firstName: zod.ZodOptional<zod.ZodString>;
|
|
2076
|
-
lastName: zod.ZodOptional<zod.ZodString>;
|
|
2077
|
-
},
|
|
2078
|
-
email: zod.ZodOptional<zod.ZodString>;
|
|
2079
|
-
},
|
|
2080
|
-
},
|
|
2081
|
-
scopes: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
|
|
2082
|
-
requestSignUp: zod.ZodOptional<zod.ZodBoolean>;
|
|
2083
|
-
loginHint: zod.ZodOptional<zod.ZodString>;
|
|
2084
|
-
additionalData: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodAny>>;
|
|
2085
|
-
},
|
|
2059
|
+
body: import("zod").ZodObject<{
|
|
2060
|
+
callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2061
|
+
newUserCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2062
|
+
errorCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2063
|
+
provider: import("zod").ZodType<(string & {}) | "linear" | "huggingface" | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown, import("zod/v4/core").$ZodTypeInternals<(string & {}) | "linear" | "huggingface" | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown>>;
|
|
2064
|
+
disableRedirect: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
2065
|
+
idToken: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
2066
|
+
token: import("zod").ZodString;
|
|
2067
|
+
nonce: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2068
|
+
accessToken: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2069
|
+
refreshToken: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2070
|
+
expiresAt: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
2071
|
+
user: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
2072
|
+
name: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
2073
|
+
firstName: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2074
|
+
lastName: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2075
|
+
}, import("zod/v4/core").$strip>>;
|
|
2076
|
+
email: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2077
|
+
}, import("zod/v4/core").$strip>>;
|
|
2078
|
+
}, import("zod/v4/core").$strip>>;
|
|
2079
|
+
scopes: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
2080
|
+
requestSignUp: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
2081
|
+
loginHint: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2082
|
+
additionalData: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
|
|
2083
|
+
}, import("zod/v4/core").$strip>;
|
|
2086
2084
|
metadata: {
|
|
2087
2085
|
$Infer: {
|
|
2088
|
-
body: zod.infer<zod.ZodObject<{
|
|
2089
|
-
callbackURL: zod.ZodOptional<zod.ZodString>;
|
|
2090
|
-
newUserCallbackURL: zod.ZodOptional<zod.ZodString>;
|
|
2091
|
-
errorCallbackURL: zod.ZodOptional<zod.ZodString>;
|
|
2092
|
-
provider: zod.ZodType<(string & {}) | "linear" | "huggingface" | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown,
|
|
2093
|
-
disableRedirect: zod.ZodOptional<zod.ZodBoolean>;
|
|
2094
|
-
idToken: zod.ZodOptional<zod.ZodObject<{
|
|
2095
|
-
token: zod.ZodString;
|
|
2096
|
-
nonce: zod.ZodOptional<zod.ZodString>;
|
|
2097
|
-
accessToken: zod.ZodOptional<zod.ZodString>;
|
|
2098
|
-
refreshToken: zod.ZodOptional<zod.ZodString>;
|
|
2099
|
-
expiresAt: zod.ZodOptional<zod.ZodNumber>;
|
|
2100
|
-
user: zod.ZodOptional<zod.ZodObject<{
|
|
2101
|
-
name: zod.ZodOptional<zod.ZodObject<{
|
|
2102
|
-
firstName: zod.ZodOptional<zod.ZodString>;
|
|
2103
|
-
lastName: zod.ZodOptional<zod.ZodString>;
|
|
2104
|
-
},
|
|
2105
|
-
email: zod.ZodOptional<zod.ZodString>;
|
|
2106
|
-
},
|
|
2107
|
-
},
|
|
2108
|
-
scopes: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
|
|
2109
|
-
requestSignUp: zod.ZodOptional<zod.ZodBoolean>;
|
|
2110
|
-
loginHint: zod.ZodOptional<zod.ZodString>;
|
|
2111
|
-
additionalData: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodAny>>;
|
|
2112
|
-
},
|
|
2086
|
+
body: import("zod").infer<import("zod").ZodObject<{
|
|
2087
|
+
callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2088
|
+
newUserCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2089
|
+
errorCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2090
|
+
provider: import("zod").ZodType<(string & {}) | "linear" | "huggingface" | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown, import("zod/v4/core").$ZodTypeInternals<(string & {}) | "linear" | "huggingface" | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown>>;
|
|
2091
|
+
disableRedirect: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
2092
|
+
idToken: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
2093
|
+
token: import("zod").ZodString;
|
|
2094
|
+
nonce: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2095
|
+
accessToken: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2096
|
+
refreshToken: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2097
|
+
expiresAt: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
2098
|
+
user: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
2099
|
+
name: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
2100
|
+
firstName: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2101
|
+
lastName: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2102
|
+
}, import("zod/v4/core").$strip>>;
|
|
2103
|
+
email: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2104
|
+
}, import("zod/v4/core").$strip>>;
|
|
2105
|
+
}, import("zod/v4/core").$strip>>;
|
|
2106
|
+
scopes: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
2107
|
+
requestSignUp: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
2108
|
+
loginHint: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2109
|
+
additionalData: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
|
|
2110
|
+
}, import("zod/v4/core").$strip>>;
|
|
2113
2111
|
returned: {
|
|
2114
2112
|
redirect: boolean;
|
|
2115
2113
|
token?: string | undefined;
|
|
@@ -2122,7 +2120,7 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2122
2120
|
emailVerified: boolean;
|
|
2123
2121
|
name: string;
|
|
2124
2122
|
image?: string | null | undefined;
|
|
2125
|
-
} &
|
|
2123
|
+
} & import("@better-auth/core/db").InferDBFieldsFromOptions<Option["user"]> & import("@better-auth/core/db").InferDBFieldsFromPlugins<"user", Option["plugins"]> extends (infer T_3) ? { [K_1 in keyof T_3]: T_3[K_1]; } : never) | undefined;
|
|
2126
2124
|
};
|
|
2127
2125
|
};
|
|
2128
2126
|
openapi: {
|
|
@@ -2174,39 +2172,39 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2174
2172
|
emailVerified: boolean;
|
|
2175
2173
|
name: string;
|
|
2176
2174
|
image?: string | null | undefined;
|
|
2177
|
-
} &
|
|
2175
|
+
} & import("@better-auth/core/db").InferDBFieldsFromOptions<Option["user"]> & import("@better-auth/core/db").InferDBFieldsFromPlugins<"user", Option["plugins"]> extends (infer T_4) ? { [K_1 in keyof T_4]: T_4[K_1]; } : never;
|
|
2178
2176
|
}>;
|
|
2179
|
-
readonly callbackOAuth:
|
|
2177
|
+
readonly callbackOAuth: import("better-call").StrictEndpoint<"/callback/:id", {
|
|
2180
2178
|
method: ("GET" | "POST")[];
|
|
2181
2179
|
operationId: string;
|
|
2182
|
-
body: zod.ZodOptional<zod.ZodObject<{
|
|
2183
|
-
code: zod.ZodOptional<zod.ZodString>;
|
|
2184
|
-
error: zod.ZodOptional<zod.ZodString>;
|
|
2185
|
-
device_id: zod.ZodOptional<zod.ZodString>;
|
|
2186
|
-
error_description: zod.ZodOptional<zod.ZodString>;
|
|
2187
|
-
state: zod.ZodOptional<zod.ZodString>;
|
|
2188
|
-
user: zod.ZodOptional<zod.ZodString>;
|
|
2189
|
-
},
|
|
2190
|
-
query: zod.ZodOptional<zod.ZodObject<{
|
|
2191
|
-
code: zod.ZodOptional<zod.ZodString>;
|
|
2192
|
-
error: zod.ZodOptional<zod.ZodString>;
|
|
2193
|
-
device_id: zod.ZodOptional<zod.ZodString>;
|
|
2194
|
-
error_description: zod.ZodOptional<zod.ZodString>;
|
|
2195
|
-
state: zod.ZodOptional<zod.ZodString>;
|
|
2196
|
-
user: zod.ZodOptional<zod.ZodString>;
|
|
2197
|
-
},
|
|
2180
|
+
body: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
2181
|
+
code: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2182
|
+
error: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2183
|
+
device_id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2184
|
+
error_description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2185
|
+
state: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2186
|
+
user: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2187
|
+
}, import("zod/v4/core").$strip>>;
|
|
2188
|
+
query: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
2189
|
+
code: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2190
|
+
error: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2191
|
+
device_id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2192
|
+
error_description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2193
|
+
state: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2194
|
+
user: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2195
|
+
}, import("zod/v4/core").$strip>>;
|
|
2198
2196
|
metadata: {
|
|
2199
2197
|
allowedMediaTypes: string[];
|
|
2200
2198
|
scope: "server";
|
|
2201
2199
|
};
|
|
2202
2200
|
}, never>;
|
|
2203
|
-
readonly getSession:
|
|
2201
|
+
readonly getSession: import("better-call").StrictEndpoint<"/get-session", {
|
|
2204
2202
|
method: ("GET" | "POST")[];
|
|
2205
2203
|
operationId: string;
|
|
2206
|
-
query: zod.ZodOptional<zod.ZodObject<{
|
|
2207
|
-
disableCookieCache: zod.ZodOptional<zod.ZodCoercedBoolean<unknown>>;
|
|
2208
|
-
disableRefresh: zod.ZodOptional<zod.ZodCoercedBoolean<unknown>>;
|
|
2209
|
-
},
|
|
2204
|
+
query: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
2205
|
+
disableCookieCache: import("zod").ZodOptional<import("zod").ZodCoercedBoolean<unknown>>;
|
|
2206
|
+
disableRefresh: import("zod").ZodOptional<import("zod").ZodCoercedBoolean<unknown>>;
|
|
2207
|
+
}, import("zod/v4/core").$strip>>;
|
|
2210
2208
|
requireHeaders: true;
|
|
2211
2209
|
metadata: {
|
|
2212
2210
|
openapi: {
|
|
@@ -2245,7 +2243,7 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2245
2243
|
token: string;
|
|
2246
2244
|
ipAddress?: string | null | undefined;
|
|
2247
2245
|
userAgent?: string | null | undefined;
|
|
2248
|
-
} &
|
|
2246
|
+
} & import("@better-auth/core/db").InferDBFieldsFromOptions<Option["session"]> & import("@better-auth/core/db").InferDBFieldsFromPlugins<"session", Option["plugins"]> extends (infer T_5) ? { [K_2 in keyof T_5]: T_5[K_2]; } : never;
|
|
2249
2247
|
user: {
|
|
2250
2248
|
id: string;
|
|
2251
2249
|
createdAt: Date;
|
|
@@ -2254,9 +2252,9 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2254
2252
|
emailVerified: boolean;
|
|
2255
2253
|
name: string;
|
|
2256
2254
|
image?: string | null | undefined;
|
|
2257
|
-
} &
|
|
2255
|
+
} & import("@better-auth/core/db").InferDBFieldsFromOptions<Option["user"]> & import("@better-auth/core/db").InferDBFieldsFromPlugins<"user", Option["plugins"]> extends (infer T_6) ? { [K_1 in keyof T_6]: T_6[K_1]; } : never;
|
|
2258
2256
|
} | null>;
|
|
2259
|
-
readonly signOut:
|
|
2257
|
+
readonly signOut: import("better-call").StrictEndpoint<"/sign-out", {
|
|
2260
2258
|
method: "POST";
|
|
2261
2259
|
operationId: string;
|
|
2262
2260
|
requireHeaders: true;
|
|
@@ -2286,18 +2284,18 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2286
2284
|
}, {
|
|
2287
2285
|
success: boolean;
|
|
2288
2286
|
}>;
|
|
2289
|
-
readonly signUpEmail:
|
|
2287
|
+
readonly signUpEmail: import("better-call").StrictEndpoint<"/sign-up/email", {
|
|
2290
2288
|
method: "POST";
|
|
2291
2289
|
operationId: string;
|
|
2292
|
-
use: ((inputContext:
|
|
2293
|
-
body: zod.ZodIntersection<zod.ZodObject<{
|
|
2294
|
-
name: zod.ZodString;
|
|
2295
|
-
email: zod.ZodEmail;
|
|
2296
|
-
password: zod.ZodString;
|
|
2297
|
-
image: zod.ZodOptional<zod.ZodString>;
|
|
2298
|
-
callbackURL: zod.ZodOptional<zod.ZodString>;
|
|
2299
|
-
rememberMe: zod.ZodOptional<zod.ZodBoolean>;
|
|
2300
|
-
},
|
|
2290
|
+
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>)[];
|
|
2291
|
+
body: import("zod").ZodIntersection<import("zod").ZodObject<{
|
|
2292
|
+
name: import("zod").ZodString;
|
|
2293
|
+
email: import("zod").ZodEmail;
|
|
2294
|
+
password: import("zod").ZodString;
|
|
2295
|
+
image: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2296
|
+
callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2297
|
+
rememberMe: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
2298
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
|
|
2301
2299
|
cloneRequest: true;
|
|
2302
2300
|
metadata: {
|
|
2303
2301
|
allowedMediaTypes: string[];
|
|
@@ -2309,7 +2307,7 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2309
2307
|
image?: string | undefined;
|
|
2310
2308
|
callbackURL?: string | undefined;
|
|
2311
2309
|
rememberMe?: boolean | undefined;
|
|
2312
|
-
} &
|
|
2310
|
+
} & import("@better-auth/core/db").InferDBFieldsFromPluginsInput<"user", Option["plugins"]> & import("@better-auth/core/db").InferDBFieldsFromOptionsInput<Option["user"]>;
|
|
2313
2311
|
returned: {
|
|
2314
2312
|
token: string | null;
|
|
2315
2313
|
user: {
|
|
@@ -2320,7 +2318,7 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2320
2318
|
emailVerified: boolean;
|
|
2321
2319
|
name: string;
|
|
2322
2320
|
image?: string | null | undefined;
|
|
2323
|
-
} &
|
|
2321
|
+
} & import("@better-auth/core/db").InferDBFieldsFromOptions<Option["user"]> & import("@better-auth/core/db").InferDBFieldsFromPlugins<"user", Option["plugins"]> extends (infer T_7) ? { [K_1 in keyof T_7]: T_7[K_1]; } : never;
|
|
2324
2322
|
};
|
|
2325
2323
|
};
|
|
2326
2324
|
openapi: {
|
|
@@ -2448,7 +2446,7 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2448
2446
|
emailVerified: boolean;
|
|
2449
2447
|
name: string;
|
|
2450
2448
|
image?: string | null | undefined;
|
|
2451
|
-
} &
|
|
2449
|
+
} & import("@better-auth/core/db").InferDBFieldsFromOptions<Option["user"]> & import("@better-auth/core/db").InferDBFieldsFromPlugins<"user", Option["plugins"]> extends (infer T_8) ? { [K_1 in keyof T_8]: T_8[K_1]; } : never;
|
|
2452
2450
|
} | {
|
|
2453
2451
|
token: string;
|
|
2454
2452
|
user: {
|
|
@@ -2459,19 +2457,19 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2459
2457
|
emailVerified: boolean;
|
|
2460
2458
|
name: string;
|
|
2461
2459
|
image?: string | null | undefined;
|
|
2462
|
-
} &
|
|
2460
|
+
} & import("@better-auth/core/db").InferDBFieldsFromOptions<Option["user"]> & import("@better-auth/core/db").InferDBFieldsFromPlugins<"user", Option["plugins"]> extends (infer T_9) ? { [K_1 in keyof T_9]: T_9[K_1]; } : never;
|
|
2463
2461
|
}>;
|
|
2464
|
-
readonly signInEmail:
|
|
2462
|
+
readonly signInEmail: import("better-call").StrictEndpoint<"/sign-in/email", {
|
|
2465
2463
|
method: "POST";
|
|
2466
2464
|
operationId: string;
|
|
2467
|
-
use: ((inputContext:
|
|
2465
|
+
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>)[];
|
|
2468
2466
|
cloneRequest: true;
|
|
2469
|
-
body: zod.ZodObject<{
|
|
2470
|
-
email: zod.ZodString;
|
|
2471
|
-
password: zod.ZodString;
|
|
2472
|
-
callbackURL: zod.ZodOptional<zod.ZodString>;
|
|
2473
|
-
rememberMe: zod.ZodOptional<zod.ZodDefault<zod.ZodBoolean>>;
|
|
2474
|
-
},
|
|
2467
|
+
body: import("zod").ZodObject<{
|
|
2468
|
+
email: import("zod").ZodString;
|
|
2469
|
+
password: import("zod").ZodString;
|
|
2470
|
+
callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2471
|
+
rememberMe: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodBoolean>>;
|
|
2472
|
+
}, import("zod/v4/core").$strip>;
|
|
2475
2473
|
metadata: {
|
|
2476
2474
|
allowedMediaTypes: string[];
|
|
2477
2475
|
$Infer: {
|
|
@@ -2493,7 +2491,7 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2493
2491
|
emailVerified: boolean;
|
|
2494
2492
|
name: string;
|
|
2495
2493
|
image?: string | null | undefined;
|
|
2496
|
-
} &
|
|
2494
|
+
} & import("@better-auth/core/db").InferDBFieldsFromOptions<Option["user"]> & import("@better-auth/core/db").InferDBFieldsFromPlugins<"user", Option["plugins"]> extends (infer T_10) ? { [K_1 in keyof T_10]: T_10[K_1]; } : never;
|
|
2497
2495
|
};
|
|
2498
2496
|
};
|
|
2499
2497
|
openapi: {
|
|
@@ -2545,18 +2543,18 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2545
2543
|
emailVerified: boolean;
|
|
2546
2544
|
name: string;
|
|
2547
2545
|
image?: string | null | undefined;
|
|
2548
|
-
} &
|
|
2546
|
+
} & import("@better-auth/core/db").InferDBFieldsFromOptions<Option["user"]> & import("@better-auth/core/db").InferDBFieldsFromPlugins<"user", Option["plugins"]> extends (infer T_11) ? { [K_1 in keyof T_11]: T_11[K_1]; } : never;
|
|
2549
2547
|
}>;
|
|
2550
|
-
readonly resetPassword:
|
|
2548
|
+
readonly resetPassword: import("better-call").StrictEndpoint<"/reset-password", {
|
|
2551
2549
|
method: "POST";
|
|
2552
2550
|
operationId: string;
|
|
2553
|
-
query: zod.ZodOptional<zod.ZodObject<{
|
|
2554
|
-
token: zod.ZodOptional<zod.ZodString>;
|
|
2555
|
-
},
|
|
2556
|
-
body: zod.ZodObject<{
|
|
2557
|
-
newPassword: zod.ZodString;
|
|
2558
|
-
token: zod.ZodOptional<zod.ZodString>;
|
|
2559
|
-
},
|
|
2551
|
+
query: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
2552
|
+
token: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2553
|
+
}, import("zod/v4/core").$strip>>;
|
|
2554
|
+
body: import("zod").ZodObject<{
|
|
2555
|
+
newPassword: import("zod").ZodString;
|
|
2556
|
+
token: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2557
|
+
}, import("zod/v4/core").$strip>;
|
|
2560
2558
|
metadata: {
|
|
2561
2559
|
openapi: {
|
|
2562
2560
|
operationId: string;
|
|
@@ -2583,11 +2581,11 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2583
2581
|
}, {
|
|
2584
2582
|
status: boolean;
|
|
2585
2583
|
}>;
|
|
2586
|
-
readonly verifyPassword:
|
|
2584
|
+
readonly verifyPassword: import("better-call").StrictEndpoint<"/verify-password", {
|
|
2587
2585
|
method: "POST";
|
|
2588
|
-
body: zod.ZodObject<{
|
|
2589
|
-
password: zod.ZodString;
|
|
2590
|
-
},
|
|
2586
|
+
body: import("zod").ZodObject<{
|
|
2587
|
+
password: import("zod").ZodString;
|
|
2588
|
+
}, import("zod/v4/core").$strip>;
|
|
2591
2589
|
metadata: {
|
|
2592
2590
|
scope: "server";
|
|
2593
2591
|
openapi: {
|
|
@@ -2612,7 +2610,7 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2612
2610
|
};
|
|
2613
2611
|
};
|
|
2614
2612
|
};
|
|
2615
|
-
use: ((inputContext:
|
|
2613
|
+
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
2616
2614
|
session: {
|
|
2617
2615
|
session: Record<string, any> & {
|
|
2618
2616
|
id: string;
|
|
@@ -2638,14 +2636,14 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2638
2636
|
}, {
|
|
2639
2637
|
status: boolean;
|
|
2640
2638
|
}>;
|
|
2641
|
-
readonly verifyEmail:
|
|
2639
|
+
readonly verifyEmail: import("better-call").StrictEndpoint<"/verify-email", {
|
|
2642
2640
|
method: "GET";
|
|
2643
2641
|
operationId: string;
|
|
2644
|
-
query: zod.ZodObject<{
|
|
2645
|
-
token: zod.ZodString;
|
|
2646
|
-
callbackURL: zod.ZodOptional<zod.ZodString>;
|
|
2647
|
-
},
|
|
2648
|
-
use: ((inputContext:
|
|
2642
|
+
query: import("zod").ZodObject<{
|
|
2643
|
+
token: import("zod").ZodString;
|
|
2644
|
+
callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2645
|
+
}, import("zod/v4/core").$strip>;
|
|
2646
|
+
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>)[];
|
|
2649
2647
|
metadata: {
|
|
2650
2648
|
openapi: {
|
|
2651
2649
|
description: string;
|
|
@@ -2694,14 +2692,14 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2694
2692
|
}, void | {
|
|
2695
2693
|
status: boolean;
|
|
2696
2694
|
}>;
|
|
2697
|
-
readonly sendVerificationEmail:
|
|
2695
|
+
readonly sendVerificationEmail: import("better-call").StrictEndpoint<"/send-verification-email", {
|
|
2698
2696
|
method: "POST";
|
|
2699
2697
|
operationId: string;
|
|
2700
2698
|
cloneRequest: true;
|
|
2701
|
-
body: zod.ZodObject<{
|
|
2702
|
-
email: zod.ZodEmail;
|
|
2703
|
-
callbackURL: zod.ZodOptional<zod.ZodString>;
|
|
2704
|
-
},
|
|
2699
|
+
body: import("zod").ZodObject<{
|
|
2700
|
+
email: import("zod").ZodEmail;
|
|
2701
|
+
callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2702
|
+
}, import("zod/v4/core").$strip>;
|
|
2705
2703
|
metadata: {
|
|
2706
2704
|
openapi: {
|
|
2707
2705
|
operationId: string;
|
|
@@ -2770,13 +2768,13 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2770
2768
|
}, {
|
|
2771
2769
|
status: boolean;
|
|
2772
2770
|
}>;
|
|
2773
|
-
readonly changeEmail:
|
|
2771
|
+
readonly changeEmail: import("better-call").StrictEndpoint<"/change-email", {
|
|
2774
2772
|
method: "POST";
|
|
2775
|
-
body: zod.ZodObject<{
|
|
2776
|
-
newEmail: zod.ZodEmail;
|
|
2777
|
-
callbackURL: zod.ZodOptional<zod.ZodString>;
|
|
2778
|
-
},
|
|
2779
|
-
use: ((inputContext:
|
|
2773
|
+
body: import("zod").ZodObject<{
|
|
2774
|
+
newEmail: import("zod").ZodEmail;
|
|
2775
|
+
callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2776
|
+
}, import("zod/v4/core").$strip>;
|
|
2777
|
+
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
2780
2778
|
session: {
|
|
2781
2779
|
session: Record<string, any> & {
|
|
2782
2780
|
id: string;
|
|
@@ -2836,15 +2834,15 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2836
2834
|
}, {
|
|
2837
2835
|
status: boolean;
|
|
2838
2836
|
}>;
|
|
2839
|
-
readonly changePassword:
|
|
2837
|
+
readonly changePassword: import("better-call").StrictEndpoint<"/change-password", {
|
|
2840
2838
|
method: "POST";
|
|
2841
2839
|
operationId: string;
|
|
2842
|
-
body: zod.ZodObject<{
|
|
2843
|
-
newPassword: zod.ZodString;
|
|
2844
|
-
currentPassword: zod.ZodString;
|
|
2845
|
-
revokeOtherSessions: zod.ZodOptional<zod.ZodBoolean>;
|
|
2846
|
-
},
|
|
2847
|
-
use: ((inputContext:
|
|
2840
|
+
body: import("zod").ZodObject<{
|
|
2841
|
+
newPassword: import("zod").ZodString;
|
|
2842
|
+
currentPassword: import("zod").ZodString;
|
|
2843
|
+
revokeOtherSessions: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
2844
|
+
}, import("zod/v4/core").$strip>;
|
|
2845
|
+
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
2848
2846
|
session: {
|
|
2849
2847
|
session: Record<string, any> & {
|
|
2850
2848
|
id: string;
|
|
@@ -2952,12 +2950,12 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2952
2950
|
image?: string | null | undefined;
|
|
2953
2951
|
};
|
|
2954
2952
|
}>;
|
|
2955
|
-
readonly setPassword:
|
|
2953
|
+
readonly setPassword: import("better-call").StrictEndpoint<string, {
|
|
2956
2954
|
method: "POST";
|
|
2957
|
-
body: zod.ZodObject<{
|
|
2958
|
-
newPassword: zod.ZodString;
|
|
2959
|
-
},
|
|
2960
|
-
use: ((inputContext:
|
|
2955
|
+
body: import("zod").ZodObject<{
|
|
2956
|
+
newPassword: import("zod").ZodString;
|
|
2957
|
+
}, import("zod/v4/core").$strip>;
|
|
2958
|
+
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
2961
2959
|
session: {
|
|
2962
2960
|
session: Record<string, any> & {
|
|
2963
2961
|
id: string;
|
|
@@ -2983,11 +2981,11 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2983
2981
|
}, {
|
|
2984
2982
|
status: boolean;
|
|
2985
2983
|
}>;
|
|
2986
|
-
readonly updateSession:
|
|
2984
|
+
readonly updateSession: import("better-call").StrictEndpoint<"/update-session", {
|
|
2987
2985
|
method: "POST";
|
|
2988
2986
|
operationId: string;
|
|
2989
|
-
body: zod.ZodRecord<zod.ZodString, zod.ZodAny>;
|
|
2990
|
-
use: ((inputContext:
|
|
2987
|
+
body: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>;
|
|
2988
|
+
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
2991
2989
|
session: {
|
|
2992
2990
|
session: Record<string, any> & {
|
|
2993
2991
|
id: string;
|
|
@@ -3049,11 +3047,11 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3049
3047
|
userAgent?: string | null | undefined;
|
|
3050
3048
|
};
|
|
3051
3049
|
}>;
|
|
3052
|
-
readonly updateUser:
|
|
3050
|
+
readonly updateUser: import("better-call").StrictEndpoint<"/update-user", {
|
|
3053
3051
|
method: "POST";
|
|
3054
3052
|
operationId: string;
|
|
3055
|
-
body: zod.ZodRecord<zod.ZodString, zod.ZodAny>;
|
|
3056
|
-
use: ((inputContext:
|
|
3053
|
+
body: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>;
|
|
3054
|
+
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
3057
3055
|
session: {
|
|
3058
3056
|
session: Record<string, any> & {
|
|
3059
3057
|
id: string;
|
|
@@ -3129,9 +3127,9 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3129
3127
|
}, {
|
|
3130
3128
|
status: boolean;
|
|
3131
3129
|
}>;
|
|
3132
|
-
readonly deleteUser:
|
|
3130
|
+
readonly deleteUser: import("better-call").StrictEndpoint<"/delete-user", {
|
|
3133
3131
|
method: "POST";
|
|
3134
|
-
use: ((inputContext:
|
|
3132
|
+
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
3135
3133
|
session: {
|
|
3136
3134
|
session: Record<string, any> & {
|
|
3137
3135
|
id: string;
|
|
@@ -3154,11 +3152,11 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3154
3152
|
};
|
|
3155
3153
|
};
|
|
3156
3154
|
}>)[];
|
|
3157
|
-
body: zod.ZodObject<{
|
|
3158
|
-
callbackURL: zod.ZodOptional<zod.ZodString>;
|
|
3159
|
-
password: zod.ZodOptional<zod.ZodString>;
|
|
3160
|
-
token: zod.ZodOptional<zod.ZodString>;
|
|
3161
|
-
},
|
|
3155
|
+
body: import("zod").ZodObject<{
|
|
3156
|
+
callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
3157
|
+
password: import("zod").ZodOptional<import("zod").ZodString>;
|
|
3158
|
+
token: import("zod").ZodOptional<import("zod").ZodString>;
|
|
3159
|
+
}, import("zod/v4/core").$strip>;
|
|
3162
3160
|
metadata: {
|
|
3163
3161
|
openapi: {
|
|
3164
3162
|
operationId: string;
|
|
@@ -3216,12 +3214,12 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3216
3214
|
success: boolean;
|
|
3217
3215
|
message: string;
|
|
3218
3216
|
}>;
|
|
3219
|
-
readonly requestPasswordReset:
|
|
3217
|
+
readonly requestPasswordReset: import("better-call").StrictEndpoint<"/request-password-reset", {
|
|
3220
3218
|
method: "POST";
|
|
3221
|
-
body: zod.ZodObject<{
|
|
3222
|
-
email: zod.ZodEmail;
|
|
3223
|
-
redirectTo: zod.ZodOptional<zod.ZodString>;
|
|
3224
|
-
},
|
|
3219
|
+
body: import("zod").ZodObject<{
|
|
3220
|
+
email: import("zod").ZodEmail;
|
|
3221
|
+
redirectTo: import("zod").ZodOptional<import("zod").ZodString>;
|
|
3222
|
+
}, import("zod/v4/core").$strip>;
|
|
3225
3223
|
metadata: {
|
|
3226
3224
|
openapi: {
|
|
3227
3225
|
operationId: string;
|
|
@@ -3248,18 +3246,18 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3248
3246
|
};
|
|
3249
3247
|
};
|
|
3250
3248
|
};
|
|
3251
|
-
use: ((inputContext:
|
|
3249
|
+
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>)[];
|
|
3252
3250
|
}, {
|
|
3253
3251
|
status: boolean;
|
|
3254
3252
|
message: string;
|
|
3255
3253
|
}>;
|
|
3256
|
-
readonly requestPasswordResetCallback:
|
|
3254
|
+
readonly requestPasswordResetCallback: import("better-call").StrictEndpoint<"/reset-password/:token", {
|
|
3257
3255
|
method: "GET";
|
|
3258
3256
|
operationId: string;
|
|
3259
|
-
query: zod.ZodObject<{
|
|
3260
|
-
callbackURL: zod.ZodString;
|
|
3261
|
-
},
|
|
3262
|
-
use: ((inputContext:
|
|
3257
|
+
query: import("zod").ZodObject<{
|
|
3258
|
+
callbackURL: import("zod").ZodString;
|
|
3259
|
+
}, import("zod/v4/core").$strip>;
|
|
3260
|
+
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>)[];
|
|
3263
3261
|
metadata: {
|
|
3264
3262
|
openapi: {
|
|
3265
3263
|
operationId: string;
|
|
@@ -3301,10 +3299,10 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3301
3299
|
};
|
|
3302
3300
|
};
|
|
3303
3301
|
}, never>;
|
|
3304
|
-
readonly listSessions:
|
|
3302
|
+
readonly listSessions: import("better-call").StrictEndpoint<"/list-sessions", {
|
|
3305
3303
|
method: "GET";
|
|
3306
3304
|
operationId: string;
|
|
3307
|
-
use: ((inputContext:
|
|
3305
|
+
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
3308
3306
|
session: {
|
|
3309
3307
|
session: Record<string, any> & {
|
|
3310
3308
|
id: string;
|
|
@@ -3349,7 +3347,7 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3349
3347
|
};
|
|
3350
3348
|
};
|
|
3351
3349
|
};
|
|
3352
|
-
}, Prettify
|
|
3350
|
+
}, Prettify<{
|
|
3353
3351
|
id: string;
|
|
3354
3352
|
createdAt: Date;
|
|
3355
3353
|
updatedAt: Date;
|
|
@@ -3358,13 +3356,13 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3358
3356
|
token: string;
|
|
3359
3357
|
ipAddress?: string | null | undefined;
|
|
3360
3358
|
userAgent?: string | null | undefined;
|
|
3361
|
-
} &
|
|
3362
|
-
readonly revokeSession:
|
|
3359
|
+
} & import("@better-auth/core/db").InferDBFieldsFromOptions<Option["session"]> & import("@better-auth/core/db").InferDBFieldsFromPlugins<"session", Option["plugins"]> extends (infer T_12) ? { [K_2 in keyof T_12]: T_12[K_2]; } : never>[]>;
|
|
3360
|
+
readonly revokeSession: import("better-call").StrictEndpoint<"/revoke-session", {
|
|
3363
3361
|
method: "POST";
|
|
3364
|
-
body: zod.ZodObject<{
|
|
3365
|
-
token: zod.ZodString;
|
|
3366
|
-
},
|
|
3367
|
-
use: ((inputContext:
|
|
3362
|
+
body: import("zod").ZodObject<{
|
|
3363
|
+
token: import("zod").ZodString;
|
|
3364
|
+
}, import("zod/v4/core").$strip>;
|
|
3365
|
+
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
3368
3366
|
session: {
|
|
3369
3367
|
session: Record<string, any> & {
|
|
3370
3368
|
id: string;
|
|
@@ -3431,9 +3429,9 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3431
3429
|
}, {
|
|
3432
3430
|
status: boolean;
|
|
3433
3431
|
}>;
|
|
3434
|
-
readonly revokeSessions:
|
|
3432
|
+
readonly revokeSessions: import("better-call").StrictEndpoint<"/revoke-sessions", {
|
|
3435
3433
|
method: "POST";
|
|
3436
|
-
use: ((inputContext:
|
|
3434
|
+
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
3437
3435
|
session: {
|
|
3438
3436
|
session: Record<string, any> & {
|
|
3439
3437
|
id: string;
|
|
@@ -3484,10 +3482,10 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3484
3482
|
}, {
|
|
3485
3483
|
status: boolean;
|
|
3486
3484
|
}>;
|
|
3487
|
-
readonly revokeOtherSessions:
|
|
3485
|
+
readonly revokeOtherSessions: import("better-call").StrictEndpoint<"/revoke-other-sessions", {
|
|
3488
3486
|
method: "POST";
|
|
3489
3487
|
requireHeaders: true;
|
|
3490
|
-
use: ((inputContext:
|
|
3488
|
+
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
3491
3489
|
session: {
|
|
3492
3490
|
session: Record<string, any> & {
|
|
3493
3491
|
id: string;
|
|
@@ -3537,26 +3535,26 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3537
3535
|
}, {
|
|
3538
3536
|
status: boolean;
|
|
3539
3537
|
}>;
|
|
3540
|
-
readonly linkSocialAccount:
|
|
3538
|
+
readonly linkSocialAccount: import("better-call").StrictEndpoint<"/link-social", {
|
|
3541
3539
|
method: "POST";
|
|
3542
3540
|
requireHeaders: true;
|
|
3543
|
-
body: zod.ZodObject<{
|
|
3544
|
-
callbackURL: zod.ZodOptional<zod.ZodString>;
|
|
3545
|
-
provider: zod.ZodType<(string & {}) | "linear" | "huggingface" | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown,
|
|
3546
|
-
idToken: zod.ZodOptional<zod.ZodObject<{
|
|
3547
|
-
token: zod.ZodString;
|
|
3548
|
-
nonce: zod.ZodOptional<zod.ZodString>;
|
|
3549
|
-
accessToken: zod.ZodOptional<zod.ZodString>;
|
|
3550
|
-
refreshToken: zod.ZodOptional<zod.ZodString>;
|
|
3551
|
-
scopes: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
|
|
3552
|
-
},
|
|
3553
|
-
requestSignUp: zod.ZodOptional<zod.ZodBoolean>;
|
|
3554
|
-
scopes: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
|
|
3555
|
-
errorCallbackURL: zod.ZodOptional<zod.ZodString>;
|
|
3556
|
-
disableRedirect: zod.ZodOptional<zod.ZodBoolean>;
|
|
3557
|
-
additionalData: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodAny>>;
|
|
3558
|
-
},
|
|
3559
|
-
use: ((inputContext:
|
|
3541
|
+
body: import("zod").ZodObject<{
|
|
3542
|
+
callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
3543
|
+
provider: import("zod").ZodType<(string & {}) | "linear" | "huggingface" | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown, import("zod/v4/core").$ZodTypeInternals<(string & {}) | "linear" | "huggingface" | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown>>;
|
|
3544
|
+
idToken: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
3545
|
+
token: import("zod").ZodString;
|
|
3546
|
+
nonce: import("zod").ZodOptional<import("zod").ZodString>;
|
|
3547
|
+
accessToken: import("zod").ZodOptional<import("zod").ZodString>;
|
|
3548
|
+
refreshToken: import("zod").ZodOptional<import("zod").ZodString>;
|
|
3549
|
+
scopes: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
3550
|
+
}, import("zod/v4/core").$strip>>;
|
|
3551
|
+
requestSignUp: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
3552
|
+
scopes: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
3553
|
+
errorCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
3554
|
+
disableRedirect: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
3555
|
+
additionalData: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
|
|
3556
|
+
}, import("zod/v4/core").$strip>;
|
|
3557
|
+
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
3560
3558
|
session: {
|
|
3561
3559
|
session: Record<string, any> & {
|
|
3562
3560
|
id: string;
|
|
@@ -3615,9 +3613,9 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3615
3613
|
url: string;
|
|
3616
3614
|
redirect: boolean;
|
|
3617
3615
|
}>;
|
|
3618
|
-
readonly listUserAccounts:
|
|
3616
|
+
readonly listUserAccounts: import("better-call").StrictEndpoint<"/list-accounts", {
|
|
3619
3617
|
method: "GET";
|
|
3620
|
-
use: ((inputContext:
|
|
3618
|
+
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
3621
3619
|
session: {
|
|
3622
3620
|
session: Record<string, any> & {
|
|
3623
3621
|
id: string;
|
|
@@ -3699,13 +3697,13 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3699
3697
|
providerId: string;
|
|
3700
3698
|
accountId: string;
|
|
3701
3699
|
}[]>;
|
|
3702
|
-
readonly deleteUserCallback:
|
|
3700
|
+
readonly deleteUserCallback: import("better-call").StrictEndpoint<"/delete-user/callback", {
|
|
3703
3701
|
method: "GET";
|
|
3704
|
-
query: zod.ZodObject<{
|
|
3705
|
-
token: zod.ZodString;
|
|
3706
|
-
callbackURL: zod.ZodOptional<zod.ZodString>;
|
|
3707
|
-
},
|
|
3708
|
-
use: ((inputContext:
|
|
3702
|
+
query: import("zod").ZodObject<{
|
|
3703
|
+
token: import("zod").ZodString;
|
|
3704
|
+
callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
3705
|
+
}, import("zod/v4/core").$strip>;
|
|
3706
|
+
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>)[];
|
|
3709
3707
|
metadata: {
|
|
3710
3708
|
openapi: {
|
|
3711
3709
|
description: string;
|
|
@@ -3739,13 +3737,13 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3739
3737
|
success: boolean;
|
|
3740
3738
|
message: string;
|
|
3741
3739
|
}>;
|
|
3742
|
-
readonly unlinkAccount:
|
|
3740
|
+
readonly unlinkAccount: import("better-call").StrictEndpoint<"/unlink-account", {
|
|
3743
3741
|
method: "POST";
|
|
3744
|
-
body: zod.ZodObject<{
|
|
3745
|
-
providerId: zod.ZodString;
|
|
3746
|
-
accountId: zod.ZodOptional<zod.ZodString>;
|
|
3747
|
-
},
|
|
3748
|
-
use: ((inputContext:
|
|
3742
|
+
body: import("zod").ZodObject<{
|
|
3743
|
+
providerId: import("zod").ZodString;
|
|
3744
|
+
accountId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
3745
|
+
}, import("zod/v4/core").$strip>;
|
|
3746
|
+
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
3749
3747
|
session: {
|
|
3750
3748
|
session: Record<string, any> & {
|
|
3751
3749
|
id: string;
|
|
@@ -3793,13 +3791,13 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3793
3791
|
}, {
|
|
3794
3792
|
status: boolean;
|
|
3795
3793
|
}>;
|
|
3796
|
-
readonly refreshToken:
|
|
3794
|
+
readonly refreshToken: import("better-call").StrictEndpoint<"/refresh-token", {
|
|
3797
3795
|
method: "POST";
|
|
3798
|
-
body: zod.ZodObject<{
|
|
3799
|
-
providerId: zod.ZodString;
|
|
3800
|
-
accountId: zod.ZodOptional<zod.ZodString>;
|
|
3801
|
-
userId: zod.ZodOptional<zod.ZodString>;
|
|
3802
|
-
},
|
|
3796
|
+
body: import("zod").ZodObject<{
|
|
3797
|
+
providerId: import("zod").ZodString;
|
|
3798
|
+
accountId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
3799
|
+
userId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
3800
|
+
}, import("zod/v4/core").$strip>;
|
|
3803
3801
|
metadata: {
|
|
3804
3802
|
openapi: {
|
|
3805
3803
|
description: string;
|
|
@@ -3852,13 +3850,13 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3852
3850
|
providerId: string;
|
|
3853
3851
|
accountId: string;
|
|
3854
3852
|
}>;
|
|
3855
|
-
readonly getAccessToken:
|
|
3853
|
+
readonly getAccessToken: import("better-call").StrictEndpoint<"/get-access-token", {
|
|
3856
3854
|
method: "POST";
|
|
3857
|
-
body: zod.ZodObject<{
|
|
3858
|
-
providerId: zod.ZodString;
|
|
3859
|
-
accountId: zod.ZodOptional<zod.ZodString>;
|
|
3860
|
-
userId: zod.ZodOptional<zod.ZodString>;
|
|
3861
|
-
},
|
|
3855
|
+
body: import("zod").ZodObject<{
|
|
3856
|
+
providerId: import("zod").ZodString;
|
|
3857
|
+
accountId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
3858
|
+
userId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
3859
|
+
}, import("zod/v4/core").$strip>;
|
|
3862
3860
|
metadata: {
|
|
3863
3861
|
openapi: {
|
|
3864
3862
|
description: string;
|
|
@@ -3900,7 +3898,7 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3900
3898
|
scopes: string[];
|
|
3901
3899
|
idToken: string | undefined;
|
|
3902
3900
|
}>;
|
|
3903
|
-
readonly accountInfo:
|
|
3901
|
+
readonly accountInfo: import("better-call").StrictEndpoint<"/account-info", {
|
|
3904
3902
|
method: "GET";
|
|
3905
3903
|
metadata: {
|
|
3906
3904
|
openapi: {
|
|
@@ -3949,16 +3947,16 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3949
3947
|
};
|
|
3950
3948
|
};
|
|
3951
3949
|
};
|
|
3952
|
-
query: zod.ZodOptional<zod.ZodObject<{
|
|
3953
|
-
accountId: zod.ZodOptional<zod.ZodString>;
|
|
3954
|
-
providerId: zod.ZodOptional<zod.ZodString>;
|
|
3955
|
-
userId: zod.ZodOptional<zod.ZodString>;
|
|
3956
|
-
},
|
|
3950
|
+
query: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
3951
|
+
accountId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
3952
|
+
providerId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
3953
|
+
userId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
3954
|
+
}, import("zod/v4/core").$strip>>;
|
|
3957
3955
|
}, {
|
|
3958
|
-
user:
|
|
3956
|
+
user: import("@better-auth/core/oauth2").OAuth2UserInfo;
|
|
3959
3957
|
data: Record<string, any>;
|
|
3960
3958
|
} | null>;
|
|
3961
|
-
} extends infer T_2 ? { [K in keyof T_2 as K extends keyof T_1 ? never : K]: T_2[K] } : never) & T_1> : never : never : never;
|
|
3959
|
+
} extends (infer T_2) ? { [K in keyof T_2 as K extends keyof T_1 ? never : K]: T_2[K]; } : never) & T_1> : never : never : never;
|
|
3962
3960
|
};
|
|
3963
3961
|
//#endregion
|
|
3964
3962
|
export { APIError, type AuthEndpoint, type AuthMiddleware, type DispatchContext, accountInfo, callbackOAuth, changeEmail, changePassword, checkEndpointConflicts, createAuthEndpoint, createAuthMiddleware, createEmailVerificationToken, deleteUser, deleteUserCallback, dispatchAuthEndpoint, error, formCsrfMiddleware, freshSessionMiddleware, getAccessToken, getAuthoritativeSessionFromCtx, getEndpoints, getIp, getOAuthState, getSession, getSessionFromCtx, getShouldSkipSessionRefresh, isAPIError, isStateful, linkSocialAccount, listSessions, listUserAccounts, ok, optionsMiddleware, originCheck, originCheckMiddleware, refreshToken, requestOnlySessionMiddleware, requestPasswordReset, requestPasswordResetCallback, requireOrgRole, requireResourceOwnership, resetPassword, revokeOtherSessions, revokeSession, revokeSessions, router, sendVerificationEmail, sendVerificationEmailFn, sensitiveSessionMiddleware, sessionMiddleware, setPassword, setShouldSkipSessionRefresh, signInEmail, signInSocial, signOut, signUpEmail, unlinkAccount, updateSession, updateUser, verifyEmail, verifyPassword };
|