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

from __future__ import annotations
from .notificationgroup import NotificationGroup, NotificationGroupTypedDict
from .notificationstepdto import NotificationStepDto, NotificationStepDtoTypedDict
from .notificationtrigger import NotificationTrigger, NotificationTriggerTypedDict
from .subscriberpreferencechannels import (
    SubscriberPreferenceChannels,
    SubscriberPreferenceChannelsTypedDict,
)
from novu_py.types import BaseModel
import pydantic
from typing import List, Optional
from typing_extensions import Annotated, NotRequired, TypedDict


class WorkflowResponseDataTypedDict(TypedDict):
    pass


class WorkflowResponseData(BaseModel):
    pass


class WorkflowIntegrationStatusTypedDict(TypedDict):
    pass


class WorkflowIntegrationStatus(BaseModel):
    pass


class WorkflowResponseTypedDict(TypedDict):
    name: str
    description: str
    active: bool
    draft: bool
    preference_settings: SubscriberPreferenceChannelsTypedDict
    critical: bool
    tags: List[str]
    steps: List[NotificationStepDtoTypedDict]
    organization_id: str
    creator_id: str
    environment_id: str
    triggers: List[NotificationTriggerTypedDict]
    notification_group_id: str
    deleted: bool
    deleted_at: str
    deleted_by: str
    id: NotRequired[str]
    parent_id: NotRequired[str]
    notification_group: NotRequired[NotificationGroupTypedDict]
    data: NotRequired[WorkflowResponseDataTypedDict]
    workflow_integration_status: NotRequired[WorkflowIntegrationStatusTypedDict]


class WorkflowResponse(BaseModel):
    name: str

    description: str

    active: bool

    draft: bool

    preference_settings: Annotated[
        SubscriberPreferenceChannels, pydantic.Field(alias="preferenceSettings")
    ]

    critical: bool

    tags: List[str]

    steps: List[NotificationStepDto]

    organization_id: Annotated[str, pydantic.Field(alias="_organizationId")]

    creator_id: Annotated[str, pydantic.Field(alias="_creatorId")]

    environment_id: Annotated[str, pydantic.Field(alias="_environmentId")]

    triggers: List[NotificationTrigger]

    notification_group_id: Annotated[str, pydantic.Field(alias="_notificationGroupId")]

    deleted: bool

    deleted_at: Annotated[str, pydantic.Field(alias="deletedAt")]

    deleted_by: Annotated[str, pydantic.Field(alias="deletedBy")]

    id: Annotated[Optional[str], pydantic.Field(alias="_id")] = None

    parent_id: Annotated[Optional[str], pydantic.Field(alias="_parentId")] = None

    notification_group: Annotated[
        Optional[NotificationGroup], pydantic.Field(alias="notificationGroup")
    ] = None

    data: Optional[WorkflowResponseData] = None

    workflow_integration_status: Annotated[
        Optional[WorkflowIntegrationStatus],
        pydantic.Field(alias="workflowIntegrationStatus"),
    ] = None
