Skip to content
module@warp-drive/core/types/spec/json-api-raw

Interface ExistingResourceObject<T> ​

Defined in: warp-drive-packages/core/src/types/spec/json-api-raw.ts:271

Contains the data for an existing resource in JSON:API format

Type Parameters ​

T ​

T extends string = string

Properties ​

attributes? ​

ts
optional attributes?: ObjectValue;

Defined in: warp-drive-packages/core/src/types/spec/json-api-raw.ts:279

the resource's attributes


id ​

ts
id: string;

Defined in: warp-drive-packages/core/src/types/spec/json-api-raw.ts:98

the resource's persisted id

Inherited from ​

ts
ExistingResourceIdentifierObject.id

lid? recommended ​

ts
optional lid?: string;

Defined in: warp-drive-packages/core/src/types/spec/json-api-raw.ts:121

While not officially part of the JSON:API spec, ember-data allows the use of lid as a local identifier for a Resource.

It is best to include the lid used when creating a new resource if this is the response to a new resource creation, also recommended if this resource type uses secondary indexes.

Once a ResourceIdentifierObject has been seen by the cache, lid should always be present. Only when inbound from the an API response is lid considered optional.

Identifiers RFC

Inherited from ​

ts
ExistingResourceIdentifierObject.lid

ts
optional links?: Links;

Defined in: warp-drive-packages/core/src/types/spec/json-api-raw.ts:287

links related to the resource


meta? ​

ts
optional meta?: ObjectValue;

Defined in: warp-drive-packages/core/src/types/spec/json-api-raw.ts:275

meta information about the resource

Overrides ​

ts
ExistingResourceIdentifierObject.meta

relationships? ​

ts
optional relationships?: ResourceRelationshipsObject<ExistingResourceIdentifierObject<string>>;

Defined in: warp-drive-packages/core/src/types/spec/json-api-raw.ts:283

the resource's relationships to other resources


type ​

ts
type: T;

Defined in: warp-drive-packages/core/src/types/spec/json-api-raw.ts:103

the resource's type

Inherited from ​

ExistingResourceObject.type

Released under the MIT License.