/**
 * Webhook Configuration Interface
 */
export interface WebhookConfig {
    id: string;
    url: string;
    events: string[];
    headers?: Record<string, string>;
    secret?: string;
    active: boolean;
    retryConfig?: {
        maxRetries: number;
        retryDelay: number;
        backoffMultiplier: number;
    };
    created_at: string;
    updated_at: string;
}
/**
 * Webhook Payload Interface
 */
export interface WebhookPayload {
    event: string;
    taskId: string;
    timestamp: string;
    data: {
        previousStatus?: string;
        currentStatus: string;
        task: any;
        metadata?: Record<string, any>;
    };
    signature?: string;
}
/**
 * Webhook Delivery Result
 */
export interface WebhookDeliveryResult {
    webhookId: string;
    success: boolean;
    statusCode?: number;
    response?: any;
    error?: string;
    attempts: number;
    timestamp: string;
}
/**
 * Webhook Service
 * Manages webhook registration, triggering, and delivery
 */
export declare class WebhookService {
    private client;
    private webhookQueue;
    private webhooks;
    constructor();
    private initializeClient;
    private initializeQueue;
    /**
     * Load webhooks from database
     */
    private loadWebhooks;
    /**
     * Register a new webhook
     */
    registerWebhook(config: Omit<WebhookConfig, 'id' | 'created_at' | 'updated_at'>): Promise<WebhookConfig>;
    /**
     * Update webhook configuration
     */
    updateWebhook(id: string, updates: Partial<WebhookConfig>): Promise<WebhookConfig>;
    /**
     * Delete a webhook
     */
    deleteWebhook(id: string): Promise<void>;
    /**
     * Trigger webhooks for an event
     */
    triggerWebhooks(event: string, taskId: string, data: any): Promise<void>;
    /**
     * Queue webhook delivery
     */
    private queueWebhookDelivery;
    /**
     * Process webhook job
     */
    private processWebhookJob;
    /**
     * Calculate retry delay with exponential backoff
     */
    private calculateRetryDelay;
    /**
     * Generate webhook signature
     */
    private generateSignature;
    /**
     * Validate webhook URL
     */
    private validateWebhookUrl;
    /**
     * Log webhook delivery
     */
    private logDelivery;
    /**
     * Log webhook delivery failure
     */
    private logDeliveryFailure;
    /**
     * Get webhook delivery history
     */
    getDeliveryHistory(webhookId: string, limit?: number): Promise<any[]>;
    /**
     * Test webhook endpoint
     */
    testWebhook(webhookId: string): Promise<WebhookDeliveryResult>;
    /**
     * Get all registered webhooks
     */
    getWebhooks(filter?: {
        active?: boolean;
        event?: string;
    }): Promise<WebhookConfig[]>;
    /**
     * Clean up service
     */
    cleanup(): Promise<void>;
}
export declare const webhookService: WebhookService;
//# sourceMappingURL=webhookService.d.ts.map