Implement Monlet MVP stack and UI updates
This commit is contained in:
17
server/monlet_server/services/notifiers/base.py
Normal file
17
server/monlet_server/services/notifiers/base.py
Normal file
@@ -0,0 +1,17 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from dataclasses import dataclass
|
||||
from typing import Protocol
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class DeliveryResult:
|
||||
ok: bool
|
||||
permanent: bool = False
|
||||
error: str | None = None
|
||||
|
||||
|
||||
class Notifier(Protocol):
|
||||
name: str
|
||||
|
||||
async def deliver(self, event_type: str, payload: dict) -> DeliveryResult: ...
|
||||
Reference in New Issue
Block a user