template-saas/apps/backend/dist/modules/webhooks/dto/webhook.dto.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

77 lines
2.1 KiB
TypeScript

import { DeliveryStatus } from '../entities';
export declare const WEBHOOK_EVENTS: readonly ["user.created", "user.updated", "user.deleted", "subscription.created", "subscription.updated", "subscription.cancelled", "invoice.paid", "invoice.failed", "file.uploaded", "file.deleted", "tenant.updated"];
export type WebhookEvent = (typeof WEBHOOK_EVENTS)[number];
export declare class CreateWebhookDto {
name: string;
description?: string;
url: string;
events: string[];
headers?: Record<string, string>;
}
export declare class UpdateWebhookDto {
name?: string;
description?: string;
url?: string;
events?: string[];
headers?: Record<string, string>;
isActive?: boolean;
}
export declare class WebhookResponseDto {
id: string;
name: string;
description: string | null;
url: string;
events: string[];
headers: Record<string, string>;
isActive: boolean;
createdAt: Date;
updatedAt: Date;
stats?: WebhookStatsDto;
}
export declare class WebhookStatsDto {
totalDeliveries: number;
successfulDeliveries: number;
failedDeliveries: number;
pendingDeliveries: number;
successRate: number;
lastDeliveryAt: Date | null;
}
export declare class DeliveryResponseDto {
id: string;
webhookId: string;
eventType: string;
payload: Record<string, any>;
status: DeliveryStatus;
responseStatus: number | null;
responseBody: string | null;
attempt: number;
maxAttempts: number;
nextRetryAt: Date | null;
lastError: string | null;
createdAt: Date;
deliveredAt: Date | null;
}
export declare class TestWebhookDto {
eventType?: string;
payload?: Record<string, any>;
}
export declare class ListDeliveriesQueryDto {
status?: DeliveryStatus;
eventType?: string;
page?: number;
limit?: number;
}
export declare class PaginatedDeliveriesDto {
items: DeliveryResponseDto[];
total: number;
page: number;
limit: number;
totalPages: number;
}
export declare class AvailableEventsDto {
events: {
name: string;
description: string;
}[];
}