# This file was auto-generated by Fern from our API Definition.

import datetime as dt
import typing

import typing_extensions
from ..core.serialization import FieldMetadata
from ..types.webhook_subscription_event_type import WebhookSubscriptionEventType
from ..types.webhook_subscription_resource_type import WebhookSubscriptionResourceType


class WebhookSubscriptionParams(typing_extensions.TypedDict):
    object: typing.Literal["webhook_subscription"]
    id: str
    """
    Unique identifier for the webhook subscription.
    """

    webhook_endpoint_id: typing_extensions.Annotated[str, FieldMetadata(alias="webhookEndpointId")]
    """
    The ID of the webhook endpoint this subscription belongs to.
    """

    resource_type: typing_extensions.Annotated[WebhookSubscriptionResourceType, FieldMetadata(alias="resourceType")]
    resource_id: typing_extensions.Annotated[str, FieldMetadata(alias="resourceId")]
    """
    The ID of the resource this subscription is scoped to (e.g., an extractor, classifier, splitter, or workflow).
    """

    enabled_events: typing_extensions.Annotated[
        typing.Sequence[WebhookSubscriptionEventType], FieldMetadata(alias="enabledEvents")
    ]
    """
    The list of event types this subscription is subscribed to. The valid event types depend on the `resourceType`.
    """

    created_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="createdAt")]
    """
    The date and time the webhook subscription was created.
    """
