Skip to main content
Version: next

PayloadResponseOptions

Defined in: src/lib/models/response-options.ts:321

Pre-configured ResponseOptions for the Payload CMS driver

The envelope is the flat mongoose-paginate-v2 shape: { docs, totalDocs, limit, totalPages, page, pagingCounter, hasPrevPage, hasNextPage, prevPage, nextPage }. pagingCounter is the 1-indexed offset of the first doc on the page and maps onto from; to has no body field and is derived. prevPage/nextPage are page numbers, not URLs, so the navigation-URL paths default to empty strings. All paths are overridable via IPaginationConfig (dot notation supported) for custom wrappers.

Extends​

Constructors​

Constructor​

new PayloadResponseOptions(options): PayloadResponseOptions

Defined in: src/lib/models/response-options.ts:322

Parameters​

options​

IPaginationConfig

Returns​

PayloadResponseOptions

Overrides​

ResponseOptions.constructor

Properties​

currentPage​

readonly currentPage: string

Defined in: src/lib/models/response-options.ts:18

Inherited from​

ResponseOptions.currentPage


data​

readonly data: string

Defined in: src/lib/models/response-options.ts:19

Inherited from​

ResponseOptions.data


firstPageUrl​

readonly firstPageUrl: string

Defined in: src/lib/models/response-options.ts:20

Inherited from​

ResponseOptions.firstPageUrl


from​

readonly from: string

Defined in: src/lib/models/response-options.ts:21

Inherited from​

ResponseOptions.from


lastPage​

readonly lastPage: string

Defined in: src/lib/models/response-options.ts:22

Inherited from​

ResponseOptions.lastPage


lastPageUrl​

readonly lastPageUrl: string

Defined in: src/lib/models/response-options.ts:23

Inherited from​

ResponseOptions.lastPageUrl


nextPageUrl​

readonly nextPageUrl: string

Defined in: src/lib/models/response-options.ts:24

Inherited from​

ResponseOptions.nextPageUrl


path​

readonly path: string

Defined in: src/lib/models/response-options.ts:25

Inherited from​

ResponseOptions.path


perPage​

readonly perPage: string

Defined in: src/lib/models/response-options.ts:26

Inherited from​

ResponseOptions.perPage


prevPageUrl​

readonly prevPageUrl: string

Defined in: src/lib/models/response-options.ts:27

Inherited from​

ResponseOptions.prevPageUrl


to​

readonly to: string

Defined in: src/lib/models/response-options.ts:28

Inherited from​

ResponseOptions.to


total​

readonly total: string

Defined in: src/lib/models/response-options.ts:29

Inherited from​

ResponseOptions.total