import type { z } from "zod"; import { array, number, object, string, tuple } from "zod"; export type Comment = z.infer; export type Embed = z.infer["embeds"][0]; 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(), });