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

from __future__ import annotations
from enum import Enum
from novu_py.types import BaseModel
import pydantic
from typing import List, Optional
from typing_extensions import Annotated, NotRequired, TypedDict


class TriggerEventResponseDtoStatus(str, Enum):
    r"""Status of the trigger"""

    ERROR = "error"
    TRIGGER_NOT_ACTIVE = "trigger_not_active"
    NO_WORKFLOW_ACTIVE_STEPS_DEFINED = "no_workflow_active_steps_defined"
    NO_WORKFLOW_STEPS_DEFINED = "no_workflow_steps_defined"
    PROCESSED = "processed"
    NO_TENANT_FOUND = "no_tenant_found"
    INVALID_RECIPIENTS = "invalid_recipients"


class JobDataTypedDict(TypedDict):
    pass


class JobData(BaseModel):
    pass


class TriggerEventResponseDtoTypedDict(TypedDict):
    acknowledged: bool
    r"""Indicates whether the trigger was acknowledged or not"""
    status: TriggerEventResponseDtoStatus
    r"""Status of the trigger"""
    error: NotRequired[List[str]]
    r"""In case of an error, this field will contain the error message(s)"""
    transaction_id: NotRequired[str]
    r"""The returned transaction ID of the trigger"""
    job_data: NotRequired[JobDataTypedDict]


class TriggerEventResponseDto(BaseModel):
    acknowledged: bool
    r"""Indicates whether the trigger was acknowledged or not"""

    status: TriggerEventResponseDtoStatus
    r"""Status of the trigger"""

    error: Optional[List[str]] = None
    r"""In case of an error, this field will contain the error message(s)"""

    transaction_id: Annotated[Optional[str], pydantic.Field(alias="transactionId")] = (
        None
    )
    r"""The returned transaction ID of the trigger"""

    job_data: Annotated[Optional[JobData], pydantic.Field(alias="jobData")] = None
