{
  "$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"
      ]
    }
  },
  "operationId": "tables.getProperties",
  "schemas": {
    "input": {
      "type": "object",
      "properties": {
        "target": {
          "$ref": "#/$defs/TableAddress"
        },
        "nodeId": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "oneOf": [
        {
          "required": [
            "target"
          ]
        },
        {
          "required": [
            "nodeId"
          ]
        }
      ]
    },
    "output": {
      "type": "object",
      "properties": {
        "nodeId": {
          "type": "string"
        },
        "address": {
          "$ref": "#/$defs/TableAddress"
        },
        "styleId": {
          "type": "string"
        },
        "alignment": {
          "enum": [
            "left",
            "center",
            "right"
          ]
        },
        "direction": {
          "enum": [
            "ltr",
            "rtl"
          ]
        },
        "preferredWidth": {
          "type": "number"
        },
        "preferredWidthType": {
          "enum": [
            "dxa",
            "auto",
            "pct"
          ]
        },
        "autoFitMode": {
          "enum": [
            "fixedWidth",
            "fitContents",
            "fitWindow"
          ]
        },
        "styleOptions": {
          "type": "object",
          "properties": {
            "headerRow": {
              "type": "boolean"
            },
            "lastRow": {
              "type": "boolean"
            },
            "firstColumn": {
              "type": "boolean"
            },
            "lastColumn": {
              "type": "boolean"
            },
            "bandedRows": {
              "type": "boolean"
            },
            "bandedColumns": {
              "type": "boolean"
            }
          },
          "additionalProperties": false
        },
        "borders": {
          "type": "object",
          "properties": {
            "top": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "lineStyle": {
                      "type": "string"
                    },
                    "lineWeightPt": {
                      "type": "number",
                      "exclusiveMinimum": 0
                    },
                    "color": {
                      "type": "string",
                      "pattern": "^(#?([0-9A-Fa-f]{6}|[0-9A-Fa-f]{3})|auto)$"
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "lineStyle",
                    "lineWeightPt",
                    "color"
                  ]
                },
                {
                  "type": "null"
                }
              ]
            },
            "bottom": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "lineStyle": {
                      "type": "string"
                    },
                    "lineWeightPt": {
                      "type": "number",
                      "exclusiveMinimum": 0
                    },
                    "color": {
                      "type": "string",
                      "pattern": "^(#?([0-9A-Fa-f]{6}|[0-9A-Fa-f]{3})|auto)$"
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "lineStyle",
                    "lineWeightPt",
                    "color"
                  ]
                },
                {
                  "type": "null"
                }
              ]
            },
            "left": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "lineStyle": {
                      "type": "string"
                    },
                    "lineWeightPt": {
                      "type": "number",
                      "exclusiveMinimum": 0
                    },
                    "color": {
                      "type": "string",
                      "pattern": "^(#?([0-9A-Fa-f]{6}|[0-9A-Fa-f]{3})|auto)$"
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "lineStyle",
                    "lineWeightPt",
                    "color"
                  ]
                },
                {
                  "type": "null"
                }
              ]
            },
            "right": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "lineStyle": {
                      "type": "string"
                    },
                    "lineWeightPt": {
                      "type": "number",
                      "exclusiveMinimum": 0
                    },
                    "color": {
                      "type": "string",
                      "pattern": "^(#?([0-9A-Fa-f]{6}|[0-9A-Fa-f]{3})|auto)$"
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "lineStyle",
                    "lineWeightPt",
                    "color"
                  ]
                },
                {
                  "type": "null"
                }
              ]
            },
            "insideH": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "lineStyle": {
                      "type": "string"
                    },
                    "lineWeightPt": {
                      "type": "number",
                      "exclusiveMinimum": 0
                    },
                    "color": {
                      "type": "string",
                      "pattern": "^(#?([0-9A-Fa-f]{6}|[0-9A-Fa-f]{3})|auto)$"
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "lineStyle",
                    "lineWeightPt",
                    "color"
                  ]
                },
                {
                  "type": "null"
                }
              ]
            },
            "insideV": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "lineStyle": {
                      "type": "string"
                    },
                    "lineWeightPt": {
                      "type": "number",
                      "exclusiveMinimum": 0
                    },
                    "color": {
                      "type": "string",
                      "pattern": "^(#?([0-9A-Fa-f]{6}|[0-9A-Fa-f]{3})|auto)$"
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "lineStyle",
                    "lineWeightPt",
                    "color"
                  ]
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "additionalProperties": false
        },
        "defaultCellMargins": {
          "type": "object",
          "properties": {
            "topPt": {
              "type": "number"
            },
            "rightPt": {
              "type": "number"
            },
            "bottomPt": {
              "type": "number"
            },
            "leftPt": {
              "type": "number"
            }
          },
          "additionalProperties": false
        },
        "cellSpacingPt": {
          "type": "number"
        }
      },
      "additionalProperties": false,
      "required": [
        "nodeId",
        "address"
      ]
    }
  }
}
