import type { DMMF } from '@prisma/generator-helper'; import type { Imports, ParsedField } from './types'; import { Ann } from './annotations'; import { Options } from '../options'; import { pascal } from 'case'; import { Model } from './model'; export declare function slash(path: string): string; export declare const uniq: (input: T[]) => T[]; export declare const concatIntoArray: (source: T[], target: T[]) => void; export declare const transformers: Record string>; export declare const getRelationScalars: (fields: DMMF.Field[]) => Record; export declare const getRelativePath: (from: string, to: string) => string; export declare const generateRelationInput: ({ field, model, allModels, templateHelpers: t, preAndSuffixClassName, canCreateAnnotation, canConnectAnnotation, }: { field: ParsedField; model: Model; allModels: Model[]; templateHelpers: Help; preAndSuffixClassName: Help['createDtoName'] | Help['updateDtoName']; canCreateAnnotation: Ann; canConnectAnnotation: Ann; }) => { type: string; imports: Imports[]; generatedClasses: string[]; apiExtraModels: string[]; }; export declare const mergeImportStatements: (first: Imports, second: Imports) => Imports; export declare const zipImportStatementParams: (items: Imports[]) => Imports[]; export type PrismaType = keyof ReturnType; declare const PrismaScalarToTypeScript: (decimalAsNumber: boolean) => { readonly String: "string"; readonly Boolean: "boolean"; readonly Int: "number"; readonly BigInt: "bigint"; readonly Float: "number"; readonly Decimal: "number" | "Prisma.Decimal"; readonly DateTime: "Date"; readonly Json: "Prisma.JsonValue"; readonly Bytes: "Buffer"; }; export declare const echo: (input: string) => string; export declare const when: (condition: unknown, thenTemplate: string, elseTemplate?: string) => string; export declare const unless: (condition: unknown, thenTemplate: string, elseTemplate?: string) => string; declare global { interface Array { each(fn: (item: T) => string, joinWith: string): string; } } export declare const getImportsDeco: (parsed: ParsedField[]) => Imports[]; export declare const makeHelpers: ({ connectDtoPrefix, createDtoPrefix, updateDtoPrefix, dtoSuffix, entityPrefix, entitySuffix, decimalAsNumber, mode, fileNamingStyle, importPath, }: Options) => { readonly addImports: (fields: ParsedField[], imports?: Imports[], extraModels?: string[]) => Imports[]; readonly config: { readonly connectDtoPrefix: string; readonly createDtoPrefix: string; readonly updateDtoPrefix: string; readonly dtoSuffix: string; readonly entityPrefix: string; readonly entitySuffix: string; }; readonly apiExtraModels: (names: string[]) => string; readonly connectDtoFilename: (name: string, withExtension?: boolean) => string; readonly connectDtoName: (name: string) => string; readonly createDtoFilename: (name: string, withExtension?: boolean) => string; readonly createDtoName: (name: string) => string; readonly echo: (input: string) => string; readonly entityFilename: (name: string, withExtension?: boolean) => string; readonly entityName: (name: string) => string; readonly fieldToDtoProp: (field: ParsedField, useInputTypes?: boolean, forceOptional?: boolean) => string; readonly fieldToEntityProp: (field: ParsedField, useInputTypes?: boolean) => string; readonly fieldType: (field: ParsedField, toInputType?: boolean) => string; readonly fieldsToDtoProps: (fields: ParsedField[], useInputTypes?: boolean, forceOptional?: boolean) => string; readonly fieldsToEntityProps: (fields: ParsedField[]) => string; readonly if: (condition: unknown, thenTemplate: string, elseTemplate?: string) => string; readonly importStatements: (items: Imports[]) => string; readonly nestImport: () => string; readonly scalarToTS: (scalar: string, useInputTypes?: boolean) => string; readonly transformClassNameCase: typeof pascal; readonly transformFileNameCase: (str: string) => string; readonly unless: (condition: unknown, thenTemplate: string, elseTemplate?: string) => string; readonly updateDtoFilename: (name: string, withExtension?: boolean) => string; readonly updateDtoName: (name: string) => string; readonly when: (condition: unknown, thenTemplate: string, elseTemplate?: string) => string; }; export type Help = ReturnType; export {};