Alpha: Document API is currently alpha and subject to breaking changes.
Summary
Delete content at a target position.- Operation ID:
delete - API member path:
editor.doc.delete(...) - Mutates document:
yes - Idempotency:
conditional - Supports tracked mode:
yes - Supports dry run:
yes - Deterministic target resolution:
yes
Expected result
Returns a TextMutationReceipt with applied status; receipt reports NO_OP if the target range is already empty.Input fields
| Field | Type | Required | Description |
|---|---|---|---|
target | TextAddress | yes | TextAddress |
target.blockId | string | yes | |
target.kind | "text" | yes | Constant: "text" |
target.range | Range | yes | Range |
target.range.end | integer | yes | |
target.range.start | integer | yes |
Example request
Output fields
Variant 1 (resolution.requestedTarget.kind=“text”)
| Field | Type | Required | Description |
|---|---|---|---|
inserted | EntityAddress[] | no | |
removed | EntityAddress[] | no | |
resolution | TextMutationResolution | yes | TextMutationResolution |
resolution.range | TextMutationRange | yes | TextMutationRange |
resolution.range.from | integer | yes | |
resolution.range.to | integer | yes | |
resolution.requestedTarget | TextAddress | no | TextAddress |
resolution.requestedTarget.blockId | string | no | |
resolution.requestedTarget.kind | "text" | no | Constant: "text" |
resolution.requestedTarget.range | Range | no | Range |
resolution.requestedTarget.range.end | integer | no | |
resolution.requestedTarget.range.start | integer | no | |
resolution.target | TextAddress | yes | TextAddress |
resolution.target.blockId | string | yes | |
resolution.target.kind | "text" | yes | Constant: "text" |
resolution.target.range | Range | yes | Range |
resolution.target.range.end | integer | yes | |
resolution.target.range.start | integer | yes | |
resolution.text | string | yes | |
success | true | yes | Constant: true |
updated | EntityAddress[] | no |
Variant 2 (resolution.requestedTarget.kind=“text”)
| Field | Type | Required | Description |
|---|---|---|---|
failure | object | yes | |
failure.code | enum | yes | "NO_OP" |
failure.details | any | no | |
failure.message | string | yes | |
resolution | TextMutationResolution | yes | TextMutationResolution |
resolution.range | TextMutationRange | yes | TextMutationRange |
resolution.range.from | integer | yes | |
resolution.range.to | integer | yes | |
resolution.requestedTarget | TextAddress | no | TextAddress |
resolution.requestedTarget.blockId | string | no | |
resolution.requestedTarget.kind | "text" | no | Constant: "text" |
resolution.requestedTarget.range | Range | no | Range |
resolution.requestedTarget.range.end | integer | no | |
resolution.requestedTarget.range.start | integer | no | |
resolution.target | TextAddress | yes | TextAddress |
resolution.target.blockId | string | yes | |
resolution.target.kind | "text" | yes | Constant: "text" |
resolution.target.range | Range | yes | Range |
resolution.target.range.end | integer | yes | |
resolution.target.range.start | integer | yes | |
resolution.text | string | yes | |
success | false | yes | Constant: false |
Example response
Pre-apply throws
TARGET_NOT_FOUNDCAPABILITY_UNAVAILABLEINVALID_TARGET
Non-applied failure codes
NO_OP
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

