Alpha: Document API is currently alpha and subject to breaking changes.
Summary
Insert a new table of contents at the target position.- Operation ID:
create.tableOfContents - API member path:
editor.doc.create.tableOfContents(...) - Mutates document:
yes - Idempotency:
non-idempotent - Supports tracked mode:
no - Supports dry run:
yes - Deterministic target resolution:
yes
Expected result
Returns a CreateTableOfContentsResult with the new TOC block address.Input fields
| Field | Type | Required | Description | |||
|---|---|---|---|---|---|---|
at | object(kind=“documentStart”) \ | object(kind=“documentEnd”) \ | object(kind=“before”) \ | object(kind=“after”) | no | One of: object(kind=“documentStart”), object(kind=“documentEnd”), object(kind=“before”), object(kind=“after”) |
config | object | no |
Example request
Output fields
No fields.Example response
Pre-apply throws
INVALID_TARGETTARGET_NOT_FOUNDCAPABILITY_UNAVAILABLE
Non-applied failure codes
NO_OPINVALID_INSERTION_CONTEXT
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

