"""The verified-webhook DTO returned by a :class:`WebhookVerifier`.

Vendor-neutral: ``event_type`` + a provider-issued unique ``event_id``
(for idempotent dedup) + the raw ``payload`` dict + ``received_at``.
Frozen (rule DP-03); ``received_at`` is UTC (rule DP-12).
"""

from __future__ import annotations

from dataclasses import dataclass
from typing import TYPE_CHECKING

if TYPE_CHECKING:
    from datetime import datetime

__all__ = ["WebhookEvent"]


@dataclass(frozen=True, slots=True)
class WebhookEvent:
    """A verified inbound webhook payload from an auth provider."""

    event_type: str
    event_id: str
    payload: dict[str, object]
    received_at: datetime
