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

from __future__ import annotations
from novu_py.types import BaseModel
from novu_py.utils import (
    FieldMetadata,
    HeaderMetadata,
    PathParamMetadata,
    RequestMetadata,
)
import pydantic
from typing import Any, Optional
from typing_extensions import Annotated, NotRequired, TypedDict


class InboundWebhooksControllerHandleWebhookRequestTypedDict(TypedDict):
    environment_id: str
    r"""The environment identifier"""
    integration_id: str
    r"""The integration identifier for the delivery provider"""
    request_body: Any
    r"""Webhook event payload from the delivery provider"""
    idempotency_key: NotRequired[str]
    r"""A header for idempotency purposes"""


class InboundWebhooksControllerHandleWebhookRequest(BaseModel):
    environment_id: Annotated[
        str,
        pydantic.Field(alias="environmentId"),
        FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
    ]
    r"""The environment identifier"""

    integration_id: Annotated[
        str,
        pydantic.Field(alias="integrationId"),
        FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
    ]
    r"""The integration identifier for the delivery provider"""

    request_body: Annotated[
        Any, FieldMetadata(request=RequestMetadata(media_type="application/json"))
    ]
    r"""Webhook event payload from the delivery provider"""

    idempotency_key: Annotated[
        Optional[str],
        pydantic.Field(alias="idempotency-key"),
        FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
    ] = None
    r"""A header for idempotency purposes"""
