2026-05-12 00:53:57 +08:00
|
|
|
from __future__ import annotations
|
|
|
|
|
|
|
|
|
|
from typing import TYPE_CHECKING, Protocol, runtime_checkable
|
|
|
|
|
|
|
|
|
|
if TYPE_CHECKING:
|
|
|
|
|
from yuxi.channels.models import HealthStatus
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@runtime_checkable
|
|
|
|
|
class ChannelGatewayProtocol(Protocol):
|
|
|
|
|
async def connect(self) -> None: ...
|
|
|
|
|
|
|
|
|
|
async def disconnect(self) -> None: ...
|
|
|
|
|
|
|
|
|
|
async def health_check(self) -> HealthStatus: ...
|
|
|
|
|
|
|
|
|
|
async def pre_connect(self) -> dict: ...
|
|
|
|
|
|
|
|
|
|
async def logout_account(self, ctx) -> None: ...
|
|
|
|
|
|
|
|
|
|
async def login_with_qr_start(self, force: bool, timeout_ms: int) -> str: ...
|
2026-05-14 02:08:36 +08:00
|
|
|
|
|
|
|
|
async def login_with_qr_check(self, session_id: str) -> dict: ...
|