Type alias CollectionResponse<Resource, Included, Meta>

CollectionResponse<Resource, Included, Meta>: {
    t: "collection";
    data: Resource[];
    included?: Included[];
    meta: Meta & {
        pg: NextPageParams;
    };
}

A typical collection response

Type Parameters

  • Resource extends unknown = unknown

  • Included extends unknown = unknown

  • Meta extends unknown = unknown

Type declaration

  • t: "collection"
  • data: Resource[]
  • Optional included?: Included[]
  • meta: Meta & {
        pg: NextPageParams;
    }

    For collections, there is a definite meta key and it contains at least the Page parameters.

Generated using TypeDoc