import type { z } from "zod"; import { ReactionSchema } from "../../schemas/extensions/reactions.ts"; import type { JSONObject } from "../../types.ts"; import { Entity } from "../entity.ts"; export class Reaction extends Entity { public static name = "pub.versia:reactions/Reaction"; public constructor(public data: z.infer) { super(data); } public static fromJSON(json: JSONObject): Promise { return ReactionSchema.parseAsync(json).then((u) => new Reaction(u)); } }