/opt/canhelp/node_modules/better-auth/dist/test-utils
Edit: /opt/canhelp/node_modules/better-auth/dist/test-utils/test-instance.d.mts (430484B)
import { Prettify as Prettify$1, UnionToIntersection } from "../types/helper.mjs";
import { InferRoute } from "../client/path-to-object.mjs";
import { InferErrorCodes, IsSignal, SessionQueryParams } from "../client/types.mjs";
import { FilteredAPI, InferAPI } from "../types/api.mjs";
import { Session, User } from "../types/models.mjs";
import { Auth } from "../types/auth.mjs";
import { setCookieToHeader } from "../cookies/cookie-utils.mjs";
import * as _better_auth_core0 from "@better-auth/core";
import { Awaitable, BetterAuthClientOptions, BetterAuthOptions } from "@better-auth/core";
import * as _better_auth_core_oauth20 from "@better-auth/core/oauth2";
import * as _better_auth_core_utils_error_codes0 from "@better-auth/core/utils/error-codes";
import * as _better_auth_core_db_adapter0 from "@better-auth/core/db/adapter";
import * as better_call0 from "better-call";
import * as zod from "zod";
import * as nanostores from "nanostores";
import * as _better_fetch_fetch0 from "@better-fetch/fetch";
import { SuccessContext } from "@better-fetch/fetch";
import * as zod_v4_core0 from "zod/v4/core";
//#region src/test-utils/test-instance.d.ts
declare function getTestInstance
, C extends BetterAuthClientOptions>(options?: O | undefined, config?: {
clientOptions?: C;
port?: number;
disableTestUser?: boolean;
testUser?: Partial;
testWith?: "sqlite" | "postgres" | "mongodb" | "mysql";
} | undefined): Promise<{
auth: Auth;
client: UnionToIntersection<(C extends undefined ? {} : C) & {
baseURL: string | undefined;
fetchOptions: {
customFetchImpl: (url: string | URL | Request, init?: RequestInit | undefined) => Promise;
};
} extends infer T ? T extends (C extends undefined ? {} : C) & {
baseURL: string | undefined;
fetchOptions: {
customFetchImpl: (url: string | URL | Request, init?: RequestInit | undefined) => Promise;
};
} ? T extends {
plugins: Array;
} ? UnionToIntersection infer Atoms) ? Atoms extends Record ? { [key in keyof Atoms as IsSignal extends true ? never : key extends string ? `use${Capitalize}` : never]: Atoms[key] } : {} : {} : {}> : {} : never : never> & UnionToIntersection Promise;
};
})["plugins"] extends any[] ? {
getSession: (context: {
headers: Headers;
query?: {
disableCookieCache?: boolean;
disableRefresh?: boolean;
} | undefined;
asResponse?: R | undefined;
returnHeaders?: H | undefined;
}) => false extends R ? H extends true ? Promise<{
headers: Headers;
response: {
session: {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
} | null;
}> : Promise<{
session: {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
} | null> : Promise;
} & FilteredAPI<{
readonly ok: better_call0.StrictEndpoint<"/ok", {
method: "GET";
metadata: {
openapi: {
description: string;
responses: {
"200": {
description: string;
content: {
"application/json": {
schema: {
type: "object";
properties: {
ok: {
type: string;
description: string;
};
};
required: string[];
};
};
};
};
};
};
scope: "server";
};
}, {
ok: boolean;
}>;
readonly error: better_call0.StrictEndpoint<"/error", {
method: "GET";
metadata: {
openapi: {
description: string;
responses: {
"200": {
description: string;
content: {
"text/html": {
schema: {
type: "string";
description: string;
};
};
};
};
};
};
scope: "server";
};
}, Response>;
readonly signInSocial: better_call0.StrictEndpoint<"/sign-in/social", {
method: "POST";
operationId: string;
body: zod.ZodObject<{
callbackURL: zod.ZodOptional;
newUserCallbackURL: zod.ZodOptional;
errorCallbackURL: zod.ZodOptional;
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>>;
disableRedirect: zod.ZodOptional;
idToken: zod.ZodOptional;
accessToken: zod.ZodOptional;
refreshToken: zod.ZodOptional;
expiresAt: zod.ZodOptional;
user: zod.ZodOptional;
lastName: zod.ZodOptional;
}, zod_v4_core0.$strip>>;
email: zod.ZodOptional;
}, zod_v4_core0.$strip>>;
}, zod_v4_core0.$strip>>;
scopes: zod.ZodOptional>;
requestSignUp: zod.ZodOptional;
loginHint: zod.ZodOptional;
additionalData: zod.ZodOptional>;
}, zod_v4_core0.$strip>;
metadata: {
$Infer: {
body: zod.infer;
newUserCallbackURL: zod.ZodOptional;
errorCallbackURL: zod.ZodOptional;
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>>;
disableRedirect: zod.ZodOptional;
idToken: zod.ZodOptional;
accessToken: zod.ZodOptional;
refreshToken: zod.ZodOptional;
expiresAt: zod.ZodOptional;
user: zod.ZodOptional;
lastName: zod.ZodOptional;
}, zod_v4_core0.$strip>>;
email: zod.ZodOptional;
}, zod_v4_core0.$strip>>;
}, zod_v4_core0.$strip>>;
scopes: zod.ZodOptional>;
requestSignUp: zod.ZodOptional;
loginHint: zod.ZodOptional;
additionalData: zod.ZodOptional>;
}, zod_v4_core0.$strip>>;
returned: {
redirect: boolean;
token?: string | undefined;
url?: string | undefined;
user?: {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
} | undefined;
};
};
openapi: {
description: string;
operationId: string;
responses: {
"200": {
description: string;
content: {
"application/json": {
schema: {
type: "object";
description: string;
properties: {
token: {
type: string;
};
user: {
type: string;
$ref: string;
};
url: {
type: string;
};
redirect: {
type: string;
enum: boolean[];
};
};
required: string[];
};
};
};
};
};
};
};
}, {
redirect: boolean;
url: string;
} | {
redirect: boolean;
token: string;
url: undefined;
user: {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
}>;
readonly callbackOAuth: better_call0.StrictEndpoint<"/callback/:id", {
method: ("GET" | "POST")[];
operationId: string;
body: zod.ZodOptional;
error: zod.ZodOptional;
device_id: zod.ZodOptional;
error_description: zod.ZodOptional;
state: zod.ZodOptional;
user: zod.ZodOptional;
}, zod_v4_core0.$strip>>;
query: zod.ZodOptional;
error: zod.ZodOptional;
device_id: zod.ZodOptional;
error_description: zod.ZodOptional;
state: zod.ZodOptional;
user: zod.ZodOptional;
}, zod_v4_core0.$strip>>;
metadata: {
allowedMediaTypes: string[];
scope: "server";
};
}, void>;
readonly getSession: better_call0.StrictEndpoint<"/get-session", {
method: ("GET" | "POST")[];
operationId: string;
query: zod.ZodOptional>;
disableRefresh: zod.ZodOptional>;
}, zod_v4_core0.$strip>>;
requireHeaders: true;
metadata: {
openapi: {
operationId: string;
description: string;
responses: {
"200": {
description: string;
content: {
"application/json": {
schema: {
type: "object";
nullable: boolean;
properties: {
session: {
$ref: string;
};
user: {
$ref: string;
};
};
required: string[];
};
};
};
};
};
};
};
}, {
session: {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
} | null>;
readonly signOut: better_call0.StrictEndpoint<"/sign-out", {
method: "POST";
operationId: string;
requireHeaders: true;
metadata: {
openapi: {
operationId: string;
description: string;
responses: {
"200": {
description: string;
content: {
"application/json": {
schema: {
type: "object";
properties: {
success: {
type: string;
};
};
};
};
};
};
};
};
};
}, {
success: boolean;
}>;
readonly signUpEmail: better_call0.StrictEndpoint<"/sign-up/email", {
method: "POST";
operationId: string;
use: ((inputContext: better_call0.MiddlewareInputContext) => Promise)[];
body: zod.ZodIntersection;
callbackURL: zod.ZodOptional;
rememberMe: zod.ZodOptional;
}, zod_v4_core0.$strip>, zod.ZodRecord>;
metadata: {
allowedMediaTypes: string[];
$Infer: {
body: {
name: string;
email: string;
password: string;
image?: string | undefined;
callbackURL?: string | undefined;
rememberMe?: boolean | undefined;
};
returned: {
token: string | null;
user: {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
};
openapi: {
operationId: string;
description: string;
requestBody: {
content: {
"application/json": {
schema: {
type: "object";
properties: {
name: {
type: string;
description: string;
};
email: {
type: string;
description: string;
};
password: {
type: string;
description: string;
};
image: {
type: string;
description: string;
};
callbackURL: {
type: string;
description: string;
};
rememberMe: {
type: string;
description: string;
};
};
required: string[];
};
};
};
};
responses: {
"200": {
description: string;
content: {
"application/json": {
schema: {
type: "object";
properties: {
token: {
type: string;
nullable: boolean;
description: string;
};
user: {
type: string;
properties: {
id: {
type: string;
description: string;
};
email: {
type: string;
format: string;
description: string;
};
name: {
type: string;
description: string;
};
image: {
type: string;
format: string;
nullable: boolean;
description: string;
};
emailVerified: {
type: string;
description: string;
};
createdAt: {
type: string;
format: string;
description: string;
};
updatedAt: {
type: string;
format: string;
description: string;
};
};
required: string[];
};
};
required: string[];
};
};
};
};
"422": {
description: string;
content: {
"application/json": {
schema: {
type: "object";
properties: {
message: {
type: string;
};
};
};
};
};
};
};
};
};
}, {
token: null;
user: {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
} | {
token: string;
user: {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
}>;
readonly signInEmail: better_call0.StrictEndpoint<"/sign-in/email", {
method: "POST";
operationId: string;
use: ((inputContext: better_call0.MiddlewareInputContext) => Promise)[];
body: zod.ZodObject<{
email: zod.ZodString;
password: zod.ZodString;
callbackURL: zod.ZodOptional;
rememberMe: zod.ZodOptional>;
}, zod_v4_core0.$strip>;
metadata: {
allowedMediaTypes: string[];
$Infer: {
body: {
email: string;
password: string;
callbackURL?: string | undefined;
rememberMe?: boolean | undefined;
};
returned: {
redirect: boolean;
token: string;
url?: string | undefined;
user: {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
};
openapi: {
operationId: string;
description: string;
responses: {
"200": {
description: string;
content: {
"application/json": {
schema: {
type: "object";
description: string;
properties: {
redirect: {
type: string;
enum: boolean[];
};
token: {
type: string;
description: string;
};
url: {
type: string;
nullable: boolean;
};
user: {
type: string;
$ref: string;
};
};
required: string[];
};
};
};
};
};
};
};
}, {
redirect: boolean;
token: string;
url?: string | undefined;
user: {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
}>;
readonly resetPassword: better_call0.StrictEndpoint<"/reset-password", {
method: "POST";
operationId: string;
query: zod.ZodOptional;
}, zod_v4_core0.$strip>>;
body: zod.ZodObject<{
newPassword: zod.ZodString;
token: zod.ZodOptional;
}, zod_v4_core0.$strip>;
metadata: {
openapi: {
operationId: string;
description: string;
responses: {
"200": {
description: string;
content: {
"application/json": {
schema: {
type: "object";
properties: {
status: {
type: string;
};
};
};
};
};
};
};
};
};
}, {
status: boolean;
}>;
readonly verifyPassword: better_call0.StrictEndpoint<"/verify-password", {
method: "POST";
body: zod.ZodObject<{
password: zod.ZodString;
}, zod_v4_core0.$strip>;
metadata: {
scope: "server";
openapi: {
operationId: string;
description: string;
responses: {
"200": {
description: string;
content: {
"application/json": {
schema: {
type: "object";
properties: {
status: {
type: string;
};
};
};
};
};
};
};
};
};
use: ((inputContext: better_call0.MiddlewareInputContext) => Promise<{
session: {
session: Record & {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: Record & {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
}>)[];
}, {
status: boolean;
}>;
readonly verifyEmail: better_call0.StrictEndpoint<"/verify-email", {
method: "GET";
operationId: string;
query: zod.ZodObject<{
token: zod.ZodString;
callbackURL: zod.ZodOptional;
}, zod_v4_core0.$strip>;
use: ((inputContext: better_call0.MiddlewareInputContext) => Promise)[];
metadata: {
openapi: {
description: string;
parameters: ({
name: string;
in: "query";
description: string;
required: true;
schema: {
type: "string";
};
} | {
name: string;
in: "query";
description: string;
required: false;
schema: {
type: "string";
};
})[];
responses: {
"200": {
description: string;
content: {
"application/json": {
schema: {
type: "object";
properties: {
user: {
type: string;
$ref: string;
};
status: {
type: string;
description: string;
};
};
required: string[];
};
};
};
};
};
};
};
}, void | {
status: boolean;
}>;
readonly sendVerificationEmail: better_call0.StrictEndpoint<"/send-verification-email", {
method: "POST";
operationId: string;
body: zod.ZodObject<{
email: zod.ZodEmail;
callbackURL: zod.ZodOptional;
}, zod_v4_core0.$strip>;
metadata: {
openapi: {
operationId: string;
description: string;
requestBody: {
content: {
"application/json": {
schema: {
type: "object";
properties: {
email: {
type: string;
description: string;
example: string;
};
callbackURL: {
type: string;
description: string;
example: string;
nullable: boolean;
};
};
required: string[];
};
};
};
};
responses: {
"200": {
description: string;
content: {
"application/json": {
schema: {
type: "object";
properties: {
status: {
type: string;
description: string;
example: boolean;
};
};
};
};
};
};
"400": {
description: string;
content: {
"application/json": {
schema: {
type: "object";
properties: {
message: {
type: string;
description: string;
example: string;
};
};
};
};
};
};
};
};
};
}, {
status: boolean;
}>;
readonly changeEmail: better_call0.StrictEndpoint<"/change-email", {
method: "POST";
body: zod.ZodObject<{
newEmail: zod.ZodEmail;
callbackURL: zod.ZodOptional;
}, zod_v4_core0.$strip>;
use: ((inputContext: better_call0.MiddlewareInputContext) => Promise<{
session: {
session: Record & {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: Record & {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
}>)[];
metadata: {
openapi: {
operationId: string;
responses: {
"200": {
description: string;
content: {
"application/json": {
schema: {
type: "object";
properties: {
user: {
type: string;
$ref: string;
};
status: {
type: string;
description: string;
};
message: {
type: string;
enum: string[];
description: string;
nullable: boolean;
};
};
required: string[];
};
};
};
};
};
};
};
}, {
status: boolean;
}>;
readonly changePassword: better_call0.StrictEndpoint<"/change-password", {
method: "POST";
operationId: string;
body: zod.ZodObject<{
newPassword: zod.ZodString;
currentPassword: zod.ZodString;
revokeOtherSessions: zod.ZodOptional;
}, zod_v4_core0.$strip>;
use: ((inputContext: better_call0.MiddlewareInputContext) => Promise<{
session: {
session: Record & {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: Record & {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
}>)[];
metadata: {
openapi: {
operationId: string;
description: string;
responses: {
"200": {
description: string;
content: {
"application/json": {
schema: {
type: "object";
properties: {
token: {
type: string;
nullable: boolean;
description: string;
};
user: {
type: string;
properties: {
id: {
type: string;
description: string;
};
email: {
type: string;
format: string;
description: string;
};
name: {
type: string;
description: string;
};
image: {
type: string;
format: string;
nullable: boolean;
description: string;
};
emailVerified: {
type: string;
description: string;
};
createdAt: {
type: string;
format: string;
description: string;
};
updatedAt: {
type: string;
format: string;
description: string;
};
};
required: string[];
};
};
required: string[];
};
};
};
};
};
};
};
}, {
token: string | null;
user: {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
} & Record & {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
}>;
readonly setPassword: better_call0.StrictEndpoint;
use: ((inputContext: better_call0.MiddlewareInputContext) => Promise<{
session: {
session: Record & {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: Record & {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
}>)[];
}, {
status: boolean;
}>;
readonly updateSession: better_call0.StrictEndpoint<"/update-session", {
method: "POST";
operationId: string;
body: zod.ZodRecord;
use: ((inputContext: better_call0.MiddlewareInputContext) => Promise<{
session: {
session: Record & {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: Record & {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
}>)[];
metadata: {
$Infer: {
body: Partial<{}>;
};
openapi: {
operationId: string;
description: string;
responses: {
"200": {
description: string;
content: {
"application/json": {
schema: {
type: "object";
properties: {
session: {
type: string;
$ref: string;
};
};
};
};
};
};
};
};
};
}, {
session: {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
}>;
readonly updateUser: better_call0.StrictEndpoint<"/update-user", {
method: "POST";
operationId: string;
body: zod.ZodRecord;
use: ((inputContext: better_call0.MiddlewareInputContext) => Promise<{
session: {
session: Record & {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: Record & {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
}>)[];
metadata: {
$Infer: {
body: Partial<{}> & {
name?: string | undefined;
image?: string | undefined | null;
};
};
openapi: {
operationId: string;
description: string;
requestBody: {
content: {
"application/json": {
schema: {
type: "object";
properties: {
name: {
type: string;
description: string;
};
image: {
type: string;
description: string;
nullable: boolean;
};
};
};
};
};
};
responses: {
"200": {
description: string;
content: {
"application/json": {
schema: {
type: "object";
properties: {
user: {
type: string;
$ref: string;
};
};
};
};
};
};
};
};
};
}, {
status: boolean;
}>;
readonly deleteUser: better_call0.StrictEndpoint<"/delete-user", {
method: "POST";
use: ((inputContext: better_call0.MiddlewareInputContext) => Promise<{
session: {
session: Record & {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: Record & {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
}>)[];
body: zod.ZodObject<{
callbackURL: zod.ZodOptional;
password: zod.ZodOptional;
token: zod.ZodOptional;
}, zod_v4_core0.$strip>;
metadata: {
openapi: {
operationId: string;
description: string;
requestBody: {
content: {
"application/json": {
schema: {
type: "object";
properties: {
callbackURL: {
type: string;
description: string;
};
password: {
type: string;
description: string;
};
token: {
type: string;
description: string;
};
};
};
};
};
};
responses: {
"200": {
description: string;
content: {
"application/json": {
schema: {
type: "object";
properties: {
success: {
type: string;
description: string;
};
message: {
type: string;
enum: string[];
description: string;
};
};
required: string[];
};
};
};
};
};
};
};
}, {
success: boolean;
message: string;
}>;
readonly requestPasswordReset: better_call0.StrictEndpoint<"/request-password-reset", {
method: "POST";
body: zod.ZodObject<{
email: zod.ZodEmail;
redirectTo: zod.ZodOptional;
}, zod_v4_core0.$strip>;
metadata: {
openapi: {
operationId: string;
description: string;
responses: {
"200": {
description: string;
content: {
"application/json": {
schema: {
type: "object";
properties: {
status: {
type: string;
};
message: {
type: string;
};
};
};
};
};
};
};
};
};
use: ((inputContext: better_call0.MiddlewareInputContext) => Promise)[];
}, {
status: boolean;
message: string;
}>;
readonly requestPasswordResetCallback: better_call0.StrictEndpoint<"/reset-password/:token", {
method: "GET";
operationId: string;
query: zod.ZodObject<{
callbackURL: zod.ZodString;
}, zod_v4_core0.$strip>;
use: ((inputContext: better_call0.MiddlewareInputContext) => Promise)[];
metadata: {
openapi: {
operationId: string;
description: string;
parameters: ({
name: string;
in: "path";
required: true;
description: string;
schema: {
type: "string";
};
} | {
name: string;
in: "query";
required: true;
description: string;
schema: {
type: "string";
};
})[];
responses: {
"200": {
description: string;
content: {
"application/json": {
schema: {
type: "object";
properties: {
token: {
type: string;
};
};
};
};
};
};
};
};
};
}, never>;
readonly listSessions: better_call0.StrictEndpoint<"/list-sessions", {
method: "GET";
operationId: string;
use: ((inputContext: better_call0.MiddlewareInputContext) => Promise<{
session: {
session: Record & {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: Record & {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
}>)[];
requireHeaders: true;
metadata: {
openapi: {
operationId: string;
description: string;
responses: {
"200": {
description: string;
content: {
"application/json": {
schema: {
type: "array";
items: {
$ref: string;
};
};
};
};
};
};
};
};
}, Prettify$1<{
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
}>[]>;
readonly revokeSession: better_call0.StrictEndpoint<"/revoke-session", {
method: "POST";
body: zod.ZodObject<{
token: zod.ZodString;
}, zod_v4_core0.$strip>;
use: ((inputContext: better_call0.MiddlewareInputContext) => Promise<{
session: {
session: Record & {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: Record & {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
}>)[];
requireHeaders: true;
metadata: {
openapi: {
description: string;
requestBody: {
content: {
"application/json": {
schema: {
type: "object";
properties: {
token: {
type: string;
description: string;
};
};
required: string[];
};
};
};
};
responses: {
"200": {
description: string;
content: {
"application/json": {
schema: {
type: "object";
properties: {
status: {
type: string;
description: string;
};
};
required: string[];
};
};
};
};
};
};
};
}, {
status: boolean;
}>;
readonly revokeSessions: better_call0.StrictEndpoint<"/revoke-sessions", {
method: "POST";
use: ((inputContext: better_call0.MiddlewareInputContext) => Promise<{
session: {
session: Record & {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: Record & {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
}>)[];
requireHeaders: true;
metadata: {
openapi: {
description: string;
responses: {
"200": {
description: string;
content: {
"application/json": {
schema: {
type: "object";
properties: {
status: {
type: string;
description: string;
};
};
required: string[];
};
};
};
};
};
};
};
}, {
status: boolean;
}>;
readonly revokeOtherSessions: better_call0.StrictEndpoint<"/revoke-other-sessions", {
method: "POST";
requireHeaders: true;
use: ((inputContext: better_call0.MiddlewareInputContext) => Promise<{
session: {
session: Record & {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: Record & {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
}>)[];
metadata: {
openapi: {
description: string;
responses: {
"200": {
description: string;
content: {
"application/json": {
schema: {
type: "object";
properties: {
status: {
type: string;
description: string;
};
};
required: string[];
};
};
};
};
};
};
};
}, {
status: boolean;
}>;
readonly linkSocialAccount: better_call0.StrictEndpoint<"/link-social", {
method: "POST";
requireHeaders: true;
body: zod.ZodObject<{
callbackURL: zod.ZodOptional;
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>>;
idToken: zod.ZodOptional;
accessToken: zod.ZodOptional;
refreshToken: zod.ZodOptional;
scopes: zod.ZodOptional>;
}, zod_v4_core0.$strip>>;
requestSignUp: zod.ZodOptional;
scopes: zod.ZodOptional>;
errorCallbackURL: zod.ZodOptional;
disableRedirect: zod.ZodOptional;
additionalData: zod.ZodOptional>;
}, zod_v4_core0.$strip>;
use: ((inputContext: better_call0.MiddlewareInputContext) => Promise<{
session: {
session: Record & {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: Record & {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
}>)[];
metadata: {
openapi: {
description: string;
operationId: string;
responses: {
"200": {
description: string;
content: {
"application/json": {
schema: {
type: "object";
properties: {
url: {
type: string;
description: string;
};
redirect: {
type: string;
description: string;
};
status: {
type: string;
};
};
required: string[];
};
};
};
};
};
};
};
}, {
url: string;
redirect: boolean;
}>;
readonly listUserAccounts: better_call0.StrictEndpoint<"/list-accounts", {
method: "GET";
use: ((inputContext: better_call0.MiddlewareInputContext) => Promise<{
session: {
session: Record & {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: Record & {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
}>)[];
metadata: {
openapi: {
operationId: string;
description: string;
responses: {
"200": {
description: string;
content: {
"application/json": {
schema: {
type: "array";
items: {
type: string;
properties: {
id: {
type: string;
};
providerId: {
type: string;
};
createdAt: {
type: string;
format: string;
};
updatedAt: {
type: string;
format: string;
};
accountId: {
type: string;
};
userId: {
type: string;
};
scopes: {
type: string;
items: {
type: string;
};
};
};
required: string[];
};
};
};
};
};
};
};
};
}, {
scopes: string[];
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
providerId: string;
accountId: string;
}[]>;
readonly deleteUserCallback: better_call0.StrictEndpoint<"/delete-user/callback", {
method: "GET";
query: zod.ZodObject<{
token: zod.ZodString;
callbackURL: zod.ZodOptional;
}, zod_v4_core0.$strip>;
use: ((inputContext: better_call0.MiddlewareInputContext) => Promise)[];
metadata: {
openapi: {
description: string;
responses: {
"200": {
description: string;
content: {
"application/json": {
schema: {
type: "object";
properties: {
success: {
type: string;
description: string;
};
message: {
type: string;
enum: string[];
description: string;
};
};
required: string[];
};
};
};
};
};
};
};
}, {
success: boolean;
message: string;
}>;
readonly unlinkAccount: better_call0.StrictEndpoint<"/unlink-account", {
method: "POST";
body: zod.ZodObject<{
providerId: zod.ZodString;
accountId: zod.ZodOptional;
}, zod_v4_core0.$strip>;
use: ((inputContext: better_call0.MiddlewareInputContext) => Promise<{
session: {
session: Record & {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: Record & {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
}>)[];
metadata: {
openapi: {
description: string;
responses: {
"200": {
description: string;
content: {
"application/json": {
schema: {
type: "object";
properties: {
status: {
type: string;
};
};
};
};
};
};
};
};
};
}, {
status: boolean;
}>;
readonly refreshToken: better_call0.StrictEndpoint<"/refresh-token", {
method: "POST";
body: zod.ZodObject<{
providerId: zod.ZodString;
accountId: zod.ZodOptional;
userId: zod.ZodOptional;
}, zod_v4_core0.$strip>;
metadata: {
openapi: {
description: string;
responses: {
200: {
description: string;
content: {
"application/json": {
schema: {
type: "object";
properties: {
tokenType: {
type: string;
};
idToken: {
type: string;
};
accessToken: {
type: string;
};
refreshToken: {
type: string;
};
accessTokenExpiresAt: {
type: string;
format: string;
};
refreshTokenExpiresAt: {
type: string;
format: string;
};
};
};
};
};
};
400: {
description: string;
};
};
};
};
}, {
accessToken: string | undefined;
refreshToken: string;
accessTokenExpiresAt: Date | undefined;
refreshTokenExpiresAt: Date | null | undefined;
scope: string | null | undefined;
idToken: string | null | undefined;
providerId: string;
accountId: string;
}>;
readonly getAccessToken: better_call0.StrictEndpoint<"/get-access-token", {
method: "POST";
body: zod.ZodObject<{
providerId: zod.ZodString;
accountId: zod.ZodOptional;
userId: zod.ZodOptional;
}, zod_v4_core0.$strip>;
metadata: {
openapi: {
description: string;
responses: {
200: {
description: string;
content: {
"application/json": {
schema: {
type: "object";
properties: {
tokenType: {
type: string;
};
idToken: {
type: string;
};
accessToken: {
type: string;
};
accessTokenExpiresAt: {
type: string;
format: string;
};
};
};
};
};
};
400: {
description: string;
};
};
};
};
}, {
accessToken: string;
accessTokenExpiresAt: Date | undefined;
scopes: string[];
idToken: string | undefined;
}>;
readonly accountInfo: better_call0.StrictEndpoint<"/account-info", {
method: "GET";
use: ((inputContext: better_call0.MiddlewareInputContext) => Promise<{
session: {
session: Record & {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: Record & {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
}>)[];
metadata: {
openapi: {
description: string;
responses: {
"200": {
description: string;
content: {
"application/json": {
schema: {
type: "object";
properties: {
user: {
type: string;
properties: {
id: {
type: string;
};
name: {
type: string;
};
email: {
type: string;
};
image: {
type: string;
};
emailVerified: {
type: string;
};
};
required: string[];
};
data: {
type: string;
properties: {};
additionalProperties: boolean;
};
};
required: string[];
additionalProperties: boolean;
};
};
};
};
};
};
};
query: zod.ZodOptional;
}, zod_v4_core0.$strip>>;
}, {
user: _better_auth_core_oauth20.OAuth2UserInfo;
data: Record;
} | null>;
}> & (((C extends undefined ? {} : C) & {
baseURL: string | undefined;
fetchOptions: {
customFetchImpl: (url: string | URL | Request, init?: RequestInit | undefined) => Promise;
};
})["plugins"] extends (infer Pl)[] ? UnionToIntersection : {}) : InferAPI<{
readonly ok: better_call0.StrictEndpoint<"/ok", {
method: "GET";
metadata: {
openapi: {
description: string;
responses: {
"200": {
description: string;
content: {
"application/json": {
schema: {
type: "object";
properties: {
ok: {
type: string;
description: string;
};
};
required: string[];
};
};
};
};
};
};
scope: "server";
};
}, {
ok: boolean;
}>;
readonly error: better_call0.StrictEndpoint<"/error", {
method: "GET";
metadata: {
openapi: {
description: string;
responses: {
"200": {
description: string;
content: {
"text/html": {
schema: {
type: "string";
description: string;
};
};
};
};
};
};
scope: "server";
};
}, Response>;
readonly signInSocial: better_call0.StrictEndpoint<"/sign-in/social", {
method: "POST";
operationId: string;
body: zod.ZodObject<{
callbackURL: zod.ZodOptional;
newUserCallbackURL: zod.ZodOptional;
errorCallbackURL: zod.ZodOptional;
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>>;
disableRedirect: zod.ZodOptional;
idToken: zod.ZodOptional;
accessToken: zod.ZodOptional;
refreshToken: zod.ZodOptional;
expiresAt: zod.ZodOptional;
user: zod.ZodOptional;
lastName: zod.ZodOptional;
}, zod_v4_core0.$strip>>;
email: zod.ZodOptional;
}, zod_v4_core0.$strip>>;
}, zod_v4_core0.$strip>>;
scopes: zod.ZodOptional>;
requestSignUp: zod.ZodOptional;
loginHint: zod.ZodOptional;
additionalData: zod.ZodOptional>;
}, zod_v4_core0.$strip>;
metadata: {
$Infer: {
body: zod.infer;
newUserCallbackURL: zod.ZodOptional;
errorCallbackURL: zod.ZodOptional;
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>>;
disableRedirect: zod.ZodOptional;
idToken: zod.ZodOptional;
accessToken: zod.ZodOptional;
refreshToken: zod.ZodOptional;
expiresAt: zod.ZodOptional;
user: zod.ZodOptional;
lastName: zod.ZodOptional;
}, zod_v4_core0.$strip>>;
email: zod.ZodOptional;
}, zod_v4_core0.$strip>>;
}, zod_v4_core0.$strip>>;
scopes: zod.ZodOptional>;
requestSignUp: zod.ZodOptional;
loginHint: zod.ZodOptional;
additionalData: zod.ZodOptional>;
}, zod_v4_core0.$strip>>;
returned: {
redirect: boolean;
token?: string | undefined;
url?: string | undefined;
user?: {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
} | undefined;
};
};
openapi: {
description: string;
operationId: string;
responses: {
"200": {
description: string;
content: {
"application/json": {
schema: {
type: "object";
description: string;
properties: {
token: {
type: string;
};
user: {
type: string;
$ref: string;
};
url: {
type: string;
};
redirect: {
type: string;
enum: boolean[];
};
};
required: string[];
};
};
};
};
};
};
};
}, {
redirect: boolean;
url: string;
} | {
redirect: boolean;
token: string;
url: undefined;
user: {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
}>;
readonly callbackOAuth: better_call0.StrictEndpoint<"/callback/:id", {
method: ("GET" | "POST")[];
operationId: string;
body: zod.ZodOptional;
error: zod.ZodOptional;
device_id: zod.ZodOptional;
error_description: zod.ZodOptional;
state: zod.ZodOptional;
user: zod.ZodOptional;
}, zod_v4_core0.$strip>>;
query: zod.ZodOptional;
error: zod.ZodOptional;
device_id: zod.ZodOptional;
error_description: zod.ZodOptional;
state: zod.ZodOptional;
user: zod.ZodOptional;
}, zod_v4_core0.$strip>>;
metadata: {
allowedMediaTypes: string[];
scope: "server";
};
}, void>;
readonly getSession: better_call0.StrictEndpoint<"/get-session", {
method: ("GET" | "POST")[];
operationId: string;
query: zod.ZodOptional>;
disableRefresh: zod.ZodOptional>;
}, zod_v4_core0.$strip>>;
requireHeaders: true;
metadata: {
openapi: {
operationId: string;
description: string;
responses: {
"200": {
description: string;
content: {
"application/json": {
schema: {
type: "object";
nullable: boolean;
properties: {
session: {
$ref: string;
};
user: {
$ref: string;
};
};
required: string[];
};
};
};
};
};
};
};
}, {
session: {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
} | null>;
readonly signOut: better_call0.StrictEndpoint<"/sign-out", {
method: "POST";
operationId: string;
requireHeaders: true;
metadata: {
openapi: {
operationId: string;
description: string;
responses: {
"200": {
description: string;
content: {
"application/json": {
schema: {
type: "object";
properties: {
success: {
type: string;
};
};
};
};
};
};
};
};
};
}, {
success: boolean;
}>;
readonly signUpEmail: better_call0.StrictEndpoint<"/sign-up/email", {
method: "POST";
operationId: string;
use: ((inputContext: better_call0.MiddlewareInputContext) => Promise)[];
body: zod.ZodIntersection;
callbackURL: zod.ZodOptional;
rememberMe: zod.ZodOptional;
}, zod_v4_core0.$strip>, zod.ZodRecord>;
metadata: {
allowedMediaTypes: string[];
$Infer: {
body: {
name: string;
email: string;
password: string;
image?: string | undefined;
callbackURL?: string | undefined;
rememberMe?: boolean | undefined;
};
returned: {
token: string | null;
user: {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
};
openapi: {
operationId: string;
description: string;
requestBody: {
content: {
"application/json": {
schema: {
type: "object";
properties: {
name: {
type: string;
description: string;
};
email: {
type: string;
description: string;
};
password: {
type: string;
description: string;
};
image: {
type: string;
description: string;
};
callbackURL: {
type: string;
description: string;
};
rememberMe: {
type: string;
description: string;
};
};
required: string[];
};
};
};
};
responses: {
"200": {
description: string;
content: {
"application/json": {
schema: {
type: "object";
properties: {
token: {
type: string;
nullable: boolean;
description: string;
};
user: {
type: string;
properties: {
id: {
type: string;
description: string;
};
email: {
type: string;
format: string;
description: string;
};
name: {
type: string;
description: string;
};
image: {
type: string;
format: string;
nullable: boolean;
description: string;
};
emailVerified: {
type: string;
description: string;
};
createdAt: {
type: string;
format: string;
description: string;
};
updatedAt: {
type: string;
format: string;
description: string;
};
};
required: string[];
};
};
required: string[];
};
};
};
};
"422": {
description: string;
content: {
"application/json": {
schema: {
type: "object";
properties: {
message: {
type: string;
};
};
};
};
};
};
};
};
};
}, {
token: null;
user: {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
} | {
token: string;
user: {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
}>;
readonly signInEmail: better_call0.StrictEndpoint<"/sign-in/email", {
method: "POST";
operationId: string;
use: ((inputContext: better_call0.MiddlewareInputContext) => Promise)[];
body: zod.ZodObject<{
email: zod.ZodString;
password: zod.ZodString;
callbackURL: zod.ZodOptional;
rememberMe: zod.ZodOptional>;
}, zod_v4_core0.$strip>;
metadata: {
allowedMediaTypes: string[];
$Infer: {
body: {
email: string;
password: string;
callbackURL?: string | undefined;
rememberMe?: boolean | undefined;
};
returned: {
redirect: boolean;
token: string;
url?: string | undefined;
user: {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
};
openapi: {
operationId: string;
description: string;
responses: {
"200": {
description: string;
content: {
"application/json": {
schema: {
type: "object";
description: string;
properties: {
redirect: {
type: string;
enum: boolean[];
};
token: {
type: string;
description: string;
};
url: {
type: string;
nullable: boolean;
};
user: {
type: string;
$ref: string;
};
};
required: string[];
};
};
};
};
};
};
};
}, {
redirect: boolean;
token: string;
url?: string | undefined;
user: {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
}>;
readonly resetPassword: better_call0.StrictEndpoint<"/reset-password", {
method: "POST";
operationId: string;
query: zod.ZodOptional;
}, zod_v4_core0.$strip>>;
body: zod.ZodObject<{
newPassword: zod.ZodString;
token: zod.ZodOptional;
}, zod_v4_core0.$strip>;
metadata: {
openapi: {
operationId: string;
description: string;
responses: {
"200": {
description: string;
content: {
"application/json": {
schema: {
type: "object";
properties: {
status: {
type: string;
};
};
};
};
};
};
};
};
};
}, {
status: boolean;
}>;
readonly verifyPassword: better_call0.StrictEndpoint<"/verify-password", {
method: "POST";
body: zod.ZodObject<{
password: zod.ZodString;
}, zod_v4_core0.$strip>;
metadata: {
scope: "server";
openapi: {
operationId: string;
description: string;
responses: {
"200": {
description: string;
content: {
"application/json": {
schema: {
type: "object";
properties: {
status: {
type: string;
};
};
};
};
};
};
};
};
};
use: ((inputContext: better_call0.MiddlewareInputContext) => Promise<{
session: {
session: Record & {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: Record & {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
}>)[];
}, {
status: boolean;
}>;
readonly verifyEmail: better_call0.StrictEndpoint<"/verify-email", {
method: "GET";
operationId: string;
query: zod.ZodObject<{
token: zod.ZodString;
callbackURL: zod.ZodOptional;
}, zod_v4_core0.$strip>;
use: ((inputContext: better_call0.MiddlewareInputContext) => Promise)[];
metadata: {
openapi: {
description: string;
parameters: ({
name: string;
in: "query";
description: string;
required: true;
schema: {
type: "string";
};
} | {
name: string;
in: "query";
description: string;
required: false;
schema: {
type: "string";
};
})[];
responses: {
"200": {
description: string;
content: {
"application/json": {
schema: {
type: "object";
properties: {
user: {
type: string;
$ref: string;
};
status: {
type: string;
description: string;
};
};
required: string[];
};
};
};
};
};
};
};
}, void | {
status: boolean;
}>;
readonly sendVerificationEmail: better_call0.StrictEndpoint<"/send-verification-email", {
method: "POST";
operationId: string;
body: zod.ZodObject<{
email: zod.ZodEmail;
callbackURL: zod.ZodOptional;
}, zod_v4_core0.$strip>;
metadata: {
openapi: {
operationId: string;
description: string;
requestBody: {
content: {
"application/json": {
schema: {
type: "object";
properties: {
email: {
type: string;
description: string;
example: string;
};
callbackURL: {
type: string;
description: string;
example: string;
nullable: boolean;
};
};
required: string[];
};
};
};
};
responses: {
"200": {
description: string;
content: {
"application/json": {
schema: {
type: "object";
properties: {
status: {
type: string;
description: string;
example: boolean;
};
};
};
};
};
};
"400": {
description: string;
content: {
"application/json": {
schema: {
type: "object";
properties: {
message: {
type: string;
description: string;
example: string;
};
};
};
};
};
};
};
};
};
}, {
status: boolean;
}>;
readonly changeEmail: better_call0.StrictEndpoint<"/change-email", {
method: "POST";
body: zod.ZodObject<{
newEmail: zod.ZodEmail;
callbackURL: zod.ZodOptional;
}, zod_v4_core0.$strip>;
use: ((inputContext: better_call0.MiddlewareInputContext) => Promise<{
session: {
session: Record & {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: Record & {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
}>)[];
metadata: {
openapi: {
operationId: string;
responses: {
"200": {
description: string;
content: {
"application/json": {
schema: {
type: "object";
properties: {
user: {
type: string;
$ref: string;
};
status: {
type: string;
description: string;
};
message: {
type: string;
enum: string[];
description: string;
nullable: boolean;
};
};
required: string[];
};
};
};
};
};
};
};
}, {
status: boolean;
}>;
readonly changePassword: better_call0.StrictEndpoint<"/change-password", {
method: "POST";
operationId: string;
body: zod.ZodObject<{
newPassword: zod.ZodString;
currentPassword: zod.ZodString;
revokeOtherSessions: zod.ZodOptional;
}, zod_v4_core0.$strip>;
use: ((inputContext: better_call0.MiddlewareInputContext) => Promise<{
session: {
session: Record & {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: Record & {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
}>)[];
metadata: {
openapi: {
operationId: string;
description: string;
responses: {
"200": {
description: string;
content: {
"application/json": {
schema: {
type: "object";
properties: {
token: {
type: string;
nullable: boolean;
description: string;
};
user: {
type: string;
properties: {
id: {
type: string;
description: string;
};
email: {
type: string;
format: string;
description: string;
};
name: {
type: string;
description: string;
};
image: {
type: string;
format: string;
nullable: boolean;
description: string;
};
emailVerified: {
type: string;
description: string;
};
createdAt: {
type: string;
format: string;
description: string;
};
updatedAt: {
type: string;
format: string;
description: string;
};
};
required: string[];
};
};
required: string[];
};
};
};
};
};
};
};
}, {
token: string | null;
user: {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
} & Record & {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
}>;
readonly setPassword: better_call0.StrictEndpoint;
use: ((inputContext: better_call0.MiddlewareInputContext) => Promise<{
session: {
session: Record & {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: Record & {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
}>)[];
}, {
status: boolean;
}>;
readonly updateSession: better_call0.StrictEndpoint<"/update-session", {
method: "POST";
operationId: string;
body: zod.ZodRecord;
use: ((inputContext: better_call0.MiddlewareInputContext) => Promise<{
session: {
session: Record & {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: Record & {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
}>)[];
metadata: {
$Infer: {
body: Partial<{}>;
};
openapi: {
operationId: string;
description: string;
responses: {
"200": {
description: string;
content: {
"application/json": {
schema: {
type: "object";
properties: {
session: {
type: string;
$ref: string;
};
};
};
};
};
};
};
};
};
}, {
session: {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
}>;
readonly updateUser: better_call0.StrictEndpoint<"/update-user", {
method: "POST";
operationId: string;
body: zod.ZodRecord;
use: ((inputContext: better_call0.MiddlewareInputContext) => Promise<{
session: {
session: Record & {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: Record & {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
}>)[];
metadata: {
$Infer: {
body: Partial<{}> & {
name?: string | undefined;
image?: string | undefined | null;
};
};
openapi: {
operationId: string;
description: string;
requestBody: {
content: {
"application/json": {
schema: {
type: "object";
properties: {
name: {
type: string;
description: string;
};
image: {
type: string;
description: string;
nullable: boolean;
};
};
};
};
};
};
responses: {
"200": {
description: string;
content: {
"application/json": {
schema: {
type: "object";
properties: {
user: {
type: string;
$ref: string;
};
};
};
};
};
};
};
};
};
}, {
status: boolean;
}>;
readonly deleteUser: better_call0.StrictEndpoint<"/delete-user", {
method: "POST";
use: ((inputContext: better_call0.MiddlewareInputContext) => Promise<{
session: {
session: Record & {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: Record & {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
}>)[];
body: zod.ZodObject<{
callbackURL: zod.ZodOptional;
password: zod.ZodOptional;
token: zod.ZodOptional;
}, zod_v4_core0.$strip>;
metadata: {
openapi: {
operationId: string;
description: string;
requestBody: {
content: {
"application/json": {
schema: {
type: "object";
properties: {
callbackURL: {
type: string;
description: string;
};
password: {
type: string;
description: string;
};
token: {
type: string;
description: string;
};
};
};
};
};
};
responses: {
"200": {
description: string;
content: {
"application/json": {
schema: {
type: "object";
properties: {
success: {
type: string;
description: string;
};
message: {
type: string;
enum: string[];
description: string;
};
};
required: string[];
};
};
};
};
};
};
};
}, {
success: boolean;
message: string;
}>;
readonly requestPasswordReset: better_call0.StrictEndpoint<"/request-password-reset", {
method: "POST";
body: zod.ZodObject<{
email: zod.ZodEmail;
redirectTo: zod.ZodOptional;
}, zod_v4_core0.$strip>;
metadata: {
openapi: {
operationId: string;
description: string;
responses: {
"200": {
description: string;
content: {
"application/json": {
schema: {
type: "object";
properties: {
status: {
type: string;
};
message: {
type: string;
};
};
};
};
};
};
};
};
};
use: ((inputContext: better_call0.MiddlewareInputContext) => Promise)[];
}, {
status: boolean;
message: string;
}>;
readonly requestPasswordResetCallback: better_call0.StrictEndpoint<"/reset-password/:token", {
method: "GET";
operationId: string;
query: zod.ZodObject<{
callbackURL: zod.ZodString;
}, zod_v4_core0.$strip>;
use: ((inputContext: better_call0.MiddlewareInputContext) => Promise)[];
metadata: {
openapi: {
operationId: string;
description: string;
parameters: ({
name: string;
in: "path";
required: true;
description: string;
schema: {
type: "string";
};
} | {
name: string;
in: "query";
required: true;
description: string;
schema: {
type: "string";
};
})[];
responses: {
"200": {
description: string;
content: {
"application/json": {
schema: {
type: "object";
properties: {
token: {
type: string;
};
};
};
};
};
};
};
};
};
}, never>;
readonly listSessions: better_call0.StrictEndpoint<"/list-sessions", {
method: "GET";
operationId: string;
use: ((inputContext: better_call0.MiddlewareInputContext) => Promise<{
session: {
session: Record & {
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: Record & {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
};
}>)[];
requireHeaders: true;
metadata: {
openapi: {
operationId: string;
description: string;
responses: {
"200": {
description: string;
content: {
"application/json": {
schema: {
type: "array";
items: {
$ref: string;
};
};
};
};
};
};
};
};
}, Prettify$1<{
id: string;
createdAt: Date;
updatedAt: Date;
userId: string;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
}>[]>;
readonly revokeSession: better_call0.StrictEndpoint<"/revoke-session", {
method: "POST";
body: zod.ZodObject<{
token: zod.ZodString;
}, zod_v4_core0.$strip>;
use: ((inputContext: better_call0.MiddlewareInputContext