import { Entity, KeyOf, Listable } from '../base.dto'; import { IBaseRequest, ISort } from '../base.request'; export type CursorDirection = 'asc' | 'desc'; export type CursorValueType = 'boolean' | 'date' | 'null' | 'number' | 'objectId' | 'string'; export interface ICursorValue { type: CursorValueType; value: boolean | number | string | null; } export interface ICursorPayload { version: 1; keys: string[]; directions: CursorDirection[]; values: ICursorValue[]; } export interface ICursorDefinition { keys: string[]; directions: CursorDirection[]; values?: unknown[]; } export interface ICursorDefinitionOptions { defaultKeys: string[]; tieBreakerKeys?: string[]; defaultDirection?: CursorDirection; cursorKey?: Listable>; cursor?: string; sort?: ISort; } export declare class CursorPagination { private static readonly FIELD_PATTERN; static isCursorRequest(query: IBaseRequest): boolean; static getLimit(limit?: number, fallback?: number): number; static resolve(options: ICursorDefinitionOptions): ICursorDefinition; static toSort(keys: string[], directions: CursorDirection[]): ISort; static slice(items: T[], limit: number, keys: string[], directions: CursorDirection[]): { hasNextPage: boolean; items: T[]; nextCursor: string | null; }; private static resolveKeys; private static toKeys; private static getDirection; private static flattenSort; private static assertSafeKey; private static encode; private static decode; private static serializeValue; private static deserializeValue; } //# sourceMappingURL=cursor-pagination.d.ts.map