/** * Cursor-based pagination for Slack API responses. * * Slack uses response_metadata.next_cursor for pagination. * Includes stuck-cursor detection and page safety limits. */ import type { WebClient } from "@slack/web-api"; export interface PaginationOptions { /** Slack API method name (e.g. "conversations.list") */ method: string; /** Base arguments for the API call (excluding cursor) */ args: Record; /** Maximum total items to return (0 = unlimited) */ limit?: number; /** Per-page limit to send to the API */ pageSize?: number; } export interface PaginatedResult { /** All collected items across pages */ items: Record[]; /** Total number of pages fetched */ pagesFetched: number; /** The key in the response that held the data array */ dataKey: string; } /** * Fetch all pages of a paginated Slack API response. */ export declare function fetchAllPages(client: WebClient, options: PaginationOptions): Promise; //# sourceMappingURL=pagination.d.ts.map