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

from __future__ import annotations
from enum import Enum
from novu_py.types import BaseModel
import pydantic
from typing import Optional
from typing_extensions import Annotated, NotRequired, TypedDict


class Status(str, Enum):
    r"""Status of the event"""

    OPENED = "opened"
    REJECTED = "rejected"
    SENT = "sent"
    DEFERRED = "deferred"
    DELIVERED = "delivered"
    BOUNCED = "bounced"
    DROPPED = "dropped"
    CLICKED = "clicked"
    BLOCKED = "blocked"
    SPAM = "spam"
    UNSUBSCRIBED = "unsubscribed"
    DELAYED = "delayed"
    COMPLAINT = "complaint"
    CREATED = "created"
    ACCEPTED = "accepted"
    QUEUED = "queued"
    SENDING = "sending"
    FAILED = "failed"
    UNDELIVERED = "undelivered"
    DISMISSED = "dismissed"


class EventBodyTypedDict(TypedDict):
    status: Status
    r"""Status of the event"""
    date_: str
    r"""Date of the event"""
    external_id: NotRequired[str]
    r"""External ID from the provider"""
    attempts: NotRequired[float]
    r"""Number of attempts"""
    response: NotRequired[str]
    r"""Response from the provider"""
    row: NotRequired[str]
    r"""Raw content from the provider webhook"""


class EventBody(BaseModel):
    status: Status
    r"""Status of the event"""

    date_: Annotated[str, pydantic.Field(alias="date")]
    r"""Date of the event"""

    external_id: Annotated[Optional[str], pydantic.Field(alias="externalId")] = None
    r"""External ID from the provider"""

    attempts: Optional[float] = None
    r"""Number of attempts"""

    response: Optional[str] = None
    r"""Response from the provider"""

    row: Optional[str] = None
    r"""Raw content from the provider webhook"""
