mirror of
https://github.com/versia-pub/server.git
synced 2025-12-06 16:38:19 +01:00
Some checks failed
CodeQL Scan / Analyze (javascript-typescript) (push) Failing after 53s
Build Docker Images / lint (push) Failing after 10s
Build Docker Images / check (push) Failing after 10s
Build Docker Images / tests (push) Failing after 6s
Build Docker Images / build (server, Dockerfile, ${{ github.repository_owner }}/server) (push) Has been skipped
Build Docker Images / build (worker, Worker.Dockerfile, ${{ github.repository_owner }}/worker) (push) Has been skipped
Deploy Docs to GitHub Pages / build (push) Failing after 5s
Mirror to Codeberg / Mirror (push) Failing after 0s
Deploy Docs to GitHub Pages / Deploy (push) Has been skipped
Nix Build / check (push) Failing after 5s
51 lines
2 KiB
TypeScript
51 lines
2 KiB
TypeScript
import { z } from "@hono/zod-openapi";
|
|
import { Source } from "./account.ts";
|
|
|
|
export const Preferences = z
|
|
.object({
|
|
"posting:default:visibility": Source.shape.privacy.openapi({
|
|
description: "Default visibility for new posts.",
|
|
example: "public",
|
|
externalDocs: {
|
|
url: "https://docs.joinmastodon.org/entities/Preferences/#posting-default-visibility",
|
|
},
|
|
}),
|
|
"posting:default:sensitive": Source.shape.sensitive.openapi({
|
|
description: "Default sensitivity flag for new posts.",
|
|
example: false,
|
|
externalDocs: {
|
|
url: "https://docs.joinmastodon.org/entities/Preferences/#posting-default-sensitive",
|
|
},
|
|
}),
|
|
"posting:default:language": Source.shape.language.nullable().openapi({
|
|
description: "Default language for new posts.",
|
|
example: null,
|
|
externalDocs: {
|
|
url: "https://docs.joinmastodon.org/entities/Preferences/#posting-default-language",
|
|
},
|
|
}),
|
|
"reading:expand:media": z
|
|
.enum(["default", "show_all", "hide_all"])
|
|
.openapi({
|
|
description:
|
|
"Whether media attachments should be automatically displayed or blurred/hidden.",
|
|
example: "default",
|
|
externalDocs: {
|
|
url: "https://docs.joinmastodon.org/entities/Preferences/#reading-expand-media",
|
|
},
|
|
}),
|
|
"reading:expand:spoilers": z.boolean().openapi({
|
|
description: "Whether CWs should be expanded by default.",
|
|
example: false,
|
|
externalDocs: {
|
|
url: "https://docs.joinmastodon.org/entities/Preferences/#reading-expand-spoilers",
|
|
},
|
|
}),
|
|
})
|
|
.openapi("Preferences", {
|
|
description: "Represents a user's preferences.",
|
|
externalDocs: {
|
|
url: "https://docs.joinmastodon.org/entities/Preferences",
|
|
},
|
|
});
|