bigbuffet-rw/packages/pl-api/lib/entities/custom-emoji.ts
marcin mikołajczak 036fa32cd3 Add pl-api to workspace
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-08-28 13:43:23 +02:00

17 lines
446 B
TypeScript

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