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

from __future__ import annotations
from .thread import Thread, ThreadTypedDict
from attio.types import BaseModel
from attio.utils import FieldMetadata, QueryParamMetadata
from typing import List, Optional
from typing_extensions import Annotated, NotRequired, TypedDict


class GetV2ThreadsRequestTypedDict(TypedDict):
    record_id: NotRequired[str]
    object: NotRequired[str]
    entry_id: NotRequired[str]
    list: NotRequired[str]
    limit: NotRequired[int]
    offset: NotRequired[int]


class GetV2ThreadsRequest(BaseModel):
    record_id: Annotated[
        Optional[str],
        FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
    ] = None

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

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

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

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

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


class GetV2ThreadsResponseTypedDict(TypedDict):
    r"""Success"""

    data: List[ThreadTypedDict]


class GetV2ThreadsResponse(BaseModel):
    r"""Success"""

    data: List[Thread]
