Skip to content
API/JsonServerResponseOptions

JsonServerResponseOptions

src/models/response-options.tsclass

Pre-configured ResponseOptions for the json-server driver

The json-server v1 envelope is { first, prev, next, last, pages, items, data }, where first/prev/next/last are page numbers, not URLs — the strategy reads prev/next directly for position derivation and leaves the URL slots undefined, so the navigation-URL paths default to empty strings. total maps to items and lastPage to pages; currentPage and perPage have no body field and are derived.

new JsonServerResponseOptions(options: PaginationConfig)
Parameter Type Description
options PaginationConfig
Property Type Description
currentPage string
data string
firstPageUrl string
from string
lastPage string
lastPageUrl string
nextPageUrl string
path string
perPage string
prevPageUrl string
to string
total string