"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DotnetReleasesSchema = exports.DotnetReleasesIndexSchema = void 0;
const zod_1 = require("zod");
const Product = zod_1.z.union([zod_1.z.literal('.NET Core'), zod_1.z.literal('.NET')]);
const SupportPhase = zod_1.z.union([
    zod_1.z.literal('current'),
    zod_1.z.literal('eol'),
    zod_1.z.literal('lts'),
    zod_1.z.literal('maintenance'),
    zod_1.z.literal('preview'),
    zod_1.z.literal('rc'),
]);
const ReleaseIndex = zod_1.z.object({
    'channel-version': zod_1.z.string(),
    'latest-release': zod_1.z.string(),
    'latest-release-date': zod_1.z.date(),
    security: zod_1.z.boolean(),
    'latest-runtime': zod_1.z.string(),
    'latest-sdk': zod_1.z.string(),
    product: Product,
    'support-phase': SupportPhase,
    'eol-date': zod_1.z.date().nullable(),
    'releases.json': zod_1.z.string(),
});
exports.DotnetReleasesIndexSchema = zod_1.z.object({
    'releases-index': zod_1.z.array(ReleaseIndex),
});
const ReleaseDetails = zod_1.z.object({
    version: zod_1.z.string(),
    'version-display': zod_1.z.string(),
});
const Release = zod_1.z.object({
    'release-date': zod_1.z.date(),
    'release-version': zod_1.z.string(),
    security: zod_1.z.boolean(),
    'release-notes': zod_1.z.string(),
    runtime: ReleaseDetails,
    sdk: ReleaseDetails,
});
exports.DotnetReleasesSchema = zod_1.z.object({
    'channel-version': zod_1.z.string(),
    'latest-release': zod_1.z.string(),
    'latest-release-date': zod_1.z.date(),
    'latest-runtime': zod_1.z.string(),
    'latest-sdk': zod_1.z.string(),
    'support-phase': SupportPhase,
    releases: zod_1.z.array(Release),
});
//# sourceMappingURL=schema.js.map