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

from __future__ import annotations
from duckyai.types import BaseModel
from duckyai.utils import FieldMetadata, QueryParamMetadata, SecurityMetadata
from typing import Optional
from typing_extensions import Annotated, NotRequired, TypedDict


class ListWebappDocumentsSecurityTypedDict(TypedDict):
    bearer_auth: str


class ListWebappDocumentsSecurity(BaseModel):
    bearer_auth: Annotated[
        str,
        FieldMetadata(
            security=SecurityMetadata(
                scheme=True,
                scheme_type="apiKey",
                sub_type="header",
                field_name="Authorization",
            )
        ),
    ]


class ListWebappDocumentsRequestTypedDict(TypedDict):
    project_id: str
    r"""The ID of the project containing the documents"""
    index_name: str
    r"""The name of the index to list documents from"""
    limit: NotRequired[int]
    r"""Maximum number of documents to return per page"""
    cursor: NotRequired[str]
    r"""Cursor for pagination, obtained from previous response"""


class ListWebappDocumentsRequest(BaseModel):
    project_id: Annotated[
        str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True))
    ]
    r"""The ID of the project containing the documents"""

    index_name: Annotated[
        str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True))
    ]
    r"""The name of the index to list documents from"""

    limit: Annotated[
        Optional[int],
        FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
    ] = None
    r"""Maximum number of documents to return per page"""

    cursor: Annotated[
        Optional[str],
        FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
    ] = None
    r"""Cursor for pagination, obtained from previous response"""
