ForcePilot/backend/package/yuxi/channels/protocols/status.py

27 lines
833 B
Python
Raw Normal View History

from __future__ import annotations
from typing import TYPE_CHECKING, Any, Protocol, runtime_checkable
if TYPE_CHECKING:
from yuxi.channels.models import ChannelAccountSnapshot
@runtime_checkable
class ChannelStatusProtocol(Protocol):
def snapshot(self) -> dict[str, Any]: ...
@property
def status(self) -> str: ...
async def probe_account(self, account: dict, timeout_ms: int) -> dict: ...
async def build_account_snapshot(self, account: dict, probe: dict) -> ChannelAccountSnapshot: ...
def build_channel_summary(self, account: dict, snapshot: dict) -> dict: ...
async def audit_account(self, account: dict, timeout_ms: int) -> dict: ...
def resolve_account_state(self, configured: bool, enabled: bool) -> str: ...
def collect_status_issues(self, accounts: list) -> list[str]: ...