from .const import DOMAIN as DOMAIN, EVENT_KEY as EVENT_KEY, JSON_PAYLOAD as JSON_PAYLOAD, LOGGER as LOGGER, REGISTERED_NOTIFICATIONS as REGISTERED_NOTIFICATIONS
from .coordinator import OverseerrConfigEntry as OverseerrConfigEntry, OverseerrCoordinator as OverseerrCoordinator
from .services import async_setup_services as async_setup_services
from _typeshed import Incomplete
from aiohttp.web_request import Request as Request
from aiohttp.web_response import Response as Response
from homeassistant.components import cloud as cloud
from homeassistant.components.webhook import async_generate_url as async_generate_url, async_register as async_register, async_unregister as async_unregister
from homeassistant.const import CONF_WEBHOOK_ID as CONF_WEBHOOK_ID, Platform as Platform
from homeassistant.core import HomeAssistant as HomeAssistant
from homeassistant.helpers.dispatcher import async_dispatcher_send as async_dispatcher_send
from homeassistant.helpers.http import HomeAssistantView as HomeAssistantView
from homeassistant.helpers.typing import ConfigType as ConfigType

PLATFORMS: list[Platform]
CONF_CLOUDHOOK_URL: str
CONFIG_SCHEMA: Incomplete

async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: ...
async def async_setup_entry(hass: HomeAssistant, entry: OverseerrConfigEntry) -> bool: ...
async def async_unload_entry(hass: HomeAssistant, entry: OverseerrConfigEntry) -> bool: ...
async def async_remove_entry(hass: HomeAssistant, entry: OverseerrConfigEntry) -> None: ...

class OverseerrWebhookManager:
    hass: Incomplete
    entry: Incomplete
    client: Incomplete
    def __init__(self, hass: HomeAssistant, entry: OverseerrConfigEntry) -> None: ...
    @property
    def webhook_urls(self) -> list[str]: ...
    async def register_webhook(self) -> None: ...
    async def check_need_change(self) -> bool: ...
    async def test_and_set_webhook(self, url: str) -> bool: ...
    async def handle_webhook(self, hass: HomeAssistant, webhook_id: str, request: Request) -> Response: ...
    async def unregister_webhook(self) -> None: ...

async def _async_cloudhook_generate_url(hass: HomeAssistant, entry: OverseerrConfigEntry) -> str: ...
