Files
radicle-explorer/httpd-client/lib/project/comment.ts
T
Sebastian Martinez 1ef0f9dfd1 Add issue embeds
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-09-27 16:40:49 +02:00

15 lines
453 B
TypeScript

import type { z } from "zod";
import { array, number, object, string, tuple } from "zod";
export type Comment = z.infer<typeof commentSchema>;
export const commentSchema = object({
id: string(),
author: object({ id: string(), alias: string().optional() }),
body: string(),
embeds: array(object({ name: string(), content: string() })),
reactions: array(tuple([string(), string()])),
timestamp: number(),
replyTo: string().nullable(),
});