format.paragraph.applyBatch
Apply an explicit ordered paragraph action program target-major to 1..1000 unique existing targets in one story, atomically. Accepts 1..1000 closed actions, at most 32000 expanded writer calls and 1048576 JSON bytes, cumulative across batches in an atomic plan. Uses existing writer validation; omitted groups are preserved. No nested plans, per-action targets/options or dry run. Expected revision is consumed once at batch start; live freshness is checked again before publication. Shared sessions support direct identity-preserving writes only.
doc.format.paragraph.applyBatch(…)Expected result
Resolves to ParagraphBatchMutationResult with resolution.targets, applied mode and tracked refs when committed, or indexed failure details. An all-no-op batch succeeds without revision, publication or history. Standalone commits once; inside an atomic plan shares its one preparation, publication and Undo/Redo unit.
Inputs
targetsparagraph | heading | listItem[]requiredoperationsstyles.paragraph.setStyleRef | styles.paragraph.clearStyle | format.paragraph.setAlignment | format.paragraph.clearAlignment | format.paragraph.setSpacing | format.paragraph.clearSpacing | format.paragraph.setIndentation | format.paragraph.clearIndentation | format.paragraph.setKeepOptions | format.paragraph.setFlowOptions | format.paragraph.setOutlineLevel | format.paragraph.setBorder | format.paragraph.clearBorder | format.paragraph.setShading | format.paragraph.clearShading | format.paragraph.setTabStop | format.paragraph.clearAllTabStops | format.paragraph.setDirection | format.paragraph.clearDirection | format.paragraph.setMarkRunProps[]requiredResult
Output fields
true
successtruerequiredresolutionobjectrequiredFields
targetsparagraph | heading | listItem[]requiredappliedChangeMode"direct" | "tracked"trackedChangeRefsTrackedChangeAddress[]false
successfalserequiredfailureobjectrequiredFields
code"INVALID_INPUT" | "TARGET_NOT_FOUND" | "REVISION_MISMATCH" | "PERMISSION_DENIED" | "CAPABILITY_UNAVAILABLE" | "PRECONDITION_FAILED"requiredmessagestringrequireddetailsunknownresolutionobjectFields
targetparagraph | heading | listItemrequiredparagraph
kind"block"requirednodeType"paragraph"requirednodeIdstringrequiredstoryStoryLocatorStory 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"requiredstoryType"body"requiredheaderFooterSlot
kind"story"requiredstoryType"headerFooterSlot"requiredsectionSectionAddressrequiredheaderFooterKind"header" | "footer"requiredvariant"default" | "first" | "even"requiredresolution"effective" | "explicit"onWrite"materializeIfInherited" | "editResolvedPart" | "error"headerFooterPart
kind"story"requiredstoryType"headerFooterPart"requiredrefIdstringrequiredfootnote
kind"story"requiredstoryType"footnote"requirednoteIdstringrequiredendnote
kind"story"requiredstoryType"endnote"requirednoteIdstringrequiredtextbox
kind"story"requiredstoryType"textbox"requiredtextboxIdstringrequiredheading
kind"block"requirednodeType"heading"requirednodeIdstringrequiredstoryStoryLocatorStory 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"requiredstoryType"body"requiredheaderFooterSlot
kind"story"requiredstoryType"headerFooterSlot"requiredsectionSectionAddressrequiredheaderFooterKind"header" | "footer"requiredvariant"default" | "first" | "even"requiredresolution"effective" | "explicit"onWrite"materializeIfInherited" | "editResolvedPart" | "error"headerFooterPart
kind"story"requiredstoryType"headerFooterPart"requiredrefIdstringrequiredfootnote
kind"story"requiredstoryType"footnote"requirednoteIdstringrequiredendnote
kind"story"requiredstoryType"endnote"requirednoteIdstringrequiredtextbox
kind"story"requiredstoryType"textbox"requiredtextboxIdstringrequiredlistItem
kind"block"requirednodeType"listItem"requirednodeIdstringrequiredstoryStoryLocatorStory 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"requiredstoryType"body"requiredheaderFooterSlot
kind"story"requiredstoryType"headerFooterSlot"requiredsectionSectionAddressrequiredheaderFooterKind"header" | "footer"requiredvariant"default" | "first" | "even"requiredresolution"effective" | "explicit"onWrite"materializeIfInherited" | "editResolvedPart" | "error"headerFooterPart
kind"story"requiredstoryType"headerFooterPart"requiredrefIdstringrequiredfootnote
kind"story"requiredstoryType"footnote"requirednoteIdstringrequiredendnote
kind"story"requiredstoryType"endnote"requirednoteIdstringrequiredtextbox
kind"story"requiredstoryType"textbox"requiredtextboxIdstringrequiredFailures
Pre-apply throws
TARGET_NOT_FOUNDINVALID_TARGETCAPABILITY_UNAVAILABLE
Non-applied receipt codes
INVALID_INPUTTARGET_NOT_FOUNDREVISION_MISMATCH
3 more codes
PERMISSION_DENIEDCAPABILITY_UNAVAILABLEPRECONDITION_FAILED
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