mirror of
https://github.com/versia-pub/server.git
synced 2026-04-28 05:09:16 +02:00
refactor(api): ♻️ Move all client schema code to new package
This commit is contained in:
parent
52602c3da7
commit
3fe07a79b8
128 changed files with 3904 additions and 169 deletions
25
packages/client/schemas/context.ts
Normal file
25
packages/client/schemas/context.ts
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
import { z } from "@hono/zod-openapi";
|
||||
import { Status } from "./status.ts";
|
||||
|
||||
export const Context = z
|
||||
.object({
|
||||
ancestors: z.array(Status).openapi({
|
||||
description: "Parents in the thread.",
|
||||
externalDocs: {
|
||||
url: "https://docs.joinmastodon.org/entities/Context/#ancestors",
|
||||
},
|
||||
}),
|
||||
descendants: z.array(Status).openapi({
|
||||
description: "Children in the thread.",
|
||||
externalDocs: {
|
||||
url: "https://docs.joinmastodon.org/entities/Context/#descendants",
|
||||
},
|
||||
}),
|
||||
})
|
||||
.openapi({
|
||||
description:
|
||||
"Represents the tree around a given status. Used for reconstructing threads of statuses.",
|
||||
externalDocs: {
|
||||
url: "https://docs.joinmastodon.org/entities/Context/#context",
|
||||
},
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue