/** Data embedded in a cursor-based pagination token. */ export interface CursorData { id: string; createdAt?: number; offset?: number; } /** Build a {@link CursorData} record from raw fields. */ export declare function createCursor(id: string, createdAt?: Date | number, offset?: number): CursorData; /** Parse a raw cursor payload (JSON string or parsed object) into validated {@link CursorData}. */ export declare function parseCursor(data: string | Record): CursorData; /** Encode {@link CursorData} into an opaque base64url cursor string. */ export declare function encodeCursor(cursor: CursorData): string; /** Decode a base64url cursor string back to its JSON representation. */ export declare function decodeCursor(encoded: string): string; /** One-shot: create a cursor from item fields and encode it immediately. */ export declare function encodeCursorFromItem(id: string, createdAt?: Date | number, offset?: number): string; /** Decode a base64url cursor string and parse it into validated {@link CursorData}. Enforces a size cap to reject hostile input. */ export declare function decodeAndParseCursor(encoded: string): CursorData; /** Generate pagination metadata (`nextCursor`, `hasMore`, `limit`) for a list result. Uses the last item's `id` and `createdAt` as the cursor anchor. */ export declare function buildCursorMeta(items: T[], limit: number, hasMore: boolean): { nextCursor?: string; hasMore: boolean; limit: number; }; //# sourceMappingURL=cursor.d.ts.map