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

from __future__ import annotations
from .subscriberresponsedto import SubscriberResponseDto, SubscriberResponseDtoTypedDict
from novu_py.types import BaseModel
from novu_py.utils import FieldMetadata, HeaderMetadata, QueryParamMetadata
import pydantic
from typing import Callable, Dict, List, Optional
from typing_extensions import Annotated, NotRequired, TypedDict


class SubscribersV1ControllerListSubscribersRequestTypedDict(TypedDict):
    page: NotRequired[float]
    limit: NotRequired[float]
    idempotency_key: NotRequired[str]
    r"""A header for idempotency purposes"""


class SubscribersV1ControllerListSubscribersRequest(BaseModel):
    page: Annotated[
        Optional[float],
        FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
    ] = None

    limit: Annotated[
        Optional[float],
        FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
    ] = 10

    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 SubscribersV1ControllerListSubscribersResponseBodyTypedDict(TypedDict):
    page: float
    r"""The current page of the paginated response"""
    has_more: bool
    r"""Does the list have more items to fetch"""
    page_size: float
    r"""Number of items on each page"""
    data: List[SubscriberResponseDtoTypedDict]


class SubscribersV1ControllerListSubscribersResponseBody(BaseModel):
    page: float
    r"""The current page of the paginated response"""

    has_more: Annotated[bool, pydantic.Field(alias="hasMore")]
    r"""Does the list have more items to fetch"""

    page_size: Annotated[float, pydantic.Field(alias="pageSize")]
    r"""Number of items on each page"""

    data: List[SubscriberResponseDto]


class SubscribersV1ControllerListSubscribersResponseTypedDict(TypedDict):
    headers: Dict[str, List[str]]
    result: SubscribersV1ControllerListSubscribersResponseBodyTypedDict


class SubscribersV1ControllerListSubscribersResponse(BaseModel):
    next: Callable[[], Optional[SubscribersV1ControllerListSubscribersResponse]]

    headers: Dict[str, List[str]]

    result: SubscribersV1ControllerListSubscribersResponseBody
