import { type } from "arktype"; import { resolvedFileAttributeSchema } from "$/schemas/common.ts"; import { nodeSchema } from "../deps/strapi.ts"; export const releaseStrapiSchema = type({ "version": "string", "date": "string.date.parse", "notes?": nodeSchema.array().or("null"), "files": resolvedFileAttributeSchema, }); export const releaseSchema = releaseStrapiSchema.merge({ type: "'release'", title: "string", }); export type Release = typeof releaseSchema.infer;