2024-10-13 15:25:30 -07:00
|
|
|
import * as v from 'valibot';
|
2024-08-28 04:43:23 -07:00
|
|
|
|
|
|
|
import { statusSchema } from './status';
|
|
|
|
|
|
|
|
/** @see {@link https://docs.joinmastodon.org/entities/Context/} */
|
2024-10-13 15:25:30 -07:00
|
|
|
const contextSchema = v.object({
|
2024-08-28 04:43:23 -07:00
|
|
|
ancestors: z.array(statusSchema),
|
|
|
|
descendants: z.array(statusSchema),
|
|
|
|
});
|
|
|
|
|
2024-10-13 15:25:30 -07:00
|
|
|
type Context = v.InferOutput<typeof contextSchema>;
|
2024-08-28 04:43:23 -07:00
|
|
|
|
|
|
|
export { contextSchema, type Context };
|