Skip to main content
Alpha: Document API is currently alpha and subject to breaking changes.

Summary

Dry-run a mutation plan, returning resolved targets without applying changes.
  • Operation ID: mutations.preview
  • API member path: editor.doc.mutations.preview(...)
  • Mutates document: no
  • Idempotency: idempotent
  • Supports tracked mode: no
  • Supports dry run: no
  • Deterministic target resolution: yes

Expected result

Returns a MutationsPreviewOutput with resolved targets and step details without applying changes.

Supported step operations

Use these values in steps[].op when authoring mutation plans.

Assert

Step op (steps[].op)DescriptionRelated API operation
assertAssert selector cardinality after mutation steps complete.

Text

Step op (steps[].op)DescriptionRelated API operation
text.rewriteRewrite matched text ranges with replacement content.replace
text.insertInsert text before or after a matched range.insert
text.deleteDelete matched text ranges.delete

Format

Step op (steps[].op)DescriptionRelated API operation
format.applyApply inline formatting patch changes to matched text ranges.format.apply

Create

Step op (steps[].op)DescriptionRelated API operation
create.paragraphCreate a paragraph adjacent to the matched block.create.paragraph
create.headingCreate a heading adjacent to the matched block.create.heading
create.tableCreate a table at the requested location.create.table

Tables

Step op (steps[].op)DescriptionRelated API operation
tables.deleteDelete the target table from the document.tables.delete
tables.clearContentsClear contents from a target table or cell range.tables.clearContents
tables.moveMove a table to a new position.tables.move
tables.splitSplit a table into two tables at a target row.tables.split
tables.convertFromTextConvert a text range into a table.tables.convertFromText
tables.convertToTextConvert a table to plain text.tables.convertToText
tables.setLayoutSet table layout mode.tables.setLayout
tables.insertRowInsert a row into the target table.tables.insertRow
tables.deleteRowDelete a row from the target table.tables.deleteRow
tables.setRowHeightSet row height in the target table.tables.setRowHeight
tables.distributeRowsDistribute row heights evenly.tables.distributeRows
tables.setRowOptionsSet row-level options (header repeat, page break, etc.).tables.setRowOptions
tables.insertColumnInsert a column into the target table.tables.insertColumn
tables.deleteColumnDelete a column from the target table.tables.deleteColumn
tables.setColumnWidthSet column width in the target table.tables.setColumnWidth
tables.distributeColumnsDistribute column widths evenly.tables.distributeColumns
tables.insertCellInsert a cell into a table row.tables.insertCell
tables.deleteCellDelete a cell from a table row.tables.deleteCell
tables.mergeCellsMerge a range of table cells.tables.mergeCells
tables.unmergeCellsUnmerge a merged table cell.tables.unmergeCells
tables.splitCellSplit a table cell into multiple cells.tables.splitCell
tables.setCellPropertiesSet properties on target table cells.tables.setCellProperties
tables.sortSort table rows by a column value.tables.sort
tables.setAltTextSet table alt text properties.tables.setAltText
tables.setStyleSet table style identifier.tables.setStyle
tables.clearStyleClear direct table style assignment.tables.clearStyle
tables.setStyleOptionSet table style option flags.tables.setStyleOption
tables.setBorderSet table border properties.tables.setBorder
tables.clearBorderClear table border properties.tables.clearBorder
tables.applyBorderPresetApply a border preset to a table.tables.applyBorderPreset
tables.setShadingSet table shading properties.tables.setShading
tables.clearShadingClear table shading properties.tables.clearShading
tables.setTablePaddingSet table-level cell padding.tables.setTablePadding
tables.setCellPaddingSet cell padding for target cells.tables.setCellPadding
tables.setCellSpacingSet table cell spacing.tables.setCellSpacing
tables.clearCellSpacingClear table cell spacing.tables.clearCellSpacing
The runtime capability snapshot also exposes this allowlist at planEngine.supportedStepOps.

Input fields

FieldTypeRequiredDescription
atomictrueyesConstant: true
changeModeenumyes"direct", "tracked"
expectedRevisionstringno
stepsobject(op=“text.rewrite”) \object(op=“text.insert”) \object(op=“text.delete”) \object(op=“format.apply”) \object(op=“assert”)[]yes

Example request

{
  "atomic": true,
  "changeMode": "direct",
  "expectedRevision": "rev-001",
  "steps": [
    {
      "args": {
        "replacement": {
          "text": "Hello, world."
        },
        "style": {
          "inline": {
            "mode": "preserve",
            "onNonUniform": "error",
            "requireUniform": true
          },
          "paragraph": {
            "mode": "preserve"
          }
        }
      },
      "id": "id-001",
      "op": "text.rewrite",
      "where": {
        "by": "select",
        "require": "first",
        "select": {
          "caseSensitive": true,
          "mode": "contains",
          "pattern": "hello world",
          "type": "text"
        },
        "within": {
          "kind": "block",
          "nodeId": "node-def456",
          "nodeType": "paragraph"
        }
      }
    }
  ]
}

Output fields

FieldTypeRequiredDescription
evaluatedRevisionstringyes
failuresobject[]no
stepsobject[]yes
validbooleanyes

Example response

{
  "evaluatedRevision": "rev-001",
  "failures": [
    {}
  ],
  "steps": [
    {}
  ],
  "valid": true
}

Pre-apply throws

  • REVISION_MISMATCH
  • MATCH_NOT_FOUND
  • AMBIGUOUS_MATCH
  • STYLE_CONFLICT
  • PRECONDITION_FAILED
  • INVALID_INPUT
  • CROSS_BLOCK_MATCH
  • SPAN_FRAGMENTED
  • TARGET_MOVED
  • PLAN_CONFLICT_OVERLAP
  • INVALID_STEP_COMBINATION
  • REVISION_CHANGED_SINCE_COMPILE
  • INVALID_INSERTION_CONTEXT
  • DOCUMENT_IDENTITY_CONFLICT
  • CAPABILITY_UNAVAILABLE

Non-applied failure codes

  • None

Raw schemas

{
  "additionalProperties": false,
  "properties": {
    "atomic": {
      "const": true,
      "type": "boolean"
    },
    "changeMode": {
      "enum": [
        "direct",
        "tracked"
      ]
    },
    "expectedRevision": {
      "type": "string"
    },
    "steps": {
      "items": {
        "oneOf": [
          {
            "additionalProperties": false,
            "properties": {
              "args": {
                "additionalProperties": false,
                "properties": {
                  "replacement": {
                    "oneOf": [
                      {
                        "additionalProperties": false,
                        "properties": {
                          "text": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "text"
                        ],
                        "type": "object"
                      },
                      {
                        "additionalProperties": false,
                        "properties": {
                          "blocks": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "text": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "text"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          }
                        },
                        "required": [
                          "blocks"
                        ],
                        "type": "object"
                      }
                    ]
                  },
                  "style": {
                    "additionalProperties": false,
                    "properties": {
                      "inline": {
                        "additionalProperties": false,
                        "properties": {
                          "mode": {
                            "enum": [
                              "preserve",
                              "set",
                              "clear",
                              "merge"
                            ],
                            "type": "string"
                          },
                          "onNonUniform": {
                            "enum": [
                              "error",
                              "useLeadingRun",
                              "majority",
                              "union"
                            ]
                          },
                          "requireUniform": {
                            "type": "boolean"
                          },
                          "setMarks": {
                            "additionalProperties": false,
                            "properties": {
                              "bold": {
                                "enum": [
                                  "on",
                                  "off",
                                  "clear"
                                ]
                              },
                              "italic": {
                                "enum": [
                                  "on",
                                  "off",
                                  "clear"
                                ]
                              },
                              "strike": {
                                "enum": [
                                  "on",
                                  "off",
                                  "clear"
                                ]
                              },
                              "underline": {
                                "enum": [
                                  "on",
                                  "off",
                                  "clear"
                                ]
                              }
                            },
                            "type": "object"
                          }
                        },
                        "required": [
                          "mode"
                        ],
                        "type": "object"
                      },
                      "paragraph": {
                        "additionalProperties": false,
                        "properties": {
                          "mode": {
                            "enum": [
                              "preserve",
                              "set",
                              "clear"
                            ],
                            "type": "string"
                          }
                        },
                        "required": [
                          "mode"
                        ],
                        "type": "object"
                      }
                    },
                    "required": [
                      "inline"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "replacement"
                ],
                "type": "object"
              },
              "id": {
                "type": "string"
              },
              "op": {
                "const": "text.rewrite",
                "type": "string"
              },
              "where": {
                "oneOf": [
                  {
                    "additionalProperties": false,
                    "properties": {
                      "by": {
                        "const": "select",
                        "type": "string"
                      },
                      "require": {
                        "enum": [
                          "first",
                          "exactlyOne",
                          "all"
                        ]
                      },
                      "select": {
                        "oneOf": [
                          {
                            "additionalProperties": false,
                            "properties": {
                              "caseSensitive": {
                                "type": "boolean"
                              },
                              "mode": {
                                "enum": [
                                  "contains",
                                  "regex"
                                ]
                              },
                              "pattern": {
                                "type": "string"
                              },
                              "type": {
                                "const": "text"
                              }
                            },
                            "required": [
                              "type",
                              "pattern"
                            ],
                            "type": "object"
                          },
                          {
                            "additionalProperties": false,
                            "properties": {
                              "kind": {
                                "enum": [
                                  "block",
                                  "inline"
                                ]
                              },
                              "nodeType": {
                                "enum": [
                                  "paragraph",
                                  "heading",
                                  "listItem",
                                  "table",
                                  "tableRow",
                                  "tableCell",
                                  "tableOfContents",
                                  "image",
                                  "sdt",
                                  "run",
                                  "bookmark",
                                  "comment",
                                  "hyperlink",
                                  "footnoteRef",
                                  "endnoteRef",
                                  "crossRef",
                                  "indexEntry",
                                  "citation",
                                  "authorityEntry",
                                  "sequenceField",
                                  "tab",
                                  "lineBreak"
                                ]
                              },
                              "type": {
                                "const": "node"
                              }
                            },
                            "required": [
                              "type"
                            ],
                            "type": "object"
                          }
                        ]
                      },
                      "within": {
                        "$ref": "#/$defs/NodeAddress"
                      }
                    },
                    "required": [
                      "by",
                      "select",
                      "require"
                    ],
                    "type": "object"
                  },
                  {
                    "additionalProperties": false,
                    "properties": {
                      "by": {
                        "const": "ref",
                        "type": "string"
                      },
                      "ref": {
                        "type": "string"
                      },
                      "within": {
                        "$ref": "#/$defs/NodeAddress"
                      }
                    },
                    "required": [
                      "by",
                      "ref"
                    ],
                    "type": "object"
                  }
                ]
              }
            },
            "required": [
              "id",
              "op",
              "where",
              "args"
            ],
            "type": "object"
          },
          {
            "additionalProperties": false,
            "properties": {
              "args": {
                "additionalProperties": false,
                "properties": {
                  "content": {
                    "additionalProperties": false,
                    "properties": {
                      "text": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "text"
                    ],
                    "type": "object"
                  },
                  "position": {
                    "enum": [
                      "before",
                      "after"
                    ]
                  },
                  "style": {
                    "additionalProperties": false,
                    "properties": {
                      "inline": {
                        "additionalProperties": false,
                        "properties": {
                          "mode": {
                            "enum": [
                              "inherit",
                              "set",
                              "clear"
                            ],
                            "type": "string"
                          },
                          "setMarks": {
                            "additionalProperties": false,
                            "properties": {
                              "bold": {
                                "enum": [
                                  "on",
                                  "off",
                                  "clear"
                                ]
                              },
                              "italic": {
                                "enum": [
                                  "on",
                                  "off",
                                  "clear"
                                ]
                              },
                              "strike": {
                                "enum": [
                                  "on",
                                  "off",
                                  "clear"
                                ]
                              },
                              "underline": {
                                "enum": [
                                  "on",
                                  "off",
                                  "clear"
                                ]
                              }
                            },
                            "type": "object"
                          }
                        },
                        "required": [
                          "mode"
                        ],
                        "type": "object"
                      }
                    },
                    "required": [
                      "inline"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "position",
                  "content"
                ],
                "type": "object"
              },
              "id": {
                "type": "string"
              },
              "op": {
                "const": "text.insert",
                "type": "string"
              },
              "where": {
                "additionalProperties": false,
                "properties": {
                  "by": {
                    "const": "select",
                    "type": "string"
                  },
                  "require": {
                    "enum": [
                      "first",
                      "exactlyOne"
                    ]
                  },
                  "select": {
                    "oneOf": [
                      {
                        "additionalProperties": false,
                        "properties": {
                          "caseSensitive": {
                            "type": "boolean"
                          },
                          "mode": {
                            "enum": [
                              "contains",
                              "regex"
                            ]
                          },
                          "pattern": {
                            "type": "string"
                          },
                          "type": {
                            "const": "text"
                          }
                        },
                        "required": [
                          "type",
                          "pattern"
                        ],
                        "type": "object"
                      },
                      {
                        "additionalProperties": false,
                        "properties": {
                          "kind": {
                            "enum": [
                              "block",
                              "inline"
                            ]
                          },
                          "nodeType": {
                            "enum": [
                              "paragraph",
                              "heading",
                              "listItem",
                              "table",
                              "tableRow",
                              "tableCell",
                              "tableOfContents",
                              "image",
                              "sdt",
                              "run",
                              "bookmark",
                              "comment",
                              "hyperlink",
                              "footnoteRef",
                              "endnoteRef",
                              "crossRef",
                              "indexEntry",
                              "citation",
                              "authorityEntry",
                              "sequenceField",
                              "tab",
                              "lineBreak"
                            ]
                          },
                          "type": {
                            "const": "node"
                          }
                        },
                        "required": [
                          "type"
                        ],
                        "type": "object"
                      }
                    ]
                  },
                  "within": {
                    "$ref": "#/$defs/NodeAddress"
                  }
                },
                "required": [
                  "by",
                  "select",
                  "require"
                ],
                "type": "object"
              }
            },
            "required": [
              "id",
              "op",
              "where",
              "args"
            ],
            "type": "object"
          },
          {
            "additionalProperties": false,
            "properties": {
              "args": {
                "additionalProperties": false,
                "properties": {},
                "type": "object"
              },
              "id": {
                "type": "string"
              },
              "op": {
                "const": "text.delete",
                "type": "string"
              },
              "where": {
                "oneOf": [
                  {
                    "additionalProperties": false,
                    "properties": {
                      "by": {
                        "const": "select",
                        "type": "string"
                      },
                      "require": {
                        "enum": [
                          "first",
                          "exactlyOne",
                          "all"
                        ]
                      },
                      "select": {
                        "oneOf": [
                          {
                            "additionalProperties": false,
                            "properties": {
                              "caseSensitive": {
                                "type": "boolean"
                              },
                              "mode": {
                                "enum": [
                                  "contains",
                                  "regex"
                                ]
                              },
                              "pattern": {
                                "type": "string"
                              },
                              "type": {
                                "const": "text"
                              }
                            },
                            "required": [
                              "type",
                              "pattern"
                            ],
                            "type": "object"
                          },
                          {
                            "additionalProperties": false,
                            "properties": {
                              "kind": {
                                "enum": [
                                  "block",
                                  "inline"
                                ]
                              },
                              "nodeType": {
                                "enum": [
                                  "paragraph",
                                  "heading",
                                  "listItem",
                                  "table",
                                  "tableRow",
                                  "tableCell",
                                  "tableOfContents",
                                  "image",
                                  "sdt",
                                  "run",
                                  "bookmark",
                                  "comment",
                                  "hyperlink",
                                  "footnoteRef",
                                  "endnoteRef",
                                  "crossRef",
                                  "indexEntry",
                                  "citation",
                                  "authorityEntry",
                                  "sequenceField",
                                  "tab",
                                  "lineBreak"
                                ]
                              },
                              "type": {
                                "const": "node"
                              }
                            },
                            "required": [
                              "type"
                            ],
                            "type": "object"
                          }
                        ]
                      },
                      "within": {
                        "$ref": "#/$defs/NodeAddress"
                      }
                    },
                    "required": [
                      "by",
                      "select",
                      "require"
                    ],
                    "type": "object"
                  },
                  {
                    "additionalProperties": false,
                    "properties": {
                      "by": {
                        "const": "ref",
                        "type": "string"
                      },
                      "ref": {
                        "type": "string"
                      },
                      "within": {
                        "$ref": "#/$defs/NodeAddress"
                      }
                    },
                    "required": [
                      "by",
                      "ref"
                    ],
                    "type": "object"
                  }
                ]
              }
            },
            "required": [
              "id",
              "op",
              "where",
              "args"
            ],
            "type": "object"
          },
          {
            "additionalProperties": false,
            "properties": {
              "args": {
                "additionalProperties": false,
                "properties": {
                  "inline": {
                    "additionalProperties": false,
                    "minProperties": 1,
                    "properties": {
                      "bCs": {
                        "oneOf": [
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "bold": {
                        "oneOf": [
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "border": {
                        "oneOf": [
                          {
                            "additionalProperties": false,
                            "minProperties": 1,
                            "properties": {
                              "color": {
                                "oneOf": [
                                  {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "space": {
                                "oneOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "sz": {
                                "oneOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "val": {
                                "oneOf": [
                                  {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "type": "object"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "caps": {
                        "oneOf": [
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "charScale": {
                        "oneOf": [
                          {
                            "type": "number"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "color": {
                        "oneOf": [
                          {
                            "minLength": 1,
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "contextualAlternates": {
                        "oneOf": [
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "cs": {
                        "oneOf": [
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "dstrike": {
                        "oneOf": [
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "eastAsianLayout": {
                        "oneOf": [
                          {
                            "additionalProperties": false,
                            "minProperties": 1,
                            "properties": {
                              "combine": {
                                "oneOf": [
                                  {
                                    "type": "boolean"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "combineBrackets": {
                                "oneOf": [
                                  {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "id": {
                                "oneOf": [
                                  {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "vert": {
                                "oneOf": [
                                  {
                                    "type": "boolean"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "vertCompress": {
                                "oneOf": [
                                  {
                                    "type": "boolean"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "type": "object"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "em": {
                        "oneOf": [
                          {
                            "minLength": 1,
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "emboss": {
                        "oneOf": [
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "fitText": {
                        "oneOf": [
                          {
                            "additionalProperties": false,
                            "minProperties": 1,
                            "properties": {
                              "id": {
                                "oneOf": [
                                  {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "val": {
                                "oneOf": [
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "type": "object"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "fontFamily": {
                        "oneOf": [
                          {
                            "minLength": 1,
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "fontSize": {
                        "oneOf": [
                          {
                            "type": "number"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "fontSizeCs": {
                        "oneOf": [
                          {
                            "type": "number"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "highlight": {
                        "oneOf": [
                          {
                            "minLength": 1,
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "iCs": {
                        "oneOf": [
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "imprint": {
                        "oneOf": [
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "italic": {
                        "oneOf": [
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "kerning": {
                        "oneOf": [
                          {
                            "type": "number"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "lang": {
                        "oneOf": [
                          {
                            "additionalProperties": false,
                            "minProperties": 1,
                            "properties": {
                              "bidi": {
                                "oneOf": [
                                  {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "eastAsia": {
                                "oneOf": [
                                  {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "val": {
                                "oneOf": [
                                  {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "type": "object"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "letterSpacing": {
                        "oneOf": [
                          {
                            "type": "number"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "ligatures": {
                        "oneOf": [
                          {
                            "minLength": 1,
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "numForm": {
                        "oneOf": [
                          {
                            "minLength": 1,
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "numSpacing": {
                        "oneOf": [
                          {
                            "minLength": 1,
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "oMath": {
                        "oneOf": [
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "outline": {
                        "oneOf": [
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "position": {
                        "oneOf": [
                          {
                            "type": "number"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "rFonts": {
                        "oneOf": [
                          {
                            "additionalProperties": false,
                            "minProperties": 1,
                            "properties": {
                              "ascii": {
                                "oneOf": [
                                  {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "asciiTheme": {
                                "oneOf": [
                                  {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "cs": {
                                "oneOf": [
                                  {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "csTheme": {
                                "oneOf": [
                                  {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "eastAsia": {
                                "oneOf": [
                                  {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "eastAsiaTheme": {
                                "oneOf": [
                                  {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "hAnsi": {
                                "oneOf": [
                                  {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "hAnsiTheme": {
                                "oneOf": [
                                  {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "hint": {
                                "oneOf": [
                                  {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "type": "object"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "rStyle": {
                        "oneOf": [
                          {
                            "minLength": 1,
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "rtl": {
                        "oneOf": [
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "shading": {
                        "oneOf": [
                          {
                            "additionalProperties": false,
                            "minProperties": 1,
                            "properties": {
                              "color": {
                                "oneOf": [
                                  {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "fill": {
                                "oneOf": [
                                  {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "val": {
                                "oneOf": [
                                  {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "type": "object"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "shadow": {
                        "oneOf": [
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "smallCaps": {
                        "oneOf": [
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "snapToGrid": {
                        "oneOf": [
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "specVanish": {
                        "oneOf": [
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "strike": {
                        "oneOf": [
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "stylisticSets": {
                        "oneOf": [
                          {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "id": {
                                  "type": "number"
                                },
                                "val": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "id"
                              ],
                              "type": "object"
                            },
                            "minItems": 1,
                            "type": "array"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "underline": {
                        "oneOf": [
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          },
                          {
                            "additionalProperties": false,
                            "minProperties": 1,
                            "properties": {
                              "color": {
                                "oneOf": [
                                  {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "style": {
                                "oneOf": [
                                  {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "themeColor": {
                                "oneOf": [
                                  {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "type": "object"
                          }
                        ]
                      },
                      "vanish": {
                        "oneOf": [
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "vertAlign": {
                        "oneOf": [
                          {
                            "enum": [
                              "superscript",
                              "subscript",
                              "baseline"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "webHidden": {
                        "oneOf": [
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "type": "object"
                  }
                },
                "required": [
                  "inline"
                ],
                "type": "object"
              },
              "id": {
                "type": "string"
              },
              "op": {
                "const": "format.apply",
                "type": "string"
              },
              "where": {
                "oneOf": [
                  {
                    "additionalProperties": false,
                    "properties": {
                      "by": {
                        "const": "select",
                        "type": "string"
                      },
                      "require": {
                        "enum": [
                          "first",
                          "exactlyOne",
                          "all"
                        ]
                      },
                      "select": {
                        "oneOf": [
                          {
                            "additionalProperties": false,
                            "properties": {
                              "caseSensitive": {
                                "type": "boolean"
                              },
                              "mode": {
                                "enum": [
                                  "contains",
                                  "regex"
                                ]
                              },
                              "pattern": {
                                "type": "string"
                              },
                              "type": {
                                "const": "text"
                              }
                            },
                            "required": [
                              "type",
                              "pattern"
                            ],
                            "type": "object"
                          },
                          {
                            "additionalProperties": false,
                            "properties": {
                              "kind": {
                                "enum": [
                                  "block",
                                  "inline"
                                ]
                              },
                              "nodeType": {
                                "enum": [
                                  "paragraph",
                                  "heading",
                                  "listItem",
                                  "table",
                                  "tableRow",
                                  "tableCell",
                                  "tableOfContents",
                                  "image",
                                  "sdt",
                                  "run",
                                  "bookmark",
                                  "comment",
                                  "hyperlink",
                                  "footnoteRef",
                                  "endnoteRef",
                                  "crossRef",
                                  "indexEntry",
                                  "citation",
                                  "authorityEntry",
                                  "sequenceField",
                                  "tab",
                                  "lineBreak"
                                ]
                              },
                              "type": {
                                "const": "node"
                              }
                            },
                            "required": [
                              "type"
                            ],
                            "type": "object"
                          }
                        ]
                      },
                      "within": {
                        "$ref": "#/$defs/NodeAddress"
                      }
                    },
                    "required": [
                      "by",
                      "select",
                      "require"
                    ],
                    "type": "object"
                  },
                  {
                    "additionalProperties": false,
                    "properties": {
                      "by": {
                        "const": "ref",
                        "type": "string"
                      },
                      "ref": {
                        "type": "string"
                      },
                      "within": {
                        "$ref": "#/$defs/NodeAddress"
                      }
                    },
                    "required": [
                      "by",
                      "ref"
                    ],
                    "type": "object"
                  }
                ]
              }
            },
            "required": [
              "id",
              "op",
              "where",
              "args"
            ],
            "type": "object"
          },
          {
            "additionalProperties": false,
            "properties": {
              "args": {
                "additionalProperties": false,
                "properties": {
                  "expectCount": {
                    "type": "number"
                  }
                },
                "required": [
                  "expectCount"
                ],
                "type": "object"
              },
              "id": {
                "type": "string"
              },
              "op": {
                "const": "assert",
                "type": "string"
              },
              "where": {
                "additionalProperties": false,
                "properties": {
                  "by": {
                    "const": "select",
                    "type": "string"
                  },
                  "select": {
                    "oneOf": [
                      {
                        "additionalProperties": false,
                        "properties": {
                          "caseSensitive": {
                            "type": "boolean"
                          },
                          "mode": {
                            "enum": [
                              "contains",
                              "regex"
                            ]
                          },
                          "pattern": {
                            "type": "string"
                          },
                          "type": {
                            "const": "text"
                          }
                        },
                        "required": [
                          "type",
                          "pattern"
                        ],
                        "type": "object"
                      },
                      {
                        "additionalProperties": false,
                        "properties": {
                          "kind": {
                            "enum": [
                              "block",
                              "inline"
                            ]
                          },
                          "nodeType": {
                            "enum": [
                              "paragraph",
                              "heading",
                              "listItem",
                              "table",
                              "tableRow",
                              "tableCell",
                              "tableOfContents",
                              "image",
                              "sdt",
                              "run",
                              "bookmark",
                              "comment",
                              "hyperlink",
                              "footnoteRef",
                              "endnoteRef",
                              "crossRef",
                              "indexEntry",
                              "citation",
                              "authorityEntry",
                              "sequenceField",
                              "tab",
                              "lineBreak"
                            ]
                          },
                          "type": {
                            "const": "node"
                          }
                        },
                        "required": [
                          "type"
                        ],
                        "type": "object"
                      }
                    ]
                  },
                  "within": {
                    "$ref": "#/$defs/NodeAddress"
                  }
                },
                "required": [
                  "by",
                  "select"
                ],
                "type": "object"
              }
            },
            "required": [
              "id",
              "op",
              "where",
              "args"
            ],
            "type": "object"
          }
        ]
      },
      "type": "array"
    }
  },
  "required": [
    "atomic",
    "changeMode",
    "steps"
  ],
  "type": "object"
}
{
  "additionalProperties": false,
  "properties": {
    "evaluatedRevision": {
      "type": "string"
    },
    "failures": {
      "items": {
        "type": "object"
      },
      "type": "array"
    },
    "steps": {
      "items": {
        "type": "object"
      },
      "type": "array"
    },
    "valid": {
      "type": "boolean"
    }
  },
  "required": [
    "evaluatedRevision",
    "steps",
    "valid"
  ],
  "type": "object"
}