mirror of
https://github.com/aljazceru/ditto.git
synced 2025-12-17 05:24:22 +01:00
feat: create thumbnailSchema
This commit is contained in:
@@ -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({
|
||||
type: z.literal('Create'),
|
||||
id: apId,
|
||||
@@ -318,6 +328,7 @@ export type {
|
||||
Note,
|
||||
Object,
|
||||
Proxy,
|
||||
thumbnailSchema,
|
||||
Update,
|
||||
Zap,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user