/** * Shared helpers for reading, writing, and validating Clay model files. * * - readModelFile: raw JSON.parse (preserves includes/mixins) * - readExpandedModel: uses Clay's model.load() to resolve includes & mixins * - writeModelFile: optionally validates against $schema, then writes formatted JSON * - validateAgainstSchema: validates data against a JSON Schema using Ajv */ /** * Raw JSON.parse of a model file. * Used by mutation tools to preserve include references and mixin definitions. */ export declare function readModelFile(modelPath: string): Record; /** * Uses Clay's model.load() to resolve includes and apply mixins. * Returns the fully expanded model object. */ export declare function readExpandedModel(modelPath: string): { name: string; generators: string[]; mixins?: unknown[]; model: Record; }; /** * Uses Clay's model.loadWithIncludeMap() to resolve includes (with tracking) and apply mixins. * Returns the expanded model plus a map of object references to their source file paths. */ export declare function readExpandedModelWithIncludeMap(modelPath: string): { model: { name: string; generators: string[]; mixins?: unknown[]; model: Record; }; includeMap: Map; }; /** * Validate data against a JSON Schema file using Ajv. * @returns Array of error strings (empty if valid). */ export declare function validateAgainstSchema(data: unknown, schemaPath: string): string[]; /** * Write a model file as formatted JSON. * If the data contains a `$schema` property, validates data.model against it first. */ export declare function writeModelFile(modelPath: string, data: Record): void; //# sourceMappingURL=model-file.d.ts.map