pleroma/packages/pl-api/lib/entities/context.ts
marcin mikołajczak 036fa32cd3 Add pl-api to workspace
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-08-28 13:43:23 +02:00

15 lines
387 B
TypeScript

import { z } from 'zod';
import { Resolve } from '../utils/types';
import { statusSchema } from './status';
/** @see {@link https://docs.joinmastodon.org/entities/Context/} */
const contextSchema = z.object({
ancestors: z.array(statusSchema),
descendants: z.array(statusSchema),
});
type Context = Resolve<z.infer<typeof contextSchema>>;
export { contextSchema, type Context };