Skip to content
qubeejs/angular
3.8/API/IResponseStrategy

IResponseStrategy

ArchivedThese are the docs for ng-qubee 3.8. Read the 4.0 docs for @qubeejs/angular.

Defined in: src/lib/interfaces/response-strategy.interface.ts:12

Strategy interface for parsing paginated API responses

Each driver implements this interface to parse responses from the corresponding backend format into a PaginatedCollection.

paginate<T>(response, options, headers?): PaginatedCollection<T>

Defined in: src/lib/interfaces/response-strategy.interface.ts:26

Parse a raw API response into a typed PaginatedCollection

T extends IPaginatedObject

Record<string, unknown>

The raw API response object (body). For drivers that emit a bare array body (e.g. PostgREST), pass the array here.

ResponseOptions

The response key name configuration

HeaderBag

Optional HTTP response headers. Drivers that carry pagination metadata in headers (PostgREST’s Content-Range) read from this bag; body-only drivers ignore it. Accepts anything with a .get() accessor (HttpHeaders, Headers) or a plain Record<string, string>.

PaginatedCollection<T>

A typed PaginatedCollection instance