1
0
Files
bigcapital/packages/server/src/modules/Webhooks/dtos/WebhookDeliveryResponse.dto.ts
T
Ahmed Bouhuolia f69b935939 feat(server): add webhooks system
- Add webhooks module with CRUD operations
- Add webhook deliveries with BullMQ queue processing
- Add webhook signature verification service
- Add webhook event subscriber for system events
- Add webhooks migration for webhooks and webhook_deliveries tables
- Register WebhooksModule in App module
- Add Webhook ability subject to roles
2026-04-17 14:40:14 +02:00

34 lines
1.3 KiB
TypeScript

import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
export class WebhookDeliveryResponseDto {
@ApiProperty({ description: 'The unique identifier of the delivery log', example: 1 })
id: number;
@ApiProperty({ description: 'ID of the associated webhook', example: 1 })
webhookId: number;
@ApiProperty({ description: 'The event type that was delivered.', example: 'sale_invoice.created' })
eventType: string;
@ApiProperty({ description: 'The payload that was sent.', type: 'object' })
payload: Record<string, any>;
@ApiPropertyOptional({ description: 'HTTP response status code.', example: 200, nullable: true })
responseStatus?: number;
@ApiPropertyOptional({ description: 'HTTP response body.', example: 'OK', nullable: true })
responseBody?: string;
@ApiProperty({ description: 'Number of delivery attempts.', example: 1 })
attemptCount: number;
@ApiPropertyOptional({ description: 'Error message if delivery failed.', example: 'Connection timeout', nullable: true })
errorMessage?: string;
@ApiPropertyOptional({ description: 'Timestamp when the delivery succeeded.', example: '2024-01-01T00:00:00.000Z', nullable: true })
deliveredAt?: string;
@ApiProperty({ description: 'Creation timestamp.', example: '2024-01-01T00:00:00.000Z' })
createdAt: string;
}