import type { ZodTypeAny, z } from 'zod'; interface PaginationParams { cursor?: number | null; perPage?: number; total: number; items: T[]; } interface PaginationResult { total: number; perPage: number; currentPage: number; lastPage: number; nextPage: number | null; previousPage: number | null; data: T[]; } /** * Class to handle pagination calculations and operations. */ declare class PaginationUtility { /** * Calculates the page number and the number of items to skip based on the cursor and items per page. * @param cursor The current page number, defaults to 1 if not provided. * @param perPage The number of items per page, defaults to 10 if not provided. * @returns An object with the calculated page number and skip count. */ calculatePaginationCursor({ cursor, perPage, }: { cursor?: number | null; perPage?: number | null; }): { page: number; skip: number; }; /** * Paginates an array of items. * @param cursor The page number to retrieve. * @param perPage The number of items per page. * @param total The total number of items. * @param items The array of items to paginate. * @returns The paginated result including metadata. */ paginate({ cursor, perPage, total, items, }: PaginationParams): PaginationResult; getNextCursor({ limit, items, schema, }: { limit: number; items: any[]; schema: T; }): z.infer | undefined; } export declare const paginationUtility: PaginationUtility; export {};