blog.brookie.vault.document

brookie.blog

Documentation

A document in a vault. The record key is the document's permanent identity; the path is a mutable field, which is what makes a rename a one-field update rather than a delete and recreate.

main record

A document in a vault. The record key is the document's permanent identity; the path is a mutable field, which is what makes a rename a one-field update rather than a delete and recreate.

Record Key tid Timestamp-based ID

Properties

content string Optional

Document body, inlined when small enough. Exactly one of content or contentBlob is present.

maxLength: 65536 bytes
contentBlob blob Optional

Document body as bytes: an attachment (image, audio, PDF), or a text document too large to inline.

contentType string Required

Usually text/markdown.

createdAt string datetime Required

An RFC 3339 formatted timestamp.

path string Required

Logical path, e.g. 'Books/The Dispossessed.md'. Looks like a file path but is not one: folder hierarchy is a projection of these strings, not a protocol concept.

maxLength: 2048 bytes
updatedAt string datetime Required

An RFC 3339 formatted timestamp.

View raw schema
{
  "key": "tid",
  "type": "record",
  "record": {
    "type": "object",
    "required": [
      "path",
      "contentType",
      "createdAt",
      "updatedAt"
    ],
    "properties": {
      "path": {
        "type": "string",
        "maxLength": 2048,
        "description": "Logical path, e.g. 'Books/The Dispossessed.md'. Looks like a file path but is not one: folder hierarchy is a projection of these strings, not a protocol concept."
      },
      "content": {
        "type": "string",
        "maxLength": 65536,
        "description": "Document body, inlined when small enough. Exactly one of content or contentBlob is present."
      },
      "createdAt": {
        "type": "string",
        "format": "datetime"
      },
      "updatedAt": {
        "type": "string",
        "format": "datetime"
      },
      "contentBlob": {
        "type": "blob",
        "accept": [
          "*/*"
        ],
        "description": "Document body as bytes: an attachment (image, audio, PDF), or a text document too large to inline."
      },
      "contentType": {
        "type": "string",
        "description": "Usually text/markdown."
      }
    }
  },
  "description": "A document in a vault. The record key is the document's permanent identity; the path is a mutable field, which is what makes a rename a one-field update rather than a delete and recreate."
}

Lexicon Garden

@