{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/brixsignage-com/json-schema/brixsignage-com-layout-schema.json",
  "title": "Layout",
  "description": "A multi-zone layout a screen can show.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/brixsignage-com-layouts-api-openapi.yml#/components/schemas/Layout",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Layout id."
    },
    "spaceId": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "resolution": {
      "type": "object",
      "properties": {
        "w": {
          "type": "number"
        },
        "h": {
          "type": "number"
        }
      },
      "required": [
        "w",
        "h"
      ],
      "description": "Design canvas size in pixels."
    },
    "zones": {
      "type": "array",
      "items": {
        "type": "object",
        "propertyNames": {
          "type": "string"
        },
        "additionalProperties": {}
      },
      "description": "Zones: geometry, bound content, frame, radius and role. `GET /v1/layouts/{id}/zones` returns the same list."
    },
    "autoFullscreenForVideo": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ]
    },
    "approvalState": {
      "type": "string",
      "enum": [
        "draft",
        "pending",
        "approved",
        "rejected"
      ],
      "description": "Review state. Editing an approved row returns it to `draft`."
    },
    "approvedSnapshot": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "JSON TEXT of the last approved version (not parsed)."
    },
    "nodeId": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "importSourceId": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "theme": {
      "anyOf": [
        {},
        {
          "type": "null"
        }
      ],
      "description": "Brand Kit look (`{ source: \"brand\", mode?, radius? }`), or null for a bare canvas."
    },
    "createdAt": {
      "type": "string",
      "description": "ISO-8601 timestamp (UTC)."
    },
    "updatedAt": {
      "type": "string",
      "description": "ISO-8601 timestamp (UTC)."
    },
    "deletedAt": {
      "anyOf": [
        {
          "type": "string",
          "description": "ISO-8601 timestamp (UTC)."
        },
        {
          "type": "null"
        }
      ],
      "description": "Always null on these reads: deleted rows are not listed."
    },
    "usedByScreenCount": {
      "type": "integer",
      "description": "Screens showing this layout now, directly or through a playlist or schedule."
    }
  },
  "required": [
    "id",
    "spaceId",
    "name",
    "resolution",
    "zones",
    "autoFullscreenForVideo",
    "approvalState",
    "approvedSnapshot",
    "nodeId",
    "importSourceId",
    "theme",
    "createdAt",
    "updatedAt",
    "deletedAt",
    "usedByScreenCount"
  ]
}