Data Layer medium complexity backend
0
Dependencies
1
Dependents
0
Entities
0
Integrations

Description

Stores and retrieves all configurable scenario records that define notification trigger rules. Each record encodes trigger type (time-based, event-based, state-based), target user roles, message template references, delivery channel priority, and cooldown metadata. Designed for extensibility so new scenarios can be introduced by inserting configuration records without code changes.

Feature: Notification Scenarios

scenario-configuration-repository

Responsibilities

  • Persist scenario configuration records with trigger conditions and channel mappings
  • Retrieve active scenarios filtered by trigger type for targeted engine evaluation
  • Provide CRUD operations for scenario management via admin interfaces
  • Store per-scenario cooldown intervals to prevent notification fatigue
  • Expose scenario-to-channel priority mappings for delivery routing

Interfaces

getActiveScenarios(): Promise<ScenarioConfig[]>
getScenarioById(id: string): Promise<ScenarioConfig | null>
getScenariosByTriggerType(type: TriggerType): Promise<ScenarioConfig[]>
createScenario(scenario: ScenarioConfig): Promise<ScenarioConfig>
updateScenario(id: string, updates: Partial<ScenarioConfig>): Promise<ScenarioConfig>
deleteScenario(id: string): Promise<void>

Relationships

Dependents (1)

Components that depend on this component