/** * Transparent polling for tpuf APIs that accept `prefer: respond-async`. * * Every API request is stamped with `prefer: respond-async`. If the server * applies the preference (i.e. responds with `202 Accepted` + * `preference-applied: respond-async`) the SDK polls the operation URL * until it finishes and returns the final result as if the call had been * synchronous. */ import { type Turbopuffer } from "../../client.js"; import { type RequestClock } from "./performance.js"; import { type FinalRequestOptions } from "../request-options.js"; /** tunables; mutable so tests can override */ export declare const config: { pollIntervalMs: number; pollRequestTimeoutMs: number; }; export declare function prepareOptions(options: FinalRequestOptions): void; export declare function maybePoll(client: Turbopuffer, response: Response, requestURL: string, options: FinalRequestOptions, clock: RequestClock): Promise; //# sourceMappingURL=respond-async.d.ts.map