"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.BlueprintSchema = exports.SeverityWeightSchema = exports.SafeFixSchema = exports.ConformanceCheckSchema = exports.QualityGateSchema = exports.ConventionRuleSchema = exports.FileSectionSchema = exports.FileRequirementSchema = exports.DirectorySectionSchema = exports.StackIdentitySchema = void 0;
const zod_1 = require("zod");
exports.StackIdentitySchema = zod_1.z.object({
    framework: zod_1.z.string(),
    css: zod_1.z.string().optional(),
    tools: zod_1.z.array(zod_1.z.string()).optional(),
});
exports.DirectorySectionSchema = zod_1.z.object({
    required: zod_1.z.array(zod_1.z.string()),
    optional: zod_1.z.array(zod_1.z.string()).optional(),
});
exports.FileRequirementSchema = zod_1.z.object({
    path: zod_1.z.string(),
    description: zod_1.z.string(),
    expectedContent: zod_1.z.string().optional(),
    autoFixable: zod_1.z.boolean().default(false),
    fixOperation: zod_1.z.string().optional(), // e.g. "create-file"
    requiresHumanReview: zod_1.z.boolean().default(false),
    severity: zod_1.z.enum(["high", "medium", "low"]).default("medium"),
});
exports.FileSectionSchema = zod_1.z.object({
    required: zod_1.z.array(exports.FileRequirementSchema),
    optional: zod_1.z.array(exports.FileRequirementSchema).optional(),
});
exports.ConventionRuleSchema = zod_1.z.object({
    id: zod_1.z.string(),
    name: zod_1.z.string(),
    description: zod_1.z.string(),
    pathPattern: zod_1.z.string(),
    severity: zod_1.z.enum(["high", "medium", "low"]).default("medium"),
});
exports.QualityGateSchema = zod_1.z.object({
    id: zod_1.z.string(),
    name: zod_1.z.string(),
    command: zod_1.z.string(),
    severity: zod_1.z.enum(["high", "medium", "low"]).default("medium"),
});
exports.ConformanceCheckSchema = zod_1.z.object({
    id: zod_1.z.string(),
    name: zod_1.z.string(),
    command: zod_1.z.string(),
    severity: zod_1.z.enum(["high", "medium", "low"]).default("medium"),
});
exports.SafeFixSchema = zod_1.z.object({
    id: zod_1.z.string(),
    description: zod_1.z.string(),
    operationType: zod_1.z.string(),
    params: zod_1.z.record(zod_1.z.any()),
});
exports.SeverityWeightSchema = zod_1.z.object({
    high: zod_1.z.number().default(20),
    medium: zod_1.z.number().default(10),
    low: zod_1.z.number().default(3),
});
exports.BlueprintSchema = zod_1.z.object({
    blueprintId: zod_1.z.string(),
    name: zod_1.z.string(),
    version: zod_1.z.string(),
    author: zod_1.z.string().optional(),
    description: zod_1.z.string().optional(),
    tags: zod_1.z.array(zod_1.z.string()).optional(),
    homepage: zod_1.z.string().optional(),
    license: zod_1.z.string().optional(),
    extends: zod_1.z.array(zod_1.z.string()).optional(),
    severityWeight: exports.SeverityWeightSchema.default({ high: 20, medium: 10, low: 3 }),
    stack: exports.StackIdentitySchema,
    directories: exports.DirectorySectionSchema.optional(),
    files: exports.FileSectionSchema.optional(),
    conventions: zod_1.z.array(exports.ConventionRuleSchema).optional(),
    qualityGates: zod_1.z.array(exports.QualityGateSchema).optional(),
    conformanceChecks: zod_1.z.array(exports.ConformanceCheckSchema).optional(),
    safeAutoFixes: zod_1.z.array(exports.SafeFixSchema).optional(),
});
//# sourceMappingURL=BlueprintSchema.js.map