import { Repository } from 'typeorm';
import { Queue } from 'bullmq';
import { WebhookEntity, WebhookDeliveryEntity } from '../entities';
import { CreateWebhookDto, UpdateWebhookDto, WebhookResponseDto, DeliveryResponseDto, TestWebhookDto, ListDeliveriesQueryDto, PaginatedDeliveriesDto, WebhookStatsDto } from '../dto';
export declare class WebhookService {
    private readonly webhookRepo;
    private readonly deliveryRepo;
    private readonly webhookQueue;
    private readonly logger;
    constructor(webhookRepo: Repository<WebhookEntity>, deliveryRepo: Repository<WebhookDeliveryEntity>, webhookQueue: Queue);
    private generateSecret;
    signPayload(payload: object, secret: string): string;
    create(tenantId: string, userId: string, dto: CreateWebhookDto): Promise<WebhookResponseDto>;
    findAll(tenantId: string): Promise<WebhookResponseDto[]>;
    findOne(tenantId: string, webhookId: string): Promise<WebhookResponseDto>;
    update(tenantId: string, webhookId: string, dto: UpdateWebhookDto): Promise<WebhookResponseDto>;
    remove(tenantId: string, webhookId: string): Promise<void>;
    regenerateSecret(tenantId: string, webhookId: string): Promise<{
        secret: string;
    }>;
    testWebhook(tenantId: string, webhookId: string, dto: TestWebhookDto): Promise<DeliveryResponseDto>;
    getDeliveries(tenantId: string, webhookId: string, query: ListDeliveriesQueryDto): Promise<PaginatedDeliveriesDto>;
    retryDelivery(tenantId: string, webhookId: string, deliveryId: string): Promise<DeliveryResponseDto>;
    getStats(webhookId: string): Promise<WebhookStatsDto>;
    dispatch(tenantId: string, eventType: string, data: Record<string, any>): Promise<void>;
    getAvailableEvents(): {
        name: string;
        description: string;
    }[];
    private toResponse;
    private toDeliveryResponse;
}
