import type { Stream } from "./streaming.js"; type PatchOperation = { op?: string; path: string; value?: unknown; }; type PatchEvent = ReadonlyArray; /** Where the items and the next page cursor live in the streamed document. */ export type QueryStreamPaths = { /** JSON pointer to the items array, for example `/items`. */ items: string; /** JSON pointer to the next page cursor, for example `/next_cursor`. */ nextCursor: string; }; /** * Yields the items of a streamed query one at a time and follows the next page cursor across pages. * * The stream is a sequence of JSON Patch operations on the page document. While a page only appends items * (the root document, `/-`) each item is yielded as soon as it arrives. As soon as the page inserts * at an index (`add /`) or replaces or removes an item, the position of an item is only known once * the page's stream ends: from then on items are held back and yielded in their final order at the end of * the page. Items yielded before that cannot be reordered. Patches deeper than one item are ignored: the * item was already yielded. */ export declare function iterQueryStream(fetch: (cursor: string | undefined) => Promise>, paths: QueryStreamPaths): AsyncGenerator; export {};