API
Index
Enumerations
Classes
Interfaces
Type aliases
Variables
Functions
Object literals
Type aliases
AnyData
Ƭ AnyData: Data‹any, any›
Defined in jsonApi.interface.ts:46
AttributesOf
Ƭ AttributesOf: D extends object ? D["attributes"] : EmptyRecord
Defined in jsonApi.interface.ts:49
EmptyRecord
Ƭ EmptyRecord: object
Defined in jsonApi.interface.ts:48
Type declaration:
[ key: string]: never
IncludedGroups
Ƭ IncludedGroups: object
Defined in jsonApi.interface.ts:108
Type declaration:
IncludedGroupsSchema
Ƭ IncludedGroupsSchema: Record‹string, IncludedGroup›
Defined in jsonApi.interface.ts:106
IncludedRelationships
Ƭ IncludedRelationships: D[]
Defined in jsonApi.interface.ts:34
MergedData
Ƭ MergedData:
Defined in jsonApi.interface.ts:60
MergeData type
This sophisticated type allows to correctly infer nicely formatted data from JSON API format. id
, type
, attributes
and relationships
suddenly become a single, combined object with easy access to it. Same is applied to arrays.
MergedIncludedGroups
Ƭ MergedIncludedGroups: object
Defined in jsonApi.interface.ts:111
Type declaration:
OptionalRels
Ƭ OptionalRels: Relationships | undefined
Defined in jsonApi.interface.ts:32
RawRelationship
Ƭ RawRelationship: object
Defined in jsonApi.interface.ts:14
Type declaration:
data: T
links? : undefined | object
related? : undefined | string
Relationship
Ƭ Relationship: RawRelationship‹RelationshipData›
Defined in jsonApi.interface.ts:23
RelationshipArray
Ƭ RelationshipArray: RawRelationship‹RelationshipData[]›
Defined in jsonApi.interface.ts:24
RelationshipData
Ƭ RelationshipData: object
Defined in jsonApi.interface.ts:7
Type declaration:
id: string
type: Type
RelationshipType
Ƭ RelationshipType: RelationshipData‹Type› | RelationshipData‹Type›[]
Defined in jsonApi.interface.ts:12
Relationships
Ƭ Relationships: Record‹string, RawRelationship‹RelationshipType› | undefined›
Defined in jsonApi.interface.ts:29
RelationshipsOf
Ƭ RelationshipsOf: D extends object ? D["relationships"] : EmptyRecord
Defined in jsonApi.interface.ts:50
ResolvedRelationship
Ƭ ResolvedRelationship: RawRelationship‹D›
Defined in jsonApi.interface.ts:26
ResolvedRelationshipArray
Ƭ ResolvedRelationshipArray: RawRelationship‹D[]›
Defined in jsonApi.interface.ts:27
ResolvedRelationships
Ƭ ResolvedRelationships: Record‹string, ResolvedRelationship | ResolvedRelationshipArray | undefined›
Defined in jsonApi.interface.ts:31
UnresolvedRelationships
Ƭ UnresolvedRelationships: Record‹string, Relationship | RelationshipArray›
Defined in jsonApi.interface.ts:30
Variables
Const
DEFAULT_RESOURCE_LIMIT
Const
DEFAULT_RESOURCE_LIMIT• DEFAULT_RESOURCE_LIMIT: 10 = 10
Defined in jsonApi.builder.ts:7
Functions
Const
findIncludedRelationship
Const
findIncludedRelationship▸ findIncludedRelationship(relationship
: RelationshipData, included
: IncludedRelationships): AnyData | undefined
Defined in jsonApi.common.ts:41
Parameters:
Name
Type
relationship
included
Returns: AnyData | undefined
Const
includedGroup
Const
includedGroup▸ includedGroup<D>(type
: string): IncludedGroup‹D›
Defined in jsonApi.common.ts:90
Type parameters:
▪ D: AnyData
Parameters:
Name
Type
type
string
Returns: IncludedGroup‹D›
Const
isData
Const
isData▸ isData<D>(data
: RelationshipData | D): data is D
Defined in jsonApi.common.ts:14
Type parameters:
▪ D: AnyData
Parameters:
Name
Type
data
Returns: data is D
Const
mergeElementData
Const
mergeElementData▸ mergeElementData<D>(data
: D): MergedData‹D›
Defined in jsonApi.common.ts:19
Type parameters:
▪ D: AnyData
Parameters:
Name
Type
data
D
Returns: MergedData‹D›
resolveRelationships
▸ resolveRelationships<D>(data
: D, included
: IncludedRelationships): D
Defined in jsonApi.common.ts:50
Type parameters:
Parameters:
Name
Type
data
D
included
Returns: D
▸ resolveRelationships(data
: RelationshipData[], included
: IncludedRelationships): object | Data‹any, any›[]
Defined in jsonApi.common.ts:54
Parameters:
Name
Type
data
included
Returns: object | Data‹any, any›[]
▸ resolveRelationships(data
: RelationshipData, included
: IncludedRelationships): AnyData | RelationshipData
Defined in jsonApi.common.ts:58
Parameters:
Name
Type
data
included
Returns: AnyData | RelationshipData
Object literals
Const
Headers
Const
Headers▪ Headers: object
Defined in jsonApi.interface.ts:137
Accept
• Accept: ContentType = ContentType.VND_JSON
Defined in jsonApi.interface.ts:139
Content-Type
• Content-Type: ContentType = ContentType.VND_JSON
Defined in jsonApi.interface.ts:138
Last updated