{
  "x-generated": "2026-11-04T17:31:15Z",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://seraphixsystems.com/data/schema/states-grid.schema.json",
  "title": "State record grid (gated)",
  "type": "object",
  "required": [
    "built",
    "states"
  ],
  "properties": {
    "built": {
      "type": "string"
    },
    "pilot": {
      "type": "string"
    },
    "license": {
      "type": "string"
    },
    "legend": {
      "type": "object"
    },
    "states": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "state",
          "monitored",
          "strokes"
        ],
        "properties": {
          "state": {
            "type": "string",
            "pattern": "^[A-Z]{2}$"
          },
          "monitored": {
            "type": "boolean"
          },
          "grid_region": {
            "type": [
              "string",
              "null"
            ]
          },
          "enacted": {
            "type": "integer"
          },
          "stated": {
            "type": "integer"
          },
          "located_sites": {
            "type": "integer"
          },
          "companies": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "record_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "strokes": {
            "type": "array",
            "items": {
              "enum": [
                0,
                45,
                90
              ]
            },
            "description": "0 monitored (horizontal), 45 stated (diagonal), 90 enacted (vertical); empty and monitored=false = dotted square"
          }
        }
      }
    }
  }
}
