/**
 * JSON:API pagination links
 */
export interface PaginationLinks {
    self?: string;
    first?: string;
    last?: string;
    prev?: string | null;
    next?: string | null;
}
/**
 * JSON:API response with pagination
 */
export interface PaginatedResponse<T> {
    data: T[];
    links?: PaginationLinks;
    meta?: {
        total_count?: number;
        page_count?: number;
        current_page?: number;
    };
}
/**
 * Options for paginated requests
 */
export interface PaginationOptions {
    /**
     * Page size (number of items per page)
     */
    pageSize?: number;
    /**
     * Maximum total items to fetch (default: unlimited for paginateAll, 10000 for paginateToArray)
     */
    limit?: number;
    /**
     * Maximum number of pages to fetch (default: 500)
     * Safety limit to prevent infinite pagination loops
     */
    maxPages?: number;
    /**
     * Optional logger for warnings. If not provided, falls back to console.
     */
    logger?: {
        warn: (...args: unknown[]) => void;
    };
}
/**
 * Async iterator for paginated results.
 * Security: Enforces max pages limit to prevent infinite pagination loops.
 */
export declare function paginateAll<T>(fetcher: (page: number, pageSize: number) => Promise<PaginatedResponse<T>>, options?: PaginationOptions): AsyncIterableIterator<T>;
/**
 * Helper to collect all paginated results into an array
 * Security: Enforces default limit to prevent DoS via infinite pagination
 */
export declare function paginateToArray<T>(fetcher: (page: number, pageSize: number) => Promise<PaginatedResponse<T>>, options?: PaginationOptions): Promise<T[]>;
//# sourceMappingURL=pagination.d.ts.map