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

from __future__ import annotations
from .postpassthroughtoolapirequestbody import (
    PostPassthroughToolAPIRequestBody,
    PostPassthroughToolAPIRequestBodyTypedDict,
)
from kombo.types import BaseModel
from kombo.utils import (
    FieldMetadata,
    HeaderMetadata,
    PathParamMetadata,
    RequestMetadata,
)
import pydantic
from typing import Optional
from typing_extensions import Annotated, NotRequired, TypedDict


class PostPassthroughToolAPIGlobalsTypedDict(TypedDict):
    integration_id: NotRequired[str]
    r"""ID of the integration you want to interact with."""


class PostPassthroughToolAPIGlobals(BaseModel):
    integration_id: Annotated[
        Optional[str],
        pydantic.Field(alias="X-Integration-Id"),
        FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
    ] = None
    r"""ID of the integration you want to interact with."""


class PostPassthroughToolAPIRequestTypedDict(TypedDict):
    tool: str
    r"""The ID of the tool whose passthrough API you want to call (e.g., `personio`)."""
    api: str
    r"""The ID of the passthrough API you want to call (some tools provide multiple). Check the endpoint description for a list of all available APIs."""
    body: PostPassthroughToolAPIRequestBodyTypedDict
    r"""POST /passthrough/:tool/:api Request body"""


class PostPassthroughToolAPIRequest(BaseModel):
    tool: Annotated[
        str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
    ]
    r"""The ID of the tool whose passthrough API you want to call (e.g., `personio`)."""

    api: Annotated[
        str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
    ]
    r"""The ID of the passthrough API you want to call (some tools provide multiple). Check the endpoint description for a list of all available APIs."""

    body: Annotated[
        PostPassthroughToolAPIRequestBody,
        FieldMetadata(request=RequestMetadata(media_type="application/json")),
    ]
    r"""POST /passthrough/:tool/:api Request body"""
