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