{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/complyonsite-com/json-schema/complyonsite-com-dwt-improved-schema.json",
  "title": "DwtImproved",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/complyonsite-com-openapi.yml#/components/schemas/DwtImproved",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "status",
    "workbookBase64",
    "movementCount",
    "itemCount",
    "repairs",
    "blockers",
    "warnings"
  ],
  "properties": {
    "status": {
      "const": "improved"
    },
    "workbookBase64": {
      "type": "string",
      "contentEncoding": "base64"
    },
    "movementCount": {
      "type": "integer",
      "minimum": 0
    },
    "itemCount": {
      "type": "integer",
      "minimum": 0
    },
    "repairs": {
      "type": "array",
      "minItems": 1,
      "items": {
        "$ref": "#/$defs/DwtWireRepair"
      }
    },
    "blockers": {
      "type": "array",
      "minItems": 1,
      "items": {
        "$ref": "#/$defs/DwtWireFinding"
      }
    },
    "warnings": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/DwtWireFinding"
      }
    }
  },
  "$defs": {
    "DwtWireFinding": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "code",
        "kind",
        "row",
        "cell"
      ],
      "properties": {
        "code": {
          "type": "string"
        },
        "kind": {
          "type": "string",
          "enum": [
            "movement",
            "item"
          ]
        },
        "row": {
          "type": "integer",
          "minimum": 1
        },
        "cell": {
          "type": "string"
        },
        "movementReference": {
          "type": "string"
        }
      }
    },
    "DwtWireRepair": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "kind",
        "row",
        "cell",
        "oldValue",
        "newValue"
      ],
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "movement",
            "item"
          ]
        },
        "row": {
          "type": "integer",
          "minimum": 1
        },
        "cell": {
          "type": "string"
        },
        "oldValue": {
          "type": "string"
        },
        "newValue": {
          "type": "string"
        }
      }
    }
  }
}