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

14 lines
348 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>;
2023-05-04 10:20:39 -07:00
export { emojiReactionSchema, type EmojiReaction };