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

18 lines
420 B
TypeScript
Raw Normal View History

2023-03-10 10:42:49 -08:00
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>;
2023-05-04 10:20:39 -07:00
export { customEmojiSchema, type CustomEmoji };