import { Account, Session as Session$1, User as User$1 } from "../types/models.mjs"; import { BetterAuthOptions } from "@better-auth/core"; import { BetterAuthPluginDBSchema, DBFieldAttribute } from "@better-auth/core/db"; //#region src/db/schema.d.ts declare function parseUserOutput(options: BetterAuthOptions, user: T): T; /** * Builds a synthetic user object that matches the shape of a real user * returned from the database. This ensures enumeration protection works * correctly by making synthetic and real user responses indistinguishable. * * The function iterates over the user output schema and: * - Includes all fields that should be returned (returned !== false) * - Uses provided values when available * - Sets optional fields to null when no value is provided * - Applies default values where defined * - Always includes the 'id' field (not part of schema but always present) */ declare function buildSyntheticUserOutput(options: BetterAuthOptions, data: Record): Record; declare function parseSessionOutput(options: BetterAuthOptions, session: T): T; declare function parseAccountOutput(options: BetterAuthOptions, account: T): Omit; declare function parseInputData>(data: T, schema: { fields: Record; action?: ("create" | "update") | undefined; }): Partial; declare function parseUserInput(options: BetterAuthOptions, user: Record | undefined, action: "create" | "update"): Partial>; declare function parseAdditionalUserInputFromProviderProfile(options: BetterAuthOptions, profile: 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, action?: "create" | "update"): Partial>; declare function getSessionDefaultFields(options: BetterAuthOptions): Record; declare function mergeSchema(schema: S, newSchema?: { [K in keyof S]?: { modelName?: string | undefined; fields?: { [P: string]: string; } | undefined; } | undefined } | undefined): S; //#endregion export { buildSyntheticUserOutput, getSessionDefaultFields, mergeSchema, parseAccountInput, parseAccountOutput, parseAdditionalUserInput, parseAdditionalUserInputFromProviderProfile, parseInputData, parseSessionInput, parseSessionOutput, parseUserInput, parseUserOutput };