from collections.abc import Callable, Coroutine
from dataclasses import dataclass
from typing import Any, TypeAlias

SendFn: TypeAlias = Callable[..., None]
AsyncSendFn: TypeAlias = Callable[..., Coroutine[Any, Any, None]]


@dataclass
class ProviderSpec:
    """Specification for a messaging provider."""

    name: str
    send: SendFn
    async_send: AsyncSendFn | None = None
    string_key: str | None = None
