bigbuffet-rw/app/soapbox/schemas/emoji-reaction.ts

14 lines
343 B
TypeScript
Raw Normal View History

2023-05-02 17:11:17 -07:00
import { z } from 'zod';
2023-05-04 08:24:34 -07:00
import { emojiSchema } from './utils';
2023-05-02 17:11:17 -07:00
/** Pleroma emoji reaction. */
const emojiReactionSchema = z.object({
name: emojiSchema,
count: z.number().nullable().catch(null),
me: z.boolean().catch(false),
});
type EmojiReaction = z.infer<typeof emojiReactionSchema>;
export { emojiReactionSchema, EmojiReaction };