Document apiReferenceMutations

mutations.beginTemporary

Apply temporary text and review operations without changing undo history.

mutates documentnon-idempotent
await doc.mutations.beginTemporary(…)

Expected result

Returns a temporary mutation receipt with preview identity and caller tag.

Inputs

tagstringrequired
operationsobject[]required
2 additional input fields
onNativeEdit"cancel" | "preserve"
expectedRevisionstring

Result

Output fields
changeTagstring

Caller correlation for this commit only; never persisted or replayed on Undo/Redo.

temporaryobjectrequired
Fields
idstringrequired
phase"begin" | "replace" | "rollback" | "commit"required
tagstringrequired
onNativeEdit"cancel" | "preserve"
cancelledBy"native-edit"
appliedChangeMode"direct" | "tracked"
idstring
insertedEntityAddress[]
updatedEntityAddress[]
removedEntityAddress[]
invalidatedRefsAffectedRef[]
remappedRefsAffectedRefRemapping[]
affectedStoriesStoryLocator[]
textRangeShiftsTextRangeShift[]
trackedTextRangeShiftsTrackedTextRangeShift[]
txIdstring
warningsReviewWarning[]
effectsReceiptEffects
Fields
insertedTextTextMutationEffect[]
insertedBlocksBlockMutationEffect[]
resultTextTextTarget
Fields
kind"text"required
segmentsTextSegment[]required
storyStoryLocator

Story scope. Defaults to document body when omitted. Use {kind:'story', storyType:'body'} for body, or other storyType values for headers, footers, footnotes, endnotes.

body
kind"story"required
storyType"body"required
headerFooterSlot
kind"story"required
storyType"headerFooterSlot"required
sectionSectionAddressrequired
headerFooterKind"header" | "footer"required
variant"default" | "first" | "even"required
resolution"effective" | "explicit"
onWrite"materializeIfInherited" | "editResolvedPart" | "error"
headerFooterPart
kind"story"required
storyType"headerFooterPart"required
refIdstringrequired
footnote
kind"story"required
storyType"footnote"required
noteIdstringrequired
endnote
kind"story"required
storyType"endnote"required
noteIdstringrequired
textbox
kind"story"required
storyType"textbox"required
textboxIdstringrequired
coordinateSpaceTextCoordinateSpace
trackedChangeRefsTrackedChangeAddress[]
trackedChangeCountinteger
changedboolean
successtruerequired
revisionobjectrequired
Fields
beforestringrequired
afterstringrequired

Failures

Pre-apply throws

  • INVALID_INPUT
  • TARGET_NOT_FOUND
  • REVISION_MISMATCH
3 more codes
  • PRECONDITION_FAILED
  • CAPABILITY_UNSUPPORTED
  • CAPABILITY_UNAVAILABLE

Raw schemas

Open the generated JSON artifact for the exact input, output, success, and failure schemas represented by this contract version.

View raw JSON schemas