import { n as __export, r as __reExport } from "./chunk-DieNfLhd.mjs"; import { t as KyselyDatabaseType } from "./types-Bde2wFm4.mjs"; import { a as LiteralNumber, c as OmitId, d as PrettifyDeep, f as Primitive, g as WithoutEmpty, h as UnionToIntersection, i as HasRequiredKeys, l as PreserveJSDoc, m as StripEmptyObjects, n as DeepPartial, o as LiteralString, p as RequiredKeysOf, r as Expand, s as LiteralUnion, t as Awaitable, u as Prettify$1 } from "./helper-BBvhhJRX.mjs"; import { n as InferPluginErrorCodes, t as InferOptionSchema } from "./plugins-DLdyc73z.mjs"; import { AuthContext, BetterAuthAdvancedOptions, BetterAuthClientOptions, BetterAuthClientOptions as BetterAuthClientOptions$1, BetterAuthClientPlugin as BetterAuthClientPlugin$1, BetterAuthCookies as BetterAuthCookies$1, BetterAuthOptions, BetterAuthOptions as BetterAuthOptions$1, BetterAuthPlugin, BetterAuthPlugin as BetterAuthPlugin$1, BetterAuthRateLimitOptions, ClientAtomListener, ClientFetchOption, ClientStore, GenericEndpointContext, InternalAdapter, StandardSchemaV1 as StandardSchemaV1$1 } from "@better-auth/core"; import { getCurrentAdapter as getCurrentAdapter$1 } from "@better-auth/core/context"; import * as _better_auth_core_db7 from "@better-auth/core/db"; import { Account, BaseModelNames, BetterAuthPluginDBSchema, DBFieldAttribute, DBFieldAttributeConfig, DBFieldType, RateLimit, Session, Session as Session$1, User, User as User$1, Verification } from "@better-auth/core/db"; import { InternalLogger } from "@better-auth/core/env"; import { BASE_ERROR_CODES } from "@better-auth/core/error"; import * as _better_auth_core_oauth28 from "@better-auth/core/oauth2"; import { generateId as generateId$1 } from "@better-auth/core/utils"; import { DBAdapter, DBAdapter as DBAdapter$1, DBAdapterInstance, DBAdapterInstance as DBAdapterInstance$1, DBAdapterSchemaCreation, DBAdapterSchemaCreation as DBAdapterSchemaCreation$1, DBTransactionAdapter, DBTransactionAdapter as DBTransactionAdapter$1, Where, Where as Where$1 } from "@better-auth/core/db/adapter"; import * as z from "zod"; import * as better_call750 from "better-call"; import { APIError as APIError$1, Endpoint, InputContext, StandardSchemaV1 } from "better-call"; import { TelemetryEvent, createTelemetry as createTelemetry$1, getTelemetryAuthConfig } from "@better-auth/telemetry"; import { AuthEndpoint, AuthMiddleware, createAuthEndpoint as createAuthEndpoint$1, createAuthMiddleware as createAuthMiddleware$1, optionsMiddleware } from "@better-auth/core/api"; import { JSONWebKeySet as JSONWebKeySet$1, JWTPayload as JWTPayload$1 } from "jose"; import { BetterFetchResponse } from "@better-fetch/fetch"; import * as zod_v4_core12 from "zod/v4/core"; import * as _standard_schema_spec0 from "@standard-schema/spec"; //#region src/db/adapter-base.d.ts declare function getBaseAdapter(options: BetterAuthOptions, handleDirectDatabase: (options: BetterAuthOptions) => Promise>): Promise>; //#endregion //#region src/db/adapter-kysely.d.ts declare function getAdapter(options: BetterAuthOptions): Promise>; //#endregion //#region src/db/field.d.ts declare const createFieldAttribute: (type: T$1, config?: C$1 | undefined) => { required?: boolean | undefined; returned?: boolean | undefined; input?: boolean | undefined; defaultValue?: (_better_auth_core_db7.DBPrimitive | (() => _better_auth_core_db7.DBPrimitive)) | undefined; onUpdate?: (() => _better_auth_core_db7.DBPrimitive) | undefined; transform?: { input?: (value: _better_auth_core_db7.DBPrimitive) => _better_auth_core_db7.DBPrimitive | Promise<_better_auth_core_db7.DBPrimitive>; output?: (value: _better_auth_core_db7.DBPrimitive) => _better_auth_core_db7.DBPrimitive | Promise<_better_auth_core_db7.DBPrimitive>; } | undefined; references?: { model: string; field: string; onDelete?: "no action" | "restrict" | "cascade" | "set null" | "set default"; } | undefined; unique?: boolean | undefined; bigint?: boolean | undefined; validator?: { input?: _standard_schema_spec0.StandardSchemaV1; output?: _standard_schema_spec0.StandardSchemaV1; } | undefined; fieldName?: string | undefined; sortable?: boolean | undefined; index?: boolean | undefined; type: T$1; }; type InferValueType = T$1 extends "string" ? string : T$1 extends "number" ? number : T$1 extends "boolean" ? boolean : T$1 extends "date" ? Date : T$1 extends "json" ? Record : T$1 extends `${infer U}[]` ? U extends "string" ? string[] : number[] : T$1 extends Array ? T$1[number] : never; type InferFieldsOutput = Field$1 extends Record ? { [key in Key as Field$1[key]["returned"] extends false ? never : Field$1[key]["required"] extends false ? Field$1[key]["defaultValue"] extends boolean | string | number | Date ? key : never : key]: InferFieldOutput } & { [key in Key as Field$1[key]["returned"] extends false ? never : Field$1[key]["required"] extends false ? Field$1[key]["defaultValue"] extends boolean | string | number | Date ? never : key : never]?: InferFieldOutput | null } : {}; type InferFieldsInput = Field$1 extends Record ? { [key in Key as Field$1[key]["required"] extends false ? never : Field$1[key]["defaultValue"] extends string | number | boolean | Date ? never : Field$1[key]["input"] extends false ? never : key]: InferFieldInput } & { [key in Key as Field$1[key]["input"] extends false ? never : key]?: InferFieldInput | undefined | null } : {}; /** * For client will add "?" on optional fields */ type InferFieldsInputClient = Field$1 extends Record ? { [key in Key as Field$1[key]["required"] extends false ? never : Field$1[key]["defaultValue"] extends string | number | boolean | Date ? never : Field$1[key]["input"] extends false ? never : key]: InferFieldInput } & { [key in Key as Field$1[key]["input"] extends false ? never : Field$1[key]["required"] extends false ? key : Field$1[key]["defaultValue"] extends string | number | boolean | Date ? key : never]?: InferFieldInput | undefined | null } : {}; type InferFieldOutput = T$1["returned"] extends false ? never : T$1["required"] extends false ? InferValueType | undefined | null : InferValueType; /** * Converts a Record to an object type * with keys and value types inferred from DBFieldAttribute["type"]. */ type FieldAttributeToObject> = AddOptionalFields<{ [K in keyof Fields]: InferValueType }, Fields>; type AddOptionalFields, Fields extends Record> = { [K in keyof T$1 as Fields[K] extends { required: true; } ? K : never]: T$1[K] } & { [K in keyof T$1 as Fields[K] extends { required: true; } ? never : K]?: T$1[K] }; /** * Infer the additional fields from the plugin options. * For example, you can infer the additional fields of the org plugin's organization schema like this: * ```ts * type AdditionalFields = InferAdditionalFieldsFromPluginOptions<"organization", OrganizationOptions> * ``` */ type InferAdditionalFieldsFromPluginOptions; } } | undefined; }, isClientSide$1 extends boolean = true> = Options["schema"] extends { [key in SchemaName]?: { additionalFields: infer Field extends Record; } } ? isClientSide$1 extends true ? FieldAttributeToObject> : FieldAttributeToObject : {}; type RemoveFieldsWithInputFalse> = { [K in keyof T$1 as T$1[K]["input"] extends false ? never : K]: T$1[K] }; type InferFieldInput = InferValueType; type PluginFieldAttribute = Omit; type InferFieldsFromPlugins = Options["plugins"] extends [] ? {} : Options["plugins"] extends Array ? T extends { schema: { [key in Key$1]: { fields: infer Field; } }; } ? Format extends "output" ? InferFieldsOutput : InferFieldsInput : {} : {}; type InferFieldsFromOptions = Options[Key$1] extends { additionalFields: infer Field; } ? Format extends "output" ? InferFieldsOutput : InferFieldsInput : {}; //#endregion //#region src/db/field-converter.d.ts declare function convertToDB>(fields: Record, values: T$1): T$1; declare function convertFromDB>(fields: Record, values: T$1 | null): T$1 | null; //#endregion //#region src/db/get-migration.d.ts declare function matchType(columnDataType: string, fieldType: DBFieldType, dbType: KyselyDatabaseType): boolean; declare function getMigrations(config: BetterAuthOptions): Promise<{ toBeCreated: { table: string; fields: Record; order: number; }[]; toBeAdded: { table: string; fields: Record; order: number; }[]; runMigrations: () => Promise; compileMigrations: () => Promise; }>; //#endregion //#region src/db/get-schema.d.ts declare function getSchema(config: BetterAuthOptions): Record; order: number; }>; //#endregion //#region src/db/internal-adapter.d.ts declare const createInternalAdapter: (adapter: DBAdapter, ctx: { options: Omit; logger: InternalLogger; hooks: Exclude[]; generateId: AuthContext["generateId"]; }) => InternalAdapter; //#endregion //#region src/db/schema.d.ts declare function parseUserOutput(options: BetterAuthOptions, user: User$1): { id: string; createdAt: Date; updatedAt: Date; email: string; emailVerified: boolean; name: string; image?: string | null | undefined; }; declare function parseAccountOutput(options: BetterAuthOptions, account: Account): { id: string; createdAt: Date; updatedAt: Date; providerId: string; accountId: string; userId: string; accessToken?: string | null | undefined; refreshToken?: string | null | undefined; idToken?: string | null | undefined; accessTokenExpiresAt?: Date | null | undefined; refreshTokenExpiresAt?: Date | null | undefined; scope?: string | null | undefined; password?: string | null | undefined; }; declare function parseSessionOutput(options: BetterAuthOptions, session: Session$1): { id: string; createdAt: Date; updatedAt: Date; userId: string; expiresAt: Date; token: string; ipAddress?: string | null | undefined; userAgent?: string | null | undefined; }; declare function parseInputData>(data: T$1, schema: { fields: Record; action?: ("create" | "update") | undefined; }): Partial; declare function parseUserInput(options: BetterAuthOptions, user: Record | undefined, action: "create" | "update"): Partial>; declare function parseAdditionalUserInput(options: BetterAuthOptions, user?: Record | undefined): Partial>; declare function parseAccountInput(options: BetterAuthOptions, account: Partial): Partial>; declare function parseSessionInput(options: BetterAuthOptions, session: Partial): Partial>; declare function mergeSchema(schema: S, newSchema?: { [K in keyof S]?: { modelName?: string | undefined; fields?: { [P: string]: string; } | undefined; } | undefined } | undefined): S; //#endregion //#region src/db/to-zod.d.ts declare function toZodSchema, IsClientSide extends boolean>({ fields, isClientSide }: { fields: Fields; /** * If true, then any fields that have `input: false` will be removed from the schema to prevent user input. */ isClientSide: IsClientSide; }): z.ZodObject }>, z.core.$strip>; type FieldAttributeToSchema, isClientSide$1 extends boolean = false> = Field$1 extends { type: any; } ? GetInput>> : Record; type GetType = F extends { type: "string"; } ? z.ZodString : F extends { type: "number"; } ? z.ZodNumber : F extends { type: "boolean"; } ? z.ZodBoolean : F extends { type: "date"; } ? z.ZodDate : z.ZodAny; type GetRequired = F extends { required: true; } ? Schema : z.ZodOptional; type GetInput = Field$1 extends { input: false; } ? isClientSide$1 extends true ? never : Schema : Schema; type RemoveNeverProps = { [K in keyof T$1 as [T$1[K]] extends [never] ? never : K]: T$1[K] }; //#endregion //#region src/db/with-hooks.d.ts declare function getWithHooks(adapter: DBAdapter, ctx: { options: BetterAuthOptions; hooks: Exclude[]; }): { createWithHooks: >(data: T$1, model: BaseModelNames, customCreateFn?: { fn: (data: Record) => void | Promise; executeMainFn?: boolean; } | undefined) => Promise; updateWithHooks: >(data: any, where: Where[], model: BaseModelNames, customUpdateFn?: { fn: (data: Record) => void | Promise; executeMainFn?: boolean; } | undefined) => Promise; updateManyWithHooks: >(data: any, where: Where[], model: BaseModelNames, customUpdateFn?: { fn: (data: Record) => void | Promise; executeMainFn?: boolean; } | undefined) => Promise; deleteWithHooks: >(where: Where[], model: BaseModelNames, customDeleteFn?: { fn: (where: Where[]) => void | Promise; executeMainFn?: boolean; } | undefined) => Promise; deleteManyWithHooks: >(where: Where[], model: BaseModelNames, customDeleteFn?: { fn: (where: Where[]) => void | Promise; executeMainFn?: boolean; } | undefined) => Promise; }; //#endregion //#region src/client/path-to-object.d.ts type CamelCase = S extends `${infer P1}-${infer P2}${infer P3}` ? `${Lowercase}${Uppercase}${CamelCase}` : Lowercase; type PathToObject any> = T$1 extends `/${infer Segment}/${infer Rest}` ? { [K in CamelCase]: PathToObject<`/${Rest}`, Fn> } : T$1 extends `/${infer Segment}` ? { [K in CamelCase]: Fn } : never; type InferSignUpEmailCtx = { email: string; name: string; password: string; image?: string | undefined; callbackURL?: string | undefined; fetchOptions?: FetchOptions | undefined; } & UnionToIntersection>; type InferUserUpdateCtx = { image?: (string | null) | undefined; name?: string | undefined; fetchOptions?: FetchOptions | undefined; } & Partial>>; type InferCtx, FetchOptions extends ClientFetchOption> = C$1["body"] extends Record ? C$1["body"] & { fetchOptions?: FetchOptions | undefined; } : C$1["query"] extends Record ? { query: C$1["query"]; fetchOptions?: FetchOptions | undefined; } : C$1["query"] extends Record | undefined ? { query?: C$1["query"] | undefined; fetchOptions?: FetchOptions | undefined; } : { fetchOptions?: FetchOptions | undefined; }; type MergeRoutes = UnionToIntersection; type InferRoute = API extends Record ? T extends Endpoint ? T["options"]["metadata"] extends { isAction: false; } | { SERVER_ONLY: true; } ? {} : PathToObject infer R) ? C extends InputContext ? & Record, Partial & Record, C["params"]>>(...data: HasRequiredKeys> extends true ? [Prettify$1 : InferCtx>, FetchOptions?] : [Prettify$1 : InferCtx>?, FetchOptions?]) => Promise> : T["path"] extends "/get-session" ? { user: InferUserFromClient; session: InferSessionFromClient; } | null : NonNullable>, T["options"]["error"] extends StandardSchemaV1 ? NonNullable["output"] : { code?: string | undefined; message?: string | undefined; }, FetchOptions["throw"] extends true ? true : COpts["fetchOptions"] extends { throw: true; } ? true : false>> : never : never> : {} : never; type InferRoutes, ClientOpts extends BetterAuthClientOptions> = MergeRoutes>; //#endregion //#region src/client/types.d.ts /** * @deprecated use type `ClientStore` instead. */ type Store = ClientStore; /** * @deprecated use type `ClientAtomListener` instead. */ type AtomListener = ClientAtomListener; /** * @deprecated use type `BetterAuthClientOptions` instead. */ type ClientOptions = BetterAuthClientOptions$1; type InferClientAPI = InferRoutes ? Auth["api"] & (O["plugins"] extends Array ? UnionToIntersection : {}) : Auth["api"], O>; type InferActions = (O["plugins"] extends Array ? UnionToIntersection infer Actions) ? Actions : {} : {}> : {}) & InferRoutes ? Plugin extends { endpoints: infer Endpoints; } ? Endpoints : {} : {} : {}, O>; type InferErrorCodes = O["plugins"] extends Array ? UnionToIntersection ? E : {} : {} : {}> : {}; /** * signals are just used to recall a computed value. * as a convention they start with "$" */ type IsSignal = T$1 extends `$${infer _}` ? true : false; type InferPluginsFromClient = O["plugins"] extends Array ? Array : undefined; type InferSessionFromClient = StripEmptyObjects>>; type InferUserFromClient = StripEmptyObjects>>; type InferAdditionalFromClient = Options["plugins"] extends Array ? T extends BetterAuthClientPlugin$1 ? T["$InferServerPlugin"] extends { schema: { [key in Key$1]: { fields: infer Field; } }; } ? Format extends "input" ? InferFieldsInputClient : InferFieldsOutput : {} : {} : {}; type SessionQueryParams = { disableCookieCache?: boolean | undefined; disableRefresh?: boolean | undefined; }; //#endregion //#region src/types/adapter.d.ts /** * Adapter Interface * * @deprecated Use `DBAdapter` from `@better-auth/core/db/adapter` instead. */ type Adapter = DBAdapter; /** * @deprecated Use `DBTransactionAdapter` from `@better-auth/core/db/adapter` instead. */ type TransactionAdapter = DBTransactionAdapter; /** * @deprecated Use `DBAdapterSchemaCreation` from `@better-auth/core/db/adapter` instead. */ type AdapterSchemaCreation = DBAdapterSchemaCreation; /** * @deprecated Use `DBAdapterInstance` from `@better-auth/core/db/adapter` instead. */ type AdapterInstance = DBAdapterInstance; //#endregion //#region src/types/api.d.ts type FilteredAPI = Omit; type FilterActions = Omit; type InferSessionAPI = API extends { [key: string]: infer E; } ? UnionToIntersection(context: { headers: Headers; query?: { disableCookieCache?: boolean; disableRefresh?: boolean; } | undefined; asResponse?: R$1 | undefined; returnHeaders?: H | undefined; }) => false extends R$1 ? H extends true ? Promise<{ headers: Headers; response: PrettifyDeep>> | null; }> : Promise>> | null> : Promise; } : never : never> : never; type InferAPI = InferSessionAPI & API; //#endregion //#region src/types/models.d.ts type AdditionalUserFieldsInput = InferFieldsFromPlugins & InferFieldsFromOptions; type AdditionalUserFieldsOutput = InferFieldsFromPlugins & InferFieldsFromOptions; type AdditionalSessionFieldsInput = InferFieldsFromPlugins & InferFieldsFromOptions; type AdditionalSessionFieldsOutput = InferFieldsFromPlugins & InferFieldsFromOptions; type InferUser = UnionToIntersection : O extends Auth ? AdditionalUserFieldsOutput : {})>>; type InferSession = UnionToIntersection : O extends Auth ? AdditionalSessionFieldsOutput : {})>>; type InferPluginTypes = O["plugins"] extends Array ? UnionToIntersection

? P["$Infer"] : {} : {}> : {}; //#endregion //#region src/types/auth.d.ts type Auth = { handler: (request: Request) => Promise; api: InferAPI>["endpoints"]>; options: Options; $ERROR_CODES: InferPluginErrorCodes & typeof BASE_ERROR_CODES; $context: Promise; /** * Share types */ $Infer: InferPluginTypes extends { Session: any; } ? InferPluginTypes : { Session: { session: PrettifyDeep>; user: PrettifyDeep>; }; } & InferPluginTypes; }; //#endregion //#region src/auth/auth.d.ts /** * Better Auth initializer for full mode (with Kysely) * * Check `minimal.ts` for minimal mode (without Kysely) */ declare const betterAuth: (options: Options & Record) => Auth; //#endregion //#region src/oauth2/state.d.ts declare function generateState(c: GenericEndpointContext, link: { email: string; userId: string; } | undefined, additionalData: Record | false | undefined): Promise<{ state: string; codeVerifier: string; }>; declare function parseState(c: GenericEndpointContext): Promise<{ [x: string]: unknown; callbackURL: string; codeVerifier: string; expiresAt: number; errorURL?: string | undefined; newUserURL?: string | undefined; link?: { email: string; userId: string; } | undefined; requestSignUp?: boolean | undefined; }>; //#endregion //#region src/utils/hide-metadata.d.ts declare const HIDE_METADATA: { isAction: false; }; declare namespace index_d_exports { export { APIError$1 as APIError, Account, Adapter, AdapterInstance, AdapterSchemaCreation, AdditionalSessionFieldsInput, AdditionalSessionFieldsOutput, AdditionalUserFieldsInput, AdditionalUserFieldsOutput, AtomListener, Auth, Awaitable, BetterAuthAdvancedOptions, BetterAuthClientOptions$1 as BetterAuthClientOptions, BetterAuthClientPlugin$1 as BetterAuthClientPlugin, BetterAuthCookies$1 as BetterAuthCookies, BetterAuthOptions$1 as BetterAuthOptions, BetterAuthPlugin$1 as BetterAuthPlugin, BetterAuthRateLimitOptions, ClientAtomListener, ClientOptions, ClientStore, DBAdapter$1 as DBAdapter, DBAdapterInstance$1 as DBAdapterInstance, DBAdapterSchemaCreation$1 as DBAdapterSchemaCreation, DBTransactionAdapter$1 as DBTransactionAdapter, DeepPartial, Expand, FilterActions, FilteredAPI, HIDE_METADATA, HasRequiredKeys, InferAPI, InferActions, InferAdditionalFromClient, InferClientAPI, InferErrorCodes, InferOptionSchema, InferPluginErrorCodes, InferPluginTypes, InferPluginsFromClient, InferSession, InferSessionAPI, InferSessionFromClient, InferUser, InferUserFromClient, IsSignal, JSONWebKeySet$1 as JSONWebKeySet, JWTPayload$1 as JWTPayload, LiteralNumber, LiteralString, LiteralUnion, OmitId, PreserveJSDoc, Prettify$1 as Prettify, PrettifyDeep, Primitive, RateLimit, RequiredKeysOf, Session$1 as Session, SessionQueryParams, StandardSchemaV1$1 as StandardSchemaV1, Store, StripEmptyObjects, TelemetryEvent, TransactionAdapter, UnionToIntersection, User$1 as User, Verification, Where$1 as Where, WithoutEmpty, betterAuth, createTelemetry$1 as createTelemetry, generateId$1 as generateId, generateState, getCurrentAdapter$1 as getCurrentAdapter, getTelemetryAuthConfig, parseState }; } import * as import___better_auth_core from "@better-auth/core"; import * as import___better_auth_core_db from "@better-auth/core/db"; import * as import___better_auth_core_env from "@better-auth/core/env"; import * as import___better_auth_core_error from "@better-auth/core/error"; import * as import___better_auth_core_oauth2 from "@better-auth/core/oauth2"; import * as import___better_auth_core_utils from "@better-auth/core/utils"; import * as import_better_call from "better-call"; import * as import_zod from "zod"; import * as import_zod_v4 from "zod/v4"; import * as import_zod_v4_core from "zod/v4/core"; //#endregion //#region src/utils/get-request-ip.d.ts declare function getIp(req: Request | Headers, options: BetterAuthOptions): string | null; //#endregion //#region src/api/middlewares/oauth.d.ts type OAuthState = { callbackURL: string; codeVerifier: string; errorURL?: string; newUserURL?: string; link?: { email: string; userId: string; }; expiresAt: number; requestSignUp?: boolean; [key: string]: any; }; declare const getOAuthState: () => Promise, setOAuthState: (value: OAuthState | null) => Promise; //#endregion //#region src/api/middlewares/origin-check.d.ts /** * A middleware to validate callbackURL and origin against * trustedOrigins. */ declare const originCheckMiddleware: (inputContext: better_call750.MiddlewareInputContext) => Promise; declare const originCheck: (getValue: (ctx: GenericEndpointContext) => string | string[]) => (inputContext: better_call750.MiddlewareInputContext) => Promise; //#endregion //#region src/api/routes/account.d.ts declare const listUserAccounts: better_call750.StrictEndpoint<"/list-accounts", { method: "GET"; use: ((inputContext: better_call750.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[]; }; }; }; }; }; }; }; }; } & { use: any[]; }, { id: string; providerId: string; createdAt: Date; updatedAt: Date; accountId: string; userId: string; scopes: string[]; }[]>; declare const linkSocialAccount: better_call750.StrictEndpoint<"/link-social", { method: "POST"; requireHeaders: true; body: z.ZodObject<{ callbackURL: z.ZodOptional; provider: z.ZodType<(string & {}) | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "vercel", unknown, z.core.$ZodTypeInternals<(string & {}) | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "vercel", unknown>>; idToken: z.ZodOptional; accessToken: z.ZodOptional; refreshToken: z.ZodOptional; scopes: z.ZodOptional>; }, z.core.$strip>>; requestSignUp: z.ZodOptional; scopes: z.ZodOptional>; errorCallbackURL: z.ZodOptional; disableRedirect: z.ZodOptional; additionalData: z.ZodOptional>; }, z.core.$strip>; use: ((inputContext: better_call750.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[]; }; }; }; }; }; }; }; } & { use: any[]; }, { url: string; redirect: boolean; }>; declare const unlinkAccount: better_call750.StrictEndpoint<"/unlink-account", { method: "POST"; body: z.ZodObject<{ providerId: z.ZodString; accountId: z.ZodOptional; }, z.core.$strip>; use: ((inputContext: better_call750.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; }; }; }; }; }; }; }; }; }; } & { use: any[]; }, { status: boolean; }>; declare const getAccessToken: better_call750.StrictEndpoint<"/get-access-token", { method: "POST"; body: z.ZodObject<{ providerId: z.ZodString; accountId: z.ZodOptional; userId: z.ZodOptional; }, z.core.$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; }; }; }; }; } & { use: any[]; }, { accessToken: string; accessTokenExpiresAt: Date | undefined; scopes: string[]; idToken: string | undefined; }>; declare const refreshToken: better_call750.StrictEndpoint<"/refresh-token", { method: "POST"; body: z.ZodObject<{ providerId: z.ZodString; accountId: z.ZodOptional; userId: z.ZodOptional; }, z.core.$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; }; }; }; }; } & { use: any[]; }, { accessToken: string | undefined; refreshToken: string | undefined; accessTokenExpiresAt: Date | undefined; refreshTokenExpiresAt: Date | undefined; scope: string | null | undefined; idToken: string | null | undefined; providerId: string; accountId: string; }>; declare const accountInfo: better_call750.StrictEndpoint<"/account-info", { method: "GET"; use: ((inputContext: better_call750.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: z.ZodOptional; }, z.core.$strip>>; } & { use: any[]; }, { user: _better_auth_core_oauth28.OAuth2UserInfo; data: Record; } | null>; //#endregion //#region src/api/routes/callback.d.ts declare const callbackOAuth: better_call750.StrictEndpoint<"/callback/:id", { method: ("GET" | "POST")[]; operationId: string; body: z.ZodOptional; error: z.ZodOptional; device_id: z.ZodOptional; error_description: z.ZodOptional; state: z.ZodOptional; user: z.ZodOptional; }, z.core.$strip>>; query: z.ZodOptional; error: z.ZodOptional; device_id: z.ZodOptional; error_description: z.ZodOptional; state: z.ZodOptional; user: z.ZodOptional; }, z.core.$strip>>; metadata: { allowedMediaTypes: string[]; isAction: false; }; } & { use: any[]; }, void>; //#endregion //#region src/api/routes/email-verification.d.ts declare function createEmailVerificationToken(secret: string, email: string, /** * The email to update from */ updateTo?: string | undefined, /** * The time in seconds for the token to expire */ expiresIn?: number, /** * Extra payload to include in the token */ extraPayload?: Record): Promise; /** * A function to send a verification email to the user */ declare function sendVerificationEmailFn(ctx: GenericEndpointContext, user: User$1): Promise; declare const sendVerificationEmail: better_call750.StrictEndpoint<"/send-verification-email", { method: "POST"; operationId: string; body: z.ZodObject<{ email: z.ZodEmail; callbackURL: z.ZodOptional; }, z.core.$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; }; }; }; }; }; }; }; }; }; } & { use: any[]; }, { status: boolean; }>; declare const verifyEmail: better_call750.StrictEndpoint<"/verify-email", { method: "GET"; operationId: string; query: z.ZodObject<{ token: z.ZodString; callbackURL: z.ZodOptional; }, z.core.$strip>; use: ((inputContext: better_call750.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[]; }; }; }; }; }; }; }; } & { use: any[]; }, void | { status: boolean; }>; //#endregion //#region src/api/routes/error.d.ts declare const error: better_call750.StrictEndpoint<"/error", { method: "GET"; metadata: { openapi: { description: string; responses: { "200": { description: string; content: { "text/html": { schema: { type: "string"; description: string; }; }; }; }; }; }; isAction: false; }; } & { use: any[]; }, Response>; //#endregion //#region src/api/routes/ok.d.ts declare const ok: better_call750.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[]; }; }; }; }; }; }; isAction: false; }; } & { use: any[]; }, { ok: boolean; }>; //#endregion //#region src/api/routes/reset-password.d.ts declare const requestPasswordReset: better_call750.StrictEndpoint<"/request-password-reset", { method: "POST"; body: z.ZodObject<{ email: z.ZodEmail; redirectTo: z.ZodOptional; }, z.core.$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: any[]; }, { status: boolean; message: string; }>; declare const requestPasswordResetCallback: better_call750.StrictEndpoint<"/reset-password/:token", { method: "GET"; operationId: string; query: z.ZodObject<{ callbackURL: z.ZodString; }, z.core.$strip>; use: ((inputContext: better_call750.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; }; }; }; }; }; }; }; }; }; } & { use: any[]; }, never>; declare const resetPassword: better_call750.StrictEndpoint<"/reset-password", { method: "POST"; operationId: string; query: z.ZodOptional; }, z.core.$strip>>; body: z.ZodObject<{ newPassword: z.ZodString; token: z.ZodOptional; }, z.core.$strip>; metadata: { openapi: { operationId: string; description: string; responses: { "200": { description: string; content: { "application/json": { schema: { type: "object"; properties: { status: { type: string; }; }; }; }; }; }; }; }; }; } & { use: any[]; }, { status: boolean; }>; //#endregion //#region src/api/routes/session.d.ts declare const getSession: