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

from __future__ import annotations
from .updatesubscriberpreferencerequestdto import (
    UpdateSubscriberPreferenceRequestDto,
    UpdateSubscriberPreferenceRequestDtoTypedDict,
)
from .updatesubscriberpreferenceresponsedto import (
    UpdateSubscriberPreferenceResponseDto,
    UpdateSubscriberPreferenceResponseDtoTypedDict,
)
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 SubscribersV1ControllerUpdateSubscriberPreferenceRequestTypedDict(TypedDict):
    subscriber_id: str
    workflow_id: str
    update_subscriber_preference_request_dto: (
        UpdateSubscriberPreferenceRequestDtoTypedDict
    )
    idempotency_key: NotRequired[str]
    r"""A header for idempotency purposes"""


class SubscribersV1ControllerUpdateSubscriberPreferenceRequest(BaseModel):
    subscriber_id: Annotated[
        str,
        pydantic.Field(alias="subscriberId"),
        FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
    ]

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

    update_subscriber_preference_request_dto: Annotated[
        UpdateSubscriberPreferenceRequestDto,
        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 SubscribersV1ControllerUpdateSubscriberPreferenceResponseTypedDict(TypedDict):
    headers: Dict[str, List[str]]
    result: UpdateSubscriberPreferenceResponseDtoTypedDict


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

    result: UpdateSubscriberPreferenceResponseDto
