"""StaxContext passed to automation handlers: raw_event, module_id, cx and ta API clients."""

from __future__ import annotations

from typing import Any

from pydantic import BaseModel


class StaxContext(BaseModel):
    """Context for automation handlers. module_id from STAX_MODULE_ID; cx/ta use inject_headers."""

    raw_event: dict[str, Any]
    module_id: str
    cx: Any  # stax_sdk.cx.Client or stax_sdk.cx.AsyncClient
    ta: Any  # stax_sdk.ta.Client or stax_sdk.ta.AsyncClient

    model_config = {"arbitrary_types_allowed": True}
