/** * Cursor-based pagination utility. * * Provides a shared `paginateItems` function used by all services that return * `IPaginatedResult`. The cursor is an opaque item ID; the page starts * after the item whose `id` matches the cursor. * * Requirements: 8.1 */ import { IPaginatedResult } from '../interfaces/communication'; /** * An item that can be paginated — must expose a string `id`. */ export interface Identifiable { id: string; } /** * Apply cursor-based pagination to an already-sorted array of items. * * @param items - The full sorted array to paginate. * @param cursor - Opaque cursor (the `id` of the last item on the previous page). * When `undefined` the first page is returned. * @param limit - Maximum number of items per page (defaults to 50). * @returns A `IPaginatedResult` with the page slice, next cursor, and `hasMore` flag. */ export declare function paginateItems(items: T[], cursor?: string, limit?: number): IPaginatedResult; //# sourceMappingURL=pagination.d.ts.map