2024-08-28 04:43:23 -07:00
|
|
|
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(''),
|
|
|
|
});
|
|
|
|
|
2024-08-29 13:48:58 -07:00
|
|
|
type AnnouncementReaction = z.infer<typeof announcementReactionSchema>;
|
2024-08-28 04:43:23 -07:00
|
|
|
|
|
|
|
export { announcementReactionSchema, type AnnouncementReaction };
|