"""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 Any, Dict, Optional
from typing_extensions import Annotated, NotRequired, TypedDict


class EditorType(str, Enum):
    r"""Type of editor to use for the body."""

    BLOCK = "block"
    HTML = "html"


class EmailControlDtoTypedDict(TypedDict):
    subject: str
    r"""Subject of the email."""
    skip: NotRequired[Dict[str, Any]]
    r"""JSONLogic filter conditions for conditionally skipping the step execution. Supports complex logical operations with AND, OR, and comparison operators. See https://jsonlogic.com/ for full typing reference."""
    body: NotRequired[str]
    r"""Body content of the email, either a valid Maily JSON object, or html string."""
    editor_type: NotRequired[EditorType]
    r"""Type of editor to use for the body."""
    disable_output_sanitization: NotRequired[bool]
    r"""Disable sanitization of the output."""


class EmailControlDto(BaseModel):
    subject: str
    r"""Subject of the email."""

    skip: Optional[Dict[str, Any]] = None
    r"""JSONLogic filter conditions for conditionally skipping the step execution. Supports complex logical operations with AND, OR, and comparison operators. See https://jsonlogic.com/ for full typing reference."""

    body: Optional[str] = ""
    r"""Body content of the email, either a valid Maily JSON object, or html string."""

    editor_type: Annotated[Optional[EditorType], pydantic.Field(alias="editorType")] = (
        EditorType.BLOCK
    )
    r"""Type of editor to use for the body."""

    disable_output_sanitization: Annotated[
        Optional[bool], pydantic.Field(alias="disableOutputSanitization")
    ] = False
    r"""Disable sanitization of the output."""
