feat(federation): Replace old types and federation validators with @lysand-org/federation

This commit is contained in:
Jesse Wierzbinski 2024-05-14 14:35:13 -10:00
parent 25d087a54b
commit 5fd6a4e43d
No known key found for this signature in database
16 changed files with 80 additions and 65 deletions

View file

@ -1,3 +1,4 @@
import type { EntityValidator } from "@lysand-org/federation";
import { relations, sql } from "drizzle-orm";
import {
type AnyPgColumn,
@ -12,7 +13,6 @@ import {
uniqueIndex,
uuid,
} from "drizzle-orm/pg-core";
import type * as Lysand from "lysand-types";
import type { Source as APISource } from "~types/mastodon/source";
export const Emojis = pgTable("Emojis", {
@ -354,8 +354,8 @@ export const Users = pgTable(
isAdmin: boolean("is_admin").default(false).notNull(),
fields: jsonb("fields").notNull().default("[]").$type<
{
key: Lysand.ContentFormat;
value: Lysand.ContentFormat;
key: typeof EntityValidator.$ContentFormat;
value: typeof EntityValidator.$ContentFormat;
}[]
>(),
endpoints: jsonb("endpoints").$type<Partial<{