bigbuffet-rw/packages/pl-api/lib/entities/announcement-reaction.ts
marcin mikołajczak d91b55d9b1 cleanup
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-08-29 22:48:58 +02:00

15 lines
533 B
TypeScript

import { z } from 'zod';
/** @see {@link https://docs.joinmastodon.org/entities/announcement/} */
const announcementReactionSchema = z.object({
name: z.string().catch(''),
count: z.number().int().nonnegative().catch(0),
me: z.boolean().catch(false),
url: z.string().nullable().catch(null),
static_url: z.string().nullable().catch(null),
announcement_id: z.string().catch(''),
});
type AnnouncementReaction = z.infer<typeof announcementReactionSchema>;
export { announcementReactionSchema, type AnnouncementReaction };