import { z } from 'zod';
import type { ApiProvider, CallApiContextParams, ProviderOptions, ProviderResponse } from '../types';
export declare const HttpProviderConfigSchema: z.ZodObject<{
    body: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodString, z.ZodArray<z.ZodAny, "many">]>>;
    headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
    maxRetries: z.ZodOptional<z.ZodNumber>;
    method: z.ZodOptional<z.ZodString>;
    queryParams: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
    request: z.ZodOptional<z.ZodString>;
    sessionParser: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodUnknown>]>>;
    transformRequest: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodUnknown>]>>;
    transformResponse: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodUnknown>]>>;
    url: z.ZodOptional<z.ZodString>;
    validateStatus: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodNumber], z.ZodUnknown>, z.ZodBoolean>]>>;
    /**
     * @deprecated use transformResponse instead
     */
    responseParser: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodUnknown>]>>;
}, "strip", z.ZodTypeAny, {
    url?: string | undefined;
    headers?: Record<string, string> | undefined;
    method?: string | undefined;
    body?: string | any[] | Record<string, any> | undefined;
    maxRetries?: number | undefined;
    queryParams?: Record<string, string> | undefined;
    request?: string | undefined;
    sessionParser?: string | ((...args: unknown[]) => unknown) | undefined;
    transformRequest?: string | ((...args: unknown[]) => unknown) | undefined;
    transformResponse?: string | ((...args: unknown[]) => unknown) | undefined;
    validateStatus?: string | ((args_0: number, ...args: unknown[]) => boolean) | undefined;
    responseParser?: string | ((...args: unknown[]) => unknown) | undefined;
}, {
    url?: string | undefined;
    headers?: Record<string, string> | undefined;
    method?: string | undefined;
    body?: string | any[] | Record<string, any> | undefined;
    maxRetries?: number | undefined;
    queryParams?: Record<string, string> | undefined;
    request?: string | undefined;
    sessionParser?: string | ((...args: unknown[]) => unknown) | undefined;
    transformRequest?: string | ((...args: unknown[]) => unknown) | undefined;
    transformResponse?: string | ((...args: unknown[]) => unknown) | undefined;
    validateStatus?: string | ((args_0: number, ...args: unknown[]) => boolean) | undefined;
    responseParser?: string | ((...args: unknown[]) => unknown) | undefined;
}>;
export type HttpProviderConfig = z.infer<typeof HttpProviderConfigSchema>;
export declare function createSessionParser(parser: string | Function | undefined): Promise<({ headers }: {
    headers: Record<string, string>;
}) => string>;
export declare function createTransformResponse(parser: string | Function | undefined): Promise<(data: any, text: string) => ProviderResponse>;
export declare function processJsonBody(body: Record<string, any> | any[], vars: Record<string, any>): Record<string, any> | any[];
export declare function processTextBody(body: string, vars: Record<string, any>): string;
export declare function createTransformRequest(transform: string | Function | undefined): Promise<(prompt: string) => any>;
export declare function determineRequestBody(contentType: boolean, parsedPrompt: any, configBody: Record<string, any> | any[] | string | undefined, vars: Record<string, any>): Record<string, any> | any[] | string;
export declare function createValidateStatus(validator: string | ((status: number) => boolean) | undefined): Promise<(status: number) => boolean>;
export declare class HttpProvider implements ApiProvider {
    url: string;
    config: HttpProviderConfig;
    private transformResponse;
    private sessionParser;
    private transformRequest;
    private validateStatus;
    constructor(url: string, options: ProviderOptions);
    id(): string;
    toString(): string;
    private getDefaultHeaders;
    private validateContentTypeAndBody;
    private getHeaders;
    callApi(prompt: string, context?: CallApiContextParams): Promise<ProviderResponse>;
    private callApiWithRawRequest;
}
//# sourceMappingURL=http.d.ts.map