bigbuffet-rw/app/soapbox/schemas/custom-emoji.ts
2023-03-10 12:42:49 -06:00

17 lines
415 B
TypeScript

import z from 'zod';
/**
* Represents a custom emoji.
* https://docs.joinmastodon.org/entities/CustomEmoji/
*/
const customEmojiSchema = z.object({
category: z.string().catch(''),
shortcode: z.string(),
static_url: z.string().catch(''),
url: z.string(),
visible_in_picker: z.boolean().catch(true),
});
type CustomEmoji = z.infer<typeof customEmojiSchema>;
export { customEmojiSchema, CustomEmoji };