Coverage for src/lexigram/notification/push/events.py: 0%

13 statements  

« prev     ^ index     » next       coverage.py v7.15.4, created at 2026-08-26 02:26 +0800

1"""Domain events for lexigram-notification push submodule. 

2 

3Emitted when push notification operations complete. Consumed by 

4analytics, delivery tracking, and device management systems. 

5""" 

6 

7from __future__ import annotations 

8 

9from dataclasses import dataclass 

10 

11from lexigram.contracts.domain.events import DomainEvent 

12 

13__all__ = [ 

14 "PushNotificationFailedEvent", 

15 "PushNotificationSentEvent", 

16] 

17 

18 

19@dataclass(frozen=True, init=False) 

20class PushNotificationSentEvent(DomainEvent): 

21 """Emitted when a push notification is successfully dispatched. 

22 

23 Consumed by: analytics, delivery tracking. 

24 """ 

25 

26 device_token: str 

27 platform: str 

28 

29 

30@dataclass(frozen=True, init=False) 

31class PushNotificationFailedEvent(DomainEvent): 

32 """Emitted when a push notification dispatch fails. 

33 

34 Consumed by: device management, retry logic, audit. 

35 """ 

36 

37 device_token: str 

38 platform: str 

39 reason: str