API reference: @salmonui/data/json
JsonPivotSourceOptionsinterface
import type { JsonPivotSourceOptions } from '@salmonui/data/json';Also exported from @salmonui/data.
interface JsonPivotSourceOptions {
readonly url?: string;
readonly fetch?: FetchLike;
readonly headers?: Readonly<Record<string, string>> | (() => Readonly<Record<string, string>>);
readonly batch?: boolean;
readonly transport?: PivotJsonTransport;
readonly policy?: RequestPolicy;
readonly scheduler?: Scheduler;
readonly onRequest?: (event: PivotRequestEvent) => boolean | void;
readonly onResponse?: (event: PivotResponseEvent) => WireAnyResponse | void;
readonly onError?: (event: PivotRequestErrorEvent) => void;
}
| Name | Signature | Description |
|---|---|---|
urloptional | readonly url?: string; | Endpoint for the default fetch transport. Ignored when |
fetchoptional | readonly fetch?: FetchLike; | |
headersoptional | readonly headers?: Readonly<Record<string, string>> | (() => Readonly<Record<string, string>>); | Request headers (auth), or a function read per request. |
batchoptional | readonly batch?: boolean; | Multiplex same-tick requests into one |
transportoptional | readonly transport?: PivotJsonTransport; | Custom transport (auth refresh, signing, WebSocket, in-process handler). |
policyoptional | readonly policy?: RequestPolicy; | Cache, dedupe and retry, as |
scheduleroptional | readonly scheduler?: Scheduler; | |
onRequestoptional | readonly onRequest?: (event: PivotRequestEvent) => boolean | void; | Called before every request; |
onResponseoptional | readonly onResponse?: (event: PivotResponseEvent) => WireAnyResponse | void; | Called with every successful response; returning an object replaces it. |
onErroroptional | readonly onError?: (event: PivotRequestErrorEvent) => void; |