feat(api): 🏷️ Port Account OpenAPI schemas from Mastodon API docs

This commit is contained in:
Jesse Wierzbinski 2025-02-05 21:49:39 +01:00
parent 76d1ccc859
commit 2aeada4904
No known key found for this signature in database
95 changed files with 610 additions and 388 deletions

View file

@ -1,10 +1,10 @@
import { z } from "@hono/zod-openapi";
import {
ADMIN_ROLES,
DEFAULT_ROLES,
RolePermissions,
} from "@versia/kit/tables";
import { types as mimeTypes } from "mime-types";
import { z } from "zod";
export enum MediaBackendType {
Local = "local",
@ -26,6 +26,11 @@ const zUrl = z
.transform((arg) => arg.replace(/\/$/, ""))
.transform((arg) => new URL(arg));
export const zBoolean = z
.string()
.transform((v) => ["true", "1", "on"].includes(v.toLowerCase()))
.or(z.boolean());
export const configValidator = z
.object({
database: z