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

Text

Format

Create

Tables

The runtime capability snapshot also exposes this allowlist at planEngine.supportedStepOps.

Input fields

Example request

Output fields

Example response

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