Alpha: Document API is currently alpha and subject to breaking changes.
Summary
Link or unlink a header/footer slot to/from the previous section.- Operation ID:
headerFooters.refs.setLinkedToPrevious - API member path:
editor.doc.headerFooters.refs.setLinkedToPrevious(...) - Mutates document:
yes - Idempotency:
conditional - Supports tracked mode:
no - Supports dry run:
yes - Deterministic target resolution:
yes
Expected result
Returns a SectionMutationResult receipt; reports NO_OP if the link state already matches, INVALID_TARGET for the first section.Input fields
| Field | Type | Required | Description |
|---|---|---|---|
linked | boolean | yes | |
target | object(kind=“headerFooterSlot”) | yes | |
target.headerFooterKind | enum | yes | "header", "footer" |
target.kind | "headerFooterSlot" | yes | Constant: "headerFooterSlot" |
target.section | SectionAddress | yes | SectionAddress |
target.section.kind | "section" | yes | Constant: "section" |
target.section.sectionId | string | yes | |
target.variant | enum | yes | "default", "first", "even" |
Example request
Output fields
Variant 1 (section.kind=“section”)
| Field | Type | Required | Description |
|---|---|---|---|
section | SectionAddress | yes | SectionAddress |
section.kind | "section" | yes | Constant: "section" |
section.sectionId | string | yes | |
success | true | yes | Constant: true |
Variant 2 (success=false)
| Field | Type | Required | Description |
|---|---|---|---|
failure | object | yes | |
failure.code | enum | yes | "NO_OP", "INVALID_TARGET", "CAPABILITY_UNAVAILABLE" |
failure.details | any | no | |
failure.message | string | yes | |
success | false | yes | Constant: false |
Example response
Pre-apply throws
TARGET_NOT_FOUNDINVALID_TARGETINVALID_INPUTCAPABILITY_UNAVAILABLEINTERNAL_ERROR
Non-applied failure codes
NO_OPINVALID_TARGETCAPABILITY_UNAVAILABLE
Raw schemas
Raw input schema
Raw input schema
Raw output schema
Raw output schema
Raw success schema
Raw success schema
Raw failure schema
Raw failure schema

