[SKY-6] Backend: Enable 2FA code detection without TOTP credentials (#4786)
This commit is contained in:
21
skyvern/forge/sdk/notification/base.py
Normal file
21
skyvern/forge/sdk/notification/base.py
Normal file
@@ -0,0 +1,21 @@
|
||||
"""Abstract base for notification registries."""
|
||||
|
||||
import asyncio
|
||||
from abc import ABC, abstractmethod
|
||||
|
||||
|
||||
class BaseNotificationRegistry(ABC):
|
||||
"""Abstract pub/sub registry scoped by organization.
|
||||
|
||||
Implementations must fan-out: a single publish call delivers the
|
||||
message to every active subscriber for that organization.
|
||||
"""
|
||||
|
||||
@abstractmethod
|
||||
def subscribe(self, organization_id: str) -> asyncio.Queue[dict]: ...
|
||||
|
||||
@abstractmethod
|
||||
def unsubscribe(self, organization_id: str, queue: asyncio.Queue[dict]) -> None: ...
|
||||
|
||||
@abstractmethod
|
||||
def publish(self, organization_id: str, message: dict) -> None: ...
|
||||
Reference in New Issue
Block a user