{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cloudbrowser-tv/json-schema/cloudbrowser-tv-live-view-grant-schema.json",
  "title": "LiveViewGrant",
  "x-generated": "2026-11-02",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cloudbrowser-tv-openapi.json#/components/schemas/LiveViewGrant",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "id": {
      "type": "string"
    },
    "browserId": {
      "type": "string"
    },
    "audience": {
      "const": "live-view"
    },
    "mode": {
      "type": "string",
      "enum": [
        "share",
        "one-time"
      ]
    },
    "permission": {
      "type": "string",
      "enum": [
        "view",
        "control"
      ],
      "default": "view",
      "description": "view is read-only: stream only, no mouse, keyboard, touch, clipboard writes, uploads, navigation commands or browser control. control allows browser interaction but no workspace, lifecycle or CDP administration. Enforced by the gateway, not just UI."
    },
    "expiresAt": {
      "type": [
        "string",
        "null"
      ],
      "description": "Null for permanent links. Legacy revoked links may retain their former deadline."
    },
    "ticketTtlSeconds": {
      "type": "integer"
    },
    "entryExpiresAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "Direct one-time URL only; null for reusable shares."
    },
    "autoRenew": {
      "type": "boolean",
      "deprecated": true,
      "description": "Legacy field. No link renewal is needed; viewer credentials refresh internally."
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "lastOpenedAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "activeSessions": {
      "type": "integer",
      "minimum": 0,
      "description": "Current authorized viewer sessions, not connected socket count."
    },
    "revision": {
      "type": "integer",
      "minimum": 1
    },
    "status": {
      "type": "string",
      "enum": [
        "active",
        "expired",
        "revoked",
        "used"
      ]
    },
    "revoked": {
      "type": "boolean"
    },
    "name": {
      "type": "string"
    },
    "lastUsedAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "visitors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "accountId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "avatarUrl": {
            "type": [
              "string",
              "null"
            ]
          },
          "lastUsedAt": {
            "type": "string",
            "format": "date-time"
          },
          "online": {
            "type": "boolean"
          }
        }
      }
    },
    "hasSecret": {
      "type": "boolean",
      "description": "Owner metadata: whether repeat-copy is available. The secret is never returned by list endpoints."
    }
  },
  "required": [
    "id",
    "browserId",
    "audience",
    "mode",
    "permission",
    "expiresAt",
    "ticketTtlSeconds",
    "entryExpiresAt",
    "autoRenew",
    "createdAt",
    "lastOpenedAt",
    "activeSessions",
    "revision",
    "status",
    "revoked"
  ]
}