server/packages/sdk/schemas/collection.ts
2025-11-21 08:31:02 +01:00

17 lines
370 B
TypeScript

import { z } from "zod";
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),
});