feat: create thumbnailSchema

This commit is contained in:
P. Reis 2024-11-04 11:10:27 -03:00
parent 34d604dded
commit cd7e6bbd43

View file

@ -154,6 +154,16 @@ const objectSchema = z.union([
]), ]),
); );
/** https://docs.joinmastodon.org/entities/Instance/#thumbnail */
const thumbnailSchema = z.object({
url: z.string().url(),
blurhash: z.string().optional(),
versions: z.object({
'@1x': z.string().url().optional(),
'@2x': z.string().url().optional(),
}).optional(),
});
const createNoteSchema = z.object({ const createNoteSchema = z.object({
type: z.literal('Create'), type: z.literal('Create'),
id: apId, id: apId,
@ -318,6 +328,7 @@ export type {
Note, Note,
Object, Object,
Proxy, Proxy,
thumbnailSchema,
Update, Update,
Zap, Zap,
}; };