import { Effect, Stream } from "effect"; import { ValidationError } from "../../errors/crud-errors.js"; import type { CursorConfig, CursorPageResult } from "../../types/cursor-types.js"; /** * Apply cursor-based pagination to a sorted stream. * * Unlike offset/limit pagination which is a lazy Stream combinator, * cursor pagination terminates the stream into a concrete CursorPageResult * because cursor metadata (hasNextPage, hasPreviousPage, cursors) requires * collecting items. * * The input stream MUST be sorted by the cursor key (ascending). * * @param config - The cursor configuration specifying key, after/before, and limit * @returns A function that takes a sorted stream and produces a CursorPageResult Effect */ export declare const applyCursor: (config: CursorConfig) => , E, R>(stream: Stream.Stream) => Effect.Effect, E | ValidationError, R>; //# sourceMappingURL=cursor-stream.d.ts.map