Document apiReferenceLists
lists.merge
Compound: merge two adjacent list sequences into one. Reassigns numId on the absorbed sequence (no strict abstractNumId check: absorbed items adopt the absorbing definition) and deletes empty paragraphs between the two sequences. Use this instead of lists.join for the user-facing "merge these lists" intent.
mutates documentdry runconditional
doc.lists.merge(…)Expected result
Returns a ListsMergeResult with the merged listId, absorbedCount, and removedEmptyBlocks count.
Inputs
targetListItemAddressrequiredFields
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"requiredtextboxIdstringrequireddirection"withPrevious" | "withNext"requiredResult
Output fields
true
successtruerequiredlistIdstringrequiredabsorbedCountintegerrequiredremovedEmptyBlocksintegerrequiredfalse
successfalserequiredfailureobjectrequiredFields
code"INVALID_TARGET" | "NO_ADJACENT_SEQUENCE" | "NO_OP"requiredmessagestringrequireddetailsunknownFailures
Pre-apply throws
TARGET_NOT_FOUNDCAPABILITY_UNAVAILABLEINVALID_TARGET
Non-applied receipt codes
INVALID_TARGETNO_ADJACENT_SEQUENCENO_OP
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