2025-11-21 08:31:02 +01:00
|
|
|
import { z } from "zod";
|
2026-02-25 02:34:27 +01:00
|
|
|
import { ReferenceSchema, TransientEntitySchema } from "./entity.ts";
|
2025-04-08 16:01:10 +02:00
|
|
|
|
2026-02-25 02:34:27 +01:00
|
|
|
export const FollowSchema = TransientEntitySchema.extend({
|
2025-04-08 16:01:10 +02:00
|
|
|
type: z.literal("Follow"),
|
2026-02-25 02:34:27 +01:00
|
|
|
author: ReferenceSchema,
|
|
|
|
|
followee: ReferenceSchema,
|
2025-04-08 16:01:10 +02:00
|
|
|
});
|
|
|
|
|
|
2026-02-25 02:34:27 +01:00
|
|
|
export const FollowAcceptSchema = TransientEntitySchema.extend({
|
2025-04-08 16:01:10 +02:00
|
|
|
type: z.literal("FollowAccept"),
|
2026-02-25 02:34:27 +01:00
|
|
|
author: ReferenceSchema,
|
|
|
|
|
follower: ReferenceSchema,
|
2025-04-08 16:01:10 +02:00
|
|
|
});
|
|
|
|
|
|
2026-02-25 02:34:27 +01:00
|
|
|
export const FollowRejectSchema = TransientEntitySchema.extend({
|
2025-04-08 16:01:10 +02:00
|
|
|
type: z.literal("FollowReject"),
|
2026-02-25 02:34:27 +01:00
|
|
|
author: ReferenceSchema,
|
|
|
|
|
follower: ReferenceSchema,
|
2025-04-08 16:01:10 +02:00
|
|
|
});
|
|
|
|
|
|
2026-02-25 02:34:27 +01:00
|
|
|
export const UnfollowSchema = TransientEntitySchema.extend({
|
2025-04-08 16:01:10 +02:00
|
|
|
type: z.literal("Unfollow"),
|
2026-02-25 02:34:27 +01:00
|
|
|
author: ReferenceSchema,
|
|
|
|
|
followee: ReferenceSchema,
|
2025-04-08 16:01:10 +02:00
|
|
|
});
|