Skip to content

Interface: OffsetPaginateOptions

@kortexya/reasoninglayer


@kortexya/reasoninglayer / OffsetPaginateOptions

Defined in: src/pagination.ts:77

How far to iterate a limit/offset endpoint, where to start, and a window onto each page.

optional limit?: number

Defined in: src/pagination.ts:60

Stop after this many items. Unbounded by default.

PaginateOptions.limit


optional offset?: number

Defined in: src/pagination.ts:86

The zero-based offset of the first item to read. Default 0.

Resumes a walk after a page the caller already holds — read the first page with the listing call, then iterate from its length — so that page is not requested twice.


optional onPage?: (page) => void

Defined in: src/pagination.ts:96

Called once per page read, before that page’s items are yielded.

OffsetPageInfo

void

Carries the match total the iterator reads anyway, so a caller that needs “N of M” does not have to issue a separate listing call for it. A total that stays above the items read tells a truncated walk (an overall limit) from a complete one.


optional pageSize?: number

Defined in: src/pagination.ts:58

Items per request. Default 100.

PaginateOptions.pageSize