API/PaginationConfig
PaginationConfig
src/types/pagination-config.type.tstype
Configuration interface for customizing response field key names
Each property maps a logical pagination concept to the actual key name used in the API response. The defaults depend on the selected driver.
For the NestJS driver, dot-notation paths are used to access nested values (e.g., ‘meta.currentPage’, ‘links.next’).
Properties
Section titled “Properties”| Property | Type | Description |
|---|---|---|
currentPage |
string |
Key for the current page number (Laravel: ‘current_page’, NestJS: ‘meta.currentPage’) |
data |
string |
Key for the data array (default: ‘data’) |
firstPageUrl |
string |
Key for the first page URL (Laravel: ‘first_page_url’, NestJS: ‘links.first’) |
from |
string |
Key for the “from” item index (Laravel: ‘from’, NestJS: computed) |
lastPage |
string |
Key for the last page number (Laravel: ‘last_page’, NestJS: ‘meta.totalPages’) |
lastPageUrl |
string |
Key for the last page URL (Laravel: ‘last_page_url’, NestJS: ‘links.last’) |
nextPageUrl |
string |
Key for the next page URL (Laravel: ‘next_page_url’, NestJS: ‘links.next’) |
path |
string |
Key for the base path (Laravel only, default: ‘path’) |
perPage |
string |
Key for items per page (Laravel: ‘per_page’, NestJS: ‘meta.itemsPerPage’) |
prevPageUrl |
string |
Key for the previous page URL (Laravel: ‘prev_page_url’, NestJS: ‘links.previous’) |
to |
string |
Key for the “to” item index (Laravel: ‘to’, NestJS: computed) |
total |
string |
Key for the total item count (Laravel: ‘total’, NestJS: ‘meta.totalItems’) |
