corvix.notifications.models =========================== .. py:module:: corvix.notifications.models .. autoapi-nested-parse:: Domain event models for notification delivery. Classes ------- .. autoapisummary:: corvix.notifications.models.NotificationEvent corvix.notifications.models.DeliveryResult corvix.notifications.models.DispatchResult Module Contents --------------- .. py:class:: NotificationEvent Canonical event produced when a new unread notification is detected. This is the payload passed to every delivery target. It is deliberately decoupled from the internal ``NotificationRecord`` so targets only depend on this stable interface. .. py:attribute:: event_id :type: str Stable identifier: ``{account_id}:{thread_id}``. .. py:attribute:: thread_id :type: str .. py:attribute:: repository :type: str .. py:attribute:: reason :type: str .. py:attribute:: subject_title :type: str .. py:attribute:: subject_type :type: str .. py:attribute:: web_url :type: str | None .. py:attribute:: updated_at :type: datetime.datetime .. py:attribute:: score :type: float .. py:attribute:: unread :type: bool .. py:attribute:: account_id :type: str :value: 'primary' .. py:class:: DeliveryResult Result of a single target's delivery attempt. .. py:attribute:: target :type: str .. py:attribute:: events_attempted :type: int .. py:attribute:: events_delivered :type: int .. py:attribute:: errors :type: list[str] :value: [] .. py:property:: success :type: bool .. py:class:: DispatchResult Aggregated result of a fan-out dispatch to all enabled targets. .. py:attribute:: events :type: list[NotificationEvent] .. py:attribute:: results :type: list[DeliveryResult] :value: [] .. py:property:: total_delivered :type: int .. py:property:: total_errors :type: int