mirror of
https://github.com/versia-pub/server.git
synced 2025-12-06 16:38:19 +01:00
20 lines
596 B
TypeScript
20 lines
596 B
TypeScript
import { z } from "zod/v4";
|
|
import { url } from "./common.ts";
|
|
|
|
export const WebFingerSchema = z.object({
|
|
subject: url,
|
|
aliases: z.array(url).optional(),
|
|
properties: z.record(url, z.string().or(z.null())).optional(),
|
|
links: z
|
|
.array(
|
|
z.object({
|
|
rel: z.string(),
|
|
type: z.string().optional(),
|
|
href: url.optional(),
|
|
titles: z.record(z.string(), z.string()).optional(),
|
|
properties: z.record(url, z.string().or(z.null())).optional(),
|
|
}),
|
|
)
|
|
.optional(),
|
|
});
|