Skip to main content
Koru
Get started
API reference sections

Schema

DocumentEntry

One document as its workspace lists it: identity, where it sits among its siblings, its title and kind, and whether it is in the trash. Listing a workspace opens none of its documents.

Type object

Shape

FieldTypeDescription
idrequiredDocumentId

DocumentId - a client-minted v4 UUID, hyphenated and lowercase. Immutable, and never derived from a name or a path.

parentDocumentId or null
ordinalrequiredinteger (uint32, >= 0)

Position among siblings. Data, not list position, so a reorder is a field change rather than a structural rewrite.

titlerequiredstring
kindrequiredstring

The application's own kind - "page", "task-list", whatever it defines. A stable token, and the store never interprets it.

mimestring or null

MIME type for opaque file entries. Mirrored into the manifest so a listing can choose an icon without opening the document snapshot.

noteDocumentId or null

The note attached to a file, as its document id. Some only on a file that has one; the note itself is an ordinary document registered as the file's child, so the trash and the purge already follow it.

trashed_atTimestamp or null

When this document was put in the trash, if it was.

Deleting a document is a move, not a delete ([ADR-69](../../../docs/decisions/ADR-051-075.md#adr-69--trashing-a-document-is-a-move-into-a-hidden-library-node-and-nothing-ever-purges-it)): losing content is the one unrecoverable bug, so Move to trash sets this and nothing else. The entry stays, its bytes stay, and it is absent from a listing only because whoever draws the listing filters on this field.

A timestamp rather than a bool because the answer to "when did this go" is worth having and costs the same, and because a sweep that empties the trash on age has something to sort on if one is ever wanted. Nothing purges on a timer today.

#[serde(default)] so a manifest written before this existed reads as not trashed, which is the truth about every document in it.

trashed_bystring or null

A self-declared display label for whoever binned it - "Steven", an email, whatever the profile says. None is normal.

A label, not an identity. The store does not resolve it, compare it, or believe it: it exists so a Trash listing can say who without the window having to look up a profile that may belong to another machine. Anything that needed to trust this would need a ProfileId and a way to verify it, which is a different feature.

Example
{
  "id": "00000000-0000-4000-8000-000000000000",
  "parent": "00000000-0000-4000-8000-000000000000",
  "ordinal": 0,
  "title": "string",
  "kind": "string",
  "mime": "string",
  "note": "00000000-0000-4000-8000-000000000000",
  "trashed_at": 0,
  "trashed_by": "string"
}

The contract has no example values, so example bodies are generated from each schema: every field is shown with a placeholder of its type.

Used by

Generated from contract version 1. Last updated .

Privacy choices

Choose which optional tools Koru may use on this site. Your choice is saved in a cookie in this browser for 12 months. Privacy policy

Privacy choices

Keep you signed in, protect forms and remember your language and this choice.

Always on

PostHog and Google Analytics 4 measure page views and actions such as downloads, using cookies or local storage.

PostHog records how pages are used, with form inputs masked and private pages excluded. Needs Analytics.

Ahrefs Web Analytics measures visits and where they come from, and Google Ads measures whether our ads led to a visit or download.