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

from __future__ import annotations
from .v3_webforms_webformresponse import (
    V3WebformsWebformResponse,
    V3WebformsWebformResponseTypedDict,
)
from squadcast_sdk.types import BaseModel
from squadcast_sdk.utils import FieldMetadata, QueryParamMetadata
from typing import Callable, List, Optional
from typing_extensions import Annotated, NotRequired, TypedDict


class WebformsGetAllWebformsRequestTypedDict(TypedDict):
    owner_id: str
    page_number: NotRequired[int]
    page_size: NotRequired[int]


class WebformsGetAllWebformsRequest(BaseModel):
    owner_id: Annotated[
        str, FieldMetadata(query=QueryParamMetadata(style="form", explode=False))
    ]

    page_number: Annotated[
        Optional[int],
        FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
    ] = None

    page_size: Annotated[
        Optional[int],
        FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
    ] = None


class WebformsGetAllWebformsMetaTypedDict(TypedDict):
    total_count: int


class WebformsGetAllWebformsMeta(BaseModel):
    total_count: int


class WebformsGetAllWebformsResponseBodyTypedDict(TypedDict):
    r"""The request has succeeded."""

    data: List[V3WebformsWebformResponseTypedDict]
    meta: WebformsGetAllWebformsMetaTypedDict


class WebformsGetAllWebformsResponseBody(BaseModel):
    r"""The request has succeeded."""

    data: List[V3WebformsWebformResponse]

    meta: WebformsGetAllWebformsMeta


class WebformsGetAllWebformsResponseTypedDict(TypedDict):
    result: WebformsGetAllWebformsResponseBodyTypedDict


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

    result: WebformsGetAllWebformsResponseBody
