View as Markdown

API reference: @salmonui/data/json

WireWriteResponseinterface

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

Also exported from @salmonui/data.

interface WireWriteResponse {
    readonly v: 1;
    readonly id: string;
    readonly fields?: readonly string[];
    readonly ok?: readonly {
        readonly key: Json;
        readonly index?: number;
        readonly version?: string;
        readonly row?: WireTuple;
    }[];
    readonly errors?: readonly {
        readonly key?: Json;
        readonly index?: number;
        readonly field?: string;
        readonly code: string;
        readonly message: string;
    }[];
    readonly conflicts?: readonly {
        readonly key: Json;
        readonly server: WireTuple;
        readonly version?: string;
    }[];
    readonly total?: number;
    readonly error?: WireError;
}
WireWriteResponse members (8)
NameSignatureDescription
vreadonly v: 1;
idreadonly id: string;
fieldsoptionalreadonly fields?: readonly string[];

Header for the tuples echoed in ok[].row and conflicts[].server. Defaults to the request's fields.

okoptionalreadonly ok?: readonly { readonly key: Json; readonly index?: number; readonly version?: string; readonly row?: WireTuple; }[];

Applied rows. index identifies an added tuple; row is the server echo (real key, computed fields).

errorsoptionalreadonly errors?: readonly { readonly key?: Json; readonly index?: number; readonly field?: string; readonly code: string; readonly message: string; }[];
conflictsoptionalreadonly conflicts?: readonly { readonly key: Json; readonly server: WireTuple; readonly version?: string; }[];
totaloptionalreadonly total?: number;
erroroptionalreadonly error?: WireError;