import { DBFieldAttribute } from "@better-auth/core/db"; import * as z from "zod"; //#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 extends boolean = false> = Field 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 extends { input: false; } ? isClientSide extends true ? never : Schema : Schema; type RemoveNeverProps = { [K in keyof T as [T[K]] extends [never] ? never : K]: T[K] }; //#endregion export { FieldAttributeToSchema, toZodSchema }; //# sourceMappingURL=to-zod.d.mts.map