mirror of
https://github.com/versia-pub/server.git
synced 2025-12-06 08:28:19 +01:00
17 lines
373 B
TypeScript
17 lines
373 B
TypeScript
import { z } from "zod/v4";
|
|
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),
|
|
});
|