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

from __future__ import annotations
from .updateworkflowdto import UpdateWorkflowDto, UpdateWorkflowDtoTypedDict
from .workflowresponsedto import WorkflowResponseDto, WorkflowResponseDtoTypedDict
from novu_py.types import BaseModel
from novu_py.utils import (
    FieldMetadata,
    HeaderMetadata,
    PathParamMetadata,
    RequestMetadata,
)
import pydantic
from typing import Dict, List, Optional
from typing_extensions import Annotated, NotRequired, TypedDict


class WorkflowControllerUpdateRequestTypedDict(TypedDict):
    workflow_id: str
    update_workflow_dto: UpdateWorkflowDtoTypedDict
    r"""Workflow update details"""
    idempotency_key: NotRequired[str]
    r"""A header for idempotency purposes"""


class WorkflowControllerUpdateRequest(BaseModel):
    workflow_id: Annotated[
        str,
        pydantic.Field(alias="workflowId"),
        FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
    ]

    update_workflow_dto: Annotated[
        UpdateWorkflowDto,
        FieldMetadata(request=RequestMetadata(media_type="application/json")),
    ]
    r"""Workflow update details"""

    idempotency_key: Annotated[
        Optional[str],
        pydantic.Field(alias="idempotency-key"),
        FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
    ] = None
    r"""A header for idempotency purposes"""


class WorkflowControllerUpdateResponseTypedDict(TypedDict):
    headers: Dict[str, List[str]]
    result: WorkflowResponseDtoTypedDict


class WorkflowControllerUpdateResponse(BaseModel):
    headers: Dict[str, List[str]]

    result: WorkflowResponseDto
