mirror of
https://github.com/versia-pub/server.git
synced 2026-04-28 13:19: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
21
packages/client/schemas/appeal.ts
Normal file
21
packages/client/schemas/appeal.ts
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
import { z } from "@hono/zod-openapi";
|
||||
|
||||
export const Appeal = z
|
||||
.object({
|
||||
text: z.string().openapi({
|
||||
description:
|
||||
"Text of the appeal from the moderated account to the moderators.",
|
||||
example: "I believe this action was taken in error.",
|
||||
}),
|
||||
state: z.enum(["approved", "rejected", "pending"]).openapi({
|
||||
description:
|
||||
"State of the appeal. 'approved' = The appeal has been approved by a moderator, 'rejected' = The appeal has been rejected by a moderator, 'pending' = The appeal has been submitted, but neither approved nor rejected yet.",
|
||||
example: "pending",
|
||||
}),
|
||||
})
|
||||
.openapi({
|
||||
description: "Appeal against a moderation action.",
|
||||
externalDocs: {
|
||||
url: "https://docs.joinmastodon.org/entities/Appeal",
|
||||
},
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue