Interface: OffsetPaginateOptions
@kortexya/reasoninglayer / OffsetPaginateOptions
Interface: OffsetPaginateOptions
Section titled “Interface: OffsetPaginateOptions”Defined in: src/pagination.ts:77
How far to iterate a limit/offset endpoint, where to start, and a window
onto each page.
Extends
Section titled “Extends”Properties
Section titled “Properties”limit?
Section titled “limit?”
optionallimit?:number
Defined in: src/pagination.ts:60
Stop after this many items. Unbounded by default.
Inherited from
Section titled “Inherited from”offset?
Section titled “offset?”
optionaloffset?:number
Defined in: src/pagination.ts:86
The zero-based offset of the first item to read. Default 0.
Remarks
Section titled “Remarks”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.
onPage?
Section titled “onPage?”
optionalonPage?: (page) =>void
Defined in: src/pagination.ts:96
Called once per page read, before that page’s items are yielded.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
Remarks
Section titled “Remarks”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.
pageSize?
Section titled “pageSize?”
optionalpageSize?:number
Defined in: src/pagination.ts:58
Items per request. Default 100.