bigbuffet-rw/packages/pl-api/lib/entities/custom-emoji.ts
marcin mikołajczak bc65755862 pl-api: Update docs
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-11-29 16:01:54 +01:00

22 lines
538 B
TypeScript

import * as v from 'valibot';
/**
* Represents a custom emoji.
*
* @category Schemas
* @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),
});
/**
* @category Entity types
*/
type CustomEmoji = v.InferOutput<typeof customEmojiSchema>;
export { customEmojiSchema, type CustomEmoji };