# WirePivotModel (@salmonui/data/json)

> The WirePivotModel interface of @salmonui/data/json: The pivot engine's PivotModel (@salmonui/pivot-table/engine), typed structurally so this package keeps no package imports. Plain JSON; the client sends it with defaults omitted and without the client-only parts (formats, conditionalFormats, calculated field format).

Canonical: https://salmonui.dev/docs/reference/data/json/WirePivotModel

```ts
import type { WirePivotModel } from '@salmonui/data/json';
```

Also exported from `@salmonui/data`.

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

## Reference

Kind: interface

```ts
interface WirePivotModel {
    readonly rows?: readonly WirePivotAxisField[];
    readonly columns?: readonly WirePivotAxisField[];
    readonly values?: readonly WirePivotValueField[];
    readonly filters?: readonly WirePivotAxisField[];
    readonly filterBy?: unknown;
    readonly sort?: unknown;
    readonly valueSort?: unknown;
    readonly groups?: unknown;
    readonly calculatedFields?: readonly {
        readonly name: string;
        readonly formula: string;
        readonly caption?: string;
        readonly format?: unknown;
    }[];
    readonly formats?: unknown;
    readonly conditionalFormats?: unknown;
    readonly expanded?: readonly (readonly Json[])[] | 'all';
    readonly totals?: unknown;
    readonly valuesPlacement?: unknown;
    readonly showEmptyMembers?: boolean;
    readonly showValueHeader?: boolean;
}
```

The pivot engine's `PivotModel` (`@salmonui/pivot-table/engine`), typed
structurally so this package keeps no package imports. Plain JSON; the
client sends it with defaults omitted and without the client-only parts
(`formats`, `conditionalFormats`, calculated field `format`).

Members (16):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `rows` | `readonly rows?: readonly WirePivotAxisField[];` | optional |  |
| `columns` | `readonly columns?: readonly WirePivotAxisField[];` | optional |  |
| `values` | `readonly values?: readonly WirePivotValueField[];` | optional |  |
| `filters` | `readonly filters?: readonly WirePivotAxisField[];` | optional |  |
| `filterBy` | `readonly filterBy?: unknown;` | optional |  |
| `sort` | `readonly sort?: unknown;` | optional |  |
| `valueSort` | `readonly valueSort?: unknown;` | optional |  |
| `groups` | `readonly groups?: unknown;` | optional |  |
| `calculatedFields` | `readonly calculatedFields?: readonly {     readonly name: string;     readonly formula: string;     readonly caption?: string;     readonly format?: unknown; }[];` | optional |  |
| `formats` | `readonly formats?: unknown;` | optional |  |
| `conditionalFormats` | `readonly conditionalFormats?: unknown;` | optional |  |
| `expanded` | `readonly expanded?: readonly (readonly Json[])[] \| 'all';` | optional | Member paths (`['rows', ...keys]`) or `'all'`. |
| `totals` | `readonly totals?: unknown;` | optional |  |
| `valuesPlacement` | `readonly valuesPlacement?: unknown;` | optional |  |
| `showEmptyMembers` | `readonly showEmptyMembers?: boolean;` | optional |  |
| `showValueHeader` | `readonly showValueHeader?: boolean;` | optional |  |
