Document apiReferenceToc

toc.update

Rebuild or refresh the materialized content of a table of contents.

mutates documentdry runconditional
doc.toc.update(…)

Expected result

Returns a TocMutationResult with the TOC address on success, or a failure code if content is unchanged or page numbers cannot be resolved.

Inputs

targetobjectrequired
Fields
kind"block"required
nodeType"tableOfContents"required
nodeIdstringrequired
1 additional input field
mode"all" | "pageNumbers"

Result

Output fields
true
successtruerequired
tocobjectrequired
Fields
kind"block"required
nodeType"tableOfContents"required
nodeIdstringrequired
false
successfalserequired
failureobjectrequired
Fields
code"NO_OP" | "INVALID_TARGET" | "TARGET_NOT_FOUND" | "CAPABILITY_UNAVAILABLE" | "INVALID_INSERTION_CONTEXT" | "PAGE_NUMBERS_NOT_MATERIALIZED"required
messagestringrequired
detailsunknown

Failures

Pre-apply throws

  • TARGET_NOT_FOUND
  • INVALID_TARGET
  • CAPABILITY_UNAVAILABLE

Non-applied receipt codes

  • NO_OP
  • PAGE_NUMBERS_NOT_MATERIALIZED
  • 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