Document apiReferenceToc
toc.markEntry
Insert a TC (table of contents entry) field at the target paragraph.
mutates documentdry runnon-idempotent
doc.toc.markEntry(…)Expected result
Returns a TocEntryMutationResult with the created entry address on success.
Inputs
targetobjectrequiredFields
kind"inline-insert"requiredanchorobjectrequiredFields
nodeType"paragraph"requirednodeIdstringrequiredposition"start" | "end"textstringrequired3 additional input fields
levelintegertableIdentifierstringomitPageNumberbooleanResult
Output fields
true
successtruerequiredentryobjectrequiredFields
kind"inline"requirednodeType"tableOfContentsEntry"requirednodeIdstringrequiredfalse
successfalserequiredfailureobjectrequiredFields
code"NO_OP" | "INVALID_TARGET" | "TARGET_NOT_FOUND" | "CAPABILITY_UNAVAILABLE" | "INVALID_INSERTION_CONTEXT" | "INVALID_INPUT"requiredmessagestringrequireddetailsunknownFailures
Pre-apply throws
TARGET_NOT_FOUNDINVALID_TARGETINVALID_INPUT
1 more codes
CAPABILITY_UNAVAILABLE
Non-applied receipt codes
NO_OPINVALID_INSERTION_CONTEXT
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