2025-07-07 03:42:35 +02:00
|
|
|
import { z } from "zod/v4";
|
2025-02-12 23:04:44 +01:00
|
|
|
import { Id } from "./common.ts";
|
|
|
|
|
|
|
|
|
|
export const Marker = z
|
|
|
|
|
.object({
|
2025-07-07 03:42:35 +02:00
|
|
|
last_read_id: Id.meta({
|
2025-02-12 23:04:44 +01:00
|
|
|
description: "The ID of the most recently viewed entity.",
|
|
|
|
|
example: "ead15c9d-8eda-4b2c-9546-ecbf851f001c",
|
|
|
|
|
}),
|
2025-07-07 03:42:35 +02:00
|
|
|
version: z.number().meta({
|
2025-02-12 23:04:44 +01:00
|
|
|
description:
|
|
|
|
|
"An incrementing counter, used for locking to prevent write conflicts.",
|
|
|
|
|
example: 462,
|
|
|
|
|
}),
|
2025-07-07 03:42:35 +02:00
|
|
|
updated_at: z.iso.datetime().meta({
|
2025-02-12 23:04:44 +01:00
|
|
|
description: "The timestamp of when the marker was set.",
|
|
|
|
|
example: "2025-01-12T13:11:00Z",
|
|
|
|
|
}),
|
|
|
|
|
})
|
2025-07-07 03:42:35 +02:00
|
|
|
.meta({
|
2025-02-12 23:04:44 +01:00
|
|
|
description:
|
|
|
|
|
"Represents the last read position within a user's timelines.",
|
|
|
|
|
externalDocs: {
|
|
|
|
|
url: "https://docs.joinmastodon.org/entities/Marker",
|
|
|
|
|
},
|
2025-07-07 03:42:35 +02:00
|
|
|
id: "Marker",
|
2025-02-12 23:04:44 +01:00
|
|
|
});
|