feat(federation): Port to Versia 0.6

This commit is contained in:
Jesse Wierzbinski 2026-02-25 02:34:27 +01:00
parent de69f27877
commit fca30b4dad
No known key found for this signature in database
62 changed files with 1614 additions and 2008 deletions

View file

@ -1,13 +1,13 @@
import { z } from "zod";
import { isISOString } from "../../regex.ts";
import { u64, url } from "../common.ts";
import { u64 } from "../common.ts";
import { TextContentFormatSchema } from "../contentformat.ts";
import { EntitySchema } from "../entity.ts";
import { EntitySchema, ReferenceSchema } from "../entity.ts";
export const VoteSchema = EntitySchema.extend({
type: z.literal("pub.versia:polls/Vote"),
author: url,
poll: url,
author: ReferenceSchema,
poll: ReferenceSchema,
option: u64,
});
@ -17,6 +17,6 @@ export const PollExtensionSchema = z.strictObject({
multiple_choice: z.boolean(),
expires_at: z
.string()
.refine((v) => isISOString(v), "must be a valid ISO8601 datetime")
.refine((v) => isISOString(v), "must be a valid RFC 3339 datetime")
.nullish(),
});