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

from __future__ import annotations
from .getcontextresponsedto import GetContextResponseDto, GetContextResponseDtoTypedDict
from .updatecontextrequestdto import (
    UpdateContextRequestDto,
    UpdateContextRequestDtoTypedDict,
)
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 ContextsControllerUpdateContextRequestTypedDict(TypedDict):
    id: str
    r"""Context ID"""
    type: str
    r"""Context type"""
    update_context_request_dto: UpdateContextRequestDtoTypedDict
    idempotency_key: NotRequired[str]
    r"""A header for idempotency purposes"""


class ContextsControllerUpdateContextRequest(BaseModel):
    id: Annotated[
        str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
    ]
    r"""Context ID"""

    type: Annotated[
        str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
    ]
    r"""Context type"""

    update_context_request_dto: Annotated[
        UpdateContextRequestDto,
        FieldMetadata(request=RequestMetadata(media_type="application/json")),
    ]

    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 ContextsControllerUpdateContextResponseTypedDict(TypedDict):
    headers: Dict[str, List[str]]
    result: GetContextResponseDtoTypedDict


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

    result: GetContextResponseDto
