# toc.listEntries

> List all TC (table of contents entry) fields in the document body.



- Member path: `doc.toc.listEntries(…)`
- Mutates document: no
- Idempotency: `idempotent`
- Supports tracked mode: no
- Supports dry run: no

## Expected result

Returns a TocListEntriesResult with an array of TC entry discovery items and pagination metadata.

## Input schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$defs": {},
  "type": "object",
  "properties": {
    "tableIdentifier": {
      "type": "string"
    },
    "levelRange": {
      "type": "object",
      "properties": {
        "from": {
          "type": "integer"
        },
        "to": {
          "type": "integer"
        }
      },
      "additionalProperties": false,
      "required": [
        "from",
        "to"
      ]
    },
    "limit": {
      "type": "integer"
    },
    "offset": {
      "type": "integer"
    }
  },
  "additionalProperties": false
}
```

## Output schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$defs": {
    "ResolvedHandle": {
      "type": "object",
      "properties": {
        "ref": {
          "type": "string"
        },
        "refStability": {
          "enum": [
            "stable",
            "ephemeral"
          ]
        },
        "targetKind": {
          "$ref": "#/$defs/TargetKind"
        }
      },
      "additionalProperties": false,
      "required": [
        "ref",
        "refStability",
        "targetKind"
      ]
    },
    "TargetKind": {
      "anyOf": [
        {
          "enum": [
            "text",
            "node",
            "list",
            "comment",
            "trackedChange",
            "table",
            "tableCell",
            "tableOfContents",
            "section",
            "sdt",
            "field"
          ]
        },
        {
          "type": "string",
          "pattern": "^ext:.+$"
        }
      ]
    },
    "PageInfo": {
      "type": "object",
      "properties": {
        "limit": {
          "type": "integer",
          "minimum": 0
        },
        "offset": {
          "type": "integer",
          "minimum": 0
        },
        "returned": {
          "type": "integer",
          "minimum": 0
        }
      },
      "additionalProperties": false,
      "required": [
        "limit",
        "offset",
        "returned"
      ]
    }
  },
  "type": "object",
  "properties": {
    "evaluatedRevision": {
      "type": "string"
    },
    "total": {
      "type": "integer"
    },
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "handle": {
            "$ref": "#/$defs/ResolvedHandle"
          },
          "address": {
            "type": "object",
            "properties": {
              "kind": {
                "const": "inline"
              },
              "nodeType": {
                "const": "tableOfContentsEntry"
              },
              "nodeId": {
                "type": "string"
              }
            },
            "additionalProperties": false,
            "required": [
              "kind",
              "nodeType",
              "nodeId"
            ]
          },
          "instruction": {
            "type": "string"
          },
          "text": {
            "type": "string"
          },
          "level": {
            "type": "integer"
          },
          "tableIdentifier": {
            "type": "string"
          },
          "omitPageNumber": {
            "type": "boolean"
          }
        },
        "additionalProperties": false,
        "required": [
          "id",
          "handle",
          "address",
          "instruction",
          "text",
          "level",
          "omitPageNumber"
        ]
      }
    },
    "page": {
      "$ref": "#/$defs/PageInfo"
    }
  },
  "additionalProperties": false,
  "required": [
    "evaluatedRevision",
    "total",
    "items",
    "page"
  ]
}
```

## Pre-apply throws

- None

## Non-applied receipt codes

- None

