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

from __future__ import annotations
from .donation_input import DonationInput, DonationInputTypedDict
from enum import Enum
from polar_sdk.types import BaseModel
import pydantic
from typing import Final, TypedDict
from typing_extensions import Annotated


class WebhookDonationCreatedPayloadType(str, Enum):
    DONATION_CREATED = "donation.created"


class WebhookDonationCreatedPayloadTypedDict(TypedDict):
    r"""Sent when a new donation is created.

    **Discord & Slack support:** Full
    """

    data: DonationInputTypedDict
    type: WebhookDonationCreatedPayloadType


class WebhookDonationCreatedPayload(BaseModel):
    r"""Sent when a new donation is created.

    **Discord & Slack support:** Full
    """

    data: DonationInput

    # fmt: off
    TYPE: Annotated[Final[WebhookDonationCreatedPayloadType], pydantic.Field(alias="type")] = WebhookDonationCreatedPayloadType.DONATION_CREATED # type: ignore
    # fmt: on
