import { z } from 'zod';
import { ServiceBubble } from '../../types/service-bubble-class.js';
import type { BubbleContext } from '../../types/bubble.js';
import { CredentialType, type BubbleName } from '@bubblelab/shared-schemas';
declare const HttpParamsSchema: z.ZodObject<{
    url: z.ZodString;
    method: z.ZodDefault<z.ZodEnum<["GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS"]>>;
    headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
    body: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
    timeout: z.ZodDefault<z.ZodNumber>;
    followRedirects: z.ZodDefault<z.ZodBoolean>;
    authType: z.ZodDefault<z.ZodEnum<["none", "bearer", "basic", "api-key", "api-key-header", "custom"]>>;
    authHeader: z.ZodOptional<z.ZodString>;
    responseType: z.ZodDefault<z.ZodEnum<["auto", "text", "binary"]>>;
    credentials: z.ZodOptional<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>;
}, "strip", z.ZodTypeAny, {
    url: string;
    timeout: number;
    method: "POST" | "DELETE" | "GET" | "PUT" | "PATCH" | "HEAD" | "OPTIONS";
    followRedirects: boolean;
    authType: "none" | "custom" | "bearer" | "basic" | "api-key" | "api-key-header";
    responseType: "binary" | "auto" | "text";
    credentials?: Partial<Record<CredentialType, string>> | undefined;
    headers?: Record<string, string> | undefined;
    body?: string | Record<string, unknown> | undefined;
    authHeader?: string | undefined;
}, {
    url: string;
    credentials?: Partial<Record<CredentialType, string>> | undefined;
    timeout?: number | undefined;
    headers?: Record<string, string> | undefined;
    method?: "POST" | "DELETE" | "GET" | "PUT" | "PATCH" | "HEAD" | "OPTIONS" | undefined;
    body?: string | Record<string, unknown> | undefined;
    followRedirects?: boolean | undefined;
    authType?: "none" | "custom" | "bearer" | "basic" | "api-key" | "api-key-header" | undefined;
    authHeader?: string | undefined;
    responseType?: "binary" | "auto" | "text" | undefined;
}>;
type HttpParamsInput = z.input<typeof HttpParamsSchema>;
type HttpParams = z.output<typeof HttpParamsSchema>;
declare const HttpResultSchema: z.ZodObject<{
    status: z.ZodNumber;
    statusText: z.ZodString;
    headers: z.ZodRecord<z.ZodString, z.ZodString>;
    body: z.ZodString;
    isBase64: z.ZodBoolean;
    contentType: z.ZodString;
    json: z.ZodOptional<z.ZodUnknown>;
    success: z.ZodBoolean;
    error: z.ZodString;
    responseTime: z.ZodNumber;
    size: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
    status: number;
    error: string;
    success: boolean;
    isBase64: boolean;
    headers: Record<string, string>;
    size: number;
    body: string;
    contentType: string;
    statusText: string;
    responseTime: number;
    json?: unknown;
}, {
    status: number;
    error: string;
    success: boolean;
    isBase64: boolean;
    headers: Record<string, string>;
    size: number;
    body: string;
    contentType: string;
    statusText: string;
    responseTime: number;
    json?: unknown;
}>;
type HttpResult = z.output<typeof HttpResultSchema>;
export declare class HttpBubble extends ServiceBubble<HttpParams, HttpResult> {
    static readonly service = "nodex-core";
    static readonly authType: "apikey";
    static readonly bubbleName: BubbleName;
    static readonly type: "service";
    static readonly schema: z.ZodObject<{
        url: z.ZodString;
        method: z.ZodDefault<z.ZodEnum<["GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS"]>>;
        headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
        body: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
        timeout: z.ZodDefault<z.ZodNumber>;
        followRedirects: z.ZodDefault<z.ZodBoolean>;
        authType: z.ZodDefault<z.ZodEnum<["none", "bearer", "basic", "api-key", "api-key-header", "custom"]>>;
        authHeader: z.ZodOptional<z.ZodString>;
        responseType: z.ZodDefault<z.ZodEnum<["auto", "text", "binary"]>>;
        credentials: z.ZodOptional<z.ZodRecord<z.ZodNativeEnum<typeof CredentialType>, z.ZodString>>;
    }, "strip", z.ZodTypeAny, {
        url: string;
        timeout: number;
        method: "POST" | "DELETE" | "GET" | "PUT" | "PATCH" | "HEAD" | "OPTIONS";
        followRedirects: boolean;
        authType: "none" | "custom" | "bearer" | "basic" | "api-key" | "api-key-header";
        responseType: "binary" | "auto" | "text";
        credentials?: Partial<Record<CredentialType, string>> | undefined;
        headers?: Record<string, string> | undefined;
        body?: string | Record<string, unknown> | undefined;
        authHeader?: string | undefined;
    }, {
        url: string;
        credentials?: Partial<Record<CredentialType, string>> | undefined;
        timeout?: number | undefined;
        headers?: Record<string, string> | undefined;
        method?: "POST" | "DELETE" | "GET" | "PUT" | "PATCH" | "HEAD" | "OPTIONS" | undefined;
        body?: string | Record<string, unknown> | undefined;
        followRedirects?: boolean | undefined;
        authType?: "none" | "custom" | "bearer" | "basic" | "api-key" | "api-key-header" | undefined;
        authHeader?: string | undefined;
        responseType?: "binary" | "auto" | "text" | undefined;
    }>;
    static readonly resultSchema: z.ZodObject<{
        status: z.ZodNumber;
        statusText: z.ZodString;
        headers: z.ZodRecord<z.ZodString, z.ZodString>;
        body: z.ZodString;
        isBase64: z.ZodBoolean;
        contentType: z.ZodString;
        json: z.ZodOptional<z.ZodUnknown>;
        success: z.ZodBoolean;
        error: z.ZodString;
        responseTime: z.ZodNumber;
        size: z.ZodNumber;
    }, "strip", z.ZodTypeAny, {
        status: number;
        error: string;
        success: boolean;
        isBase64: boolean;
        headers: Record<string, string>;
        size: number;
        body: string;
        contentType: string;
        statusText: string;
        responseTime: number;
        json?: unknown;
    }, {
        status: number;
        error: string;
        success: boolean;
        isBase64: boolean;
        headers: Record<string, string>;
        size: number;
        body: string;
        contentType: string;
        statusText: string;
        responseTime: number;
        json?: unknown;
    }>;
    static readonly shortDescription = "Makes HTTP requests to external APIs and services";
    static readonly longDescription = "\n    A basic HTTP client bubble for making requests to external APIs and web services.\n    \n    Features:\n    - Support for all major HTTP methods (GET, POST, PUT, PATCH, DELETE, etc.)\n    - Custom headers and request body support\n    - Configurable timeouts and redirect handling\n    - JSON parsing for API responses\n    - Detailed response metadata (status, headers, timing, size)\n    - Error handling with meaningful messages\n    \n    Use cases:\n    - Calling external REST APIs\n    - Webhook requests\n    - Data fetching from web services\n    - Integration with third-party services\n    - Simple web scraping (for public APIs)\n    - Health checks and monitoring\n  ";
    static readonly alias = "fetch";
    constructor(params?: HttpParamsInput, context?: BubbleContext);
    protected chooseCredential(): string | undefined;
    testCredential(): Promise<boolean>;
    protected performAction(context?: BubbleContext): Promise<HttpResult>;
    /**
     * Determines if a Content-Type represents text content (as opposed to binary).
     * Binary content will be base64-encoded in the response body.
     */
    private isTextMimeType;
}
export {};
//# sourceMappingURL=http.d.ts.map