/**
 * HTTP Alert Channel Base
 *
 * Abstract base class for HTTP-based alert channels providing:
 * - Fetch with timeout
 * - Response parsing
 * - HTTP error handling
 * - Headers management
 *
 * @packageDocumentation
 * @module security/alerting/channels/http-base
 */
import { BaseAlertChannel, type BaseChannelConfig } from './base.js';
/**
 * HTTP channel configuration extending base config
 */
export interface HttpChannelConfig extends BaseChannelConfig {
    /** Request timeout in ms */
    timeout?: number;
}
/**
 * HTTP request options
 */
export interface HttpRequestOptions {
    /** Request URL */
    url: string;
    /** HTTP method */
    method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
    /** Request headers */
    headers?: Record<string, string>;
    /** Request body (will be JSON stringified if object) */
    body?: unknown;
    /** Request timeout override */
    timeout?: number;
}
/**
 * HTTP response wrapper
 */
export interface HttpResponse<T = unknown> {
    /** HTTP status code */
    status: number;
    /** Response is OK (2xx) */
    ok: boolean;
    /** Response headers */
    headers: Headers;
    /** Parsed response data */
    data: T;
    /** Raw response text */
    text: string;
}
/**
 * Abstract base class for HTTP-based alert channels
 *
 * Extends BaseAlertChannel with HTTP-specific functionality:
 * - Fetch with timeout and abort controller
 * - JSON request/response handling
 * - HTTP error extraction
 */
export declare abstract class HttpAlertChannel extends BaseAlertChannel {
    constructor(config?: HttpChannelConfig);
    /**
     * Make an HTTP request with timeout
     */
    protected httpRequest<T = unknown>(options: HttpRequestOptions): Promise<HttpResponse<T>>;
    /**
     * Make an HTTP POST request
     */
    protected httpPost<T = unknown>(url: string, body: unknown, headers?: Record<string, string>): Promise<HttpResponse<T>>;
    /**
     * Make an HTTP request and throw on non-2xx response
     */
    protected httpRequestOrThrow<T = unknown>(options: HttpRequestOptions): Promise<HttpResponse<T>>;
    /**
     * Extract error message from HTTP response
     */
    protected extractErrorMessage(response: HttpResponse): string;
    /**
     * Build default headers (can be overridden by subclasses)
     */
    protected getDefaultHeaders(): Record<string, string>;
    /**
     * Merge headers with defaults
     */
    protected mergeHeaders(customHeaders?: Record<string, string>): Record<string, string>;
}
//# sourceMappingURL=http-base.d.ts.map