{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/brixsignage-com/json-schema/brixsignage-com-schedule-block-schema.json",
  "title": "ScheduleBlock",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/brixsignage-com-schedules-api-openapi.yml#/components/schemas/ScheduleBlock",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Schedule block id."
    },
    "label": {
      "type": "string"
    },
    "daysOfWeek": {
      "type": "array",
      "items": {
        "type": "integer",
        "minimum": 0,
        "maximum": 6
      },
      "description": "0 = Sunday … 6 = Saturday. Empty = every day."
    },
    "startTime": {
      "type": "string",
      "description": "24-hour `HH:MM`."
    },
    "endTime": {
      "type": "string",
      "description": "24-hour `HH:MM`; `00:00` = midnight. An end before the start wraps overnight."
    },
    "priority": {
      "type": "integer",
      "description": "0–1000; higher wins where blocks overlap."
    },
    "startDate": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "`YYYY-MM-DD`, or null for no start bound."
    },
    "endDate": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "repeatEveryWeeks": {
      "type": "integer",
      "description": "1–52."
    },
    "refKind": {
      "type": "string",
      "enum": [
        "media",
        "playlist",
        "app",
        "layout",
        "creative",
        "signage"
      ]
    },
    "refId": {
      "type": "string"
    },
    "screensOff": {
      "type": "boolean",
      "description": "The block turns the screens off instead of playing `ref`."
    },
    "contentName": {
      "type": "string",
      "description": "Current name of the content, `Screens off`, or `(missing content)` when the ref no longer resolves."
    },
    "thumbnailUrl": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "position": {
      "type": "integer"
    }
  },
  "required": [
    "id",
    "label",
    "daysOfWeek",
    "startTime",
    "endTime",
    "priority",
    "startDate",
    "endDate",
    "repeatEveryWeeks",
    "refKind",
    "refId",
    "screensOff",
    "contentName",
    "thumbnailUrl",
    "position"
  ]
}