template-saas/apps/backend/dist/modules/webhooks/services/webhook.service.d.ts
rckrdmrd 50a821a415
Some checks failed
CI / Backend CI (push) Has been cancelled
CI / Frontend CI (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / CI Summary (push) Has been cancelled
[SIMCO-V38] feat: Actualizar a SIMCO v3.8.0
- HERENCIA-SIMCO.md actualizado con directivas v3.7 y v3.8
- Actualizaciones de configuracion

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 08:53:08 -06:00

33 lines
1.8 KiB
TypeScript

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;
}