{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "version": {
      "type": "number",
      "const": 1
    },
    "kind": {
      "type": "string",
      "enum": [
        "table",
        "rack"
      ],
      "description": "Four upright posts supporting one or more rectangular frame levels."
    },
    "widthMm": {
      "type": "integer",
      "minimum": 188,
      "maximum": 3088,
      "description": "Outside width of the posts, in mm."
    },
    "depthMm": {
      "type": "integer",
      "minimum": 188,
      "maximum": 3088,
      "description": "Outside depth of the posts, in mm."
    },
    "heightMm": {
      "type": "integer",
      "minimum": 106,
      "maximum": 3006,
      "description": "Overall height including end caps, in mm."
    },
    "levels": {
      "type": "integer",
      "minimum": 1,
      "maximum": 12
    },
    "levelCentersMm": {
      "description": "Horizontal frame center heights from the floor, in strictly ascending order, one per level.",
      "minItems": 1,
      "maxItems": 12,
      "type": "array",
      "items": {
        "type": "number",
        "minimum": 33,
        "maximum": 3006
      }
    },
    "finish": {
      "type": "string",
      "enum": [
        "silver",
        "black"
      ]
    },
    "board": {
      "description": "External wood (15 mm by default), no boards, or an official panel catalog ID.",
      "type": "string",
      "enum": [
        "wood",
        "none",
        "panel-aluminum-silver-3",
        "panel-aluminum-black-3",
        "panel-steel-white-3",
        "panel-pet-clear-3",
        "panel-pet-clear-5",
        "panel-polycarbonate-clear-3",
        "panel-polycarbonate-clear-5"
      ]
    },
    "woodThicknessMm": {
      "description": "Thickness of external wood boards in mm. Only valid with wood or when board is omitted. Default: 15.",
      "type": "number",
      "minimum": 1,
      "maximum": 100
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "plannedItems": {
      "description": "Unplaced catalog items, kept out of the assembly subtotal.",
      "maxItems": 1000,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "itemNo": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "quantity": {
            "type": "integer",
            "minimum": 1,
            "maximum": 999
          }
        },
        "required": [
          "itemNo",
          "quantity"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "version",
    "kind",
    "widthMm",
    "depthMm",
    "heightMm",
    "levels"
  ],
  "additionalProperties": false
}
