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

from __future__ import annotations
from .generatelayoutpreviewresponsedto import (
    GenerateLayoutPreviewResponseDto,
    GenerateLayoutPreviewResponseDtoTypedDict,
)
from .layoutpreviewrequestdto import (
    LayoutPreviewRequestDto,
    LayoutPreviewRequestDtoTypedDict,
)
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 LayoutsControllerGeneratePreviewRequestTypedDict(TypedDict):
    layout_id: str
    layout_preview_request_dto: LayoutPreviewRequestDtoTypedDict
    r"""Layout preview generation details"""
    idempotency_key: NotRequired[str]
    r"""A header for idempotency purposes"""


class LayoutsControllerGeneratePreviewRequest(BaseModel):
    layout_id: Annotated[
        str,
        pydantic.Field(alias="layoutId"),
        FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
    ]

    layout_preview_request_dto: Annotated[
        LayoutPreviewRequestDto,
        FieldMetadata(request=RequestMetadata(media_type="application/json")),
    ]
    r"""Layout preview generation 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 LayoutsControllerGeneratePreviewResponseTypedDict(TypedDict):
    headers: Dict[str, List[str]]
    result: GenerateLayoutPreviewResponseDtoTypedDict


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

    result: GenerateLayoutPreviewResponseDto
