import { type SecurityAlert } from '../types.js';
import { HttpAlertChannel, type HttpChannelConfig } from './http-base.js';
import type { SendInternalResult } from './base.js';
export interface WebhookChannelConfig extends HttpChannelConfig {
    /** Webhook URL */
    url: string;
    /** HTTP method (default: POST) */
    method?: 'POST' | 'PUT' | 'PATCH';
    /** Custom headers */
    headers?: Record<string, string>;
    /** Authentication configuration */
    auth?: {
        type: 'basic' | 'bearer' | 'api-key' | 'hmac';
        /** For basic auth: username */
        username?: string;
        /** For basic auth: password; for bearer: token; for api-key: key */
        credentials?: string;
        /** For api-key: header name (default: X-API-Key) */
        headerName?: string;
        /** For HMAC: secret key */
        secret?: string;
        /** For HMAC: algorithm (default: sha256) */
        algorithm?: 'sha256' | 'sha384' | 'sha512';
        /** For HMAC: header name (default: X-Signature) */
        signatureHeader?: string;
    };
    /** Custom payload transformer */
    transformPayload?: (alert: SecurityAlert) => unknown;
    /** Content type (default: application/json) */
    contentType?: string;
    /** Include timestamp header */
    includeTimestamp?: boolean;
    /** Timestamp header name (default: X-Timestamp) */
    timestampHeader?: string;
    /** Verify SSL (default: true) */
    verifySSL?: boolean;
}
/**
 * Generic webhook integration for security alerts
 */
export declare class WebhookAlertChannel extends HttpAlertChannel {
    protected readonly channelType: "webhook";
    protected readonly channelName = "Webhook";
    protected readonly logger: import("pino").Logger<never, boolean>;
    private readonly url;
    private readonly method;
    private readonly customHeaders;
    private readonly auth?;
    private readonly transformPayload?;
    private readonly contentType;
    private readonly includeTimestamp;
    private readonly timestampHeader;
    constructor(config: WebhookChannelConfig);
    /**
     * Send an alert to the webhook
     */
    protected sendInternal(alert: SecurityAlert): Promise<SendInternalResult>;
    /**
     * Add authentication headers
     */
    private addAuthHeaders;
    /**
     * Test the webhook connection
     */
    test(): Promise<boolean>;
    /**
     * Get the webhook URL (masked for debugging)
     */
    getUrl(): string;
    /**
     * Mask sensitive parts of URL
     */
    private maskUrl;
}
/**
 * Create a new webhook alert channel
 */
export declare function createWebhookChannel(config: WebhookChannelConfig): WebhookAlertChannel;
/**
 * Create a webhook channel with HMAC signing
 */
export declare function createSignedWebhookChannel(url: string, secret: string, options?: Partial<WebhookChannelConfig>): WebhookAlertChannel;
//# sourceMappingURL=webhook.d.ts.map