bigbuffet-rw/packages/pl-api/lib/entities/announcement-reaction.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

21 lines
657 B
TypeScript

import * as v from 'valibot';
/**
* @category Schemas
* @see {@link https://docs.joinmastodon.org/entities/announcement/}
*/
const announcementReactionSchema = v.object({
name: v.fallback(v.string(), ''),
count: v.fallback(v.pipe(v.number(), v.integer(), v.minValue(0)), 0),
me: v.fallback(v.boolean(), false),
url: v.fallback(v.nullable(v.string()), null),
static_url: v.fallback(v.nullable(v.string()), null),
announcement_id: v.fallback(v.string(), ''),
});
/**
* @category Entity types
*/
type AnnouncementReaction = v.InferOutput<typeof announcementReactionSchema>;
export { announcementReactionSchema, type AnnouncementReaction };