bigbuffet-rw/packages/pl-api/lib/entities/custom-emoji.ts
marcin mikołajczak a6bc160caa pl-api: Do some blind search and replace
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-10-14 00:25:30 +02:00

17 lines
480 B
TypeScript

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