export interface JsonApiSuccess< Type extends string, Attributes extends Record | undefined, > { data: { id: string; type: Type; attributes: Attributes }[]; } export interface JsonApiError { errors: { status: string; title: string; detail: string; source: { pointer: string; }; }[]; } export type JsonApiResponse< Type extends string, Attributes extends Record | undefined, > = JsonApiSuccess | JsonApiError;