summaryrefslogtreecommitdiffstats
path: root/src/schemas/releases.ts
diff options
context:
space:
mode:
authorVolpeon <git@volpeon.ink>2026-07-22 19:40:59 +0200
committerVolpeon <git@volpeon.ink>2026-07-22 19:40:59 +0200
commitc1e28224aa2e1450031669d9a7e359b63e04687d (patch)
tree68f3d8905c763a91f68001d868197effa92adafa /src/schemas/releases.ts
downloadcorvos-website-c1e28224aa2e1450031669d9a7e359b63e04687d.tar.gz
corvos-website-c1e28224aa2e1450031669d9a7e359b63e04687d.tar.bz2
corvos-website-c1e28224aa2e1450031669d9a7e359b63e04687d.zip
Init
Diffstat (limited to 'src/schemas/releases.ts')
-rw-r--r--src/schemas/releases.ts18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/schemas/releases.ts b/src/schemas/releases.ts
new file mode 100644
index 0000000..0ccb6a6
--- /dev/null
+++ b/src/schemas/releases.ts
@@ -0,0 +1,18 @@
1import { type } from "arktype";
2
3import { nodeSchema } from "../deps/strapi.tsx";
4import { strapiLoader } from "../deps/strapi.tsx";
5
6export const releaseStrapiSchema = type({
7 "version": "string",
8 "date": "string.date.parse",
9 "notes?": nodeSchema.array().or("null"),
10 "files": strapiLoader.resolvedFileAttributeSchema,
11});
12
13export const releaseSchema = releaseStrapiSchema.merge({
14 type: "'release'",
15 title: "string",
16});
17
18export type Release = typeof releaseSchema.infer;