paginateOffset
paginateOffset<
T>(fetchPage,params?):AsyncGenerator<T,void,undefined>
Defined in: packages/core/dist/index.d.ts:142
Drive an offset-paginated endpoint as an async iterator. Stops when the
server’s pageCount is exhausted (or after the configured maxPages
to bound runaway iteration). Default page size is whatever the
underlying endpoint clamps to — pass limit explicitly for control.
Type Parameters
Section titled “Type Parameters”T
Parameters
Section titled “Parameters”fetchPage
Section titled “fetchPage”(params) => Promise<OffsetPage<T>>
params?
Section titled “params?”limit?
Section titled “limit?”number
maxPages?
Section titled “maxPages?”number
Returns
Section titled “Returns”AsyncGenerator<T, void, undefined>
Example
Section titled “Example”for await (const order of paginateOffset((p) => client.orders.list(p),)) { console.log(order.orderNumber);}Unofficial. Lonca is an independent, community-maintained project — not affiliated with, endorsed by, or supported by Trendyol, Hepsiburada, or any other marketplace. All marketplace names and trademarks belong to their respective owners.