# DocumentComparePatch

interface

The result of comparing a snapshot against processed data: the operations to bring the document to the new state, together with the snapshot metadata.

Can be applied via [`applyPatch`](module_ai_toolkit_documentcompare-DocumentCompare.md#function-applyPatch).

<a id="properties"></a>

## Properties

<a id="member-aiSource"></a>

### `aiSource?: AIOperationSource`

Which AI feature produced the processed data the patch was computed from, or unset when it did not come from AI.

<a id="member-channelId"></a>

### `channelId: string`

The channel of the document the snapshot was captured from, validated on apply.

<a id="member-operations"></a>

### `operations: Record<string, Array<Operation>>`

The operations to apply, keyed by root name (a root with no changes maps to an empty array).

<a id="member-options"></a>

### `options: DocumentComparePatchOptions`

How the patch is applied.

<a id="member-sessionId"></a>

### `sessionId: string`

The editing session the snapshot was captured in, validated on apply.

<a id="member-version"></a>

### `version: number`

The snapshot version the operations are anchored to (used to reconcile them on apply).

---

Full index of the CKEditor 5 API reference: [llms.txt](llms.txt)
