bigbuffet-rw/packages/pl-api/lib/entities/admin/dimension.ts
marcin mikołajczak 036fa32cd3 Add pl-api to workspace
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-08-28 13:43:23 +02:00

20 lines
489 B
TypeScript

import { z } from 'zod';
/** @see {@link https://docs.joinmastodon.org/entities/Admin_Dimension/} */
const adminDimensionSchema = z.object({
key: z.string(),
data: z.object({
key: z.string(),
human_key: z.string(),
value: z.string(),
unit: z.string().optional().catch(undefined),
human_value: z.string().optional().catch(undefined),
}),
});
type AdminDimension = z.infer<typeof adminDimensionSchema>;
export {
adminDimensionSchema,
type AdminDimension,
};