wiki.lichen.noteRevision

lichen.wiki

Documentation

A revision to a note. It holds either a diff from the previous revision or the complete new body, depending on diffFormat.

main record

A revision to a note. It holds either a diff from the previous revision or the complete new body, depending on diffFormat.

Record Key tid Timestamp-based ID

Properties

blobs array of blob Optional

Blobs the content references. Each is identified by the uploading repo's DID and the blob CID. Content points at one with ![alt](/blob/<did>/<cid>), the path lichen serves it from. Listing the ref here keeps the blob alive in the PDS.

createdAt string datetime Required

When this revision was created.

diff string Required

The revision payload. With "diff-match-patch" it is a patch against parentRevision. With "full-text" it is the note's whole new body, and it is only accepted when parentRevision is the current head.

maxLength: 1000000 bytes
diffFormat string Required

How to read the diff field. "diff-match-patch" means a patch against parentRevision. "full-text" means the whole note body.

maxLength: 32 bytes
Known values: diff-match-patch, full-text
message string Optional

Optional commit message describing this revision.

maxLength: 10240 bytesmaxGraphemes: 1024 graphemes
noteRef string at-uri Required

AT-URI of the parent note record.

parentRevision string at-uri Optional

AT-URI of the previous revision. Omitted for the first revision of a note.

View raw schema
{
  "description": "A revision to a note. It holds either a diff from the previous revision or the complete new body, depending on diffFormat.",
  "key": "tid",
  "record": {
    "properties": {
      "blobs": {
        "description": "Blobs the content references. Each is identified by the uploading repo's DID and the blob CID. Content points at one with ![alt](/blob/<did>/<cid>), the path lichen serves it from. Listing the ref here keeps the blob alive in the PDS.",
        "items": {
          "accept": [
            "image/jpeg",
            "image/png",
            "image/gif",
            "image/webp"
          ],
          "maxSize": 2097152,
          "type": "blob"
        },
        "type": "array"
      },
      "createdAt": {
        "description": "When this revision was created.",
        "format": "datetime",
        "type": "string"
      },
      "diff": {
        "description": "The revision payload. With \"diff-match-patch\" it is a patch against parentRevision. With \"full-text\" it is the note's whole new body, and it is only accepted when parentRevision is the current head.",
        "maxLength": 1000000,
        "type": "string"
      },
      "diffFormat": {
        "description": "How to read the diff field. \"diff-match-patch\" means a patch against parentRevision. \"full-text\" means the whole note body.",
        "knownValues": [
          "diff-match-patch",
          "full-text"
        ],
        "maxLength": 32,
        "type": "string"
      },
      "message": {
        "description": "Optional commit message describing this revision.",
        "maxGraphemes": 1024,
        "maxLength": 10240,
        "type": "string"
      },
      "noteRef": {
        "description": "AT-URI of the parent note record.",
        "format": "at-uri",
        "type": "string"
      },
      "parentRevision": {
        "description": "AT-URI of the previous revision. Omitted for the first revision of a note.",
        "format": "at-uri",
        "type": "string"
      }
    },
    "required": [
      "noteRef",
      "diff",
      "diffFormat",
      "createdAt"
    ],
    "type": "object"
  },
  "type": "record"
}

Lexicon Garden

@