import * as schema from './getSchema'; import { PrintOptions } from './printSchema'; import * as finder from './finder'; type ReplaceReturnType any, NewReturn> = (...a: Parameters) => NewReturn; type ExtractKeys = 'getSchema' | 'getSubject' | 'getParent' | 'print'; type NeutralKeys = 'break' | 'comment' | 'attribute' | 'enumerator' | 'then' | 'findByType' | 'findAllByType'; type DatasourceOrGeneratorKeys = 'assignment'; type EnumKeys = 'enumerator'; type FieldKeys = 'attribute' | 'removeAttribute'; type BlockKeys = 'blockAttribute' | 'field' | 'removeField'; type PrismaSchemaFinderOptions = finder.ByTypeOptions & { within?: finder.ByTypeSourceObject[]; }; type PrismaSchemaSubset = ReplaceReturnType>>; type PrismaSchemaBuilder = { [U in K]: U extends ExtractKeys ? ConcretePrismaSchemaBuilder[U] : U extends NeutralKeys ? ConcretePrismaSchemaBuilder[U] : U extends 'datasource' ? PrismaSchemaSubset : U extends 'generator' ? PrismaSchemaSubset : U extends 'model' ? PrismaSchemaSubset : U extends 'view' ? PrismaSchemaSubset : U extends 'type' ? PrismaSchemaSubset : U extends 'field' ? PrismaSchemaSubset : U extends 'removeField' ? PrismaSchemaSubset : U extends 'enum' ? PrismaSchemaSubset : U extends 'removeAttribute' ? PrismaSchemaSubset : PrismaSchemaSubset; }; type Arg = string | { name: string; function?: Arg[]; }; type Subject = schema.Block | schema.Field | schema.Enumerator | undefined; export declare class ConcretePrismaSchemaBuilder { private schema; private _subject; private _parent; constructor(source?: string); print(options?: PrintOptions): string; getSchema(): schema.Schema; generator(name: string, provider?: string): this; drop(name: string): this; datasource(provider: string, url: string | { env: string; }): this; model(name: string): this; view(name: string): this; type(name: string): this; enum(name: string, enumeratorNames?: string[]): this; enumerator(value: string): this; private getSubject; private getParent; blockAttribute(name: string, args?: string | string[] | Record): this; attribute(name: string, args?: Arg[] | Record): this; removeAttribute(name: string): this; assignment(key: string, value: string): this; findByType(typeToMatch: Match, { within, ...options }: PrismaSchemaFinderOptions): finder.FindByBlock | null; findAllByType(typeToMatch: Match, { within, ...options }: PrismaSchemaFinderOptions): Array | null>; private blockInsert; break(): this; comment(text: string, node?: boolean): this; schemaComment(text: string, node?: boolean): this; field(name: string, fieldType?: string | schema.Func): this; removeField(name: string): this; then>(callback: (subject: R) => unknown): this; } export declare function createPrismaSchemaBuilder(source?: string): PrismaSchemaBuilder>; export {};