server/packages/sdk/schemas/collection.ts

17 lines
370 B
TypeScript
Raw Normal View History

2025-11-21 08:31:02 +01:00
import { z } from "zod";
2025-04-10 19:15:31 +02:00
import { u64, url } from "./common.ts";
export const CollectionSchema = z.strictObject({
author: url.nullable(),
first: url,
last: url,
total: u64,
next: url.nullable(),
previous: url.nullable(),
items: z.array(z.any()),
});
export const URICollectionSchema = CollectionSchema.extend({
items: z.array(url),
});