from . import const as const, messages as messages
from homeassistant.core import Context as Context, callback as callback
from homeassistant.exceptions import HomeAssistantError as HomeAssistantError, Unauthorized as Unauthorized
from typing import Any

class ActiveConnection:
    logger: Any = ...
    hass: Any = ...
    send_message: Any = ...
    user: Any = ...
    refresh_token_id: Any = ...
    subscriptions: Any = ...
    last_id: int = ...
    def __init__(self, logger: Any, hass: Any, send_message: Any, user: Any, refresh_token: Any) -> None: ...
    def context(self, msg: Any): ...
    def send_result(self, msg_id: int, result: Union[Any, None]=...) -> None: ...
    async def send_big_result(self, msg_id: Any, result: Any) -> None: ...
    def send_error(self, msg_id: int, code: str, message: str) -> None: ...
    def async_handle(self, msg: Any) -> None: ...
    def async_close(self) -> None: ...
    def async_handle_exception(self, msg: Any, err: Any) -> None: ...
