/** * Auto-paging utilities for MercadoPago search endpoints. * * Returns an `AsyncIterable` that lazily fetches pages of results so * callers can iterate over every item with a `for await...of` loop without * manually managing offset/limit. * * Example: * ```ts * const payment = new Payment(config); * for await (const p of payment.searchAll({ status: 'approved' })) { * console.log(p.id); * } * ``` */ import type { PageResult } from './types'; type SearchFn = (options?: TOptions) => Promise>; /** * Creates an `AsyncIterable` that auto-fetches all pages. * * Supports both offset/limit pagination (Pattern A) and page/page_size * pagination (Pattern B, used by some Order endpoints). * * @param searchFn Callable that accepts search options and returns one page. * @param baseOptions Initial search options. `limit`/`offset` are managed automatically. * @param pageSize Items per page. Defaults to 100. */ export declare function createAutoPagingIterable>(searchFn: SearchFn, baseOptions?: TOptions, pageSize?: number): AsyncIterable; export {};