Function: paginateByPage()
@kortexya/reasoninglayer / paginateByPage
Function: paginateByPage()
Section titled “Function: paginateByPage()”paginateByPage<
TItem>(read,options?,requestOptions?):AsyncGenerator<TItem,void,undefined>
Defined in: src/pagination.ts:192
Iterate a page/pageSize endpoint, one item at a time.
Type Parameters
Section titled “Type Parameters”TItem
Parameters
Section titled “Parameters”NumberedPageReader<TItem>
Reads one page. Pages are 1-based.
options?
Section titled “options?”Page size and an optional overall cap.
requestOptions?
Section titled “requestOptions?”Per-call options, applied to EVERY page request.
Returns
Section titled “Returns”AsyncGenerator<TItem, void, undefined>
An async iterator over the items.
Example
Section titled “Example”for await (const entry of client.audit.iterate({ eventType: 'credit_decision' })) { console.log(entry.action);}