2025-07-07 03:42:35 +02:00
|
|
|
import { z } from "zod/v4";
|
2025-02-11 18:22:39 +01:00
|
|
|
import { Status } from "./status.ts";
|
|
|
|
|
|
|
|
|
|
export const Context = z
|
|
|
|
|
.object({
|
2025-07-07 03:42:35 +02:00
|
|
|
ancestors: z.array(Status).meta({
|
2025-02-11 18:22:39 +01:00
|
|
|
description: "Parents in the thread.",
|
|
|
|
|
externalDocs: {
|
|
|
|
|
url: "https://docs.joinmastodon.org/entities/Context/#ancestors",
|
|
|
|
|
},
|
|
|
|
|
}),
|
2025-07-07 03:42:35 +02:00
|
|
|
descendants: z.array(Status).meta({
|
2025-02-11 18:22:39 +01:00
|
|
|
description: "Children in the thread.",
|
|
|
|
|
externalDocs: {
|
|
|
|
|
url: "https://docs.joinmastodon.org/entities/Context/#descendants",
|
|
|
|
|
},
|
|
|
|
|
}),
|
|
|
|
|
})
|
2025-07-07 03:42:35 +02:00
|
|
|
.meta({
|
2025-02-11 18:22:39 +01:00
|
|
|
description:
|
|
|
|
|
"Represents the tree around a given status. Used for reconstructing threads of statuses.",
|
|
|
|
|
externalDocs: {
|
|
|
|
|
url: "https://docs.joinmastodon.org/entities/Context/#context",
|
|
|
|
|
},
|
2025-07-07 03:42:35 +02:00
|
|
|
id: "Context",
|
2025-02-11 18:22:39 +01:00
|
|
|
});
|