"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Vendir = exports.Contents = exports.HelmChart = exports.VendirResource = void 0;
const zod_1 = require("zod");
const schema_utils_1 = require("../../../util/schema-utils");
exports.VendirResource = zod_1.z.object({
    apiVersion: zod_1.z.literal('vendir.k14s.io/v1alpha1'),
    kind: zod_1.z.literal('Config'),
});
exports.HelmChart = zod_1.z.object({
    name: zod_1.z.string(),
    version: zod_1.z.string(),
    repository: zod_1.z.object({
        url: zod_1.z.string().regex(/^(?:oci|https?):\/\/.+/),
    }),
});
exports.Contents = zod_1.z.object({
    path: zod_1.z.string(),
    helmChart: exports.HelmChart,
});
exports.Vendir = exports.VendirResource.extend({
    directories: zod_1.z.array(zod_1.z.object({
        path: zod_1.z.string(),
        contents: (0, schema_utils_1.LooseArray)(exports.Contents),
    })),
});
//# sourceMappingURL=schema.js.map