# WriteRequest (@salmonui/data-grid/engine)

> The WriteRequest interface of @salmonui/data-grid/engine.

Canonical: https://salmonui.dev/docs/reference/data-grid/engine/WriteRequest

```ts
import type { WriteRequest } from '@salmonui/data-grid/engine';
```

Entry index: https://salmonui.dev/docs/reference/data-grid/engine (Markdown with every symbol of the entry: https://salmonui.dev/docs/reference/data-grid/engine.md).

## Reference

Kind: interface

```ts
interface WriteRequest<Row> {
    readonly version: number;
    readonly added: readonly {
        readonly tempId: RowId;
        readonly row: Row;
        readonly parentId?: RowId | null;
    }[];
    readonly changed: readonly {
        readonly rowId: RowId;
        readonly row: Row;
        readonly previous: Row;
        readonly changedColumnIds: readonly ColumnId[];
    }[];
    readonly deleted: readonly {
        readonly rowId: RowId;
        readonly row: Row;
    }[];
    readonly mode: 'row' | 'dialog' | 'batch' | 'cell';
    readonly signal: AbortSignalLike;
    readonly moved?: RowPlacement;
}
```

Members (7):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `version` | `readonly version: number;` |  |  |
| `added` | `readonly added: readonly {     readonly tempId: RowId;     readonly row: Row;     readonly parentId?: RowId \| null; }[];` |  | `parentId` (tree mode): the parent the added row joins (null: a root); its `parentIdField` value is already set for flat data. |
| `changed` | `readonly changed: readonly {     readonly rowId: RowId;     readonly row: Row;     readonly previous: Row;     readonly changedColumnIds: readonly ColumnId[]; }[];` |  |  |
| `deleted` | `readonly deleted: readonly {     readonly rowId: RowId;     readonly row: Row; }[];` |  |  |
| `mode` | `readonly mode: 'row' \| 'dialog' \| 'batch' \| 'cell';` |  |  |
| `signal` | `readonly signal: AbortSignalLike;` |  |  |
| `moved` | `readonly moved?: RowPlacement;` | optional | Row reorder placement hint (row drag and drop): local sources move the rows in their array. |
