{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "input": {
      "type": "string",
      "minLength": 1,
      "pattern": "\\.[xX][lL][sS][xX]$",
      "x-tiwater-file-role": "read", "x-tiwater-document-revision-role": "current"
    },
    "output": {
      "type": "string",
      "minLength": 1,
      "pattern": "\\.[xX][lL][sS][xX]$",
      "description": "Output document path; may equal input for an atomic in-place update.",
      "x-tiwater-file-role": "write"
    },
    "receiptOutput": {
      "type": "string",
      "minLength": 1,
      "description": "New JSON receipt path. Existing files are never overwritten.",
      "x-tiwater-file-role": "write",
      "x-tiwater-file-effect": false
    },
    "changes": {
      "minItems": 1,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "sheet": {
            "type": "string",
            "minLength": 1
          },
          "fitToPagesWide": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "fitToPagesTall": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "orientation": {
            "type": "string",
            "enum": [
              "portrait",
              "landscape"
            ]
          },
          "paperSize": {
            "type": "string",
            "enum": [
              "letter",
              "legal",
              "a3",
              "a4"
            ]
          },
          "repeatRowsStart": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "repeatRowsEnd": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "repeatColsStart": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "repeatColsEnd": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "sheet"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "input",
    "output",
    "receiptOutput",
    "changes"
  ],
  "additionalProperties": false
}
