TypeScript API / laikacms/json-api / decodeJsonApiResource
Variable: decodeJsonApiResource
ts
const decodeJsonApiResource: (input, options?) => object;Parameters
| Parameter | Type |
|---|---|
input | unknown |
options? | ParseOptions |
Returns
attributes
ts
readonly attributes: object;Index Signature
ts
[key: string]: anyid
ts
readonly id: string = S.String;links?
ts
readonly optional links?: object;Resource-level links per JSON:API spec — at minimum self, optionally related. Lets a client navigate from a collection item to its canonical detail URL without reconstructing the route table.
Index Signature
ts
[key: string]: stringmeta?
ts
readonly optional meta?: object;Per JSON:API spec, resource-level meta is the right home for protocol / backend-specific information that isn't part of the entity's primary attributes — e.g. a storage object's extension + revisionId.
Index Signature
ts
[key: string]: anyrelationships?
ts
readonly optional relationships?: object;Index Signature
ts
[key: string]: anytype
ts
readonly type: string = S.String;