IPaginationConfig
Defined in: src/lib/interfaces/pagination-config.interface.ts:10
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
currentPage?
optionalcurrentPage?:string
Defined in: src/lib/interfaces/pagination-config.interface.ts:12
Key for the current page number (Laravel: 'current_page', NestJS: 'meta.currentPage')
data?
optionaldata?:string
Defined in: src/lib/interfaces/pagination-config.interface.ts:14
Key for the data array (default: 'data')
firstPageUrl?
optionalfirstPageUrl?:string
Defined in: src/lib/interfaces/pagination-config.interface.ts:16
Key for the first page URL (Laravel: 'first_page_url', NestJS: 'links.first')
from?
optionalfrom?:string
Defined in: src/lib/interfaces/pagination-config.interface.ts:18
Key for the "from" item index (Laravel: 'from', NestJS: computed)
lastPage?
optionallastPage?:string
Defined in: src/lib/interfaces/pagination-config.interface.ts:20
Key for the last page number (Laravel: 'last_page', NestJS: 'meta.totalPages')
lastPageUrl?
optionallastPageUrl?:string
Defined in: src/lib/interfaces/pagination-config.interface.ts:22
Key for the last page URL (Laravel: 'last_page_url', NestJS: 'links.last')
nextPageUrl?
optionalnextPageUrl?:string
Defined in: src/lib/interfaces/pagination-config.interface.ts:24
Key for the next page URL (Laravel: 'next_page_url', NestJS: 'links.next')
path?
optionalpath?:string
Defined in: src/lib/interfaces/pagination-config.interface.ts:26
Key for the base path (Laravel only, default: 'path')
perPage?
optionalperPage?:string
Defined in: src/lib/interfaces/pagination-config.interface.ts:28
Key for items per page (Laravel: 'per_page', NestJS: 'meta.itemsPerPage')
prevPageUrl?
optionalprevPageUrl?:string
Defined in: src/lib/interfaces/pagination-config.interface.ts:30
Key for the previous page URL (Laravel: 'prev_page_url', NestJS: 'links.previous')
to?
optionalto?:string
Defined in: src/lib/interfaces/pagination-config.interface.ts:32
Key for the "to" item index (Laravel: 'to', NestJS: computed)
total?
optionaltotal?:string
Defined in: src/lib/interfaces/pagination-config.interface.ts:34
Key for the total item count (Laravel: 'total', NestJS: 'meta.totalItems')