API reference: @salmonui/data/json
WireReadResponseinterface
import type { WireReadResponse } from '@salmonui/data/json';Also exported from @salmonui/data.
interface WireReadResponse {
readonly v: 1;
readonly id: string;
readonly fields: readonly string[];
readonly types?: readonly WireType[];
readonly rows: readonly WireTuple[];
readonly dict?: Readonly<Record<string, readonly string[]>>;
readonly total?: number;
readonly next?: string | null;
readonly prev?: string | null;
readonly aggregates?: Readonly<Record<string, Readonly<Record<string, unknown>>>>;
readonly groups?: readonly WireGroup[];
readonly childCounts?: readonly number[];
readonly parents?: readonly Json[];
readonly depths?: readonly number[];
readonly facet?: {
readonly field: string;
readonly entries: readonly (readonly [
key: string,
label: string,
count: number
])[];
readonly complete: boolean;
};
readonly error?: WireError;
}
| Name | Signature | Description |
|---|---|---|
v | readonly v: 1; | |
id | readonly id: string; | |
fields | readonly fields: readonly string[]; | |
typesoptional | readonly types?: readonly WireType[]; | |
rows | readonly rows: readonly WireTuple[]; | |
dictoptional | readonly dict?: Readonly<Record<string, readonly string[]>>; | Dictionary encoding: that field's cells are indexes into the list. |
totaloptional | readonly total?: number; | |
nextoptional | readonly next?: string | null; | Cursor of the next page; null on the last page. |
prevoptional | readonly prev?: string | null; | |
aggregatesoptional | readonly aggregates?: Readonly<Record<string, Readonly<Record<string, unknown>>>>; | |
groupsoptional | readonly groups?: readonly WireGroup[]; | Group level of a lazy group load (instead of rows). |
childCountsoptional | readonly childCounts?: readonly number[]; | Tree loads: child count per row (0 = leaf), parallel to |
parentsoptional | readonly parents?: readonly Json[]; | Tree loads that return more than one level (a filtered read with the
ancestor chain, or a whole subtree): the parent key per row (null: a
root), parallel to |
depthsoptional | readonly depths?: readonly number[]; | Depth per row relative to the requested level (0: a child of |
facetoptional | readonly facet?: {
readonly field: string;
readonly entries: readonly (readonly [
key: string,
label: string,
count: number
])[];
readonly complete: boolean;
}; | |
erroroptional | readonly error?: WireError; |