mirror of
https://github.com/versia-pub/server.git
synced 2026-04-27 12:49:16 +02:00
26 lines
743 B
TypeScript
26 lines
743 B
TypeScript
import { z } from "zod";
|
|
import { ReferenceSchema, TransientEntitySchema } from "./entity.ts";
|
|
|
|
export const FollowSchema = TransientEntitySchema.extend({
|
|
type: z.literal("Follow"),
|
|
author: ReferenceSchema,
|
|
followee: ReferenceSchema,
|
|
});
|
|
|
|
export const FollowAcceptSchema = TransientEntitySchema.extend({
|
|
type: z.literal("FollowAccept"),
|
|
author: ReferenceSchema,
|
|
follower: ReferenceSchema,
|
|
});
|
|
|
|
export const FollowRejectSchema = TransientEntitySchema.extend({
|
|
type: z.literal("FollowReject"),
|
|
author: ReferenceSchema,
|
|
follower: ReferenceSchema,
|
|
});
|
|
|
|
export const UnfollowSchema = TransientEntitySchema.extend({
|
|
type: z.literal("Unfollow"),
|
|
author: ReferenceSchema,
|
|
followee: ReferenceSchema,
|
|
});
|