import type { ProviderAuthMaterial } from "../authProfileLayer/authEnvelope.js";
import { type ProviderAccessError } from "./providerErrorClassifier.js";
import type { ProviderTransport } from "./transportCaller.js";
export type ProviderCallerRequestEnvelope = {
    method: string;
    url: string;
    headers?: Readonly<Record<string, string>>;
    query?: Readonly<Record<string, string>>;
    body?: unknown;
    provider?: string;
    endpoint?: string;
};
export type ProviderCallerResponseEnvelope = {
    status: number;
    headers: Readonly<Record<string, string>>;
    body: unknown;
    providerRawShapePromoted: false;
    publicSafe: true;
};
export type ProviderCaller = (request: ProviderCallerRequestEnvelope) => Promise<ProviderCallerResponseEnvelope>;
export type ProviderCallerFactoryInput = {
    transport: ProviderTransport;
    authMaterial?: ProviderAuthMaterial;
    timeoutMs?: number;
    signal?: AbortSignal;
};
export declare function createProviderCaller(input: ProviderCallerFactoryInput): ProviderCaller;
export declare function unwrapProviderCallerBody(response: ProviderCallerResponseEnvelope | unknown): unknown;
export declare function providerCallerErrorCode(error: unknown): ProviderAccessError["code"];
