/** * Generic interface for paginated responses */ export interface PaginatedResponse { totalPages: number; content: T[]; } /** * Options for pagination extraction */ export interface PaginationOptions { onPageFetched?: (page: number, data: T[], totalItems: number) => void; onPageError?: (page: number, error: unknown) => void; onComplete?: (totalItems: T[]) => void; delayBetweenRequests?: number; fetchPage: (page: number) => Promise>; } /** * Utility class for handling paginated API responses */ export declare class PaginationManager { private static readonly DEFAULT_DELAY_BETWEEN_REQUESTS; /** * Extract all data from a paginated API response * @param options Configuration options for pagination * @returns Promise that resolves to all items from all pages */ static extractAllPages(options: PaginationOptions): Promise; /** * Extract data from a specific range of pages * @param startPage Starting page (0-based) * @param endPage Ending page (exclusive) * @param options Configuration options * @returns Promise that resolves to items from the specified page range */ static extractPageRange(startPage: number, endPage: number, options: PaginationOptions): Promise; /** * Extract data with custom page processing logic * @param options Configuration options with custom processing * @returns Promise that resolves to processed data */ static extractWithCustomProcessing(options: PaginationOptions & { processPage: (page: number, data: T[]) => Promise; combineResults: (results: R[]) => R; }): Promise; } /** * Convenience function for simple pagination extraction */ export declare function extractAllPages(fetchPage: (page: number) => Promise>, options?: Partial>): Promise; /** * Convenience function for extracting a page range */ export declare function extractPageRange(startPage: number, endPage: number, fetchPage: (page: number) => Promise>, options?: Partial>): Promise; //# sourceMappingURL=PaginationManager.d.ts.map