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

from __future__ import annotations
from apideck_unify.types import BaseModel
from typing import List, Optional
from typing_extensions import NotRequired, TypedDict


class WebhookSubscriptionTypedDict(TypedDict):
    downstream_id: NotRequired[str]
    r"""The ID of the downstream service"""
    unify_event_types: NotRequired[List[str]]
    r"""The list of Unify Events this connection is subscribed to"""
    downstream_event_types: NotRequired[List[str]]
    r"""The list of downstream Events this connection is subscribed to"""
    execute_url: NotRequired[str]
    r"""The URL the downstream is sending to when the event is triggered"""
    created_at: NotRequired[str]
    r"""The date and time the webhook subscription was created downstream"""


class WebhookSubscription(BaseModel):
    downstream_id: Optional[str] = None
    r"""The ID of the downstream service"""

    unify_event_types: Optional[List[str]] = None
    r"""The list of Unify Events this connection is subscribed to"""

    downstream_event_types: Optional[List[str]] = None
    r"""The list of downstream Events this connection is subscribed to"""

    execute_url: Optional[str] = None
    r"""The URL the downstream is sending to when the event is triggered"""

    created_at: Optional[str] = None
    r"""The date and time the webhook subscription was created downstream"""
