2025-07-07 03:42:35 +02:00
|
|
|
import { z } from "zod/v4";
|
2025-04-08 16:01:10 +02:00
|
|
|
import { url } from "./common.ts";
|
|
|
|
|
import { EntitySchema } from "./entity.ts";
|
|
|
|
|
|
|
|
|
|
export const FollowSchema = EntitySchema.extend({
|
|
|
|
|
type: z.literal("Follow"),
|
|
|
|
|
uri: z.null().optional(),
|
|
|
|
|
author: url,
|
|
|
|
|
followee: url,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
export const FollowAcceptSchema = EntitySchema.extend({
|
|
|
|
|
type: z.literal("FollowAccept"),
|
|
|
|
|
uri: z.null().optional(),
|
|
|
|
|
author: url,
|
|
|
|
|
follower: url,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
export const FollowRejectSchema = EntitySchema.extend({
|
|
|
|
|
type: z.literal("FollowReject"),
|
|
|
|
|
uri: z.null().optional(),
|
|
|
|
|
author: url,
|
|
|
|
|
follower: url,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
export const UnfollowSchema = EntitySchema.extend({
|
|
|
|
|
type: z.literal("Unfollow"),
|
|
|
|
|
uri: z.null().optional(),
|
|
|
|
|
author: url,
|
|
|
|
|
followee: url,
|
|
|
|
|
});
|