import type { JsonApiResponse, SearchParams } from "../types.js"; import { type QueryValue } from "./http/transport.js"; import type { ProgressReporter } from "./progress.js"; export declare function buildSearchQuery(params: SearchParams): Record; /** * Search wrapper around `apiRequest` that enforces BoondManager's per-route * `maxResults` ceiling (see `ROUTE_MAX_RESULTS`). When the caller requests more * results than the route allows, the request is transparently split into * chunks of `cap` records and the pages are merged into a single JSON:API * response — the caller still receives the full page, but BoondManager never * sees `maxResults` above the cap (which overflows memory on `/actions`). * * Routes whose ceiling already covers the requested page size take the fast * path: a single `apiRequest`, byte-for-byte identical to calling it directly. * The chunk count is bounded by `ceil((offset + requested) / cap)`, so there is * no unbounded loop; the loop also stops early once a page comes back short * (end of the result set on the server). * * `onProgress` (optional, last position — no existing caller had to change) is * invoked **only on the chunked path**: one step per BoondManager page. The * fast path stays silent on purpose — a single API call has nothing to report * and a "1/1" notification would be pure noise. The reporter is a no-op unless * the client sent a `progressToken` (see `services/progress.ts`). */ export declare function apiSearch(path: string, query: Record, onProgress?: ProgressReporter): Promise; //# sourceMappingURL=search.d.ts.map