Skip to content
API/DirectusResponseOptions

DirectusResponseOptions

src/models/response-options.tsclass

Pre-configured ResponseOptions for the Directus driver

The Directus envelope is { data, meta: { total_count, filter_count } } (with meta=total_count,filter_count requested — the request strategy always emits it). total defaults to meta.filter_count, the count of items matching the current filter; point it at meta.total_count via PaginationConfig for the unfiltered collection size. The envelope names no current page, page size, or navigation URLs, so those paths default to empty strings — the strategy falls back to page 1 and derives lastPage/from/to only when the response provably holds the whole filtered set. All paths are overridable (dot notation supported) for custom wrappers that do include paging fields.

new DirectusResponseOptions(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