{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/hummingdeck/json-schema/hummingdeck-document-schema.json",
  "title": "Document",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/hummingdeck-decks-api-openapi.yml#/components/schemas/Document",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Unique identifier for the document"
    },
    "title": {
      "type": "string",
      "description": "Document title"
    },
    "fileType": {
      "type": "string",
      "description": "MIME type of the document"
    },
    "deliveryMode": {
      "type": "string",
      "enum": [
        "preview",
        "download_only"
      ],
      "description": "download_only files are never previewed; recipients download them and open them on their device."
    },
    "pageCount": {
      "type": [
        "integer",
        "null"
      ],
      "description": "Number of pages when processing has determined it."
    },
    "thumbnailUrl": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri",
      "description": "Thumbnail image URL when one is available."
    },
    "processingStatus": {
      "type": "string",
      "enum": [
        "pending",
        "processing",
        "completed",
        "failed"
      ],
      "description": "Processing continues after upload. The document can go into a room right away; poll until completed before sending a link to it."
    },
    "processingErrorCode": {
      "type": [
        "string",
        "null"
      ],
      "description": "Why processing failed, when processingStatus is failed."
    },
    "createdAt": {
      "type": "string",
      "format": "date-time",
      "description": "Timestamp when the document was created."
    }
  },
  "required": [
    "id",
    "title",
    "fileType",
    "deliveryMode",
    "pageCount",
    "thumbnailUrl",
    "processingStatus",
    "processingErrorCode",
    "createdAt"
  ],
  "additionalProperties": false
}