> ## Documentation Index
> Fetch the complete documentation index at: https://docs.reducto.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Types: OfficeJS: References and fields

## `BookmarkUpdateData`

Import from `@reductoai/docx/officejs`.

```ts theme={null}
type BookmarkUpdateData = WritableProperties<Bookmark> & { range?: RangeUpdateData }
```

## `CaptionEntry`

A caption paragraph; `numberEnd` is the offset just past its SEQ number.

Not exported by name. You get it from the API.

| Name | Type | Description |
| - | - | - |
| `label` | `string` | |
| `numberEnd` | `number` | |
| `target` | `EditTarget` | |
| `text` | `string` | |

## `CaptionPosition`

Import from `@reductoai/docx/officejs`.

```ts theme={null}
type CaptionPosition = "Above" | "Below"
```

## `CaptionSpec`

`label` is the SEQ name ("Figure"); `title` follows the number as typed (": Results").

Not exported by name. You get it from the API.

| Name | Type | Description |
| - | - | - |
| `excludeLabel?` | `boolean` | |
| `label` | `string` | |
| `position` | `"above" \| "below"` | |
| `title?` | `string` | |

## `CrossReference`

A heading reference adds Word's hidden `_Ref` bookmark over the heading text, or reuses one.

Import from `@reductoai/docx-editor`, `@reductoai/docx-editor/model`.

| Name | Type | Description |
| - | - | - |
| `hyperlink?` | `boolean` | |
| `includeAboveBelow?` | `boolean` | Word's "Include above/below": a paragraph or note number reference adds \p. |
| `insert` | `"text" \| "page" \| "aboveBelow" \| "number" \| "numberNoContext" \| "numberFullContext" \| "noteNumber" \| "noteNumberFormatted"` | `number` is the paragraph number in relative context (REF \r), `numberNoContext` its own level only (\n), `numberFullContext` every level (\w). `noteNumber` is NOTEREF; `noteNumberFormatted` adds \f, the note mark's own formatting. |
| `to` | `{ bookmark: string } \| { heading: EditTarget } \| { numbered: EditTarget } \| { note: { id: string; kind: "footnote" \| "endnote" } } \| { caption: EditTarget; part?: "entire" \| "labelNumber" \| "text" }` | |

## `EditorBookmark`

A body bookmark; `hidden` ones (`_Toc…`, `_GoBack`) start with "\_".

Import from `@reductoai/docx-editor`, `@reductoai/docx-editor/model`.

| Name | Type | Description |
| - | - | - |
| `end` | `Position` | |
| `hidden` | `boolean` | |
| `name` | `string` | |
| `start` | `Position` | |

## `EndnoteLocation`

Import from `@reductoai/docx/officejs`.

```ts theme={null}
type EndnoteLocation = "EndOfSection" | "EndOfDocument"
```

## `FieldInsertLocation`

Import from `@reductoai/docx/officejs`.

```ts theme={null}
type FieldInsertLocation = "Start" | "End" | "Before" | "After" | "Replace"
```

## `FieldRefreshReport`

Not exported by name. You get it from the API.

| Name | Type | Description |
| - | - | - |
| `skipped` | `{ code: string; reason: string }[]` | Fields of the refreshable types this pass could not compute, by name. |
| `unchanged` | `number` | Caches that already matched. |
| `updated` | `number` | Cached results rewritten to what the laid pages say. |

## `FieldSegment`

One stretch of a field's cached result, in paragraph-local session offsets.

Not exported by name. You get it from the API.

| Name | Type | Description |
| - | - | - |
| `end` | `number` | |
| `paragraph` | `XElement` | |
| `start` | `number` | |

## `FieldTypeValue`

Import from `@reductoai/docx/node`, `@reductoai/docx/officejs`.

```ts theme={null}
type FieldTypeValue = typeof FieldType[keyof typeof FieldType]
```

## `FieldUpdateData`

Import from `@reductoai/docx/officejs`.

```ts theme={null}
type FieldUpdateData = WritableProperties<Field> & { result?: RangeUpdateData }
```

## `FieldUpdateOptions`

Not exported by name. You get it from the API.

| Name | Type | Description |
| - | - | - |
| `mergeData?` | `Readonly<Record<string, CustomPropertyValue>>` | |

## `FootnoteLocation`

Import from `@reductoai/docx/officejs`.

```ts theme={null}
type FootnoteLocation = "BottomOfPage" | "BeneathText"
```

## `HyperlinkUpdateData`

Import from `@reductoai/docx/officejs`.

```ts theme={null}
type HyperlinkUpdateData = WritableProperties<Hyperlink> & { range?: RangeUpdateData }
```

## `IndexAddOptions`

Import from `@reductoai/docx/officejs`.

| Name | Type | Description |
| - | - | - |
| `filter?` | `IndexFilter` | |
| `headingSeparator?` | `HeadingSeparator` | |
| `indexLanguage?` | `IndexLanguage` | |
| `numberOfColumns?` | `number` | |
| `rightAlignPageNumbers?` | `boolean` | |
| `separateAccentedLetterHeadings?` | `boolean` | |
| `sortBy?` | `IndexSortBy` | |
| `type?` | `IndexType` | |

## `IndexFilter`

Import from `@reductoai/docx/officejs`.

```ts theme={null}
type IndexFilter = "None" | "Aiueo" | "Akasatana" | "Chosung" | "Low" | "Medium" | "Full"
```

## `IndexFormat`

Import from `@reductoai/docx/officejs`.

```ts theme={null}
type IndexFormat = "Template" | "Classic" | "Fancy" | "Modern" | "Bulleted" | "Formal" | "Simple"
```

## `IndexLanguage`

Import from `@reductoai/docx/officejs`.

```ts theme={null}
type IndexLanguage = keyof typeof LANGUAGES
```

## `IndexMarkAllEntriesOptions`

Import from `@reductoai/docx/officejs`.

| Name | Type | Description |
| - | - | - |
| `bold?` | `boolean` | |
| `bookmarkName?` | `string` | |
| `crossReference?` | `string` | |
| `crossReferenceAutoText?` | `string` | |
| `entry?` | `string` | |
| `entryAutoText?` | `string` | |
| `italic?` | `boolean` | |

## `IndexSortBy`

Import from `@reductoai/docx/officejs`.

```ts theme={null}
type IndexSortBy = "Stroke" | "Syllable"
```

## `IndexType`

Import from `@reductoai/docx/officejs`.

```ts theme={null}
type IndexType = "Indent" | "Runin"
```

## `IndexUpdateData`

Import from `@reductoai/docx/officejs`.

| Name | Type | Description |
| - | - | - |
| `tabLeader?` | `TabLeaderValue` | |

## `InsertCaptionOptions`

Import from `@reductoai/docx/officejs`.

| Name | Type | Description |
| - | - | - |
| `excludeLabel?` | `boolean` | Word's "Exclude label from caption": the number alone. |
| `position?` | `CaptionPosition` | |
| `title?` | `string` | Text after the number, as typed (": Results"). |

## `InsertCrossReferenceOptions`

Import from `@reductoai/docx/officejs`.

| Name | Type | Description |
| - | - | - |
| `includePosition?` | `boolean` | Word's "Include above/below": the \p switch after a number. |
| `insertAsHyperlink?` | `boolean` | Word's "Insert as hyperlink": the \h switch. |

## `InsertHyperlinkOptions`

Import from `@reductoai/docx/node`.

| Name | Type | Description |
| - | - | - |
| `offset?` | `number` | UTF-16 offset in the paragraph's text; defaults to the end. |
| `text` | `string` | |
| `tooltip?` | `string` | |
| `url` | `string` | Absolute URI (https, mailto, ...), stored as an External relationship, or `"#Bookmark"` for an internal link, stored as `w:anchor`. |

## `NoteFormat`

Import from `@reductoai/docx-editor`, `@reductoai/docx-editor/model`.

```ts theme={null}
type NoteFormat = "decimal" | "lowerLetter" | "upperLetter" | "lowerRoman" | "upperRoman" | "chicago"
```

## `NoteItemType`

Import from `@reductoai/docx/officejs`.

```ts theme={null}
type NoteItemType = "Footnote" | "Endnote"
```

## `NoteItemUpdateData`

Import from `@reductoai/docx/officejs`.

```ts theme={null}
type NoteItemUpdateData = WritableProperties<NoteItem> & { body?: BodyUpdateData; reference?: RangeUpdateData }
```

## `NoteKind`

Not exported by name. You get it from the API.

```ts theme={null}
type NoteKind = "footnote" | "endnote"
```

## `NoteNumbering`

How a section numbers its notes; Word reads only the section's own settings.

Import from `@reductoai/docx-editor`, `@reductoai/docx-editor/model`.

| Name | Type | Description |
| - | - | - |
| `applyTo?` | `"section" \| "document"` | Apply changes to: the section at the selection (default) or every section. |
| `format?` | `NoteFormat` | |
| `position?` | `NotePosition` | Location: footnotes at the page bottom or beneath the text; endnotes at the end of each section or of the document. |
| `restart?` | `"continuous" \| "eachSection" \| "eachPage"` | |
| `start?` | `number` | |

## `NoteNumberRestart`

Word's Numbering box; EachPage exists for footnotes only.

Import from `@reductoai/docx/officejs`.

```ts theme={null}
type NoteNumberRestart = "Continuous" | "EachSection" | "EachPage"
```

## `NoteNumberStyle`

WdNoteNumberStyle; Symbol is Word's chicago sequence (\*, †, ‡, §).

Import from `@reductoai/docx/officejs`.

```ts theme={null}
type NoteNumberStyle = "Arabic" | "LowercaseRoman" | "UppercaseRoman" | "LowercaseLetter" | "UppercaseLetter" | "Symbol"
```

## `NotePosition`

Import from `@reductoai/docx-editor`, `@reductoai/docx-editor/model`.

```ts theme={null}
type NotePosition = "pageBottom" | "beneathText" | "sectionEnd" | "documentEnd"
```

## `NoteRef`

A footnote or endnote mark in the body; `story` is the note's story key.

Import from `@reductoai/docx-editor`, `@reductoai/docx-editor/model`.

| Name | Type | Description |
| - | - | - |
| `at` | `Position` | |
| `id` | `string` | |
| `kind` | `"footnote" \| "endnote"` | |
| `story` | `string` | |

## `ParsedField`

Not exported by name. You get it from the API.

| Name | Type | Description |
| - | - | - |
| `anchor` | `XElement` | Liveness anchor: the w:fldSimple element or the begin w:fldChar. |
| `code` | `string` | |
| `hasResult` | `boolean` | A separator was seen (or the field is `w:fldSimple`): the field caches a result. |
| `locked` | `boolean` | |
| `result` | `string` | |
| `segments` | `FieldSegment[]` | Where the cached result's ink lives; empty for a resultless field. |
| `start` | `number` | Paragraph-local session offset where the field opens. |

## `ReferenceKind`

VBA WdReferenceKind without the wd prefix.

Import from `@reductoai/docx/officejs`.

```ts theme={null}
type ReferenceKind = "ContentText" | "NumberRelativeContext" | "NumberNoContext" | "NumberFullContext" | "EntireCaption" | "OnlyLabelAndNumber" | "OnlyCaptionText" | "PageNumber" | "Position" | "FootnoteNumber" | "EndnoteNumber" | "FootnoteNumberFormatted" | "EndnoteNumberFormatted"
```

## `SortFieldType`

Import from `@reductoai/docx/officejs`.

```ts theme={null}
type SortFieldType = "Alphanumeric" | "Numeric" | "Date"
```

## `TableFieldSeparator`

VBA WdTableFieldSeparator by name, or one character.

Import from `@reductoai/docx/officejs`.

```ts theme={null}
type TableFieldSeparator = "Tabs" | "Commas" | string & {}
```

## `TableOfAuthoritiesAddOptions`

Import from `@reductoai/docx/officejs`.

| Name | Type | Description |
| - | - | - |
| `bookmark?` | `string` | |
| `category?` | `number` | |
| `entrySeparator?` | `string` | |
| `includeCategoryHeader?` | `boolean` | |
| `keepEntryFormatting?` | `boolean` | |
| `pageNumberSeparator?` | `string` | |
| `pageRangeSeparator?` | `string` | |
| `sequenceName?` | `string` | |
| `sequenceSeparator?` | `string` | |
| `usePassim?` | `boolean` | |

## `TableOfAuthoritiesMarkCitationOptions`

Import from `@reductoai/docx/officejs`.

| Name | Type | Description |
| - | - | - |
| `category?` | `number` | |
| `longCitation?` | `string` | |
| `longCitationAutoText?` | `string` | |

## `TableOfAuthoritiesUpdateData`

Import from `@reductoai/docx/officejs`.

| Name | Type | Description |
| - | - | - |
| `bookmark?` | `string` | |
| `category?` | `number` | |
| `entrySeparator?` | `string` | |
| `isCategoryHeaderIncluded?` | `boolean` | |
| `isEntryFormattingKept?` | `boolean` | |
| `isPassimUsed?` | `boolean` | |
| `pageNumberSeparator?` | `string` | |
| `pageRangeSeparator?` | `string` | |
| `sequenceName?` | `string` | |
| `sequenceSeparator?` | `string` | |
| `tabLeader?` | `TabLeaderValue` | |

## `TableOfContentsAddOptions`

Import from `@reductoai/docx/node`, `@reductoai/docx/officejs`.

| Name | Type | Description |
| - | - | - |
| `addedStyles?` | `string` | |
| `hidePageNumbersOnWeb?` | `boolean` | |
| `includePageNumbers?` | `boolean` | |
| `lowerHeadingLevel?` | `number` | |
| `rightAlignPageNumbers?` | `boolean` | |
| `tableId?` | `string` | |
| `upperHeadingLevel?` | `number` | |
| `useBuiltInHeadingStyles?` | `boolean` | |
| `useFields?` | `boolean` | |
| `useHyperlinksOnWeb?` | `boolean` | |
| `useOutlineLevels?` | `boolean` | |

## `TableOfContentsMarkEntryOptions`

Import from `@reductoai/docx/node`, `@reductoai/docx/officejs`.

| Name | Type | Description |
| - | - | - |
| `entry?` | `string` | |
| `entryAutoText?` | `string` | |
| `level?` | `number` | |
| `tableId?` | `string` | |

## `TableOfContentsUpdateData`

Import from `@reductoai/docx/node`, `@reductoai/docx/officejs`.

| Name | Type | Description |
| - | - | - |
| `areBuiltInHeadingStylesUsed?` | `boolean` | |
| `areFieldsUsed?` | `boolean` | |
| `areHyperlinksUsedOnWeb?` | `boolean` | |
| `arePageNumbersHiddenOnWeb?` | `boolean` | |
| `arePageNumbersIncluded?` | `boolean` | |
| `arePageNumbersRightAligned?` | `boolean` | |
| `lowerHeadingLevel?` | `number` | |
| `tabLeader?` | `TabLeaderValue` | |
| `tableId?` | `string` | |
| `upperHeadingLevel?` | `number` | |

## `TableOfFiguresAddOptions`

Import from `@reductoai/docx/officejs`.

| Name | Type | Description |
| - | - | - |
| `addedStyles?` | `string` | |
| `captionLabel?` | `string` | |
| `hidePageNumbersOnWeb?` | `boolean` | |
| `includeLabel?` | `boolean` | |
| `includePageNumbers?` | `boolean` | |
| `lowerHeadingLevel?` | `number` | |
| `rightAlignPageNumbers?` | `boolean` | |
| `tableId?` | `string` | |
| `upperHeadingLevel?` | `number` | |
| `useBuiltInHeadingStyles?` | `boolean` | |
| `useFields?` | `boolean` | |
| `useHyperlinksOnWeb?` | `boolean` | |

## `TableOfFiguresUpdateData`

Import from `@reductoai/docx/officejs`.

```ts theme={null}
type TableOfFiguresUpdateData = TableOfContentsUpdateData & { captionLabel?: string; isLabelIncluded?: boolean }
```

## `UpdateFieldsOptions`

Import from `@reductoai/docx/node`, `@reductoai/docx/officejs`.

```ts theme={null}
type UpdateFieldsOptions = FieldUpdateOptions & { rebuildTablesOfContents?: boolean }
```
