import { MaybeTimestamp } from "../../../util/timestamp.js";
import { z } from "zod";

//#region lib/modules/datasource/python-version/schema.ts
const PythonRelease = z.object({
	name: z.string(),
	slug: z.string(),
	version: z.number(),
	is_latest: z.boolean(),
	is_published: z.boolean(),
	release_date: MaybeTimestamp,
	pre_release: z.boolean(),
	release_page: z.string().nullable(),
	show_on_download_page: z.boolean(),
	release_notes_url: z.string(),
	resource_uri: z.string()
}).transform(({ name, release_date: releaseTimestamp, pre_release }) => {
	return {
		version: name?.replace("Python", "").trim(),
		releaseTimestamp,
		isStable: pre_release === false
	};
}).array();

//#endregion
export { PythonRelease };
//# sourceMappingURL=schema.js.map