{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/hummingdeck/main/json-schema/hummingdeck-document-view-schema.json",
  "title": "DocumentView",
  "x-generated": "2026-10-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/hummingdeck-openapi.json#/components/schemas/DocumentView",
  "type": "object",
  "properties": {
    "viewId": {
      "type": "string",
      "description": "Unique identifier for this view session"
    },
    "shareSlug": {
      "type": "string",
      "description": "Slug of the share link that was viewed"
    },
    "viewerEmail": {
      "type": "string",
      "description": "Email of the viewer (from personal link or email gate). Empty string if unknown."
    },
    "viewerName": {
      "type": "string",
      "description": "Name of the viewer (from personal link). Empty string if unknown."
    },
    "companyName": {
      "type": "string",
      "description": "Company name associated with the share link. Empty string if unknown."
    },
    "deckTitle": {
      "type": "string",
      "description": "Title of the document that was viewed"
    },
    "device": {
      "type": "string",
      "description": "Device type of the viewer. \"-\" when the device was not recorded.",
      "enum": [
        "desktop",
        "mobile",
        "tablet",
        "-"
      ]
    },
    "location": {
      "type": "string",
      "description": "Geographic location of the viewer (city, country)"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time",
      "description": "Timestamp when the view occurred (ISO 8601)"
    }
  },
  "required": [
    "viewId",
    "shareSlug",
    "viewerEmail",
    "viewerName",
    "companyName",
    "deckTitle",
    "device",
    "location",
    "createdAt"
  ]
}