mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
feat: create thumbnailSchema
This commit is contained in:
parent
34d604dded
commit
cd7e6bbd43
1 changed files with 11 additions and 0 deletions
|
|
@ -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,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue