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.

Feature: Notification Scenarios

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>

Relationships

Dependents (1)

Components that depend on this component

Related Data Entities (1)

Data entities managed by this component