Skip to content

TypeScript API / laikacms/json-api / decodeJsonApiCollectionResponse

Variable: decodeJsonApiCollectionResponse ​

ts
const decodeJsonApiCollectionResponse: (input, options?) => object;

Parameters ​

ParameterType
inputunknown
options?ParseOptions

Returns ​

object

data ​

ts
readonly data: readonly object[];

included? ​

ts
readonly optional included?: readonly object[];
ts
readonly optional links?: object;
ts
readonly optional first?: string;
ts
readonly optional last?: string;
ts
readonly optional next?: string;
ts
readonly optional prev?: string;
ts
readonly optional self?: string;

meta? ​

ts
readonly optional meta?: object;

meta.page? ​

ts
readonly optional page?: object;

meta.page.estimatedTotal? ​

ts
readonly optional estimatedTotal?: number;

meta.page.total? ​

ts
readonly optional total?: number;

meta.warnings? ​

ts
readonly optional warnings?: readonly object[];

Per-item recoverable errors emitted while assembling this response. Surfaces LaikaStream recoverableErrors (per-key delete failures, unreadable subfolders, corrupt rows, …) without aborting the response. Same shape as a top-level JSON:API error object.

Released under the MIT License.