import { type HttpContext } from "../http.js"; import type { RequestOp, Transport, TransportName, TransportResult } from "./types.js"; export interface HttpOpDescriptor { method: "GET" | "POST" | "DELETE"; path: string; query?: Record; noNamespace?: boolean; body?: unknown; retry?: boolean; disabledOn503?: boolean; signal?: AbortSignal; headers?: Record; } export interface HttpTransportConfig { endpoint: string; apiKey: string | undefined; fetchImpl: typeof fetch; timeoutMs: number; namespace: string | undefined; maxRetries?: number; backoffMs?: number; } export interface RequestMeta { retried: number; status?: number; } export type HttpTransportResult = TransportResult & { meta?: RequestMeta; }; export declare class HttpTransport implements Transport { readonly name: TransportName; private readonly endpoint; private readonly apiKey; private readonly fetchImpl; private readonly timeoutMs; private readonly namespace; private readonly maxRetries; private readonly backoffMs; constructor(config: HttpTransportConfig); toHttpContext(): HttpContext; request(op: RequestOp): Promise; private doFetch; } export declare function httpOp(kind: string, http: HttpOpDescriptor): RequestOp;