better-auth 1.8.0-beta.2 → 1.8.0-beta.3
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 +5 -10
- package/dist/api/dispatch.d.mts +3 -5
- package/dist/api/dispatch.mjs +6 -4
- package/dist/api/index.d.mts +506 -508
- package/dist/api/index.mjs +35 -34
- package/dist/api/middlewares/authorization.d.mts +15 -12
- 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 +4 -7
- package/dist/api/routes/account.d.mts +11 -15
- package/dist/api/routes/account.mjs +7 -4
- package/dist/api/routes/callback.d.mts +2 -5
- package/dist/api/routes/callback.mjs +4 -2
- package/dist/api/routes/email-verification.d.mts +7 -12
- package/dist/api/routes/error.d.mts +2 -5
- package/dist/api/routes/index.d.mts +2 -1
- package/dist/api/routes/ok.d.mts +2 -5
- package/dist/api/routes/password.d.mts +8 -11
- package/dist/api/routes/password.mjs +3 -2
- package/dist/api/routes/session.d.mts +26 -29
- package/dist/api/routes/sign-in.d.mts +4 -6
- package/dist/api/routes/sign-out.d.mts +2 -5
- package/dist/api/routes/sign-up.d.mts +4 -6
- package/dist/api/routes/update-session.d.mts +4 -6
- package/dist/api/routes/update-user.d.mts +14 -16
- package/dist/api/routes/update-user.mjs +1 -1
- package/dist/api/state/oauth.d.mts +0 -3
- package/dist/api/state/oauth.mjs +2 -1
- package/dist/auth/full.d.mts +3 -4
- package/dist/auth/minimal.d.mts +3 -3
- package/dist/client/broadcast-channel.d.mts +6 -7
- package/dist/client/config.d.mts +15 -19
- package/dist/client/config.mjs +2 -2
- package/dist/client/equality.d.mts +3 -5
- package/dist/client/focus-manager.d.mts +4 -5
- package/dist/client/index.d.mts +8 -7
- package/dist/client/lynx/index.d.mts +6 -7
- package/dist/client/lynx/index.mjs +3 -2
- package/dist/client/lynx/lynx-store.d.mts +3 -4
- package/dist/client/online-manager.d.mts +4 -5
- package/dist/client/parser.d.mts +9 -5
- package/dist/client/path-to-object.d.mts +13 -14
- package/dist/client/plugins/index.d.mts +1 -1
- package/dist/client/plugins/infer-plugin.d.mts +2 -4
- package/dist/client/query.d.mts +4 -6
- package/dist/client/react/index.d.mts +6 -7
- package/dist/client/react/index.mjs +3 -2
- package/dist/client/react/react-store.d.mts +3 -4
- package/dist/client/session-atom.d.mts +4 -4
- package/dist/client/session-refresh.d.mts +3 -5
- package/dist/client/solid/index.d.mts +6 -7
- package/dist/client/solid/index.mjs +3 -2
- package/dist/client/svelte/index.d.mts +6 -7
- package/dist/client/svelte/index.mjs +3 -2
- package/dist/client/types.d.mts +11 -11
- package/dist/client/vanilla.d.mts +4 -5
- package/dist/client/vanilla.mjs +3 -2
- package/dist/client/vue/index.d.mts +6 -7
- package/dist/client/vue/index.mjs +3 -2
- package/dist/context/create-context.mjs +7 -7
- package/dist/context/helpers.mjs +9 -7
- package/dist/cookies/cookie-utils.d.mts +13 -13
- package/dist/cookies/cookie-utils.mjs +1 -3
- package/dist/cookies/index.d.mts +17 -18
- package/dist/cookies/index.mjs +11 -7
- package/dist/cookies/jwt.mjs +2 -1
- package/dist/cookies/session-store.d.mts +6 -5
- package/dist/cookies/session-store.mjs +3 -2
- package/dist/crypto/buffer.d.mts +2 -3
- package/dist/crypto/index.d.mts +9 -16
- package/dist/crypto/index.mjs +2 -1
- package/dist/crypto/jwt.d.mts +5 -7
- package/dist/crypto/jwt.mjs +2 -1
- package/dist/crypto/password.d.mts +1 -5
- package/dist/crypto/random.d.mts +2 -3
- package/dist/db/adapter-base.d.mts +2 -4
- package/dist/db/adapter-kysely.d.mts +2 -4
- package/dist/db/field-converter.d.mts +3 -5
- package/dist/db/field.d.mts +11 -12
- package/dist/db/get-migration.d.mts +4 -8
- package/dist/db/get-migration.mjs +22 -22
- package/dist/db/get-schema.d.mts +2 -4
- package/dist/db/internal-adapter.d.mts +2 -4
- package/dist/db/internal-adapter.mjs +6 -4
- package/dist/db/revoke-unproven-account-access.d.mts +3 -4
- package/dist/db/schema.d.mts +15 -16
- package/dist/db/schema.mjs +6 -3
- package/dist/db/to-zod.d.mts +5 -9
- package/dist/db/with-hooks.d.mts +3 -5
- package/dist/index.d.mts +4 -3
- package/dist/integrations/next-js.d.mts +7 -11
- package/dist/integrations/node.d.mts +5 -7
- package/dist/integrations/node.mjs +4 -2
- package/dist/integrations/solid-start.d.mts +2 -3
- package/dist/integrations/svelte-kit.d.mts +6 -14
- package/dist/integrations/tanstack-start-solid.d.mts +4 -8
- package/dist/integrations/tanstack-start.d.mts +4 -8
- package/dist/oauth2/link-account.d.mts +5 -11
- package/dist/oauth2/link-account.mjs +12 -6
- package/dist/oauth2/state.d.mts +5 -7
- package/dist/oauth2/state.mjs +1 -1
- package/dist/oauth2/utils.d.mts +4 -6
- package/dist/package.mjs +1 -1
- package/dist/plugins/access/access.d.mts +4 -6
- package/dist/plugins/access/index.mjs +1 -2
- package/dist/plugins/access/types.d.mts +12 -14
- package/dist/plugins/additional-fields/client.d.mts +2 -4
- package/dist/plugins/admin/access/index.mjs +1 -2
- package/dist/plugins/admin/access/statement.d.mts +7 -7
- package/dist/plugins/admin/admin.d.mts +122 -128
- package/dist/plugins/admin/client.d.mts +32 -32
- package/dist/plugins/admin/client.mjs +1 -1
- package/dist/plugins/admin/error-codes.d.mts +25 -28
- package/dist/plugins/admin/index.d.mts +1 -1
- package/dist/plugins/admin/index.mjs +1 -2
- package/dist/plugins/admin/schema.d.mts +3 -4
- package/dist/plugins/admin/types.d.mts +8 -8
- package/dist/plugins/anonymous/client.d.mts +10 -12
- package/dist/plugins/anonymous/client.mjs +1 -1
- package/dist/plugins/anonymous/error-codes.d.mts +10 -13
- package/dist/plugins/anonymous/index.d.mts +17 -21
- package/dist/plugins/anonymous/schema.d.mts +2 -3
- package/dist/plugins/anonymous/types.d.mts +5 -6
- package/dist/plugins/bearer/index.d.mts +7 -11
- package/dist/plugins/captcha/constants.d.mts +2 -3
- package/dist/plugins/captcha/index.d.mts +6 -9
- package/dist/plugins/captcha/types.d.mts +11 -13
- package/dist/plugins/custom-session/client.d.mts +2 -4
- package/dist/plugins/custom-session/index.d.mts +10 -16
- package/dist/plugins/device-authorization/client.d.mts +2 -4
- package/dist/plugins/device-authorization/index.d.mts +39 -44
- package/dist/plugins/device-authorization/index.mjs +9 -8
- package/dist/plugins/device-authorization/routes.d.mts +11 -9
- package/dist/plugins/device-authorization/routes.mjs +6 -5
- package/dist/plugins/device-authorization/schema.d.mts +2 -3
- package/dist/plugins/email-otp/client.d.mts +5 -7
- package/dist/plugins/email-otp/client.mjs +1 -1
- package/dist/plugins/email-otp/error-codes.d.mts +5 -8
- package/dist/plugins/email-otp/index.d.mts +69 -76
- package/dist/plugins/email-otp/otp-token.mjs +19 -7
- package/dist/plugins/email-otp/types.d.mts +2 -4
- package/dist/plugins/generic-oauth/index.d.mts +9 -13
- package/dist/plugins/generic-oauth/index.mjs +6 -4
- package/dist/plugins/generic-oauth/providers/auth0.d.mts +3 -5
- package/dist/plugins/generic-oauth/providers/gumroad.d.mts +3 -5
- package/dist/plugins/generic-oauth/providers/gumroad.mjs +1 -1
- package/dist/plugins/generic-oauth/providers/hubspot.d.mts +3 -5
- package/dist/plugins/generic-oauth/providers/hubspot.mjs +2 -1
- package/dist/plugins/generic-oauth/providers/index.d.mts +2 -1
- package/dist/plugins/generic-oauth/providers/keycloak.d.mts +3 -5
- package/dist/plugins/generic-oauth/providers/line.d.mts +3 -5
- package/dist/plugins/generic-oauth/providers/microsoft-entra-id.d.mts +3 -5
- package/dist/plugins/generic-oauth/providers/okta.d.mts +3 -5
- package/dist/plugins/generic-oauth/providers/patreon.d.mts +3 -5
- package/dist/plugins/generic-oauth/providers/patreon.mjs +2 -2
- package/dist/plugins/generic-oauth/providers/slack.d.mts +3 -5
- package/dist/plugins/generic-oauth/providers/slack.mjs +5 -2
- package/dist/plugins/generic-oauth/providers/yandex.d.mts +3 -5
- package/dist/plugins/generic-oauth/types.d.mts +6 -7
- package/dist/plugins/haveibeenpwned/index.d.mts +7 -11
- package/dist/plugins/index.d.mts +4 -1
- package/dist/plugins/jwt/client.d.mts +2 -3
- package/dist/plugins/jwt/index.d.mts +11 -14
- package/dist/plugins/jwt/index.mjs +1 -1
- package/dist/plugins/jwt/schema.d.mts +2 -3
- package/dist/plugins/jwt/sign.d.mts +9 -8
- package/dist/plugins/jwt/types.d.mts +7 -8
- package/dist/plugins/jwt/utils.d.mts +6 -9
- package/dist/plugins/jwt/verify.d.mts +2 -4
- package/dist/plugins/last-login-method/client.d.mts +3 -4
- package/dist/plugins/last-login-method/index.d.mts +5 -9
- package/dist/plugins/last-login-method/index.mjs +1 -1
- package/dist/plugins/magic-link/client.d.mts +2 -4
- package/dist/plugins/magic-link/index.d.mts +7 -10
- package/dist/plugins/magic-link/index.mjs +20 -17
- package/dist/plugins/multi-session/client.d.mts +3 -5
- package/dist/plugins/multi-session/client.mjs +1 -1
- package/dist/plugins/multi-session/error-codes.d.mts +3 -6
- package/dist/plugins/multi-session/index.d.mts +10 -14
- package/dist/plugins/oauth-popup/client.d.mts +11 -17
- package/dist/plugins/oauth-popup/client.mjs +6 -4
- package/dist/plugins/oauth-popup/constants.d.mts +5 -6
- package/dist/plugins/oauth-popup/error-codes.d.mts +6 -9
- package/dist/plugins/oauth-popup/index.d.mts +11 -15
- package/dist/plugins/oauth-popup/index.mjs +8 -7
- package/dist/plugins/oauth-popup/types.d.mts +4 -6
- package/dist/plugins/oauth-proxy/index.d.mts +11 -15
- package/dist/plugins/oauth-proxy/index.mjs +10 -7
- package/dist/plugins/one-tap/client.d.mts +6 -9
- package/dist/plugins/one-tap/index.d.mts +4 -7
- package/dist/plugins/one-time-token/client.d.mts +2 -3
- package/dist/plugins/one-time-token/index.d.mts +8 -10
- package/dist/plugins/open-api/generator.d.mts +8 -8
- package/dist/plugins/open-api/generator.mjs +5 -5
- package/dist/plugins/open-api/index.d.mts +5 -7
- package/dist/plugins/organization/access/index.mjs +1 -2
- package/dist/plugins/organization/access/statement.d.mts +8 -8
- package/dist/plugins/organization/adapter.d.mts +60 -87
- package/dist/plugins/organization/adapter.mjs +14 -10
- package/dist/plugins/organization/client.d.mts +108 -107
- package/dist/plugins/organization/client.mjs +9 -5
- package/dist/plugins/organization/error-codes.d.mts +61 -64
- package/dist/plugins/organization/has-permission.d.mts +2 -4
- 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 +20 -20
- package/dist/plugins/organization/organization.mjs +13 -8
- package/dist/plugins/organization/permission.d.mts +4 -5
- package/dist/plugins/organization/routes/crud-access-control.d.mts +28 -28
- package/dist/plugins/organization/routes/crud-invites.d.mts +64 -65
- package/dist/plugins/organization/routes/crud-invites.mjs +21 -18
- package/dist/plugins/organization/routes/crud-members.d.mts +53 -56
- package/dist/plugins/organization/routes/crud-members.mjs +23 -21
- package/dist/plugins/organization/routes/crud-org.d.mts +63 -65
- package/dist/plugins/organization/routes/crud-org.mjs +4 -2
- package/dist/plugins/organization/routes/crud-team.d.mts +65 -66
- package/dist/plugins/organization/routes/crud-team.mjs +4 -2
- package/dist/plugins/organization/schema.d.mts +33 -33
- package/dist/plugins/organization/schema.mjs +1 -1
- package/dist/plugins/organization/types.d.mts +16 -17
- package/dist/plugins/phone-number/client.d.mts +14 -16
- package/dist/plugins/phone-number/client.mjs +1 -1
- package/dist/plugins/phone-number/error-codes.d.mts +14 -17
- package/dist/plugins/phone-number/index.d.mts +48 -54
- package/dist/plugins/phone-number/schema.d.mts +2 -3
- package/dist/plugins/phone-number/types.d.mts +4 -5
- package/dist/plugins/siwe/client.d.mts +2 -4
- package/dist/plugins/siwe/index.d.mts +7 -9
- package/dist/plugins/siwe/index.mjs +1 -1
- package/dist/plugins/siwe/parse-message.mjs +1 -3
- package/dist/plugins/siwe/schema.d.mts +3 -4
- package/dist/plugins/siwe/types.d.mts +4 -4
- package/dist/plugins/test-utils/auth-helpers.mjs +4 -2
- package/dist/plugins/test-utils/index.d.mts +3 -5
- package/dist/plugins/test-utils/types.d.mts +7 -7
- package/dist/plugins/two-factor/backup-codes/index.d.mts +11 -14
- package/dist/plugins/two-factor/backup-codes/index.mjs +12 -6
- package/dist/plugins/two-factor/client.d.mts +16 -19
- package/dist/plugins/two-factor/client.mjs +1 -1
- package/dist/plugins/two-factor/constant.mjs +1 -1
- package/dist/plugins/two-factor/error-code.d.mts +15 -18
- package/dist/plugins/two-factor/index.d.mts +31 -35
- package/dist/plugins/two-factor/index.mjs +6 -3
- package/dist/plugins/two-factor/otp/index.d.mts +5 -8
- package/dist/plugins/two-factor/otp/index.mjs +159 -154
- package/dist/plugins/two-factor/schema.d.mts +2 -3
- package/dist/plugins/two-factor/totp/index.d.mts +7 -10
- package/dist/plugins/two-factor/totp/index.mjs +164 -148
- package/dist/plugins/two-factor/types.d.mts +6 -7
- package/dist/plugins/username/client.d.mts +12 -14
- package/dist/plugins/username/client.mjs +1 -1
- package/dist/plugins/username/error-codes.d.mts +11 -14
- package/dist/plugins/username/index.d.mts +26 -31
- package/dist/plugins/username/schema.d.mts +7 -10
- package/dist/state.d.mts +4 -5
- package/dist/test-utils/headers.d.mts +2 -3
- package/dist/test-utils/http-test-instance.d.mts +26 -29
- package/dist/test-utils/test-instance.d.mts +7 -6
- package/dist/test-utils/test-instance.mjs +4 -2
- package/dist/types/adapter.d.mts +1 -1
- package/dist/types/api.d.mts +4 -6
- package/dist/types/auth.d.mts +2 -4
- package/dist/types/helper.d.mts +11 -12
- package/dist/types/index.d.mts +2 -2
- package/dist/types/models.d.mts +4 -5
- package/dist/types/plugins.d.mts +7 -8
- package/dist/utils/hide-metadata.d.mts +2 -3
- package/dist/utils/index.d.mts +2 -1
- package/dist/utils/is-api-error.mjs +1 -2
- package/dist/utils/time.d.mts +4 -4
- package/dist/utils/url.d.mts +13 -15
- package/dist/utils/wildcard.mjs +5 -3
- package/package.json +12 -12
package/dist/api/index.d.mts
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { OverrideMerge, Prettify as Prettify$1, 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,25 +19,20 @@ 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 { addOAuthServerContext, 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 { Middleware } from "better-call";
|
|
29
30
|
import { AuthEndpoint, AuthMiddleware, NO_STORE_HEADERS, createAuthEndpoint, createAuthMiddleware, optionsMiddleware } from "@better-auth/core/api";
|
|
30
|
-
import * as _$zod from "zod";
|
|
31
|
-
import * as _$zod_v4_core0 from "zod/v4/core";
|
|
32
|
-
|
|
33
31
|
//#region src/api/index.d.ts
|
|
34
|
-
declare function checkEndpointConflicts(options: BetterAuthOptions, logger: InternalLogger): void;
|
|
35
|
-
declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<AuthContext>, options: Option): {
|
|
32
|
+
export declare function checkEndpointConflicts(options: BetterAuthOptions, logger: InternalLogger): void;
|
|
33
|
+
export declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<AuthContext>, options: Option): {
|
|
36
34
|
api: OverrideMerge<{
|
|
37
|
-
readonly ok:
|
|
35
|
+
readonly ok: import("better-call").StrictEndpoint<"/ok", {
|
|
38
36
|
method: "GET";
|
|
39
37
|
metadata: {
|
|
40
38
|
openapi: {
|
|
@@ -64,7 +62,7 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
64
62
|
}, {
|
|
65
63
|
ok: boolean;
|
|
66
64
|
}>;
|
|
67
|
-
readonly error:
|
|
65
|
+
readonly error: import("better-call").StrictEndpoint<"/error", {
|
|
68
66
|
method: "GET";
|
|
69
67
|
metadata: {
|
|
70
68
|
openapi: {
|
|
@@ -86,63 +84,63 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
86
84
|
scope: "server";
|
|
87
85
|
};
|
|
88
86
|
}, Response>;
|
|
89
|
-
readonly signInSocial:
|
|
87
|
+
readonly signInSocial: import("better-call").StrictEndpoint<"/sign-in/social", {
|
|
90
88
|
method: "POST";
|
|
91
89
|
operationId: string;
|
|
92
|
-
body:
|
|
93
|
-
callbackURL:
|
|
94
|
-
newUserCallbackURL:
|
|
95
|
-
errorCallbackURL:
|
|
96
|
-
provider:
|
|
97
|
-
disableRedirect:
|
|
98
|
-
idToken:
|
|
99
|
-
token:
|
|
100
|
-
nonce:
|
|
101
|
-
accessToken:
|
|
102
|
-
refreshToken:
|
|
103
|
-
expiresAt:
|
|
104
|
-
user:
|
|
105
|
-
name:
|
|
106
|
-
firstName:
|
|
107
|
-
lastName:
|
|
108
|
-
},
|
|
109
|
-
email:
|
|
110
|
-
},
|
|
111
|
-
},
|
|
112
|
-
scopes:
|
|
113
|
-
requestSignUp:
|
|
114
|
-
loginHint:
|
|
115
|
-
additionalParams:
|
|
116
|
-
additionalData:
|
|
117
|
-
},
|
|
90
|
+
body: import("zod").ZodObject<{
|
|
91
|
+
callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
92
|
+
newUserCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
93
|
+
errorCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
94
|
+
provider: import("zod").ZodType<(string & {}) | "github" | "apple" | "atlassian" | "cloudflare" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown, import("zod/v4/core").$ZodTypeInternals<(string & {}) | "github" | "apple" | "atlassian" | "cloudflare" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown>>;
|
|
95
|
+
disableRedirect: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
96
|
+
idToken: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
97
|
+
token: import("zod").ZodString;
|
|
98
|
+
nonce: import("zod").ZodOptional<import("zod").ZodString>;
|
|
99
|
+
accessToken: import("zod").ZodOptional<import("zod").ZodString>;
|
|
100
|
+
refreshToken: import("zod").ZodOptional<import("zod").ZodString>;
|
|
101
|
+
expiresAt: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
102
|
+
user: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
103
|
+
name: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
104
|
+
firstName: import("zod").ZodOptional<import("zod").ZodString>;
|
|
105
|
+
lastName: import("zod").ZodOptional<import("zod").ZodString>;
|
|
106
|
+
}, import("zod/v4/core").$strip>>;
|
|
107
|
+
email: import("zod").ZodOptional<import("zod").ZodString>;
|
|
108
|
+
}, import("zod/v4/core").$strip>>;
|
|
109
|
+
}, import("zod/v4/core").$strip>>;
|
|
110
|
+
scopes: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
111
|
+
requestSignUp: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
112
|
+
loginHint: import("zod").ZodOptional<import("zod").ZodString>;
|
|
113
|
+
additionalParams: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodString>>;
|
|
114
|
+
additionalData: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
|
|
115
|
+
}, import("zod/v4/core").$strip>;
|
|
118
116
|
metadata: {
|
|
119
117
|
$Infer: {
|
|
120
|
-
body:
|
|
121
|
-
callbackURL:
|
|
122
|
-
newUserCallbackURL:
|
|
123
|
-
errorCallbackURL:
|
|
124
|
-
provider:
|
|
125
|
-
disableRedirect:
|
|
126
|
-
idToken:
|
|
127
|
-
token:
|
|
128
|
-
nonce:
|
|
129
|
-
accessToken:
|
|
130
|
-
refreshToken:
|
|
131
|
-
expiresAt:
|
|
132
|
-
user:
|
|
133
|
-
name:
|
|
134
|
-
firstName:
|
|
135
|
-
lastName:
|
|
136
|
-
},
|
|
137
|
-
email:
|
|
138
|
-
},
|
|
139
|
-
},
|
|
140
|
-
scopes:
|
|
141
|
-
requestSignUp:
|
|
142
|
-
loginHint:
|
|
143
|
-
additionalParams:
|
|
144
|
-
additionalData:
|
|
145
|
-
},
|
|
118
|
+
body: import("zod").infer<import("zod").ZodObject<{
|
|
119
|
+
callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
120
|
+
newUserCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
121
|
+
errorCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
122
|
+
provider: import("zod").ZodType<(string & {}) | "github" | "apple" | "atlassian" | "cloudflare" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown, import("zod/v4/core").$ZodTypeInternals<(string & {}) | "github" | "apple" | "atlassian" | "cloudflare" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown>>;
|
|
123
|
+
disableRedirect: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
124
|
+
idToken: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
125
|
+
token: import("zod").ZodString;
|
|
126
|
+
nonce: import("zod").ZodOptional<import("zod").ZodString>;
|
|
127
|
+
accessToken: import("zod").ZodOptional<import("zod").ZodString>;
|
|
128
|
+
refreshToken: import("zod").ZodOptional<import("zod").ZodString>;
|
|
129
|
+
expiresAt: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
130
|
+
user: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
131
|
+
name: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
132
|
+
firstName: import("zod").ZodOptional<import("zod").ZodString>;
|
|
133
|
+
lastName: import("zod").ZodOptional<import("zod").ZodString>;
|
|
134
|
+
}, import("zod/v4/core").$strip>>;
|
|
135
|
+
email: import("zod").ZodOptional<import("zod").ZodString>;
|
|
136
|
+
}, import("zod/v4/core").$strip>>;
|
|
137
|
+
}, import("zod/v4/core").$strip>>;
|
|
138
|
+
scopes: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
139
|
+
requestSignUp: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
140
|
+
loginHint: import("zod").ZodOptional<import("zod").ZodString>;
|
|
141
|
+
additionalParams: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodString>>;
|
|
142
|
+
additionalData: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
|
|
143
|
+
}, import("zod/v4/core").$strip>>;
|
|
146
144
|
returned: {
|
|
147
145
|
redirect: boolean;
|
|
148
146
|
token?: string | undefined;
|
|
@@ -155,7 +153,7 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
155
153
|
emailVerified: boolean;
|
|
156
154
|
name: string;
|
|
157
155
|
image?: string | null | undefined;
|
|
158
|
-
} &
|
|
156
|
+
} & 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;
|
|
159
157
|
};
|
|
160
158
|
};
|
|
161
159
|
openapi: {
|
|
@@ -207,41 +205,41 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
207
205
|
emailVerified: boolean;
|
|
208
206
|
name: string;
|
|
209
207
|
image?: string | null | undefined;
|
|
210
|
-
} &
|
|
208
|
+
} & 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;
|
|
211
209
|
}>;
|
|
212
|
-
readonly callbackOAuth:
|
|
210
|
+
readonly callbackOAuth: import("better-call").StrictEndpoint<"/callback/:id", {
|
|
213
211
|
method: ("GET" | "POST")[];
|
|
214
212
|
operationId: string;
|
|
215
|
-
body:
|
|
216
|
-
code:
|
|
217
|
-
error:
|
|
218
|
-
device_id:
|
|
219
|
-
error_description:
|
|
220
|
-
state:
|
|
221
|
-
user:
|
|
222
|
-
iss:
|
|
223
|
-
},
|
|
224
|
-
query:
|
|
225
|
-
code:
|
|
226
|
-
error:
|
|
227
|
-
device_id:
|
|
228
|
-
error_description:
|
|
229
|
-
state:
|
|
230
|
-
user:
|
|
231
|
-
iss:
|
|
232
|
-
},
|
|
213
|
+
body: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
214
|
+
code: import("zod").ZodOptional<import("zod").ZodString>;
|
|
215
|
+
error: import("zod").ZodOptional<import("zod").ZodString>;
|
|
216
|
+
device_id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
217
|
+
error_description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
218
|
+
state: import("zod").ZodOptional<import("zod").ZodString>;
|
|
219
|
+
user: import("zod").ZodOptional<import("zod").ZodString>;
|
|
220
|
+
iss: import("zod").ZodOptional<import("zod").ZodString>;
|
|
221
|
+
}, import("zod/v4/core").$strip>>;
|
|
222
|
+
query: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
223
|
+
code: import("zod").ZodOptional<import("zod").ZodString>;
|
|
224
|
+
error: import("zod").ZodOptional<import("zod").ZodString>;
|
|
225
|
+
device_id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
226
|
+
error_description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
227
|
+
state: import("zod").ZodOptional<import("zod").ZodString>;
|
|
228
|
+
user: import("zod").ZodOptional<import("zod").ZodString>;
|
|
229
|
+
iss: import("zod").ZodOptional<import("zod").ZodString>;
|
|
230
|
+
}, import("zod/v4/core").$strip>>;
|
|
233
231
|
metadata: {
|
|
234
232
|
allowedMediaTypes: string[];
|
|
235
233
|
scope: "server";
|
|
236
234
|
};
|
|
237
235
|
}, void>;
|
|
238
|
-
readonly getSession:
|
|
236
|
+
readonly getSession: import("better-call").StrictEndpoint<"/get-session", {
|
|
239
237
|
method: ("GET" | "POST")[];
|
|
240
238
|
operationId: string;
|
|
241
|
-
query:
|
|
242
|
-
disableCookieCache:
|
|
243
|
-
disableRefresh:
|
|
244
|
-
},
|
|
239
|
+
query: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
240
|
+
disableCookieCache: import("zod").ZodOptional<import("zod").ZodCoercedBoolean<unknown>>;
|
|
241
|
+
disableRefresh: import("zod").ZodOptional<import("zod").ZodCoercedBoolean<unknown>>;
|
|
242
|
+
}, import("zod/v4/core").$strip>>;
|
|
245
243
|
requireHeaders: true;
|
|
246
244
|
metadata: {
|
|
247
245
|
openapi: {
|
|
@@ -280,7 +278,7 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
280
278
|
token: string;
|
|
281
279
|
ipAddress?: string | null | undefined;
|
|
282
280
|
userAgent?: string | null | undefined;
|
|
283
|
-
} &
|
|
281
|
+
} & 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;
|
|
284
282
|
user: {
|
|
285
283
|
id: string;
|
|
286
284
|
createdAt: Date;
|
|
@@ -289,15 +287,15 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
289
287
|
emailVerified: boolean;
|
|
290
288
|
name: string;
|
|
291
289
|
image?: string | null | undefined;
|
|
292
|
-
} &
|
|
290
|
+
} & 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;
|
|
293
291
|
} | null>;
|
|
294
|
-
readonly signOut:
|
|
292
|
+
readonly signOut: import("better-call").StrictEndpoint<"/sign-out", {
|
|
295
293
|
method: "POST";
|
|
296
|
-
body:
|
|
297
|
-
callbackURL:
|
|
298
|
-
disableRedirect:
|
|
299
|
-
state:
|
|
300
|
-
},
|
|
294
|
+
body: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
295
|
+
callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
296
|
+
disableRedirect: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
297
|
+
state: import("zod").ZodOptional<import("zod").ZodString>;
|
|
298
|
+
}, import("zod/v4/core").$strip>>;
|
|
301
299
|
operationId: string;
|
|
302
300
|
requireHeaders: true;
|
|
303
301
|
metadata: {
|
|
@@ -336,18 +334,18 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
336
334
|
url: string | undefined;
|
|
337
335
|
redirect: boolean | undefined;
|
|
338
336
|
}>;
|
|
339
|
-
readonly signUpEmail:
|
|
337
|
+
readonly signUpEmail: import("better-call").StrictEndpoint<"/sign-up/email", {
|
|
340
338
|
method: "POST";
|
|
341
339
|
operationId: string;
|
|
342
|
-
use: Middleware<
|
|
343
|
-
body:
|
|
344
|
-
name:
|
|
345
|
-
email:
|
|
346
|
-
password:
|
|
347
|
-
image:
|
|
348
|
-
callbackURL:
|
|
349
|
-
rememberMe:
|
|
350
|
-
},
|
|
340
|
+
use: Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>>[];
|
|
341
|
+
body: import("zod").ZodIntersection<import("zod").ZodObject<{
|
|
342
|
+
name: import("zod").ZodString;
|
|
343
|
+
email: import("zod").ZodEmail;
|
|
344
|
+
password: import("zod").ZodString;
|
|
345
|
+
image: import("zod").ZodOptional<import("zod").ZodString>;
|
|
346
|
+
callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
347
|
+
rememberMe: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
348
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
|
|
351
349
|
cloneRequest: true;
|
|
352
350
|
metadata: {
|
|
353
351
|
allowedMediaTypes: string[];
|
|
@@ -359,7 +357,7 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
359
357
|
image?: string | undefined;
|
|
360
358
|
callbackURL?: string | undefined;
|
|
361
359
|
rememberMe?: boolean | undefined;
|
|
362
|
-
} &
|
|
360
|
+
} & import("@better-auth/core/db").InferDBFieldsFromPluginsInput<"user", Option["plugins"]> & import("@better-auth/core/db").InferDBFieldsFromOptionsInput<Option["user"]>;
|
|
363
361
|
returned: {
|
|
364
362
|
token: string | null;
|
|
365
363
|
user: {
|
|
@@ -370,7 +368,7 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
370
368
|
emailVerified: boolean;
|
|
371
369
|
name: string;
|
|
372
370
|
image?: string | null | undefined;
|
|
373
|
-
} &
|
|
371
|
+
} & 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;
|
|
374
372
|
};
|
|
375
373
|
};
|
|
376
374
|
openapi: {
|
|
@@ -498,7 +496,7 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
498
496
|
emailVerified: boolean;
|
|
499
497
|
name: string;
|
|
500
498
|
image?: string | null | undefined;
|
|
501
|
-
} &
|
|
499
|
+
} & 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;
|
|
502
500
|
} | {
|
|
503
501
|
token: string;
|
|
504
502
|
user: {
|
|
@@ -509,19 +507,19 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
509
507
|
emailVerified: boolean;
|
|
510
508
|
name: string;
|
|
511
509
|
image?: string | null | undefined;
|
|
512
|
-
} &
|
|
510
|
+
} & 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;
|
|
513
511
|
}>;
|
|
514
|
-
readonly signInEmail:
|
|
512
|
+
readonly signInEmail: import("better-call").StrictEndpoint<"/sign-in/email", {
|
|
515
513
|
method: "POST";
|
|
516
514
|
operationId: string;
|
|
517
|
-
use: Middleware<
|
|
515
|
+
use: Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>>[];
|
|
518
516
|
cloneRequest: true;
|
|
519
|
-
body:
|
|
520
|
-
email:
|
|
521
|
-
password:
|
|
522
|
-
callbackURL:
|
|
523
|
-
rememberMe:
|
|
524
|
-
},
|
|
517
|
+
body: import("zod").ZodObject<{
|
|
518
|
+
email: import("zod").ZodString;
|
|
519
|
+
password: import("zod").ZodString;
|
|
520
|
+
callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
521
|
+
rememberMe: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodBoolean>>;
|
|
522
|
+
}, import("zod/v4/core").$strip>;
|
|
525
523
|
metadata: {
|
|
526
524
|
allowedMediaTypes: string[];
|
|
527
525
|
$Infer: {
|
|
@@ -543,7 +541,7 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
543
541
|
emailVerified: boolean;
|
|
544
542
|
name: string;
|
|
545
543
|
image?: string | null | undefined;
|
|
546
|
-
} &
|
|
544
|
+
} & 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;
|
|
547
545
|
};
|
|
548
546
|
};
|
|
549
547
|
openapi: {
|
|
@@ -595,18 +593,18 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
595
593
|
emailVerified: boolean;
|
|
596
594
|
name: string;
|
|
597
595
|
image?: string | null | undefined;
|
|
598
|
-
} &
|
|
596
|
+
} & 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;
|
|
599
597
|
}>;
|
|
600
|
-
readonly resetPassword:
|
|
598
|
+
readonly resetPassword: import("better-call").StrictEndpoint<"/reset-password", {
|
|
601
599
|
method: "POST";
|
|
602
600
|
operationId: string;
|
|
603
|
-
query:
|
|
604
|
-
token:
|
|
605
|
-
},
|
|
606
|
-
body:
|
|
607
|
-
newPassword:
|
|
608
|
-
token:
|
|
609
|
-
},
|
|
601
|
+
query: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
602
|
+
token: import("zod").ZodOptional<import("zod").ZodString>;
|
|
603
|
+
}, import("zod/v4/core").$strip>>;
|
|
604
|
+
body: import("zod").ZodObject<{
|
|
605
|
+
newPassword: import("zod").ZodString;
|
|
606
|
+
token: import("zod").ZodOptional<import("zod").ZodString>;
|
|
607
|
+
}, import("zod/v4/core").$strip>;
|
|
610
608
|
metadata: {
|
|
611
609
|
openapi: {
|
|
612
610
|
operationId: string;
|
|
@@ -633,11 +631,11 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
633
631
|
}, {
|
|
634
632
|
status: boolean;
|
|
635
633
|
}>;
|
|
636
|
-
readonly verifyPassword:
|
|
634
|
+
readonly verifyPassword: import("better-call").StrictEndpoint<"/verify-password", {
|
|
637
635
|
method: "POST";
|
|
638
|
-
body:
|
|
639
|
-
password:
|
|
640
|
-
},
|
|
636
|
+
body: import("zod").ZodObject<{
|
|
637
|
+
password: import("zod").ZodString;
|
|
638
|
+
}, import("zod/v4/core").$strip>;
|
|
641
639
|
metadata: {
|
|
642
640
|
scope: "server";
|
|
643
641
|
openapi: {
|
|
@@ -662,7 +660,7 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
662
660
|
};
|
|
663
661
|
};
|
|
664
662
|
};
|
|
665
|
-
use: Middleware<
|
|
663
|
+
use: Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
666
664
|
session: {
|
|
667
665
|
session: Record<string, any> & {
|
|
668
666
|
id: string;
|
|
@@ -688,14 +686,14 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
688
686
|
}, {
|
|
689
687
|
status: boolean;
|
|
690
688
|
}>;
|
|
691
|
-
readonly verifyEmail:
|
|
689
|
+
readonly verifyEmail: import("better-call").StrictEndpoint<"/verify-email", {
|
|
692
690
|
method: "GET";
|
|
693
691
|
operationId: string;
|
|
694
|
-
query:
|
|
695
|
-
token:
|
|
696
|
-
callbackURL:
|
|
697
|
-
},
|
|
698
|
-
use: Middleware<
|
|
692
|
+
query: import("zod").ZodObject<{
|
|
693
|
+
token: import("zod").ZodString;
|
|
694
|
+
callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
695
|
+
}, import("zod/v4/core").$strip>;
|
|
696
|
+
use: Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>>[];
|
|
699
697
|
metadata: {
|
|
700
698
|
openapi: {
|
|
701
699
|
description: string;
|
|
@@ -744,14 +742,14 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
744
742
|
}, void | {
|
|
745
743
|
status: boolean;
|
|
746
744
|
}>;
|
|
747
|
-
readonly sendVerificationEmail:
|
|
745
|
+
readonly sendVerificationEmail: import("better-call").StrictEndpoint<"/send-verification-email", {
|
|
748
746
|
method: "POST";
|
|
749
747
|
operationId: string;
|
|
750
748
|
cloneRequest: true;
|
|
751
|
-
body:
|
|
752
|
-
email:
|
|
753
|
-
callbackURL:
|
|
754
|
-
},
|
|
749
|
+
body: import("zod").ZodObject<{
|
|
750
|
+
email: import("zod").ZodEmail;
|
|
751
|
+
callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
752
|
+
}, import("zod/v4/core").$strip>;
|
|
755
753
|
metadata: {
|
|
756
754
|
openapi: {
|
|
757
755
|
operationId: string;
|
|
@@ -820,13 +818,13 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
820
818
|
}, {
|
|
821
819
|
status: boolean;
|
|
822
820
|
}>;
|
|
823
|
-
readonly changeEmail:
|
|
821
|
+
readonly changeEmail: import("better-call").StrictEndpoint<"/change-email", {
|
|
824
822
|
method: "POST";
|
|
825
|
-
body:
|
|
826
|
-
newEmail:
|
|
827
|
-
callbackURL:
|
|
828
|
-
},
|
|
829
|
-
use: Middleware<
|
|
823
|
+
body: import("zod").ZodObject<{
|
|
824
|
+
newEmail: import("zod").ZodEmail;
|
|
825
|
+
callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
826
|
+
}, import("zod/v4/core").$strip>;
|
|
827
|
+
use: Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
830
828
|
session: {
|
|
831
829
|
session: Record<string, any> & {
|
|
832
830
|
id: string;
|
|
@@ -886,15 +884,15 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
886
884
|
}, {
|
|
887
885
|
status: boolean;
|
|
888
886
|
}>;
|
|
889
|
-
readonly changePassword:
|
|
887
|
+
readonly changePassword: import("better-call").StrictEndpoint<"/change-password", {
|
|
890
888
|
method: "POST";
|
|
891
889
|
operationId: string;
|
|
892
|
-
body:
|
|
893
|
-
newPassword:
|
|
894
|
-
currentPassword:
|
|
895
|
-
revokeOtherSessions:
|
|
896
|
-
},
|
|
897
|
-
use: Middleware<
|
|
890
|
+
body: import("zod").ZodObject<{
|
|
891
|
+
newPassword: import("zod").ZodString;
|
|
892
|
+
currentPassword: import("zod").ZodString;
|
|
893
|
+
revokeOtherSessions: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
894
|
+
}, import("zod/v4/core").$strip>;
|
|
895
|
+
use: Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
898
896
|
session: {
|
|
899
897
|
session: Record<string, any> & {
|
|
900
898
|
id: string;
|
|
@@ -1002,12 +1000,12 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1002
1000
|
image?: string | null | undefined;
|
|
1003
1001
|
};
|
|
1004
1002
|
}>;
|
|
1005
|
-
readonly setPassword:
|
|
1003
|
+
readonly setPassword: import("better-call").StrictEndpoint<string, {
|
|
1006
1004
|
method: "POST";
|
|
1007
|
-
body:
|
|
1008
|
-
newPassword:
|
|
1009
|
-
},
|
|
1010
|
-
use: Middleware<
|
|
1005
|
+
body: import("zod").ZodObject<{
|
|
1006
|
+
newPassword: import("zod").ZodString;
|
|
1007
|
+
}, import("zod/v4/core").$strip>;
|
|
1008
|
+
use: Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
1011
1009
|
session: {
|
|
1012
1010
|
session: Record<string, any> & {
|
|
1013
1011
|
id: string;
|
|
@@ -1033,11 +1031,11 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1033
1031
|
}, {
|
|
1034
1032
|
status: boolean;
|
|
1035
1033
|
}>;
|
|
1036
|
-
readonly updateSession:
|
|
1034
|
+
readonly updateSession: import("better-call").StrictEndpoint<"/update-session", {
|
|
1037
1035
|
method: "POST";
|
|
1038
1036
|
operationId: string;
|
|
1039
|
-
body:
|
|
1040
|
-
use: Middleware<
|
|
1037
|
+
body: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>;
|
|
1038
|
+
use: Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
1041
1039
|
session: {
|
|
1042
1040
|
session: Record<string, any> & {
|
|
1043
1041
|
id: string;
|
|
@@ -1099,11 +1097,11 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1099
1097
|
userAgent?: string | null | undefined;
|
|
1100
1098
|
};
|
|
1101
1099
|
}>;
|
|
1102
|
-
readonly updateUser:
|
|
1100
|
+
readonly updateUser: import("better-call").StrictEndpoint<"/update-user", {
|
|
1103
1101
|
method: "POST";
|
|
1104
1102
|
operationId: string;
|
|
1105
|
-
body:
|
|
1106
|
-
use: Middleware<
|
|
1103
|
+
body: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>;
|
|
1104
|
+
use: Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
1107
1105
|
session: {
|
|
1108
1106
|
session: Record<string, any> & {
|
|
1109
1107
|
id: string;
|
|
@@ -1179,9 +1177,9 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1179
1177
|
}, {
|
|
1180
1178
|
status: boolean;
|
|
1181
1179
|
}>;
|
|
1182
|
-
readonly deleteUser:
|
|
1180
|
+
readonly deleteUser: import("better-call").StrictEndpoint<"/delete-user", {
|
|
1183
1181
|
method: "POST";
|
|
1184
|
-
use: Middleware<
|
|
1182
|
+
use: Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
1185
1183
|
session: {
|
|
1186
1184
|
session: Record<string, any> & {
|
|
1187
1185
|
id: string;
|
|
@@ -1204,11 +1202,11 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1204
1202
|
};
|
|
1205
1203
|
};
|
|
1206
1204
|
}>>[];
|
|
1207
|
-
body:
|
|
1208
|
-
callbackURL:
|
|
1209
|
-
password:
|
|
1210
|
-
token:
|
|
1211
|
-
},
|
|
1205
|
+
body: import("zod").ZodObject<{
|
|
1206
|
+
callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1207
|
+
password: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1208
|
+
token: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1209
|
+
}, import("zod/v4/core").$strip>;
|
|
1212
1210
|
metadata: {
|
|
1213
1211
|
openapi: {
|
|
1214
1212
|
operationId: string;
|
|
@@ -1266,12 +1264,12 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1266
1264
|
success: boolean;
|
|
1267
1265
|
message: string;
|
|
1268
1266
|
}>;
|
|
1269
|
-
readonly requestPasswordReset:
|
|
1267
|
+
readonly requestPasswordReset: import("better-call").StrictEndpoint<"/request-password-reset", {
|
|
1270
1268
|
method: "POST";
|
|
1271
|
-
body:
|
|
1272
|
-
email:
|
|
1273
|
-
redirectTo:
|
|
1274
|
-
},
|
|
1269
|
+
body: import("zod").ZodObject<{
|
|
1270
|
+
email: import("zod").ZodEmail;
|
|
1271
|
+
redirectTo: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1272
|
+
}, import("zod/v4/core").$strip>;
|
|
1275
1273
|
metadata: {
|
|
1276
1274
|
openapi: {
|
|
1277
1275
|
operationId: string;
|
|
@@ -1298,18 +1296,18 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1298
1296
|
};
|
|
1299
1297
|
};
|
|
1300
1298
|
};
|
|
1301
|
-
use: Middleware<
|
|
1299
|
+
use: Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>>[];
|
|
1302
1300
|
}, {
|
|
1303
1301
|
status: boolean;
|
|
1304
1302
|
message: string;
|
|
1305
1303
|
}>;
|
|
1306
|
-
readonly requestPasswordResetCallback:
|
|
1304
|
+
readonly requestPasswordResetCallback: import("better-call").StrictEndpoint<"/reset-password/:token", {
|
|
1307
1305
|
method: "GET";
|
|
1308
1306
|
operationId: string;
|
|
1309
|
-
query:
|
|
1310
|
-
callbackURL:
|
|
1311
|
-
},
|
|
1312
|
-
use: Middleware<
|
|
1307
|
+
query: import("zod").ZodObject<{
|
|
1308
|
+
callbackURL: import("zod").ZodString;
|
|
1309
|
+
}, import("zod/v4/core").$strip>;
|
|
1310
|
+
use: Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>>[];
|
|
1313
1311
|
metadata: {
|
|
1314
1312
|
openapi: {
|
|
1315
1313
|
operationId: string;
|
|
@@ -1351,10 +1349,10 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1351
1349
|
};
|
|
1352
1350
|
};
|
|
1353
1351
|
}, never>;
|
|
1354
|
-
readonly listSessions:
|
|
1352
|
+
readonly listSessions: import("better-call").StrictEndpoint<"/list-sessions", {
|
|
1355
1353
|
method: "GET";
|
|
1356
1354
|
operationId: string;
|
|
1357
|
-
use: Middleware<
|
|
1355
|
+
use: Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
1358
1356
|
session: {
|
|
1359
1357
|
session: Record<string, any> & {
|
|
1360
1358
|
id: string;
|
|
@@ -1408,13 +1406,13 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1408
1406
|
token: string;
|
|
1409
1407
|
ipAddress?: string | null | undefined;
|
|
1410
1408
|
userAgent?: string | null | undefined;
|
|
1411
|
-
} &
|
|
1412
|
-
readonly revokeSession:
|
|
1409
|
+
} & 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>[]>;
|
|
1410
|
+
readonly revokeSession: import("better-call").StrictEndpoint<"/revoke-session", {
|
|
1413
1411
|
method: "POST";
|
|
1414
|
-
body:
|
|
1415
|
-
token:
|
|
1416
|
-
},
|
|
1417
|
-
use: Middleware<
|
|
1412
|
+
body: import("zod").ZodObject<{
|
|
1413
|
+
token: import("zod").ZodString;
|
|
1414
|
+
}, import("zod/v4/core").$strip>;
|
|
1415
|
+
use: Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
1418
1416
|
session: {
|
|
1419
1417
|
session: Record<string, any> & {
|
|
1420
1418
|
id: string;
|
|
@@ -1481,9 +1479,9 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1481
1479
|
}, {
|
|
1482
1480
|
status: boolean;
|
|
1483
1481
|
}>;
|
|
1484
|
-
readonly revokeSessions:
|
|
1482
|
+
readonly revokeSessions: import("better-call").StrictEndpoint<"/revoke-sessions", {
|
|
1485
1483
|
method: "POST";
|
|
1486
|
-
use: Middleware<
|
|
1484
|
+
use: Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
1487
1485
|
session: {
|
|
1488
1486
|
session: Record<string, any> & {
|
|
1489
1487
|
id: string;
|
|
@@ -1534,10 +1532,10 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1534
1532
|
}, {
|
|
1535
1533
|
status: boolean;
|
|
1536
1534
|
}>;
|
|
1537
|
-
readonly revokeOtherSessions:
|
|
1535
|
+
readonly revokeOtherSessions: import("better-call").StrictEndpoint<"/revoke-other-sessions", {
|
|
1538
1536
|
method: "POST";
|
|
1539
1537
|
requireHeaders: true;
|
|
1540
|
-
use: Middleware<
|
|
1538
|
+
use: Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
1541
1539
|
session: {
|
|
1542
1540
|
session: Record<string, any> & {
|
|
1543
1541
|
id: string;
|
|
@@ -1587,27 +1585,27 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1587
1585
|
}, {
|
|
1588
1586
|
status: boolean;
|
|
1589
1587
|
}>;
|
|
1590
|
-
readonly linkSocialAccount:
|
|
1588
|
+
readonly linkSocialAccount: import("better-call").StrictEndpoint<"/link-social", {
|
|
1591
1589
|
method: "POST";
|
|
1592
1590
|
requireHeaders: true;
|
|
1593
|
-
body:
|
|
1594
|
-
callbackURL:
|
|
1595
|
-
provider:
|
|
1596
|
-
idToken:
|
|
1597
|
-
token:
|
|
1598
|
-
nonce:
|
|
1599
|
-
accessToken:
|
|
1600
|
-
refreshToken:
|
|
1601
|
-
},
|
|
1602
|
-
requestSignUp:
|
|
1603
|
-
scopes:
|
|
1604
|
-
errorCallbackURL:
|
|
1605
|
-
disableRedirect:
|
|
1606
|
-
loginHint:
|
|
1607
|
-
additionalParams:
|
|
1608
|
-
additionalData:
|
|
1609
|
-
},
|
|
1610
|
-
use: Middleware<
|
|
1591
|
+
body: import("zod").ZodObject<{
|
|
1592
|
+
callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1593
|
+
provider: import("zod").ZodType<(string & {}) | "github" | "apple" | "atlassian" | "cloudflare" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown, import("zod/v4/core").$ZodTypeInternals<(string & {}) | "github" | "apple" | "atlassian" | "cloudflare" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown>>;
|
|
1594
|
+
idToken: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
1595
|
+
token: import("zod").ZodString;
|
|
1596
|
+
nonce: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1597
|
+
accessToken: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1598
|
+
refreshToken: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1599
|
+
}, import("zod/v4/core").$strip>>;
|
|
1600
|
+
requestSignUp: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
1601
|
+
scopes: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
1602
|
+
errorCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1603
|
+
disableRedirect: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
1604
|
+
loginHint: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1605
|
+
additionalParams: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodString>>;
|
|
1606
|
+
additionalData: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
|
|
1607
|
+
}, import("zod/v4/core").$strip>;
|
|
1608
|
+
use: Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
1611
1609
|
session: {
|
|
1612
1610
|
session: Record<string, any> & {
|
|
1613
1611
|
id: string;
|
|
@@ -1666,9 +1664,9 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1666
1664
|
url: string;
|
|
1667
1665
|
redirect: boolean;
|
|
1668
1666
|
}>;
|
|
1669
|
-
readonly listUserAccounts:
|
|
1667
|
+
readonly listUserAccounts: import("better-call").StrictEndpoint<"/list-accounts", {
|
|
1670
1668
|
method: "GET";
|
|
1671
|
-
use: Middleware<
|
|
1669
|
+
use: Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
1672
1670
|
session: {
|
|
1673
1671
|
session: Record<string, any> & {
|
|
1674
1672
|
id: string;
|
|
@@ -1750,13 +1748,13 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1750
1748
|
providerId: string;
|
|
1751
1749
|
accountId: string;
|
|
1752
1750
|
}[]>;
|
|
1753
|
-
readonly deleteUserCallback:
|
|
1751
|
+
readonly deleteUserCallback: import("better-call").StrictEndpoint<"/delete-user/callback", {
|
|
1754
1752
|
method: "GET";
|
|
1755
|
-
query:
|
|
1756
|
-
token:
|
|
1757
|
-
callbackURL:
|
|
1758
|
-
},
|
|
1759
|
-
use: Middleware<
|
|
1753
|
+
query: import("zod").ZodObject<{
|
|
1754
|
+
token: import("zod").ZodString;
|
|
1755
|
+
callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1756
|
+
}, import("zod/v4/core").$strip>;
|
|
1757
|
+
use: Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>>[];
|
|
1760
1758
|
metadata: {
|
|
1761
1759
|
openapi: {
|
|
1762
1760
|
description: string;
|
|
@@ -1790,12 +1788,12 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1790
1788
|
success: boolean;
|
|
1791
1789
|
message: string;
|
|
1792
1790
|
}>;
|
|
1793
|
-
readonly unlinkAccount:
|
|
1791
|
+
readonly unlinkAccount: import("better-call").StrictEndpoint<"/unlink-account", {
|
|
1794
1792
|
method: "POST";
|
|
1795
|
-
body:
|
|
1796
|
-
accountId:
|
|
1797
|
-
},
|
|
1798
|
-
use: Middleware<
|
|
1793
|
+
body: import("zod").ZodObject<{
|
|
1794
|
+
accountId: import("zod").ZodString;
|
|
1795
|
+
}, import("zod/v4/core").$strip>;
|
|
1796
|
+
use: Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
1799
1797
|
session: {
|
|
1800
1798
|
session: Record<string, any> & {
|
|
1801
1799
|
id: string;
|
|
@@ -1843,15 +1841,15 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1843
1841
|
}, {
|
|
1844
1842
|
status: boolean;
|
|
1845
1843
|
}>;
|
|
1846
|
-
readonly refreshToken:
|
|
1844
|
+
readonly refreshToken: import("better-call").StrictEndpoint<"/refresh-token", {
|
|
1847
1845
|
method: "POST";
|
|
1848
|
-
body:
|
|
1849
|
-
accountId:
|
|
1850
|
-
userId:
|
|
1851
|
-
},
|
|
1852
|
-
useAccountCookie:
|
|
1853
|
-
userId:
|
|
1854
|
-
},
|
|
1846
|
+
body: import("zod").ZodUnion<readonly [import("zod").ZodObject<{
|
|
1847
|
+
accountId: import("zod").ZodString;
|
|
1848
|
+
userId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1849
|
+
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
1850
|
+
useAccountCookie: import("zod").ZodLiteral<true>;
|
|
1851
|
+
userId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1852
|
+
}, import("zod/v4/core").$strict>]>;
|
|
1855
1853
|
metadata: {
|
|
1856
1854
|
openapi: {
|
|
1857
1855
|
description: string;
|
|
@@ -1904,15 +1902,15 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1904
1902
|
providerId: string;
|
|
1905
1903
|
accountId: string;
|
|
1906
1904
|
}>;
|
|
1907
|
-
readonly getAccessToken:
|
|
1905
|
+
readonly getAccessToken: import("better-call").StrictEndpoint<"/get-access-token", {
|
|
1908
1906
|
method: "POST";
|
|
1909
|
-
body:
|
|
1910
|
-
accountId:
|
|
1911
|
-
userId:
|
|
1912
|
-
},
|
|
1913
|
-
useAccountCookie:
|
|
1914
|
-
userId:
|
|
1915
|
-
},
|
|
1907
|
+
body: import("zod").ZodUnion<readonly [import("zod").ZodObject<{
|
|
1908
|
+
accountId: import("zod").ZodString;
|
|
1909
|
+
userId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1910
|
+
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
1911
|
+
useAccountCookie: import("zod").ZodLiteral<true>;
|
|
1912
|
+
userId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1913
|
+
}, import("zod/v4/core").$strict>]>;
|
|
1916
1914
|
metadata: {
|
|
1917
1915
|
openapi: {
|
|
1918
1916
|
description: string;
|
|
@@ -1954,7 +1952,7 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
1954
1952
|
scopes: string[];
|
|
1955
1953
|
idToken: string | undefined;
|
|
1956
1954
|
}>;
|
|
1957
|
-
readonly accountInfo:
|
|
1955
|
+
readonly accountInfo: import("better-call").StrictEndpoint<"/account-info", {
|
|
1958
1956
|
method: "GET";
|
|
1959
1957
|
metadata: {
|
|
1960
1958
|
openapi: {
|
|
@@ -2017,20 +2015,20 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
2017
2015
|
};
|
|
2018
2016
|
};
|
|
2019
2017
|
};
|
|
2020
|
-
query:
|
|
2021
|
-
accountId:
|
|
2022
|
-
userId:
|
|
2023
|
-
},
|
|
2024
|
-
useAccountCookie:
|
|
2025
|
-
userId:
|
|
2026
|
-
},
|
|
2018
|
+
query: import("zod").ZodUnion<readonly [import("zod").ZodObject<{
|
|
2019
|
+
accountId: import("zod").ZodString;
|
|
2020
|
+
userId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2021
|
+
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
2022
|
+
useAccountCookie: import("zod").ZodLiteral<true>;
|
|
2023
|
+
userId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2024
|
+
}, import("zod/v4/core").$strict>]>;
|
|
2027
2025
|
}, {
|
|
2028
2026
|
account: {
|
|
2029
2027
|
id: string;
|
|
2030
2028
|
providerId: string;
|
|
2031
2029
|
accountId: string;
|
|
2032
2030
|
};
|
|
2033
|
-
user:
|
|
2031
|
+
user: import("@better-auth/core/oauth2").OAuth2UserInfo;
|
|
2034
2032
|
data: object;
|
|
2035
2033
|
}>;
|
|
2036
2034
|
}, UnionToIntersection<Option["plugins"] extends (infer T_10)[] ? T_10 extends BetterAuthPlugin ? T_10 extends {
|
|
@@ -2041,14 +2039,14 @@ declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<A
|
|
|
2041
2039
|
middleware: Middleware;
|
|
2042
2040
|
}[];
|
|
2043
2041
|
};
|
|
2044
|
-
declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, options: Option) => {
|
|
2042
|
+
export declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, options: Option) => {
|
|
2045
2043
|
handler: (request: Request) => Promise<Response>;
|
|
2046
2044
|
endpoints: UnionToIntersection<Option["plugins"] extends (infer T)[] ? T extends BetterAuthPlugin ? T extends {
|
|
2047
2045
|
endpoints: infer E;
|
|
2048
|
-
} ? E : {} : {} : {}> extends infer T_1 ? T_1 extends UnionToIntersection<Option["plugins"] extends (infer T)[] ? T extends BetterAuthPlugin ? T extends {
|
|
2046
|
+
} ? E : {} : {} : {}> extends (infer T_1) ? T_1 extends UnionToIntersection<Option["plugins"] extends (infer T)[] ? T extends BetterAuthPlugin ? T extends {
|
|
2049
2047
|
endpoints: infer E;
|
|
2050
2048
|
} ? E : {} : {} : {}> ? T_1 extends unknown ? Prettify$1<({
|
|
2051
|
-
readonly ok:
|
|
2049
|
+
readonly ok: import("better-call").StrictEndpoint<"/ok", {
|
|
2052
2050
|
method: "GET";
|
|
2053
2051
|
metadata: {
|
|
2054
2052
|
openapi: {
|
|
@@ -2078,7 +2076,7 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2078
2076
|
}, {
|
|
2079
2077
|
ok: boolean;
|
|
2080
2078
|
}>;
|
|
2081
|
-
readonly error:
|
|
2079
|
+
readonly error: import("better-call").StrictEndpoint<"/error", {
|
|
2082
2080
|
method: "GET";
|
|
2083
2081
|
metadata: {
|
|
2084
2082
|
openapi: {
|
|
@@ -2100,63 +2098,63 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2100
2098
|
scope: "server";
|
|
2101
2099
|
};
|
|
2102
2100
|
}, Response>;
|
|
2103
|
-
readonly signInSocial:
|
|
2101
|
+
readonly signInSocial: import("better-call").StrictEndpoint<"/sign-in/social", {
|
|
2104
2102
|
method: "POST";
|
|
2105
2103
|
operationId: string;
|
|
2106
|
-
body:
|
|
2107
|
-
callbackURL:
|
|
2108
|
-
newUserCallbackURL:
|
|
2109
|
-
errorCallbackURL:
|
|
2110
|
-
provider:
|
|
2111
|
-
disableRedirect:
|
|
2112
|
-
idToken:
|
|
2113
|
-
token:
|
|
2114
|
-
nonce:
|
|
2115
|
-
accessToken:
|
|
2116
|
-
refreshToken:
|
|
2117
|
-
expiresAt:
|
|
2118
|
-
user:
|
|
2119
|
-
name:
|
|
2120
|
-
firstName:
|
|
2121
|
-
lastName:
|
|
2122
|
-
},
|
|
2123
|
-
email:
|
|
2124
|
-
},
|
|
2125
|
-
},
|
|
2126
|
-
scopes:
|
|
2127
|
-
requestSignUp:
|
|
2128
|
-
loginHint:
|
|
2129
|
-
additionalParams:
|
|
2130
|
-
additionalData:
|
|
2131
|
-
},
|
|
2104
|
+
body: import("zod").ZodObject<{
|
|
2105
|
+
callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2106
|
+
newUserCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2107
|
+
errorCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2108
|
+
provider: import("zod").ZodType<(string & {}) | "github" | "apple" | "atlassian" | "cloudflare" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown, import("zod/v4/core").$ZodTypeInternals<(string & {}) | "github" | "apple" | "atlassian" | "cloudflare" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown>>;
|
|
2109
|
+
disableRedirect: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
2110
|
+
idToken: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
2111
|
+
token: import("zod").ZodString;
|
|
2112
|
+
nonce: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2113
|
+
accessToken: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2114
|
+
refreshToken: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2115
|
+
expiresAt: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
2116
|
+
user: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
2117
|
+
name: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
2118
|
+
firstName: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2119
|
+
lastName: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2120
|
+
}, import("zod/v4/core").$strip>>;
|
|
2121
|
+
email: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2122
|
+
}, import("zod/v4/core").$strip>>;
|
|
2123
|
+
}, import("zod/v4/core").$strip>>;
|
|
2124
|
+
scopes: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
2125
|
+
requestSignUp: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
2126
|
+
loginHint: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2127
|
+
additionalParams: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodString>>;
|
|
2128
|
+
additionalData: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
|
|
2129
|
+
}, import("zod/v4/core").$strip>;
|
|
2132
2130
|
metadata: {
|
|
2133
2131
|
$Infer: {
|
|
2134
|
-
body:
|
|
2135
|
-
callbackURL:
|
|
2136
|
-
newUserCallbackURL:
|
|
2137
|
-
errorCallbackURL:
|
|
2138
|
-
provider:
|
|
2139
|
-
disableRedirect:
|
|
2140
|
-
idToken:
|
|
2141
|
-
token:
|
|
2142
|
-
nonce:
|
|
2143
|
-
accessToken:
|
|
2144
|
-
refreshToken:
|
|
2145
|
-
expiresAt:
|
|
2146
|
-
user:
|
|
2147
|
-
name:
|
|
2148
|
-
firstName:
|
|
2149
|
-
lastName:
|
|
2150
|
-
},
|
|
2151
|
-
email:
|
|
2152
|
-
},
|
|
2153
|
-
},
|
|
2154
|
-
scopes:
|
|
2155
|
-
requestSignUp:
|
|
2156
|
-
loginHint:
|
|
2157
|
-
additionalParams:
|
|
2158
|
-
additionalData:
|
|
2159
|
-
},
|
|
2132
|
+
body: import("zod").infer<import("zod").ZodObject<{
|
|
2133
|
+
callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2134
|
+
newUserCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2135
|
+
errorCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2136
|
+
provider: import("zod").ZodType<(string & {}) | "github" | "apple" | "atlassian" | "cloudflare" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown, import("zod/v4/core").$ZodTypeInternals<(string & {}) | "github" | "apple" | "atlassian" | "cloudflare" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown>>;
|
|
2137
|
+
disableRedirect: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
2138
|
+
idToken: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
2139
|
+
token: import("zod").ZodString;
|
|
2140
|
+
nonce: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2141
|
+
accessToken: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2142
|
+
refreshToken: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2143
|
+
expiresAt: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
2144
|
+
user: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
2145
|
+
name: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
2146
|
+
firstName: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2147
|
+
lastName: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2148
|
+
}, import("zod/v4/core").$strip>>;
|
|
2149
|
+
email: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2150
|
+
}, import("zod/v4/core").$strip>>;
|
|
2151
|
+
}, import("zod/v4/core").$strip>>;
|
|
2152
|
+
scopes: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
2153
|
+
requestSignUp: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
2154
|
+
loginHint: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2155
|
+
additionalParams: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodString>>;
|
|
2156
|
+
additionalData: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
|
|
2157
|
+
}, import("zod/v4/core").$strip>>;
|
|
2160
2158
|
returned: {
|
|
2161
2159
|
redirect: boolean;
|
|
2162
2160
|
token?: string | undefined;
|
|
@@ -2169,7 +2167,7 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2169
2167
|
emailVerified: boolean;
|
|
2170
2168
|
name: string;
|
|
2171
2169
|
image?: string | null | undefined;
|
|
2172
|
-
} &
|
|
2170
|
+
} & 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;
|
|
2173
2171
|
};
|
|
2174
2172
|
};
|
|
2175
2173
|
openapi: {
|
|
@@ -2221,41 +2219,41 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2221
2219
|
emailVerified: boolean;
|
|
2222
2220
|
name: string;
|
|
2223
2221
|
image?: string | null | undefined;
|
|
2224
|
-
} &
|
|
2222
|
+
} & 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;
|
|
2225
2223
|
}>;
|
|
2226
|
-
readonly callbackOAuth:
|
|
2224
|
+
readonly callbackOAuth: import("better-call").StrictEndpoint<"/callback/:id", {
|
|
2227
2225
|
method: ("GET" | "POST")[];
|
|
2228
2226
|
operationId: string;
|
|
2229
|
-
body:
|
|
2230
|
-
code:
|
|
2231
|
-
error:
|
|
2232
|
-
device_id:
|
|
2233
|
-
error_description:
|
|
2234
|
-
state:
|
|
2235
|
-
user:
|
|
2236
|
-
iss:
|
|
2237
|
-
},
|
|
2238
|
-
query:
|
|
2239
|
-
code:
|
|
2240
|
-
error:
|
|
2241
|
-
device_id:
|
|
2242
|
-
error_description:
|
|
2243
|
-
state:
|
|
2244
|
-
user:
|
|
2245
|
-
iss:
|
|
2246
|
-
},
|
|
2227
|
+
body: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
2228
|
+
code: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2229
|
+
error: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2230
|
+
device_id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2231
|
+
error_description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2232
|
+
state: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2233
|
+
user: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2234
|
+
iss: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2235
|
+
}, import("zod/v4/core").$strip>>;
|
|
2236
|
+
query: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
2237
|
+
code: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2238
|
+
error: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2239
|
+
device_id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2240
|
+
error_description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2241
|
+
state: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2242
|
+
user: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2243
|
+
iss: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2244
|
+
}, import("zod/v4/core").$strip>>;
|
|
2247
2245
|
metadata: {
|
|
2248
2246
|
allowedMediaTypes: string[];
|
|
2249
2247
|
scope: "server";
|
|
2250
2248
|
};
|
|
2251
2249
|
}, void>;
|
|
2252
|
-
readonly getSession:
|
|
2250
|
+
readonly getSession: import("better-call").StrictEndpoint<"/get-session", {
|
|
2253
2251
|
method: ("GET" | "POST")[];
|
|
2254
2252
|
operationId: string;
|
|
2255
|
-
query:
|
|
2256
|
-
disableCookieCache:
|
|
2257
|
-
disableRefresh:
|
|
2258
|
-
},
|
|
2253
|
+
query: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
2254
|
+
disableCookieCache: import("zod").ZodOptional<import("zod").ZodCoercedBoolean<unknown>>;
|
|
2255
|
+
disableRefresh: import("zod").ZodOptional<import("zod").ZodCoercedBoolean<unknown>>;
|
|
2256
|
+
}, import("zod/v4/core").$strip>>;
|
|
2259
2257
|
requireHeaders: true;
|
|
2260
2258
|
metadata: {
|
|
2261
2259
|
openapi: {
|
|
@@ -2294,7 +2292,7 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2294
2292
|
token: string;
|
|
2295
2293
|
ipAddress?: string | null | undefined;
|
|
2296
2294
|
userAgent?: string | null | undefined;
|
|
2297
|
-
} &
|
|
2295
|
+
} & 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;
|
|
2298
2296
|
user: {
|
|
2299
2297
|
id: string;
|
|
2300
2298
|
createdAt: Date;
|
|
@@ -2303,15 +2301,15 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2303
2301
|
emailVerified: boolean;
|
|
2304
2302
|
name: string;
|
|
2305
2303
|
image?: string | null | undefined;
|
|
2306
|
-
} &
|
|
2304
|
+
} & 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;
|
|
2307
2305
|
} | null>;
|
|
2308
|
-
readonly signOut:
|
|
2306
|
+
readonly signOut: import("better-call").StrictEndpoint<"/sign-out", {
|
|
2309
2307
|
method: "POST";
|
|
2310
|
-
body:
|
|
2311
|
-
callbackURL:
|
|
2312
|
-
disableRedirect:
|
|
2313
|
-
state:
|
|
2314
|
-
},
|
|
2308
|
+
body: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
2309
|
+
callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2310
|
+
disableRedirect: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
2311
|
+
state: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2312
|
+
}, import("zod/v4/core").$strip>>;
|
|
2315
2313
|
operationId: string;
|
|
2316
2314
|
requireHeaders: true;
|
|
2317
2315
|
metadata: {
|
|
@@ -2350,18 +2348,18 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2350
2348
|
url: string | undefined;
|
|
2351
2349
|
redirect: boolean | undefined;
|
|
2352
2350
|
}>;
|
|
2353
|
-
readonly signUpEmail:
|
|
2351
|
+
readonly signUpEmail: import("better-call").StrictEndpoint<"/sign-up/email", {
|
|
2354
2352
|
method: "POST";
|
|
2355
2353
|
operationId: string;
|
|
2356
|
-
use: Middleware<
|
|
2357
|
-
body:
|
|
2358
|
-
name:
|
|
2359
|
-
email:
|
|
2360
|
-
password:
|
|
2361
|
-
image:
|
|
2362
|
-
callbackURL:
|
|
2363
|
-
rememberMe:
|
|
2364
|
-
},
|
|
2354
|
+
use: Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>>[];
|
|
2355
|
+
body: import("zod").ZodIntersection<import("zod").ZodObject<{
|
|
2356
|
+
name: import("zod").ZodString;
|
|
2357
|
+
email: import("zod").ZodEmail;
|
|
2358
|
+
password: import("zod").ZodString;
|
|
2359
|
+
image: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2360
|
+
callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2361
|
+
rememberMe: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
2362
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
|
|
2365
2363
|
cloneRequest: true;
|
|
2366
2364
|
metadata: {
|
|
2367
2365
|
allowedMediaTypes: string[];
|
|
@@ -2373,7 +2371,7 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2373
2371
|
image?: string | undefined;
|
|
2374
2372
|
callbackURL?: string | undefined;
|
|
2375
2373
|
rememberMe?: boolean | undefined;
|
|
2376
|
-
} &
|
|
2374
|
+
} & import("@better-auth/core/db").InferDBFieldsFromPluginsInput<"user", Option["plugins"]> & import("@better-auth/core/db").InferDBFieldsFromOptionsInput<Option["user"]>;
|
|
2377
2375
|
returned: {
|
|
2378
2376
|
token: string | null;
|
|
2379
2377
|
user: {
|
|
@@ -2384,7 +2382,7 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2384
2382
|
emailVerified: boolean;
|
|
2385
2383
|
name: string;
|
|
2386
2384
|
image?: string | null | undefined;
|
|
2387
|
-
} &
|
|
2385
|
+
} & 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;
|
|
2388
2386
|
};
|
|
2389
2387
|
};
|
|
2390
2388
|
openapi: {
|
|
@@ -2512,7 +2510,7 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2512
2510
|
emailVerified: boolean;
|
|
2513
2511
|
name: string;
|
|
2514
2512
|
image?: string | null | undefined;
|
|
2515
|
-
} &
|
|
2513
|
+
} & 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;
|
|
2516
2514
|
} | {
|
|
2517
2515
|
token: string;
|
|
2518
2516
|
user: {
|
|
@@ -2523,19 +2521,19 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2523
2521
|
emailVerified: boolean;
|
|
2524
2522
|
name: string;
|
|
2525
2523
|
image?: string | null | undefined;
|
|
2526
|
-
} &
|
|
2524
|
+
} & 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;
|
|
2527
2525
|
}>;
|
|
2528
|
-
readonly signInEmail:
|
|
2526
|
+
readonly signInEmail: import("better-call").StrictEndpoint<"/sign-in/email", {
|
|
2529
2527
|
method: "POST";
|
|
2530
2528
|
operationId: string;
|
|
2531
|
-
use: Middleware<
|
|
2529
|
+
use: Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>>[];
|
|
2532
2530
|
cloneRequest: true;
|
|
2533
|
-
body:
|
|
2534
|
-
email:
|
|
2535
|
-
password:
|
|
2536
|
-
callbackURL:
|
|
2537
|
-
rememberMe:
|
|
2538
|
-
},
|
|
2531
|
+
body: import("zod").ZodObject<{
|
|
2532
|
+
email: import("zod").ZodString;
|
|
2533
|
+
password: import("zod").ZodString;
|
|
2534
|
+
callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2535
|
+
rememberMe: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodBoolean>>;
|
|
2536
|
+
}, import("zod/v4/core").$strip>;
|
|
2539
2537
|
metadata: {
|
|
2540
2538
|
allowedMediaTypes: string[];
|
|
2541
2539
|
$Infer: {
|
|
@@ -2557,7 +2555,7 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2557
2555
|
emailVerified: boolean;
|
|
2558
2556
|
name: string;
|
|
2559
2557
|
image?: string | null | undefined;
|
|
2560
|
-
} &
|
|
2558
|
+
} & 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;
|
|
2561
2559
|
};
|
|
2562
2560
|
};
|
|
2563
2561
|
openapi: {
|
|
@@ -2609,18 +2607,18 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2609
2607
|
emailVerified: boolean;
|
|
2610
2608
|
name: string;
|
|
2611
2609
|
image?: string | null | undefined;
|
|
2612
|
-
} &
|
|
2610
|
+
} & 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;
|
|
2613
2611
|
}>;
|
|
2614
|
-
readonly resetPassword:
|
|
2612
|
+
readonly resetPassword: import("better-call").StrictEndpoint<"/reset-password", {
|
|
2615
2613
|
method: "POST";
|
|
2616
2614
|
operationId: string;
|
|
2617
|
-
query:
|
|
2618
|
-
token:
|
|
2619
|
-
},
|
|
2620
|
-
body:
|
|
2621
|
-
newPassword:
|
|
2622
|
-
token:
|
|
2623
|
-
},
|
|
2615
|
+
query: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
2616
|
+
token: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2617
|
+
}, import("zod/v4/core").$strip>>;
|
|
2618
|
+
body: import("zod").ZodObject<{
|
|
2619
|
+
newPassword: import("zod").ZodString;
|
|
2620
|
+
token: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2621
|
+
}, import("zod/v4/core").$strip>;
|
|
2624
2622
|
metadata: {
|
|
2625
2623
|
openapi: {
|
|
2626
2624
|
operationId: string;
|
|
@@ -2647,11 +2645,11 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2647
2645
|
}, {
|
|
2648
2646
|
status: boolean;
|
|
2649
2647
|
}>;
|
|
2650
|
-
readonly verifyPassword:
|
|
2648
|
+
readonly verifyPassword: import("better-call").StrictEndpoint<"/verify-password", {
|
|
2651
2649
|
method: "POST";
|
|
2652
|
-
body:
|
|
2653
|
-
password:
|
|
2654
|
-
},
|
|
2650
|
+
body: import("zod").ZodObject<{
|
|
2651
|
+
password: import("zod").ZodString;
|
|
2652
|
+
}, import("zod/v4/core").$strip>;
|
|
2655
2653
|
metadata: {
|
|
2656
2654
|
scope: "server";
|
|
2657
2655
|
openapi: {
|
|
@@ -2676,7 +2674,7 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2676
2674
|
};
|
|
2677
2675
|
};
|
|
2678
2676
|
};
|
|
2679
|
-
use: Middleware<
|
|
2677
|
+
use: Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
2680
2678
|
session: {
|
|
2681
2679
|
session: Record<string, any> & {
|
|
2682
2680
|
id: string;
|
|
@@ -2702,14 +2700,14 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2702
2700
|
}, {
|
|
2703
2701
|
status: boolean;
|
|
2704
2702
|
}>;
|
|
2705
|
-
readonly verifyEmail:
|
|
2703
|
+
readonly verifyEmail: import("better-call").StrictEndpoint<"/verify-email", {
|
|
2706
2704
|
method: "GET";
|
|
2707
2705
|
operationId: string;
|
|
2708
|
-
query:
|
|
2709
|
-
token:
|
|
2710
|
-
callbackURL:
|
|
2711
|
-
},
|
|
2712
|
-
use: Middleware<
|
|
2706
|
+
query: import("zod").ZodObject<{
|
|
2707
|
+
token: import("zod").ZodString;
|
|
2708
|
+
callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2709
|
+
}, import("zod/v4/core").$strip>;
|
|
2710
|
+
use: Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>>[];
|
|
2713
2711
|
metadata: {
|
|
2714
2712
|
openapi: {
|
|
2715
2713
|
description: string;
|
|
@@ -2758,14 +2756,14 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2758
2756
|
}, void | {
|
|
2759
2757
|
status: boolean;
|
|
2760
2758
|
}>;
|
|
2761
|
-
readonly sendVerificationEmail:
|
|
2759
|
+
readonly sendVerificationEmail: import("better-call").StrictEndpoint<"/send-verification-email", {
|
|
2762
2760
|
method: "POST";
|
|
2763
2761
|
operationId: string;
|
|
2764
2762
|
cloneRequest: true;
|
|
2765
|
-
body:
|
|
2766
|
-
email:
|
|
2767
|
-
callbackURL:
|
|
2768
|
-
},
|
|
2763
|
+
body: import("zod").ZodObject<{
|
|
2764
|
+
email: import("zod").ZodEmail;
|
|
2765
|
+
callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2766
|
+
}, import("zod/v4/core").$strip>;
|
|
2769
2767
|
metadata: {
|
|
2770
2768
|
openapi: {
|
|
2771
2769
|
operationId: string;
|
|
@@ -2834,13 +2832,13 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2834
2832
|
}, {
|
|
2835
2833
|
status: boolean;
|
|
2836
2834
|
}>;
|
|
2837
|
-
readonly changeEmail:
|
|
2835
|
+
readonly changeEmail: import("better-call").StrictEndpoint<"/change-email", {
|
|
2838
2836
|
method: "POST";
|
|
2839
|
-
body:
|
|
2840
|
-
newEmail:
|
|
2841
|
-
callbackURL:
|
|
2842
|
-
},
|
|
2843
|
-
use: Middleware<
|
|
2837
|
+
body: import("zod").ZodObject<{
|
|
2838
|
+
newEmail: import("zod").ZodEmail;
|
|
2839
|
+
callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2840
|
+
}, import("zod/v4/core").$strip>;
|
|
2841
|
+
use: Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
2844
2842
|
session: {
|
|
2845
2843
|
session: Record<string, any> & {
|
|
2846
2844
|
id: string;
|
|
@@ -2900,15 +2898,15 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
2900
2898
|
}, {
|
|
2901
2899
|
status: boolean;
|
|
2902
2900
|
}>;
|
|
2903
|
-
readonly changePassword:
|
|
2901
|
+
readonly changePassword: import("better-call").StrictEndpoint<"/change-password", {
|
|
2904
2902
|
method: "POST";
|
|
2905
2903
|
operationId: string;
|
|
2906
|
-
body:
|
|
2907
|
-
newPassword:
|
|
2908
|
-
currentPassword:
|
|
2909
|
-
revokeOtherSessions:
|
|
2910
|
-
},
|
|
2911
|
-
use: Middleware<
|
|
2904
|
+
body: import("zod").ZodObject<{
|
|
2905
|
+
newPassword: import("zod").ZodString;
|
|
2906
|
+
currentPassword: import("zod").ZodString;
|
|
2907
|
+
revokeOtherSessions: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
2908
|
+
}, import("zod/v4/core").$strip>;
|
|
2909
|
+
use: Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
2912
2910
|
session: {
|
|
2913
2911
|
session: Record<string, any> & {
|
|
2914
2912
|
id: string;
|
|
@@ -3016,12 +3014,12 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3016
3014
|
image?: string | null | undefined;
|
|
3017
3015
|
};
|
|
3018
3016
|
}>;
|
|
3019
|
-
readonly setPassword:
|
|
3017
|
+
readonly setPassword: import("better-call").StrictEndpoint<string, {
|
|
3020
3018
|
method: "POST";
|
|
3021
|
-
body:
|
|
3022
|
-
newPassword:
|
|
3023
|
-
},
|
|
3024
|
-
use: Middleware<
|
|
3019
|
+
body: import("zod").ZodObject<{
|
|
3020
|
+
newPassword: import("zod").ZodString;
|
|
3021
|
+
}, import("zod/v4/core").$strip>;
|
|
3022
|
+
use: Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
3025
3023
|
session: {
|
|
3026
3024
|
session: Record<string, any> & {
|
|
3027
3025
|
id: string;
|
|
@@ -3047,11 +3045,11 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3047
3045
|
}, {
|
|
3048
3046
|
status: boolean;
|
|
3049
3047
|
}>;
|
|
3050
|
-
readonly updateSession:
|
|
3048
|
+
readonly updateSession: import("better-call").StrictEndpoint<"/update-session", {
|
|
3051
3049
|
method: "POST";
|
|
3052
3050
|
operationId: string;
|
|
3053
|
-
body:
|
|
3054
|
-
use: Middleware<
|
|
3051
|
+
body: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>;
|
|
3052
|
+
use: Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
3055
3053
|
session: {
|
|
3056
3054
|
session: Record<string, any> & {
|
|
3057
3055
|
id: string;
|
|
@@ -3113,11 +3111,11 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3113
3111
|
userAgent?: string | null | undefined;
|
|
3114
3112
|
};
|
|
3115
3113
|
}>;
|
|
3116
|
-
readonly updateUser:
|
|
3114
|
+
readonly updateUser: import("better-call").StrictEndpoint<"/update-user", {
|
|
3117
3115
|
method: "POST";
|
|
3118
3116
|
operationId: string;
|
|
3119
|
-
body:
|
|
3120
|
-
use: Middleware<
|
|
3117
|
+
body: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>;
|
|
3118
|
+
use: Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
3121
3119
|
session: {
|
|
3122
3120
|
session: Record<string, any> & {
|
|
3123
3121
|
id: string;
|
|
@@ -3193,9 +3191,9 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3193
3191
|
}, {
|
|
3194
3192
|
status: boolean;
|
|
3195
3193
|
}>;
|
|
3196
|
-
readonly deleteUser:
|
|
3194
|
+
readonly deleteUser: import("better-call").StrictEndpoint<"/delete-user", {
|
|
3197
3195
|
method: "POST";
|
|
3198
|
-
use: Middleware<
|
|
3196
|
+
use: Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
3199
3197
|
session: {
|
|
3200
3198
|
session: Record<string, any> & {
|
|
3201
3199
|
id: string;
|
|
@@ -3218,11 +3216,11 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3218
3216
|
};
|
|
3219
3217
|
};
|
|
3220
3218
|
}>>[];
|
|
3221
|
-
body:
|
|
3222
|
-
callbackURL:
|
|
3223
|
-
password:
|
|
3224
|
-
token:
|
|
3225
|
-
},
|
|
3219
|
+
body: import("zod").ZodObject<{
|
|
3220
|
+
callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
3221
|
+
password: import("zod").ZodOptional<import("zod").ZodString>;
|
|
3222
|
+
token: import("zod").ZodOptional<import("zod").ZodString>;
|
|
3223
|
+
}, import("zod/v4/core").$strip>;
|
|
3226
3224
|
metadata: {
|
|
3227
3225
|
openapi: {
|
|
3228
3226
|
operationId: string;
|
|
@@ -3280,12 +3278,12 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3280
3278
|
success: boolean;
|
|
3281
3279
|
message: string;
|
|
3282
3280
|
}>;
|
|
3283
|
-
readonly requestPasswordReset:
|
|
3281
|
+
readonly requestPasswordReset: import("better-call").StrictEndpoint<"/request-password-reset", {
|
|
3284
3282
|
method: "POST";
|
|
3285
|
-
body:
|
|
3286
|
-
email:
|
|
3287
|
-
redirectTo:
|
|
3288
|
-
},
|
|
3283
|
+
body: import("zod").ZodObject<{
|
|
3284
|
+
email: import("zod").ZodEmail;
|
|
3285
|
+
redirectTo: import("zod").ZodOptional<import("zod").ZodString>;
|
|
3286
|
+
}, import("zod/v4/core").$strip>;
|
|
3289
3287
|
metadata: {
|
|
3290
3288
|
openapi: {
|
|
3291
3289
|
operationId: string;
|
|
@@ -3312,18 +3310,18 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3312
3310
|
};
|
|
3313
3311
|
};
|
|
3314
3312
|
};
|
|
3315
|
-
use: Middleware<
|
|
3313
|
+
use: Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>>[];
|
|
3316
3314
|
}, {
|
|
3317
3315
|
status: boolean;
|
|
3318
3316
|
message: string;
|
|
3319
3317
|
}>;
|
|
3320
|
-
readonly requestPasswordResetCallback:
|
|
3318
|
+
readonly requestPasswordResetCallback: import("better-call").StrictEndpoint<"/reset-password/:token", {
|
|
3321
3319
|
method: "GET";
|
|
3322
3320
|
operationId: string;
|
|
3323
|
-
query:
|
|
3324
|
-
callbackURL:
|
|
3325
|
-
},
|
|
3326
|
-
use: Middleware<
|
|
3321
|
+
query: import("zod").ZodObject<{
|
|
3322
|
+
callbackURL: import("zod").ZodString;
|
|
3323
|
+
}, import("zod/v4/core").$strip>;
|
|
3324
|
+
use: Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>>[];
|
|
3327
3325
|
metadata: {
|
|
3328
3326
|
openapi: {
|
|
3329
3327
|
operationId: string;
|
|
@@ -3365,10 +3363,10 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3365
3363
|
};
|
|
3366
3364
|
};
|
|
3367
3365
|
}, never>;
|
|
3368
|
-
readonly listSessions:
|
|
3366
|
+
readonly listSessions: import("better-call").StrictEndpoint<"/list-sessions", {
|
|
3369
3367
|
method: "GET";
|
|
3370
3368
|
operationId: string;
|
|
3371
|
-
use: Middleware<
|
|
3369
|
+
use: Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
3372
3370
|
session: {
|
|
3373
3371
|
session: Record<string, any> & {
|
|
3374
3372
|
id: string;
|
|
@@ -3422,13 +3420,13 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3422
3420
|
token: string;
|
|
3423
3421
|
ipAddress?: string | null | undefined;
|
|
3424
3422
|
userAgent?: string | null | undefined;
|
|
3425
|
-
} &
|
|
3426
|
-
readonly revokeSession:
|
|
3423
|
+
} & 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>[]>;
|
|
3424
|
+
readonly revokeSession: import("better-call").StrictEndpoint<"/revoke-session", {
|
|
3427
3425
|
method: "POST";
|
|
3428
|
-
body:
|
|
3429
|
-
token:
|
|
3430
|
-
},
|
|
3431
|
-
use: Middleware<
|
|
3426
|
+
body: import("zod").ZodObject<{
|
|
3427
|
+
token: import("zod").ZodString;
|
|
3428
|
+
}, import("zod/v4/core").$strip>;
|
|
3429
|
+
use: Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
3432
3430
|
session: {
|
|
3433
3431
|
session: Record<string, any> & {
|
|
3434
3432
|
id: string;
|
|
@@ -3495,9 +3493,9 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3495
3493
|
}, {
|
|
3496
3494
|
status: boolean;
|
|
3497
3495
|
}>;
|
|
3498
|
-
readonly revokeSessions:
|
|
3496
|
+
readonly revokeSessions: import("better-call").StrictEndpoint<"/revoke-sessions", {
|
|
3499
3497
|
method: "POST";
|
|
3500
|
-
use: Middleware<
|
|
3498
|
+
use: Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
3501
3499
|
session: {
|
|
3502
3500
|
session: Record<string, any> & {
|
|
3503
3501
|
id: string;
|
|
@@ -3548,10 +3546,10 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3548
3546
|
}, {
|
|
3549
3547
|
status: boolean;
|
|
3550
3548
|
}>;
|
|
3551
|
-
readonly revokeOtherSessions:
|
|
3549
|
+
readonly revokeOtherSessions: import("better-call").StrictEndpoint<"/revoke-other-sessions", {
|
|
3552
3550
|
method: "POST";
|
|
3553
3551
|
requireHeaders: true;
|
|
3554
|
-
use: Middleware<
|
|
3552
|
+
use: Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
3555
3553
|
session: {
|
|
3556
3554
|
session: Record<string, any> & {
|
|
3557
3555
|
id: string;
|
|
@@ -3601,27 +3599,27 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3601
3599
|
}, {
|
|
3602
3600
|
status: boolean;
|
|
3603
3601
|
}>;
|
|
3604
|
-
readonly linkSocialAccount:
|
|
3602
|
+
readonly linkSocialAccount: import("better-call").StrictEndpoint<"/link-social", {
|
|
3605
3603
|
method: "POST";
|
|
3606
3604
|
requireHeaders: true;
|
|
3607
|
-
body:
|
|
3608
|
-
callbackURL:
|
|
3609
|
-
provider:
|
|
3610
|
-
idToken:
|
|
3611
|
-
token:
|
|
3612
|
-
nonce:
|
|
3613
|
-
accessToken:
|
|
3614
|
-
refreshToken:
|
|
3615
|
-
},
|
|
3616
|
-
requestSignUp:
|
|
3617
|
-
scopes:
|
|
3618
|
-
errorCallbackURL:
|
|
3619
|
-
disableRedirect:
|
|
3620
|
-
loginHint:
|
|
3621
|
-
additionalParams:
|
|
3622
|
-
additionalData:
|
|
3623
|
-
},
|
|
3624
|
-
use: Middleware<
|
|
3605
|
+
body: import("zod").ZodObject<{
|
|
3606
|
+
callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
3607
|
+
provider: import("zod").ZodType<(string & {}) | "github" | "apple" | "atlassian" | "cloudflare" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown, import("zod/v4/core").$ZodTypeInternals<(string & {}) | "github" | "apple" | "atlassian" | "cloudflare" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown>>;
|
|
3608
|
+
idToken: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
3609
|
+
token: import("zod").ZodString;
|
|
3610
|
+
nonce: import("zod").ZodOptional<import("zod").ZodString>;
|
|
3611
|
+
accessToken: import("zod").ZodOptional<import("zod").ZodString>;
|
|
3612
|
+
refreshToken: import("zod").ZodOptional<import("zod").ZodString>;
|
|
3613
|
+
}, import("zod/v4/core").$strip>>;
|
|
3614
|
+
requestSignUp: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
3615
|
+
scopes: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
3616
|
+
errorCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
3617
|
+
disableRedirect: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
3618
|
+
loginHint: import("zod").ZodOptional<import("zod").ZodString>;
|
|
3619
|
+
additionalParams: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodString>>;
|
|
3620
|
+
additionalData: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
|
|
3621
|
+
}, import("zod/v4/core").$strip>;
|
|
3622
|
+
use: Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
3625
3623
|
session: {
|
|
3626
3624
|
session: Record<string, any> & {
|
|
3627
3625
|
id: string;
|
|
@@ -3680,9 +3678,9 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3680
3678
|
url: string;
|
|
3681
3679
|
redirect: boolean;
|
|
3682
3680
|
}>;
|
|
3683
|
-
readonly listUserAccounts:
|
|
3681
|
+
readonly listUserAccounts: import("better-call").StrictEndpoint<"/list-accounts", {
|
|
3684
3682
|
method: "GET";
|
|
3685
|
-
use: Middleware<
|
|
3683
|
+
use: Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
3686
3684
|
session: {
|
|
3687
3685
|
session: Record<string, any> & {
|
|
3688
3686
|
id: string;
|
|
@@ -3764,13 +3762,13 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3764
3762
|
providerId: string;
|
|
3765
3763
|
accountId: string;
|
|
3766
3764
|
}[]>;
|
|
3767
|
-
readonly deleteUserCallback:
|
|
3765
|
+
readonly deleteUserCallback: import("better-call").StrictEndpoint<"/delete-user/callback", {
|
|
3768
3766
|
method: "GET";
|
|
3769
|
-
query:
|
|
3770
|
-
token:
|
|
3771
|
-
callbackURL:
|
|
3772
|
-
},
|
|
3773
|
-
use: Middleware<
|
|
3767
|
+
query: import("zod").ZodObject<{
|
|
3768
|
+
token: import("zod").ZodString;
|
|
3769
|
+
callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
3770
|
+
}, import("zod/v4/core").$strip>;
|
|
3771
|
+
use: Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>>[];
|
|
3774
3772
|
metadata: {
|
|
3775
3773
|
openapi: {
|
|
3776
3774
|
description: string;
|
|
@@ -3804,12 +3802,12 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3804
3802
|
success: boolean;
|
|
3805
3803
|
message: string;
|
|
3806
3804
|
}>;
|
|
3807
|
-
readonly unlinkAccount:
|
|
3805
|
+
readonly unlinkAccount: import("better-call").StrictEndpoint<"/unlink-account", {
|
|
3808
3806
|
method: "POST";
|
|
3809
|
-
body:
|
|
3810
|
-
accountId:
|
|
3811
|
-
},
|
|
3812
|
-
use: Middleware<
|
|
3807
|
+
body: import("zod").ZodObject<{
|
|
3808
|
+
accountId: import("zod").ZodString;
|
|
3809
|
+
}, import("zod/v4/core").$strip>;
|
|
3810
|
+
use: Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
3813
3811
|
session: {
|
|
3814
3812
|
session: Record<string, any> & {
|
|
3815
3813
|
id: string;
|
|
@@ -3857,15 +3855,15 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3857
3855
|
}, {
|
|
3858
3856
|
status: boolean;
|
|
3859
3857
|
}>;
|
|
3860
|
-
readonly refreshToken:
|
|
3858
|
+
readonly refreshToken: import("better-call").StrictEndpoint<"/refresh-token", {
|
|
3861
3859
|
method: "POST";
|
|
3862
|
-
body:
|
|
3863
|
-
accountId:
|
|
3864
|
-
userId:
|
|
3865
|
-
},
|
|
3866
|
-
useAccountCookie:
|
|
3867
|
-
userId:
|
|
3868
|
-
},
|
|
3860
|
+
body: import("zod").ZodUnion<readonly [import("zod").ZodObject<{
|
|
3861
|
+
accountId: import("zod").ZodString;
|
|
3862
|
+
userId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
3863
|
+
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
3864
|
+
useAccountCookie: import("zod").ZodLiteral<true>;
|
|
3865
|
+
userId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
3866
|
+
}, import("zod/v4/core").$strict>]>;
|
|
3869
3867
|
metadata: {
|
|
3870
3868
|
openapi: {
|
|
3871
3869
|
description: string;
|
|
@@ -3918,15 +3916,15 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3918
3916
|
providerId: string;
|
|
3919
3917
|
accountId: string;
|
|
3920
3918
|
}>;
|
|
3921
|
-
readonly getAccessToken:
|
|
3919
|
+
readonly getAccessToken: import("better-call").StrictEndpoint<"/get-access-token", {
|
|
3922
3920
|
method: "POST";
|
|
3923
|
-
body:
|
|
3924
|
-
accountId:
|
|
3925
|
-
userId:
|
|
3926
|
-
},
|
|
3927
|
-
useAccountCookie:
|
|
3928
|
-
userId:
|
|
3929
|
-
},
|
|
3921
|
+
body: import("zod").ZodUnion<readonly [import("zod").ZodObject<{
|
|
3922
|
+
accountId: import("zod").ZodString;
|
|
3923
|
+
userId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
3924
|
+
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
3925
|
+
useAccountCookie: import("zod").ZodLiteral<true>;
|
|
3926
|
+
userId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
3927
|
+
}, import("zod/v4/core").$strict>]>;
|
|
3930
3928
|
metadata: {
|
|
3931
3929
|
openapi: {
|
|
3932
3930
|
description: string;
|
|
@@ -3968,7 +3966,7 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
3968
3966
|
scopes: string[];
|
|
3969
3967
|
idToken: string | undefined;
|
|
3970
3968
|
}>;
|
|
3971
|
-
readonly accountInfo:
|
|
3969
|
+
readonly accountInfo: import("better-call").StrictEndpoint<"/account-info", {
|
|
3972
3970
|
method: "GET";
|
|
3973
3971
|
metadata: {
|
|
3974
3972
|
openapi: {
|
|
@@ -4031,23 +4029,23 @@ declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, optio
|
|
|
4031
4029
|
};
|
|
4032
4030
|
};
|
|
4033
4031
|
};
|
|
4034
|
-
query:
|
|
4035
|
-
accountId:
|
|
4036
|
-
userId:
|
|
4037
|
-
},
|
|
4038
|
-
useAccountCookie:
|
|
4039
|
-
userId:
|
|
4040
|
-
},
|
|
4032
|
+
query: import("zod").ZodUnion<readonly [import("zod").ZodObject<{
|
|
4033
|
+
accountId: import("zod").ZodString;
|
|
4034
|
+
userId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
4035
|
+
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
4036
|
+
useAccountCookie: import("zod").ZodLiteral<true>;
|
|
4037
|
+
userId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
4038
|
+
}, import("zod/v4/core").$strict>]>;
|
|
4041
4039
|
}, {
|
|
4042
4040
|
account: {
|
|
4043
4041
|
id: string;
|
|
4044
4042
|
providerId: string;
|
|
4045
4043
|
accountId: string;
|
|
4046
4044
|
};
|
|
4047
|
-
user:
|
|
4045
|
+
user: import("@better-auth/core/oauth2").OAuth2UserInfo;
|
|
4048
4046
|
data: object;
|
|
4049
4047
|
}>;
|
|
4050
|
-
} 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;
|
|
4048
|
+
} 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;
|
|
4051
4049
|
};
|
|
4052
4050
|
//#endregion
|
|
4053
|
-
export { APIError, type AuthEndpoint, type AuthMiddleware, type DispatchContext, NO_STORE_HEADERS, accountInfo, addOAuthServerContext, callbackOAuth, changeEmail, changePassword,
|
|
4051
|
+
export { APIError, type AuthEndpoint, type AuthMiddleware, type DispatchContext, NO_STORE_HEADERS, accountInfo, addOAuthServerContext, callbackOAuth, changeEmail, changePassword, createAuthEndpoint, createAuthMiddleware, createEmailVerificationToken, deleteUser, deleteUserCallback, dispatchAuthEndpoint, error, formCsrfMiddleware, freshSessionMiddleware, getAccessToken, getAuthoritativeSessionFromCtx, getIP, getOAuthState, getSession, getSessionFromCtx, getShouldSkipSessionRefresh, isAPIError, isStateful, linkSocialAccount, listSessions, listUserAccounts, ok, optionsMiddleware, originCheck, originCheckMiddleware, refreshToken, requestOnlySessionMiddleware, requestPasswordReset, requestPasswordResetCallback, requireOrgRole, requireResourceOwnership, resetPassword, revokeOtherSessions, revokeSession, revokeSessions, sendVerificationEmail, sendVerificationEmailFn, sensitiveSessionMiddleware, sessionMiddleware, setPassword, setShouldSkipSessionRefresh, signInEmail, signInSocial, signOut, signUpEmail, unlinkAccount, updateSession, updateUser, verifyEmail, verifyPassword };
|