import { MongoValidator } from "@prisma-next/mongo-contract"; import { Contract, ContractField, ContractValueObject, JsonValue } from "@prisma-next/contract/types"; import { AuthoringContributions } from "@prisma-next/framework-components/authoring"; import { SymbolTable } from "@prisma-next/psl-parser"; import { Result } from "@prisma-next/utils/result"; import { SourceFile } from "@prisma-next/psl-parser/syntax"; import { CodecLookup } from "@prisma-next/framework-components/codec"; import { ContractSourceDiagnostic, ContractSourceDiagnostics } from "@prisma-next/config/config-types"; //#region src/derive-json-schema.d.ts /** * The permitted values a field's value set restricts it to, keyed by the value set's name — the * storage `entries.valueSet` slot. The validator's `enum` keyword is sourced from these, not from * `domain.enum`. */ type FieldValueSets = Record; declare function deriveJsonSchema(fields: Record, valueObjects?: Record, codecLookup?: CodecLookup, valueSets?: FieldValueSets): MongoValidator; interface PolymorphicVariant { readonly discriminatorValue: string; readonly fields: Record; } declare function derivePolymorphicJsonSchema(baseFields: Record, discriminatorField: string, variants: readonly PolymorphicVariant[], valueObjects?: Record, codecLookup?: CodecLookup, valueSets?: FieldValueSets): MongoValidator; //#endregion //#region src/interpreter.d.ts interface InterpretPslDocumentToMongoContractInput { readonly symbolTable: SymbolTable; readonly sourceFile: SourceFile; readonly sourceId: string; readonly scalarTypeDescriptors: ReadonlyMap; readonly codecLookup?: CodecLookup; readonly seedDiagnostics?: readonly ContractSourceDiagnostic[]; readonly authoringContributions?: AuthoringContributions; /** The target's default codec ids for an `enum` block that omits `@@type`. */ readonly enumInferenceCodecs?: { readonly text: string; readonly int: string; }; } declare function interpretPslDocumentToMongoContract(input: InterpretPslDocumentToMongoContractInput): Result; //#endregion export { type FieldValueSets, type InterpretPslDocumentToMongoContractInput, deriveJsonSchema, derivePolymorphicJsonSchema, interpretPslDocumentToMongoContract }; //# sourceMappingURL=index.d.mts.map