server/packages/sdk/schemas/collection.ts

14 lines
349 B
TypeScript
Raw Normal View History

2025-11-21 08:31:02 +01:00
import { z } from "zod";
import { u64 } from "./common.ts";
import { ReferenceSchema } from "./entity.ts";
export const CollectionSchema = z.strictObject({
author: ReferenceSchema.nullable(),
total: u64,
items: z.array(z.any()),
});
export const URICollectionSchema = CollectionSchema.extend({
items: z.array(ReferenceSchema),
});