bigbuffet-rw/packages/pl-api/lib/entities/directory/server.ts
marcin mikołajczak db19522a54 pl-api: add server directory client
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-08-30 19:28:12 +02:00

21 lines
617 B
TypeScript

import { z } from 'zod';
const directoryServerSchema = z.object({
domain: z.string(),
version: z.string(),
description: z.string(),
languages: z.array(z.string()),
region: z.string(),
categories: z.array(z.string()),
proxied_thumbnail: z.string().url().nullable().catch(null),
blurhash: z.string().nullable().catch(null),
total_users: z.coerce.number(),
last_week_users: z.coerce.number(),
approval_required: z.boolean(),
language: z.string(),
category: z.string(),
});
type DirectoryServer = z.infer<typeof directoryServerSchema>;
export { directoryServerSchema, type DirectoryServer };