View as Markdown

API reference: @salmonui/data/json

WirePivotResponseinterface

import type { WirePivotResponse } from '@salmonui/data/json';

Also exported from @salmonui/data.

interface WirePivotResponse {
    readonly v: 1;
    readonly id: string;
    readonly resultVersion?: string;
    readonly rowCount?: number;
    readonly columnCount?: number;
    readonly columnDepth?: number;
    readonly rowDepth?: number;
    readonly rowHeaders?: readonly WirePivotHeader[];
    readonly columnHeaders?: readonly WirePivotHeader[];
    readonly cells?: readonly (readonly (number | null)[])[];
    readonly kinds?: readonly string[];
    readonly fields?: readonly string[];
    readonly types?: readonly WireType[];
    readonly rows?: readonly WireTuple[];
    readonly dict?: Readonly<Record<string, readonly string[]>>;
    readonly total?: number;
    readonly error?: WireError;
}
WirePivotResponse members (17)
NameSignatureDescription
vreadonly v: 1;
idreadonly id: string;
resultVersionoptionalreadonly resultVersion?: string;

Opaque; changes when the model or the data change.

rowCountoptionalreadonly rowCount?: number;

Leaf rows and columns of the full result.

columnCountoptionalreadonly columnCount?: number;
columnDepthoptionalreadonly columnDepth?: number;

Header row count of the column tree and level count of the row tree.

rowDepthoptionalreadonly rowDepth?: number;
rowHeadersoptionalreadonly rowHeaders?: readonly WirePivotHeader[];

The window's header nodes with their ancestors, depth-first.

columnHeadersoptionalreadonly columnHeaders?: readonly WirePivotHeader[];
cellsoptionalreadonly cells?: readonly (readonly (number | null)[])[];

[row - window.rows[0]][column - window.columns[0]]; formatted on the client.

kindsoptionalreadonly kinds?: readonly string[];

Cell kinds parallel to cells, one character per cell (0 value, 1 subtotal, 2 grand total); omitted when every cell is a value.

fieldsoptionalreadonly fields?: readonly string[];
typesoptionalreadonly types?: readonly WireType[];
rowsoptionalreadonly rows?: readonly WireTuple[];
dictoptionalreadonly dict?: Readonly<Record<string, readonly string[]>>;
totaloptionalreadonly total?: number;
erroroptionalreadonly error?: WireError;