/** Options accepted by every Jina request helper. */ export interface JinaRequestOptions { /** Bearer token sent in `Authorization`. Required. */ apiKey: string; /** Override the default 8 s timeout. */ timeoutMs?: number; /** * Optional AbortSignal from the caller. Composed with the internal timeout * signal so either source can cancel the request. */ signal?: AbortSignal; } interface PostJsonParams extends JinaRequestOptions { url: string; body: Req; } /** * POST `body` to `url` as JSON, return the parsed JSON response as `unknown`. * * The response is `unknown` on purpose: callers MUST narrow it with their * own defensive parser (Jina occasionally changes response shapes). * * @throws {JinaAuthError} on 401/403 * @throws {JinaRateLimitError} on 429 * @throws {JinaApiError} on any other non-OK status (incl. HTML * bodies from upstream CDNs/LBs) * @throws {JinaNetworkError} on fetch failure, abort, or timeout */ export declare function postJson({ url, body, apiKey, timeoutMs, signal: callerSignal, }: PostJsonParams): Promise; export {};