Shared pagination helper used by testRepo and runRepo.
All paginated list endpoints share the same default page size so API
consumers get a consistent experience. Change DEFAULT_PAGE_SIZE
to adjust the global default; the maxPageSize guard prevents abuse.
- Source:
Members
(static, constant) DEFAULT_PAGE_SIZE
Default number of records per page when the caller omits pageSize.
- Source:
(static, constant) MAX_PAGE_SIZE
Hard upper bound — requests above this are clamped silently.
- Source:
Methods
(static) parsePagination(pageopt, pageSizeopt) → {Object}
Clamp and parse page / pageSize from route query params.
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
page |
string | number |
<optional> |
1 | |
pageSize |
string | number |
<optional> |
DEFAULT_PAGE_SIZE |
- Source:
Returns:
- Type
- Object
Type Definitions
PageMeta
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
total |
number | Total matching records (ignoring pagination). |
page |
number | Current 1-based page number. |
pageSize |
number | Records per page. |
hasMore |
boolean | Whether a next page exists. |
- Source:
PagedResult
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
data |
Array.<Object> | Deserialized records for the current page. |
meta |
PageMeta | Pagination metadata. |
- Source: