"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

from __future__ import annotations
from .customerseat import CustomerSeat, CustomerSeatTypedDict
from datetime import datetime
from polar_sdk.types import BaseModel
from polar_sdk.utils import validate_const
import pydantic
from pydantic.functional_validators import AfterValidator
from typing import Literal
from typing_extensions import Annotated, TypedDict


class WebhookCustomerSeatClaimedPayloadTypedDict(TypedDict):
    r"""Sent when a customer seat is claimed.

    This event is triggered when a customer accepts the seat invitation and claims their access.
    """

    timestamp: datetime
    data: CustomerSeatTypedDict
    type: Literal["customer_seat.claimed"]


class WebhookCustomerSeatClaimedPayload(BaseModel):
    r"""Sent when a customer seat is claimed.

    This event is triggered when a customer accepts the seat invitation and claims their access.
    """

    timestamp: datetime

    data: CustomerSeat

    TYPE: Annotated[
        Annotated[
            Literal["customer_seat.claimed"],
            AfterValidator(validate_const("customer_seat.claimed")),
        ],
        pydantic.Field(alias="type"),
    ] = "customer_seat.claimed"
