import CodeBlockWriter from 'code-block-writer'; import { CreateFileOptions, ExtendedDMMF, ExtendedDMMFField, ExtendedDMMFModel, ExtendedDMMFSchemaArgInputType, ZodValidatorOptions } from './classes'; export type WriteStatements = (datamodel: ExtendedDMMF, writer: CreateFileOptions) => void; export interface CreateOptions { dmmf: ExtendedDMMF; path: string; } export type CreateFiles = (options: CreateOptions) => void; export interface ScalarValidatorFunctionOptions { key: string; pattern: string; } export type ValidatorFunction = (options: ScalarValidatorFunctionOptions) => string | undefined; export type ValidatorFunctionMap = Record; export type ZodValidatorTypeMap = Record; export type PrismaScalarTypeMap = Record; export type ZodCustomErrorKey = 'invalid_type_error' | 'required_error' | 'description'; export type ZodPrimitiveType = 'string' | 'number' | 'bigint' | 'boolean' | 'date' | 'symbol' | 'undefined' | 'null' | 'void' | 'unknown' | 'never' | 'any'; export type ZodValidatorType = Extract | 'custom'; export type ZodScalarType = Extract; export type PrismaScalarType = 'String' | 'Boolean' | 'Int' | 'BigInt' | 'Float' | 'Decimal' | 'DateTime' | 'Json' | 'Bytes'; export type ZodPrismaScalarType = Exclude; export type ZodBasicValidatorKeys = 'refine' | 'transform' | 'superRefine'; export type ZodStringValidatorKeys = 'min' | 'max' | 'length' | 'email' | 'url' | 'uuid' | 'cuid' | 'regex' | 'startsWith' | 'endsWith' | 'trim' | 'datetime' | 'noDefault'; export type ZodNumberValidatorKeys = 'gt' | 'gte' | 'lt' | 'lte' | 'int' | 'positive' | 'nonpositive' | 'negative' | 'nonnegative' | 'multipleOf' | 'finite' | 'noDefault'; export type ZodDateValidatorKeys = 'min' | 'max'; export type ZodBigIntValidatorKeys = 'array'; export type ZodCustomValidatorKeys = 'use' | 'omit' | 'import' | 'array'; export type WriteBaseFilterTypesFunction = (options?: { nullable?: boolean; aggregates?: boolean; }) => (writer: CodeBlockWriter) => void; export type PrismaAction = 'findUnique' | 'findMany' | 'findFirst' | 'createOne' | 'createMany' | 'updateOne' | 'updateMany' | 'upsertOne' | 'deleteOne' | 'deleteMany' | 'executeRaw' | 'aggregate' | 'count' | 'groupBy'; export interface WriteTypeOptions extends ZodValidatorOptions { inputType: ExtendedDMMFSchemaArgInputType; isOptional?: boolean; isNullable?: boolean; writeLazy?: boolean; writeComma?: boolean; writeValidation?: boolean; } export type WriteTypeFunction = (writer: CodeBlockWriter, options: TOptions) => CodeBlockWriter | undefined; export interface WriteFieldOptions { writer: CodeBlockWriter; field: ExtendedDMMFField; writeOptionalDefaults?: boolean; forcePartial?: boolean; } export interface ExtendedWriteFieldOptions extends WriteFieldOptions { model: ExtendedDMMFModel; dmmf: ExtendedDMMF; } export interface ContentWriterOptions { fileWriter: CreateFileOptions; dmmf: ExtendedDMMF; getSingleFileContent?: boolean; } //# sourceMappingURL=types.d.ts.map