Notification Execution Log
Component Detail
Data Layer
medium complexity
backend
0
Dependencies
1
Dependents
1
Entities
0
Integrations
Description
Records every notification sent by the rule engine with status, timestamp, rule ID, recipient, and entity reference. Serves as the deduplication store to prevent duplicate sends on idempotent re-runs and provides an audit trail for notification delivery.
notification-execution-log
Responsibilities
- Record each notification dispatch with full context for audit and deduplication
- Provide deduplication lookups by rule, recipient, and entity within a time window
- Track delivery status updates from push and email/SMS services
Interfaces
logExecution(entry: ExecutionLogEntry): Promise<void>
findDuplicate(ruleId: string, userId: string, entityId: string, window: DateRange): Promise<ExecutionLogEntry | null>
updateStatus(notificationId: string, status: DeliveryStatus): Promise<void>
getLogsByRule(ruleId: string, pagination: PaginationParams): Promise<ExecutionLogEntry[]>
getLogsByRecipient(userId: string, pagination: PaginationParams): Promise<ExecutionLogEntry[]>
pruneOldEntries(olderThan: Date): Promise<number>