Skip to content
module@warp-drive/core/types/spec/document

Interface SingleResourceDataDocument<T, R> ​

Defined in: warp-drive-packages/core/src/types/spec/document.ts:32

This type represents a raw {json:api} document for a single resource returned by a request intended to be inserted into the cache.

For the Reactive value returned by a request using the store, use ReactiveDataDocument instead.

Type Parameters ​

T ​

T = PersistedResourceKey

R ​

R = PersistedResourceKey

Properties ​

data ​

ts
data: T | null;

Defined in: warp-drive-packages/core/src/types/spec/document.ts:48

the resource the document represents, or null if it has none


included? ​

ts
optional included?: R[];

Defined in: warp-drive-packages/core/src/types/spec/document.ts:52

any additional resources included via sideloading


lid? ​

ts
optional lid?: string;

Defined in: warp-drive-packages/core/src/types/spec/document.ts:36

the url or cache-key associated with the structured document


ts
optional links?: 
  | Links
  | PaginationLinks;

Defined in: warp-drive-packages/core/src/types/spec/document.ts:40

links related to the document


meta? ​

ts
optional meta?: ObjectValue;

Defined in: warp-drive-packages/core/src/types/spec/document.ts:44

meta information about the document

Released under the MIT License.