mirror of
https://github.com/versia-pub/api.git
synced 2026-03-13 04:09:15 +01:00
feat(federation): ✨ Add Collections
This commit is contained in:
parent
1cffb93d52
commit
1203269531
3 changed files with 27 additions and 0 deletions
|
|
@ -105,6 +105,20 @@ export const NoteSchema = EntitySchema.extend({
|
|||
.nullable(),
|
||||
});
|
||||
|
||||
export const CollectionSchema = z.object({
|
||||
author: z.string().url().nullable(),
|
||||
first: z.string().url(),
|
||||
last: z.string().url(),
|
||||
total: z
|
||||
.number()
|
||||
.int()
|
||||
.nonnegative()
|
||||
.max(2 ** 64 - 1),
|
||||
next: z.string().url().nullable(),
|
||||
previous: z.string().url().nullable(),
|
||||
items: z.array(z.any()),
|
||||
});
|
||||
|
||||
export const PublicKeyDataSchema = z
|
||||
.object({
|
||||
key: z.string().min(1),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue