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

from __future__ import annotations
from novu_py.types import BaseModel
import pydantic
from typing import Any, Dict, Optional
from typing_extensions import Annotated, NotRequired, TypedDict


class WorkflowPreferenceRequestDtoTypedDict(TypedDict):
    workflow_id: str
    r"""The workflow identifier"""
    enabled: NotRequired[bool]
    r"""Whether the preference is enabled. Used when condition is not provided."""
    condition: NotRequired[Dict[str, Any]]
    r"""Optional condition using JSON Logic rules"""


class WorkflowPreferenceRequestDto(BaseModel):
    workflow_id: Annotated[str, pydantic.Field(alias="workflowId")]
    r"""The workflow identifier"""

    enabled: Optional[bool] = None
    r"""Whether the preference is enabled. Used when condition is not provided."""

    condition: Optional[Dict[str, Any]] = None
    r"""Optional condition using JSON Logic rules"""
