feat(api): 🏷️ Port Role and CustomEmoji OpenAPI schemas
Some checks failed
Mirror to Codeberg / Mirror (push) Failing after 1s

This commit is contained in:
Jesse Wierzbinski 2025-02-11 18:22:39 +01:00
parent 7c622730dc
commit 264e2fe8ac
No known key found for this signature in database
17 changed files with 319 additions and 177 deletions

View file

@ -1,4 +1,4 @@
import type { Source as ApiSource } from "@versia/client/types";
import type { z } from "@hono/zod-openapi";
import type { ContentFormat, InstanceMetadata } from "@versia/federation/types";
import type { Challenge } from "altcha-lib/types";
import { relations, sql } from "drizzle-orm";
@ -14,6 +14,7 @@ import {
uniqueIndex,
uuid,
} from "drizzle-orm/pg-core";
import type { Source } from "~/classes/schemas/account";
// biome-ignore lint/nursery/useExplicitType: Type is too complex
const createdAt = () =>
@ -553,16 +554,7 @@ export const Users = pgTable(
inbox: string;
outbox: string;
}> | null>(),
source: jsonb("source").notNull().$type<
ApiSource & {
avatar?: {
content_type: string;
};
header?: {
content_type: string;
};
}
>(),
source: jsonb("source").notNull().$type<z.infer<typeof Source>>(),
avatarId: uuid("avatarId").references(() => Medias.id, {
onDelete: "set null",
onUpdate: "cascade",