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
« prev ^ index » next coverage.py v7.15.4, created at 2026-08-26 02:26 +0800
1"""Domain events for lexigram-notification push submodule.
3Emitted when push notification operations complete. Consumed by
4analytics, delivery tracking, and device management systems.
5"""
7from __future__ import annotations
9from dataclasses import dataclass
11from lexigram.contracts.domain.events import DomainEvent
13__all__ = [
14 "PushNotificationFailedEvent",
15 "PushNotificationSentEvent",
16]
19@dataclass(frozen=True, init=False)
20class PushNotificationSentEvent(DomainEvent):
21 """Emitted when a push notification is successfully dispatched.
23 Consumed by: analytics, delivery tracking.
24 """
26 device_token: str
27 platform: str
30@dataclass(frozen=True, init=False)
31class PushNotificationFailedEvent(DomainEvent):
32 """Emitted when a push notification dispatch fails.
34 Consumed by: device management, retry logic, audit.
35 """
37 device_token: str
38 platform: str
39 reason: str