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

targetobjectrequired
Fields
kind"inline-insert"required
anchorobjectrequired
Fields
nodeType"paragraph"required
nodeIdstringrequired
position"start" | "end"
textstringrequired
3 additional input fields
levelinteger
tableIdentifierstring
omitPageNumberboolean

Result

Output fields
true
successtruerequired
entryobjectrequired
Fields
kind"inline"required
nodeType"tableOfContentsEntry"required
nodeIdstringrequired
false
successfalserequired
failureobjectrequired
Fields
code"NO_OP" | "INVALID_TARGET" | "TARGET_NOT_FOUND" | "CAPABILITY_UNAVAILABLE" | "INVALID_INSERTION_CONTEXT" | "INVALID_INPUT"required
messagestringrequired
detailsunknown

Failures

Pre-apply throws

  • TARGET_NOT_FOUND
  • INVALID_TARGET
  • INVALID_INPUT
1 more codes
  • CAPABILITY_UNAVAILABLE

Non-applied receipt codes

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