bigbuffet-rw/packages/pl-api/lib/entities/admin/rule.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

13 lines
396 B
TypeScript

import { z } from 'zod';
/** @see {@link https://docs.pleroma.social/backend/development/API/admin_api/#get-apiv1pleromaadminrules} */
const adminRuleSchema = z.object({
id: z.string(),
text: z.string().catch(''),
hint: z.string().catch(''),
priority: z.number().nullable().catch(null),
});
type AdminRule = z.infer<typeof adminRuleSchema>;
export { adminRuleSchema, type AdminRule };