Notification Rule Registry
Component Detail
Service Layer
medium complexity
backend
0
Dependencies
1
Dependents
0
Entities
0
Integrations
Description
Maintains the central, authoritative list of all notification rule definitions. Each rule is a typed TypeScript object specifying event_type, a condition predicate (query or function), a recipient_resolver, delivery channel (push, email, sms, or all), template_id, and cooldown_hours. New notification scenarios are added as configuration entries in the registry array, requiring no changes to the delivery infrastructure.
notification-rule-registry
Responsibilities
- Maintain the typed registry array of all active notification rule definitions
- Validate rule definitions at registration time against the NotificationRule interface
- Support retrieval of rules filtered by event type or delivery channel
- Expose a clear extension point so new org-specific scenarios are config additions, not code changes
Interfaces
registerRule(rule: NotificationRule)
getAllRules()
getRulesByEventType(eventType: string)
getRulesByChannel(channel: NotificationChannel)
getRuleById(ruleId: string)
validateRule(rule: NotificationRule)
unregisterRule(ruleId: string)