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

from __future__ import annotations
from .activitynotificationjobresponsedto import (
    ActivityNotificationJobResponseDto,
    ActivityNotificationJobResponseDtoTypedDict,
)
from .activitynotificationsubscriberresponsedto import (
    ActivityNotificationSubscriberResponseDto,
    ActivityNotificationSubscriberResponseDtoTypedDict,
)
from .activitynotificationtemplateresponsedto import (
    ActivityNotificationTemplateResponseDto,
    ActivityNotificationTemplateResponseDtoTypedDict,
)
from .activitytopicdto import ActivityTopicDto, ActivityTopicDtoTypedDict
from .severitylevelenum import SeverityLevelEnum
from .steptypeenum import StepTypeEnum
from novu_py.types import BaseModel
import pydantic
from typing import Any, Dict, List, Optional
from typing_extensions import Annotated, NotRequired, TypedDict


class ActivityNotificationResponseDtoTypedDict(TypedDict):
    environment_id: str
    r"""Environment ID of the notification"""
    organization_id: str
    r"""Organization ID of the notification"""
    subscriber_id: str
    r"""Subscriber ID of the notification"""
    transaction_id: str
    r"""Transaction ID of the notification"""
    id: NotRequired[str]
    r"""Unique identifier of the notification"""
    template_id: NotRequired[str]
    r"""Template ID of the notification"""
    digested_notification_id: NotRequired[str]
    r"""Digested Notification ID"""
    created_at: NotRequired[str]
    r"""Creation time of the notification"""
    updated_at: NotRequired[str]
    r"""Last updated time of the notification"""
    channels: NotRequired[List[StepTypeEnum]]
    subscriber: NotRequired[ActivityNotificationSubscriberResponseDtoTypedDict]
    r"""Subscriber of the notification"""
    template: NotRequired[ActivityNotificationTemplateResponseDtoTypedDict]
    r"""Template of the notification"""
    jobs: NotRequired[List[ActivityNotificationJobResponseDtoTypedDict]]
    r"""Jobs of the notification"""
    payload: NotRequired[Dict[str, Any]]
    r"""Payload of the notification"""
    tags: NotRequired[List[str]]
    r"""Tags associated with the notification"""
    controls: NotRequired[Dict[str, Any]]
    r"""Controls associated with the notification"""
    to: NotRequired[Dict[str, Any]]
    r"""To field for subscriber definition"""
    topics: NotRequired[List[ActivityTopicDtoTypedDict]]
    r"""Topics of the notification"""
    severity: NotRequired[SeverityLevelEnum]
    r"""Severity of the workflow"""
    critical: NotRequired[bool]
    r"""Criticality of the notification"""
    context_keys: NotRequired[List[str]]
    r"""Context (single or multi) in which the notification was sent"""


class ActivityNotificationResponseDto(BaseModel):
    environment_id: Annotated[str, pydantic.Field(alias="_environmentId")]
    r"""Environment ID of the notification"""

    organization_id: Annotated[str, pydantic.Field(alias="_organizationId")]
    r"""Organization ID of the notification"""

    subscriber_id: Annotated[str, pydantic.Field(alias="_subscriberId")]
    r"""Subscriber ID of the notification"""

    transaction_id: Annotated[str, pydantic.Field(alias="transactionId")]
    r"""Transaction ID of the notification"""

    id: Annotated[Optional[str], pydantic.Field(alias="_id")] = None
    r"""Unique identifier of the notification"""

    template_id: Annotated[Optional[str], pydantic.Field(alias="_templateId")] = None
    r"""Template ID of the notification"""

    digested_notification_id: Annotated[
        Optional[str], pydantic.Field(alias="_digestedNotificationId")
    ] = None
    r"""Digested Notification ID"""

    created_at: Annotated[Optional[str], pydantic.Field(alias="createdAt")] = None
    r"""Creation time of the notification"""

    updated_at: Annotated[Optional[str], pydantic.Field(alias="updatedAt")] = None
    r"""Last updated time of the notification"""

    channels: Optional[List[StepTypeEnum]] = None

    subscriber: Optional[ActivityNotificationSubscriberResponseDto] = None
    r"""Subscriber of the notification"""

    template: Optional[ActivityNotificationTemplateResponseDto] = None
    r"""Template of the notification"""

    jobs: Optional[List[ActivityNotificationJobResponseDto]] = None
    r"""Jobs of the notification"""

    payload: Optional[Dict[str, Any]] = None
    r"""Payload of the notification"""

    tags: Optional[List[str]] = None
    r"""Tags associated with the notification"""

    controls: Optional[Dict[str, Any]] = None
    r"""Controls associated with the notification"""

    to: Optional[Dict[str, Any]] = None
    r"""To field for subscriber definition"""

    topics: Optional[List[ActivityTopicDto]] = None
    r"""Topics of the notification"""

    severity: Optional[SeverityLevelEnum] = None
    r"""Severity of the workflow"""

    critical: Optional[bool] = None
    r"""Criticality of the notification"""

    context_keys: Annotated[
        Optional[List[str]], pydantic.Field(alias="contextKeys")
    ] = None
    r"""Context (single or multi) in which the notification was sent"""
