Type alias JsonApiDocument

JsonApiDocument: XOR<{
    data: ResourceObject | ResourceObject[] | ResourceIdentifierObject | ResourceIdentifierObject[] | null;
}, {
    errors: ErrorObject[];
}> & {
    included?: ResourceObject[];
    jsonapi?: JsonApiObject;
    links?: TopLevelLinksObject;
    meta?: MetaObject;
}

This type looks a bit more complicated, as we require either the data or errors property, but not both at the same time.

See

https://jsonapi.org/format/1.0/#document-top-level

Generated using TypeDoc