{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$defs": {
    "TableAddress": {
      "type": "object",
      "properties": {
        "kind": {
          "const": "block"
        },
        "nodeType": {
          "const": "table"
        },
        "nodeId": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "required": [
        "kind",
        "nodeType",
        "nodeId"
      ]
    },
    "TableCellAddress": {
      "type": "object",
      "properties": {
        "kind": {
          "const": "block"
        },
        "nodeType": {
          "const": "tableCell"
        },
        "nodeId": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "required": [
        "kind",
        "nodeType",
        "nodeId"
      ]
    }
  },
  "operationId": "tables.getCells",
  "schemas": {
    "input": {
      "type": "object",
      "properties": {
        "target": {
          "$ref": "#/$defs/TableAddress"
        },
        "nodeId": {
          "type": "string"
        },
        "rowIndex": {
          "type": "integer",
          "minimum": 0
        },
        "columnIndex": {
          "type": "integer",
          "minimum": 0
        }
      },
      "additionalProperties": false,
      "oneOf": [
        {
          "required": [
            "target"
          ]
        },
        {
          "required": [
            "nodeId"
          ]
        }
      ]
    },
    "output": {
      "type": "object",
      "properties": {
        "nodeId": {
          "type": "string"
        },
        "address": {
          "$ref": "#/$defs/TableAddress"
        },
        "cells": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "nodeId": {
                "type": "string"
              },
              "address": {
                "$ref": "#/$defs/TableCellAddress"
              },
              "rowIndex": {
                "type": "integer",
                "minimum": 0
              },
              "columnIndex": {
                "type": "integer",
                "minimum": 0
              },
              "colspan": {
                "type": "integer",
                "minimum": 1
              },
              "rowspan": {
                "type": "integer",
                "minimum": 1
              }
            },
            "additionalProperties": false,
            "required": [
              "nodeId",
              "address",
              "rowIndex",
              "columnIndex",
              "colspan",
              "rowspan"
            ]
          }
        }
      },
      "additionalProperties": false,
      "required": [
        "nodeId",
        "address",
        "cells"
      ]
    }
  }
}
